예제 #1
0
 internal void editCustomer(T_Customer customer)
 {
     using (MEMSEntities db = new MEMSEntities())
     {                
         db.Entry(customer).State = System.Data.EntityState.Modified;  
         db.SaveChanges();
     }
 }
예제 #2
0
 public bool UpdateProduct(T_Product product)
 {
     using (MEMSEntities db = new MEMSEntities())
     {
         db.Entry(product).State = EntityState.Modified;
         return db.SaveChanges() > 0 ? true : false;
     }
 }
예제 #3
0
 internal void updateSupplier(T_Suppliers supplier)
 {
     using (MEMSEntities db = new MEMSEntities())
     {
         db.Entry(supplier).State = System.Data.EntityState.Modified;
         db.SaveChanges();
     }
 }
예제 #4
0
 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();
     }
 }
예제 #5
0
 internal void UpdateCustomerContacts(T_Customer_contacts contact)
 {
     using (MEMSEntities db = new MEMSEntities())
     {
         db.Entry(contact).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
예제 #6
0
 internal void UpdateCustomerAddress(T_Customer_address address)
 {
     using (var db = new MEMSEntities())
     {
         db.Entry(address).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
예제 #7
0
 internal void DelCustomerAddress(T_Customer_address address)
 {
     using (MEMSEntities db = new MEMSEntities())
     {
         db.Entry(address).State = EntityState.Deleted;
         db.SaveChanges();
     }
 }
예제 #8
0
 public bool UpdateCraft(T_Crafts craft)
 {
     using (MEMSEntities db = new MEMSEntities())
     {
         db.Entry(craft).State = EntityState.Modified;
         return db.SaveChanges() > 0 ? true : false;
     }
 }
예제 #9
0
 internal void DelSupplierContacts(T_Suppliers_contacts contact)
 {
     using (MEMSEntities db = new MEMSEntities())
     {
         db.Entry(contact).State = EntityState.Deleted;
         db.SaveChanges();
     }
 }