public ActionResult UpdateInventory(string itno, string bdentry, string seentry, string stkentry, string ctgp, string blno, string whlc) { var inventoryItems = InventoryDataService.UpdateInventory(itno, bdentry, seentry, stkentry, ctgp, blno, whlc); var inventoryItems2 = InventoryDataService.GetInventoryRecordsByGroupId(ctgp); if (inventoryItems.Count == 1) { return(RedirectToAction("Index", "Group")); } return(View("Inventory", new InventoryViewModel() { Records = inventoryItems2, SelectedRecord = InventoryDataService.SelectInventory(ctgp, itno, whlc, blno).First() })); }