public ActionResult EducationDetail(string id) { EmpEducationDTO empDetails = new EmpEducationDTO(); int empCode = Convert.ToInt32(Session["EmpCode"]); ListOfDatas(empCode); int expId = Convert.ToInt32(id); empDetails = _empEducationService.GetEducationByEduId(expId); return(View(empDetails)); }
public ActionResult EducationEdit(int empId, int eduId) { if (!ViewBag.AllowView) { ViewBag.Error = "You are not Authorize to use this Page"; return(PartialView("_partialviewNotFound")); } List <SelectListItem> educationLevel = new List <SelectListItem>(); foreach (var row in _educationLevel.GetEducationLevel()) { educationLevel.Add(new SelectListItem { Text = row.LevelName, Value = row.LevelId.ToString() }); } IEnumerable <SelectListItem> countries = _countryService.GetCountryList(); ViewBag.Countries = countries; ViewBag.EducationLevel = educationLevel; ViewBag.EmployeeDetail = _empDetails.GetEmployeeDetails(empId); ViewBag.SideBar = _moduleService.AdminEmployeeDetailsMenu(empId); EmpEducationDTO data = _empEducationService.GetEducationByEduId(eduId); data.PassedDateNP = !String.IsNullOrEmpty(Convert.ToString(data.PassedDate)) ? NepEngDate.EngToNep(Convert.ToDateTime(data.PassedDate)) : null; //data.PassedDate = Convert.ToDateTime( NepDateConverter.EngToNep(data.PassedDate).ToString()); return(View("../Employee/Education/EducationEdit", data)); }