예제 #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 addNewCustomer(T_Customer newcustomer)
 {
     using (MEMSEntities db = new MEMSEntities())
     {
         db.T_Customer.Add(newcustomer);
         db.SaveChanges();
     }
 }
예제 #4
0
 public bool AddNewProduct(T_Product product)
 {
     using (MEMSEntities db = new MEMSEntities())
     {
         db.T_Product.Add(product);
         return db.SaveChanges() > 0 ? true : false;
     }
 }
예제 #5
0
 internal void updateSupplier(T_Suppliers supplier)
 {
     using (MEMSEntities db = new MEMSEntities())
     {
         db.Entry(supplier).State = System.Data.EntityState.Modified;
         db.SaveChanges();
     }
 }
예제 #6
0
 internal void addNewSupplier(T_Suppliers newsupplier)
 {
     using (MEMSEntities db = new MEMSEntities())
     {
         db.T_Suppliers.Add(newsupplier);
         db.SaveChanges();
     }
 }
예제 #7
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();
     }
 }
예제 #8
0
 internal void UpdateCustomerContacts(T_Customer_contacts contact)
 {
     using (MEMSEntities db = new MEMSEntities())
     {
         db.Entry(contact).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
예제 #9
0
 internal void AddCustomerContacts(T_Customer_contacts contact)
 {
     using (MEMSEntities db = new MEMSEntities())
     {
         db.T_Customer_contacts.Add(contact);
         
         db.SaveChanges();
     }
 }
예제 #10
0
 internal void UpdateCustomerAddress(T_Customer_address address)
 {
     using (var db = new MEMSEntities())
     {
         db.Entry(address).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
예제 #11
0
 internal void AddCustomerAddress(T_Customer_address address)
 {
     using (MEMSEntities db = new MEMSEntities())
     {
         db.T_Customer_address.Add(address);
         db.SaveChanges();
     }
 }
예제 #12
0
 internal void DelCustomerAddress(T_Customer_address address)
 {
     using (MEMSEntities db = new MEMSEntities())
     {
         db.Entry(address).State = EntityState.Deleted;
         db.SaveChanges();
     }
 }
예제 #13
0
 public bool UpdateCraft(T_Crafts craft)
 {
     using (MEMSEntities db = new MEMSEntities())
     {
         db.Entry(craft).State = EntityState.Modified;
         return db.SaveChanges() > 0 ? true : false;
     }
 }
예제 #14
0
        internal void AddSupplierContacts(T_Suppliers_contacts contact)
        {
            using (MEMSEntities db = new MEMSEntities())
            {
                db.T_Suppliers_contacts.Add(contact);

                db.SaveChanges();
            }
        }
예제 #15
0
 internal void DelSupplierContacts(T_Suppliers_contacts contact)
 {
     using (MEMSEntities db = new MEMSEntities())
     {
         db.Entry(contact).State = EntityState.Deleted;
         db.SaveChanges();
     }
 }