示例#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));
 }