public ActionResult DetailsLeave(int id) { HRMDB objHRMEmp = new HRMDB(); string ide = Session["id"].ToString(); var empdata = (from x in objHRMEmp.AspNetUsers where x.Id == ide select x).SingleOrDefault(); string Dept = empdata.DepartmentId; ViewBag.deptid = Dept; var leave = objLeaveBLL.Details(id); return(View(leave)); }