public ActionResult Allocation(int?id)
        {
            if (id == null)
            {
                return(Redirect(Url.Action("Index", "ReliefRequisition")));
            }

            var requisition =
                _reliefRequisitionService.Get(t => t.RequisitionID == id, null, "ReliefRequisitionDetails").
                FirstOrDefault();

            ViewData["donors"] = _donorService.GetAllDonor();
            //ViewBag.HRDID = new SelectList(_donorService.GetAllDonor(), "HRDID", "Year", donor.HRDID);

            if (requisition == null)
            {
                HttpNotFound();
            }
            if (requisition != null && requisition.ProgramID == (int)Programs.PSNP)
            {
                ViewBag.program = "PSNP";
            }
            var datePref             = _userAccountService.GetUserInfo(HttpContext.User.Identity.Name).DatePreference;
            var requisitionViewModel = RequisitionViewModelBinder.BindReliefRequisitionViewModel(requisition, _workflowStatusService.GetStatus(WORKFLOW.RELIEF_REQUISITION), datePref);

            if (requisition != null && (requisition.RationID != null && requisition.RationID > 0))
            {
                requisitionViewModel.Ration = _rationService.FindById((int)requisition.RationID).RefrenceNumber;
            }
            return(View(requisitionViewModel));
        }
        public ActionResult Details(int id)
        {
            var requisition = _reliefRequisitionService.FindById(id);

            if (requisition == null)
            {
                return(HttpNotFound());
            }
            var datePref             = _userAccountService.GetUserInfo(HttpContext.User.Identity.Name).DatePreference;
            var requisitionViewModel = RequisitionViewModelBinder.BindReliefRequisitionViewModel(requisition, _workflowStatusService.GetStatus(WORKFLOW.RELIEF_REQUISITION), datePref);

            return(View(requisitionViewModel));
        }
        public ActionResult Allocation(int id)
        {
            var requisition =
                _reliefRequisitionService.Get(t => t.RequisitionID == id, null, "ReliefRequisitionDetails").
                FirstOrDefault();

            ViewData["donors"] = _donorService.GetAllDonor();
            //ViewBag.HRDID = new SelectList(_donorService.GetAllDonor(), "HRDID", "Year", donor.HRDID);

            if (requisition == null)
            {
                HttpNotFound();
            }
            var datePref             = _userAccountService.GetUserInfo(HttpContext.User.Identity.Name).DatePreference;
            var requisitionViewModel = RequisitionViewModelBinder.BindReliefRequisitionViewModel(requisition, _workflowStatusService.GetStatus(WORKFLOW.RELIEF_REQUISITION), datePref);

            return(View(requisitionViewModel));
        }
        public ActionResult SendToLogistics(int id)
        {
            //var requistion = _reliefRequisitionService.FindById(id);
            //if (requistion == null)
            //{
            //    HttpNotFound();
            //}
            var requisition =
                _reliefRequisitionService.Get(t => t.RequisitionID == id, null, "ReliefRequisitionDetails").
                FirstOrDefault();

            if (requisition == null)
            {
                HttpNotFound();
            }
            var datePref             = _userAccountService.GetUserInfo(HttpContext.User.Identity.Name).DatePreference;
            var requisitionViewModel = RequisitionViewModelBinder.BindReliefRequisitionViewModel(requisition, _workflowStatusService.GetStatus(WORKFLOW.RELIEF_REQUISITION), datePref);



            return(View(requisitionViewModel));
        }