Пример #1
0
        // GET: LeaveYearlyReport
        public ActionResult Index()
        {
            int curentemp = Convert.ToInt32(Session["Empcode"]);

            LeaveYearlyReportWithFilter Record = new LeaveYearlyReportWithFilter();

            Record.EmployeeSelectList    = _leaveEarnedService.GetBrancheEmployeeSelectList(curentemp);
            Record.LeaveYears            = _leaveServices.GetLeaveYearSelectList();
            Record.LeaveYearlyReport     = new List <LeaveYearlyReportDTO>();
            Record.PayrollLeaveDeduction = new List <PayrollLeaveDeductionDTO>();
            return(View("../Leave/LeaveYearlyReport/LeaveYearlyReport", Record));
        }
Пример #2
0
        public ActionResult SelfLeaveYearlyReport()
        {
            LeaveYearlyReportWithFilter Record = new LeaveYearlyReportWithFilter();
            int empCode = Convert.ToInt32(Session["EmpCode"]);

            Record.EmployeeCode = empCode;
            Record.LeaveYearId  = 1;
            Record.LeaveYearId  = _unitOfWork.LeaveYearRepository.All().Where(x => x.YearCurrent == true).Select(x => x.YearId).FirstOrDefault();

            Record.LeaveYears            = _leaveServices.GetLeaveYearSelectList();
            Record.LeaveYearlyReport     = new List <LeaveYearlyReportDTO>();
            Record.PayrollLeaveDeduction = new List <PayrollLeaveDeductionDTO>();
            Record.LeaveYearlyReport     = _leaveServices.GetLeaveYearlyReport(Record);
            return(View(Record));
        }
Пример #3
0
 public ActionResult SelfLeaveYearlyReport(LeaveYearlyReportWithFilter Record)
 {
     Record.LeaveYears            = _leaveServices.GetLeaveYearSelectList();
     Record.LeaveYearlyReport     = new List <LeaveYearlyReportDTO>();
     Record.PayrollLeaveDeduction = new List <PayrollLeaveDeductionDTO>();
     if (ModelState.IsValid)
     {
         Record.LeaveYearlyReport     = _leaveServices.GetLeaveYearlyReport(Record);
         Record.PayrollLeaveDeduction = _leaveServices.GetPayrollLeaveDeduction(Record);
     }
     else
     {
         TempData["Danger"] = "Please fill in the required field";
         return(View(Record));
     }
     return(View(Record));
 }