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 addNewCustomer(T_Customer newcustomer) { using (MEMSEntities db = new MEMSEntities()) { db.T_Customer.Add(newcustomer); db.SaveChanges(); } }
public bool AddNewProduct(T_Product product) { using (MEMSEntities db = new MEMSEntities()) { db.T_Product.Add(product); 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 addNewSupplier(T_Suppliers newsupplier) { using (MEMSEntities db = new MEMSEntities()) { db.T_Suppliers.Add(newsupplier); 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 AddCustomerContacts(T_Customer_contacts contact) { using (MEMSEntities db = new MEMSEntities()) { db.T_Customer_contacts.Add(contact); db.SaveChanges(); } }
internal void UpdateCustomerAddress(T_Customer_address address) { using (var db = new MEMSEntities()) { db.Entry(address).State = EntityState.Modified; db.SaveChanges(); } }
internal void AddCustomerAddress(T_Customer_address address) { using (MEMSEntities db = new MEMSEntities()) { db.T_Customer_address.Add(address); 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 AddSupplierContacts(T_Suppliers_contacts contact) { using (MEMSEntities db = new MEMSEntities()) { db.T_Suppliers_contacts.Add(contact); db.SaveChanges(); } }
internal void DelSupplierContacts(T_Suppliers_contacts contact) { using (MEMSEntities db = new MEMSEntities()) { db.Entry(contact).State = EntityState.Deleted; db.SaveChanges(); } }