public ActionResult LeaveBalance(int?Id) { if (Id == null) { Id = Convert.ToInt32(Session["EmpCode"]); } else { ViewBag.SideBar = _moduleService.AdminEmployeeDetailsMenu(Convert.ToInt32(Id)); } try { LeaveBalanceModel result = new LeaveBalanceModel(); result.LeaveBalance = _LeaveAddAdmin.LeaveBalanceSearch(); result.LeaveBalance.EmpCodeList = _LeaveEarnedService.GetBrancheEmployeeSelectList(Convert.ToInt32(Session["EmpCode"])); if (Id >= 0) { result.LeaveBalance.EmpCode = Convert.ToInt32(Id); } else { result.LeaveBalance.EmpCode = Convert.ToInt32(Session["EmpCode"]); } result.LeaveBalanceDetails = _LeaveAddAdmin.LeaveBalanceList(result.LeaveBalance.LeaveYearId, Convert.ToInt32(result.LeaveBalance.EmpCode)); return(View(result)); } catch (Exception Ex) { Session["error"] = Ex.Message; return(View()); } }
public ActionResult FilterBox() { LeaveApplicationDTO Record = new LeaveApplicationDTO(); Record.YearSelectList = _SpecialleavetypeService.GetYearSelectList(); Record.EmployeeCodeSelectlist = _LeaveEarnedService.GetBrancheEmployeeSelectList(Convert.ToInt32(ViewBag.Empcode)); return(View("../Leave/LeaveTypeSpecial/FilterBox", Record)); }
public ActionResult Index() { LeaveEarnedInfomationDTO Record = new LeaveEarnedInfomationDTO(); Record.LeaveEarnedList = new List <LeaveEarnedDTO>(); int curentemp = Convert.ToInt32(Session["Empcode"]); Record.YearSelectList = _SpecialleavetypeService.GetYearSelectList(); Record.BranchEmployeeCodeSelectlist = _LeaveEarnedService.GetBrancheEmployeeSelectList(curentemp); return(View("../Leave/LeaveEarned/Index", Record)); }
public ActionResult Add(EmployeeFamilyDTO Record) { Record.FDob = !string.IsNullOrEmpty(Record.FDobNP) ? Convert.ToDateTime(NepEngDate.NepToEng(Record.FDobNP)) : Record.FDob; int curentemp = Convert.ToInt32(Session["Empcode"]); Record.EmpCode = Record.EmpId; Record.EmployeeCodeSelectlist = _LeaveEarnedService.GetBrancheEmployeeSelectList(curentemp); try { if (ModelState.IsValid) { _EmployeeFamilyService.AddEmplyeeFamily(Record); Session["Success"] = "Successfully Added Employee Family"; return(RedirectToAction("Index", "Family", new { id = Record.EmpId })); } else { ViewBag.Error = "Form Error"; } } catch (Exception Exception) { ViewBag.Error = Exception.Message; } return(View("../Employee/Family/Add", Record)); }
// 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)); }
public ActionResult Index() { PayrollLeaveDeductionInformation Record = new PayrollLeaveDeductionInformation(); Record.PayrollLeaveDeductionList = new List <PayrollLeaveDeductionDTO>(); Record.YearSelectList = _SpecialleavetypeService.GetYearSelectList(); Record.EmployeeCodeSelectlist = _LeaveEarnedService.GetBrancheEmployeeSelectList(Convert.ToInt32(ViewBag.Empcode)); List <PayrollLeaveDeductionDTO> RecordList = new List <PayrollLeaveDeductionDTO>(); return(View("../Leave/PayrollLeaveDeduction/Index", Record)); }