public void UpdateSupplier(SUPPLIER item) { using (PODbEntities1 context = new PODbEntities1()) { context.Entry(item).State = System.Data.Entity.EntityState.Modified; context.SaveChanges(); } }
public void AddSupplier(SUPPLIER item) { try { using (PODbEntities1 context = new PODbEntities1()) { context.SUPPLIERs.Add(item); context.SaveChanges(); } } catch (Exception e) { throw new Exception(e.Message.ToString()); } }