public ActionResult List() { string userId = User.Identity.GetUserId(); var s1 = StaffDepartmentDAO.GetStaffByUserId(userId); var reqList = RequestDAO.GetRequests(s1).ToList(); ModelState.Clear(); return(View(reqList)); }
public List <RequestViewModel> ReadRequest() { var userId = User.Identity.GetUserId(); Staff s1 = StaffDepartmentDAO.GetStaffByUserId(userId); var reqList = new List <RequestViewModel>(); if (s1 != null) { reqList = RequestDAO.GetRequests(s1); } return(reqList); }