public ActionResult GridForRequests_CustomHandler(string filter) { if (filter.Equals("All")) { Session["Filter"] = "All"; return(PartialView("Grid/_GridForRequests", RequestsRepository.GetAllRequests())); } Session["Filter"] = null; return(PartialView("Grid/_GridForRequests", RequestsRepository.Requests)); }
/// <summary> /// Set request details for Manager or Supervisor. /// </summary> /// <param name="reqId">Request Id of request</param> public void SetReqDetails(int reqId) { var request = Application.Filter != null? RequestsRepository.GetAllRequests().FirstOrDefault(u => u.RequestId.Equals(reqId)) : RequestsRepository.Requests.FirstOrDefault(u => u.RequestId.Equals(reqId)); if (request == null) { return; } RequestId = request.RequestId; DbStatusId = request.StatusId; RequestDate = request.CreatedOn; RequestStatus = request.Status; RequestorName = GetUserName(request.RequestorId); UpdatorName = GetUserName(request.UpdatorId); UpdateDate = request.UpdatedOn; Shelters = GetShelters(reqId); Items = GetItems(reqId); Statuses = RequestsRepository.GetStatusList(); }
/// <summary> /// Gridview for Requests. /// </summary> public ActionResult GridForRequests(string filter) { return(PartialView("Grid/_GridForRequests", Application.Filter != null ? RequestsRepository.GetAllRequests() : RequestsRepository.Requests)); }