Esempio n. 1
0
        public ActionResult EmployeePayrollMaster(int id)
        {
            SetupEmployeeMasterProviders prov  = new SetupEmployeeMasterProviders();
            SetupEmployeeMasterModel     model = new SetupEmployeeMasterModel();

            if (GetPayrollCount(id) == false)
            {
                return(RedirectToAction("Index", new { string.Empty, message = "Employee Payroll Already Created. Please Edit Payroll !!" }));
            }
            int designation = HospitalManagementSystem.Utility.GetDesignationOfEmployeeByID(id);

            model.SetupEmployeeMasterModelList = prov.GetDesignationDetail(designation);
            foreach (var item in model.SetupEmployeeMasterModelList)
            {
                model.BasicSalary   = item.BasicSalary;
                model.GradeRate     = item.GradeRate;
                model.CITAmount     = item.CITAmount;
                model.CITPercentage = item.CITPercentage;
            }
            model.SetupEmployeeMasterModelList = prov.GetDesignationDetail(designation);
            foreach (var item in model.SetupEmployeeMasterModelList)
            {
                model.BasicSalary   = item.BasicSalary;
                model.GradeRate     = item.GradeRate;
                model.CITAmount     = item.CITAmount;
                model.CITPercentage = item.CITPercentage;
            }
            model.EmployeeMasterId = id;
            return(View("EmployeePayrollMaster", model));
        }