// GET: Attendance/MonthlyEditor public ActionResult Index() { VMJobCardCreate vmJobCardCreate = new VMJobCardCreate(); vmJobCardCreate = MonthlyEditorService.GetIndex(); ViewBag.PayrolPeriodID = new SelectList(DDService.GetPayrollPeriod().ToList().OrderBy(aa => aa.PRName).ToList(), "PPayrollPeriodID", "PRName"); return(View(vmJobCardCreate)); }
public ActionResult Create3(VMJobCardCreate es, int?[] SelectedEmpIds) { VMLoggedUser LoggedInUser = Session["LoggedInUser"] as VMLoggedUser; JobCardService.PostCreate3(es, SelectedEmpIds, LoggedInUser); //return View(es); return(RedirectToAction("Index")); }
/// <summary> /// Gets the List of OU,Location and Job card types /// </summary> /// <returns></returns> public ActionResult Create1() { VMJobCardCreate vmJobCardCreate = new VMJobCardCreate(); vmJobCardCreate = JobCardService.GetCreate1(); ViewBag.JobCardTypeID = new SelectList(DDService.GetJobCardType().ToList().OrderBy(aa => aa.JobCardName).ToList(), "PJobCardTypeID", "JobCardName"); return(View(vmJobCardCreate)); }
public ActionResult Create1(VMJobCardCreate es, int?[] SelectedCompanyIds, int?[] SelectedOUCommonIds, int?[] SelectedOUIds, int?[] SelectedEmploymentTypeIds, int?[] SelectedLocationIds, int?[] SelectedGradeIds, int?[] SelectedJobTitleIds, int?[] SelectedDesignationIds, int?[] SelectedCrewIds, int?[] SelectedShiftIds) { VMLoggedUser LoggedInUser = Session["LoggedInUser"] as VMLoggedUser; es = JobCardService.GetCreate2(es, SelectedCompanyIds, SelectedOUCommonIds, SelectedOUIds, SelectedEmploymentTypeIds, SelectedLocationIds, SelectedGradeIds, SelectedJobTitleIds, SelectedDesignationIds, SelectedCrewIds, SelectedShiftIds, LoggedInUser); return(View("Create2", es)); }
public VMJobCardCreate GetCreate2(VMJobCardCreate es, int?[] SelectedCompanyIds, int?[] SelectedOUCommonIds, int?[] SelectedOUIds, int?[] SelectedEmploymentTypeIds, int?[] SelectedLocationIds, int?[] SelectedGradeIds, int?[] SelectedJobTitleIds, int?[] SelectedDesignationIds, int?[] SelectedCrewIds, int?[] SelectedShiftIds, VMLoggedUser LoggedInUser) { VMEmpSelection vmEmpSelection = EmpSelectionService.GetStepTwo(SelectedCompanyIds, SelectedOUCommonIds, SelectedOUIds, SelectedEmploymentTypeIds, SelectedLocationIds, SelectedGradeIds, SelectedJobTitleIds, SelectedDesignationIds, SelectedCrewIds, SelectedShiftIds, es.EmpNo, LoggedInUser); es.Criteria = vmEmpSelection.Criteria; es.CriteriaName = vmEmpSelection.CriteriaName; es.EmpNo = vmEmpSelection.EmpNo; es.Employee = vmEmpSelection.Employee; es.JobCardTypeName = DDService.GetJobCardType().Where(aa => aa.PJobCardTypeID == es.JobCardTypeID).First().JobCardName; return(es); }
public void PostCreate3(VMJobCardCreate es, int?[] employeeIds, VMLoggedUser LoggedInUser) { string Message = ""; foreach (var empid in employeeIds) { VHR_EmployeeProfile employee = DDService.GetEmployeeInfo(LoggedInUser).Where(aa => aa.PEmployeeID == empid).First(); Expression <Func <Shift, bool> > SpecificEntries97 = c => c.PShiftID == employee.ShiftID; Shift shifts = ShiftService.GetIndexSpecific(SpecificEntries97).First(); if (shifts.GZDays == true) { List <Holiday> holiday = DDService.GetHolidays().Where(aa => aa.HolidayDate == es.JobDateFrom).ToList(); if (holiday.Count > 0) { Message = "Cannot apply job card of the Gazetted Holiday"; } } Expression <Func <PayrollPeriod, bool> > SpecificEntries96 = c => es.JobDateFrom >= c.PRStartDate && es.JobDateFrom <= c.PREndDate && c.PeriodStageID == "C"; List <PayrollPeriod> dbPayrollPeriods = PayrollPeriodService.GetIndexSpecific(SpecificEntries96).ToList(); if (dbPayrollPeriods.Count() > 0) { Message = "Cannot enter Job card in Closed Payroll Period"; } if (Message == "") { JobCardApp jcApp = new JobCardApp(); jcApp.DateCreated = DateTime.Now; jcApp.DateEnded = es.JobDateTo; jcApp.DateStarted = es.JobDateFrom; jcApp.EmployeeID = empid; jcApp.Minutes = es.TotalMinutes; jcApp.Remarks = es.Remarks; jcApp.JobCardTypeID = es.JobCardTypeID; jcApp.UserID = LoggedInUser.PUserID; JobCardAppRepository.Add(jcApp); JobCardAppRepository.Save(); DDService.ProcessDailyAttendance(jcApp.DateStarted, jcApp.DateEnded, (int)jcApp.EmployeeID, jcApp.EmployeeID.ToString()); DDService.ProcessMonthlyAttendance(jcApp.DateStarted, (int)jcApp.EmployeeID, jcApp.EmployeeID.ToString()); } else { } } }
// public VMJobCardCreate GetCreate1() { VMJobCardCreate obj = new VMJobCardCreate(); return(obj); }
public ServiceMessage PostEdit(VMJobCardCreate obj) { throw new NotImplementedException(); }