Пример #1
0
        public ActionResult Requisition_Search([DataSourceRequest] DataSourceRequest request, int regionID, int programID, int id)// SearchRequsetViewModel filter)
        {
            var requests          = _reliefRequisitionService.Get(t => t.Status == id && t.RegionID == regionID && t.ProgramID == programID);
            var datePref          = _userAccountService.GetUserInfo(HttpContext.User.Identity.Name).DatePreference;
            var requestViewModels = RequisitionViewModelBinder.BindReliefRequisitionListViewModel(requests, _workflowStatusService
                                                                                                  .GetStatus(
                                                                                                      WORKFLOW.
                                                                                                      RELIEF_REQUISITION), datePref).OrderByDescending(m => m.RequisitionID);

            return(Json(requestViewModels.ToDataSourceResult(request), JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        public ActionResult Requisition_Read([DataSourceRequest] DataSourceRequest request)
        {
            var requests          = _reliefRequisitionService.Get(t => t.Status == (int)Cats.Models.Constant.ReliefRequisitionStatus.Approved);
            var datePref          = _userAccountService.GetUserInfo(HttpContext.User.Identity.Name).DatePreference;
            var requestViewModels = RequisitionViewModelBinder.BindReliefRequisitionListViewModel(requests,
                                                                                                  _workflowStatusService
                                                                                                  .GetStatus(
                                                                                                      WORKFLOW.
                                                                                                      RELIEF_REQUISITION), datePref).OrderByDescending(m => m.RequisitionID);

            return(Json(requestViewModels.ToDataSourceResult(request), JsonRequestBehavior.AllowGet));
        }