add new ajax metod
This commit is contained in:
@@ -167,6 +167,39 @@ public class AutoExtensionModel : PageModel
|
||||
//Correction();
|
||||
}
|
||||
|
||||
public IActionResult GetEmployeesStartedWorkInSelectedPeriod(long workshopId, string startDate)
|
||||
{
|
||||
var start = startDate.ToGeorgianDateTime();
|
||||
var end = ($"{startDate.FindeEndOfMonth()}").ToGeorgianDateTime();
|
||||
var LeftWorkSerchModel = new LeftWorkSearchModel
|
||||
{
|
||||
WorkshopId = workshopId
|
||||
};
|
||||
var leftWorkList = _leftWorkApplication.search(LeftWorkSerchModel);
|
||||
|
||||
if (leftWorkList.Count > 0)
|
||||
{
|
||||
var res = leftWorkList.Where(x => x.StartWorkDateGr <= end && x.StartWorkDateGr > start).ToList();
|
||||
if (res.Count > 0)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
founded = true,
|
||||
leftWorkList = res,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
founded = false,
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
public IActionResult OnGetContractStatus(long employeeId, long workshopId, string employeeName, string workshopname)
|
||||
{
|
||||
var command = new ContractStatusViewModel();
|
||||
|
||||
Reference in New Issue
Block a user