internal void editCustomer(T_Customer customer) { using (MEMSEntities db = new MEMSEntities()) { db.Entry(customer).State = System.Data.EntityState.Modified; db.SaveChanges(); } }
public bool UpdateProduct(T_Product product) { using (MEMSEntities db = new MEMSEntities()) { db.Entry(product).State = EntityState.Modified; return db.SaveChanges() > 0 ? true : false; } }
internal void updateSupplier(T_Suppliers supplier) { using (MEMSEntities db = new MEMSEntities()) { db.Entry(supplier).State = System.Data.EntityState.Modified; db.SaveChanges(); } }
internal void delCustomer(T_Customer customer) { using (MEMSEntities db = new MEMSEntities()) { //db.T_Customer.Remove(customer); var entityentry = db.Entry(customer); entityentry.State = EntityState.Deleted; db.SaveChanges(); } }
internal void UpdateCustomerContacts(T_Customer_contacts contact) { using (MEMSEntities db = new MEMSEntities()) { db.Entry(contact).State = EntityState.Modified; db.SaveChanges(); } }
internal void UpdateCustomerAddress(T_Customer_address address) { using (var db = new MEMSEntities()) { db.Entry(address).State = EntityState.Modified; db.SaveChanges(); } }
internal void DelCustomerAddress(T_Customer_address address) { using (MEMSEntities db = new MEMSEntities()) { db.Entry(address).State = EntityState.Deleted; db.SaveChanges(); } }
public bool UpdateCraft(T_Crafts craft) { using (MEMSEntities db = new MEMSEntities()) { db.Entry(craft).State = EntityState.Modified; return db.SaveChanges() > 0 ? true : false; } }
internal void DelSupplierContacts(T_Suppliers_contacts contact) { using (MEMSEntities db = new MEMSEntities()) { db.Entry(contact).State = EntityState.Deleted; db.SaveChanges(); } }