public ActionResult Badhuwa(int empCode) { if (!ViewBag.AllowView) { ViewBag.Error = "You are not Authorize to use this Page"; return(PartialView("_partialviewNotFound")); } EmployeeDetailsViewModel partialData = _employeeService.GetEmployeeDetails(empCode); EmployeeJobHistoryViewModel res = new EmployeeJobHistoryViewModel(); res.Designation = partialData.Designation; res.JobType = partialData.JobType; res.Department = partialData.Department; res.OfficeName = partialData.OfficeName; res.OfficeId = partialData.OfficeId; res.Rank = partialData.Rank; res.Name = partialData.Name; res.Section = partialData.Section; res.Level = partialData.Level; ListOfDatas(empCode); List <SelectListItem> SubGroupList = new List <SelectListItem>(); foreach (var row in _serviceEventSubGroupService.GetSubGroupById(7)) { SubGroupList.Add(new SelectListItem { Text = row.ServiceEventSubGroupName, Value = row.ServiceEventSubGroupId.ToString() }); } ViewBag.SubGroupList = SubGroupList; return(View("../Employee/Badhuwa/Index", res)); }
public void ListOfDatas(int empCode) { ViewBag.EmployeeDetail = _employeeService.GetEmployeeDetails(empCode); ViewBag.SideBar = _moduleService.AdminEmployeeDetailsMenu(empCode); List <SelectListItem> OfficeList = new List <SelectListItem>(); foreach (var row in _officeService.GetOfficeAllData()) { OfficeList.Add(new SelectListItem { Text = row.OfficeName, Value = row.OfficeId.ToString() }); } List <SelectListItem> DepartmentList = new List <SelectListItem>(); foreach (var row in _departmentServices.GetDepartmentlist()) { DepartmentList.Add(new SelectListItem { Text = row.DeptName, Value = row.DeptId.ToString() }); } List <SelectListItem> SectionList = new List <SelectListItem>(); foreach (var row in _sectionServices.GetSectionList()) { SectionList.Add(new SelectListItem { Text = row.SectionName, Value = row.SectionId.ToString() }); } List <SelectListItem> DesignationList = new List <SelectListItem>(); foreach (var row in _designationServices.GetDesignationList()) { DesignationList.Add(new SelectListItem { Text = row.DsgName, Value = row.DsgId.ToString() }); } List <SelectListItem> RankList = new List <SelectListItem>(); foreach (var row in _rankServices.GetRankList()) { RankList.Add(new SelectListItem { Text = row.RankName.ToString(), Value = row.RankId.ToString() }); } List <SelectListItem> LevelList = new List <SelectListItem>(); foreach (var row in _levelServices.GetLevellist()) { LevelList.Add(new SelectListItem { Text = row.LevelName, Value = row.LevelId.ToString() }); } List <SelectListItem> BusinessGroupList = new List <SelectListItem>(); foreach (var row in _bgGroupService.GetBusinessGroupList()) { BusinessGroupList.Add(new SelectListItem { Text = row.BgName, Value = row.BgId.ToString() }); } List <SelectListItem> ShiftList = new List <SelectListItem>(); foreach (var row in _shiftService.GetShiftsLIst()) { ShiftList.Add(new SelectListItem { Text = row.ShiftName, Value = row.ShiftId.ToString() }); } List <SelectListItem> RemoteList = new List <SelectListItem>(); foreach (var row in _remoteService.GetRemoteList()) { RemoteList.Add(new SelectListItem { Text = row.RemoteAreaName, Value = row.RemoteId.ToString() }); } List <SelectListItem> JobTypeList = new List <SelectListItem>(); foreach (var row in _jobTypeservices.GetJobTypeList()) { JobTypeList.Add(new SelectListItem { Text = row.JobTypeName, Value = row.JobtypeId.ToString() }); } List <SelectListItem> ServiceEventList = new List <SelectListItem>(); foreach (var row in _serviceEventService.GetServiceEventList()) { ServiceEventList.Add(new SelectListItem { Text = row.ServiceEventGroupName, Value = row.ServiceEventId.ToString() }); } List <SelectListItem> ServiceEventSubGroupList = new List <SelectListItem>(); foreach (var row in _serviceEventSubGroupService.GetSubGroupById(1)) { ServiceEventSubGroupList.Add(new SelectListItem { Text = row.ServiceEventSubGroupName, Value = row.ServiceEventSubGroupId.ToString() }); } var EmployeesList = _employeeService.GetEmployeeSelectList(); ViewBag.officeList = OfficeList; ViewBag.departmentList = DepartmentList; ViewBag.sectionList = SectionList; ViewBag.designationList = DesignationList; ViewBag.rankList = RankList; ViewBag.levelList = LevelList; ViewBag.businessGroupList = BusinessGroupList; ViewBag.shiftList = ShiftList; ViewBag.remoteList = RemoteList; ViewBag.jobTypeList = JobTypeList; ViewBag.serviceEventList = ServiceEventList; ViewBag.employeeList = EmployeesList; ViewBag.ServiceEventSubGroupList = ServiceEventSubGroupList; }