public async Task CheckForPastMonths() { var carWashWorkers = await _carWashWorkers.GetChooseEmployees(); foreach (var item in carWashWorkers) { await AddSalaryArchive(item.id); } }
public async Task <ActionResult> Index(int?adminCarWosh, int?adminDetailing, int?Seller, List <int> chkRow) { if (adminCarWosh != null && adminDetailing != null && Seller != null && chkRow != null) { if (chkRow.Any(x => x == adminCarWosh) != true) { chkRow.Add(adminCarWosh.Value); } if (chkRow.Any(x => x == adminDetailing) != true) { chkRow.Add(adminDetailing.Value); } if (chkRow.Any(x => x == Seller) != true) { chkRow.Add(Seller.Value); } await _services.AddToCurrentShift(adminCarWosh, adminDetailing, Seller, chkRow); return(Redirect("/Order/Index")); } else if (chkRow != null && adminCarWosh == null && adminDetailing == null && Seller == null) { await _services.AddToCurrentShift(chkRow); return(Redirect("/BrigadeForToday/TodayShift")); } else if (adminCarWosh != null || adminDetailing != null || Seller != null) { await _services.AddToCurrentShift(adminCarWosh, adminDetailing, Seller); return(Redirect("/BrigadeForToday/TodayShift")); } var ReirectModel = Mapper.Map <IEnumerable <CarWashWorkersView> >(await _services.GetChooseEmployees()); return(View(ReirectModel)); }