public ActionResult Employee_Resignation() { List <MastersModel> EmpResignationList = new List <MastersModel>(); try { dt = mdb_layer.GetEmpResignation(Convert.ToInt32(Session["Emp_id"])); foreach (DataRow dr in dt.Rows) { MastersModel mm = new MastersModel(); mm.Emp_Id = Convert.ToInt32(Session["Emp_id"]); mm.Emp_Name = dr["Emp_Name"].ToString(); mm.Manager_Name = dr["MANAGER_NAME"].ToString(); mm.Department_Name = dr["department_name"].ToString(); mm.Current_Date = dr["currentDate"].ToString(); mm.LastWorking_Date = dr["LastWorkingDate"].ToString(); EmpResignationList.Add(mm); FillDropdownbox(); } return(View(EmpResignationList)); } catch (Exception ex) { return(View()); } }