public ActionResult CreateRetrievalForm(long[] requisition, string sessionId) { List <long> selected = new List <long>(); foreach (var id in requisition) { selected.Add(id); } //using list to DAO search by list RetrievalFormService.UpdateStatuses(selected); return(RedirectToAction("ViewRetrievalForm", "RetrievalForm", new { sessionId = sessionId })); }
// GET: RetrievalForm public ActionResult ViewRetrievalForm(string sessionId) { List <RetrievalForm> retrievalForms = RetrievalFormService.ViewRetrievalForm(); ViewData["retrievalForms"] = retrievalForms; if (DisbursementListService.CheckForPendingDisbursements().Count != 0) { ViewData["alreadyAssigned"] = "YES"; } else { ViewData["alreadyAssigned"] = "NO"; } List <int> stockLevel = new List <int>(); foreach (var item in retrievalForms) { stockLevel.Add(item.stockLevel); } ViewData["stockLevel"] = stockLevel; ViewData["sessionId"] = sessionId; return(View()); }