public ActionResult EditUnitOfSale(int id, UnitOfSale unitOfSales) { try { using (StockItemContext stockItem = new StockItemContext()) { stockItem.Entry(unitOfSales).State = EntityState.Modified; stockItem.SaveChanges(); } return(RedirectToAction("UnitOfSaleIndex")); } catch { return(View()); } }
public ActionResult EditSup(int id, Supplier suppliers) { try { using (StockItemContext stockItem = new StockItemContext()) { stockItem.Entry(suppliers).State = EntityState.Modified; stockItem.SaveChanges(); } return(RedirectToAction("SupplierIndex")); } catch { return(View()); } }