Esempio n. 1
0
 internal void DelCustomerAddress(T_Customer_address address)
 {
     using (MEMSContext db = new MEMSContext())
     {
         db.Entry(address).State = EntityState.Deleted;
         db.SaveChanges();
     }
 }
Esempio n. 2
0
 internal void AddCustomerAddress(T_Customer_address address)
 {
     using (MEMSContext db = new MEMSContext())
     {
         db.T_Customer_address.Add(address);
         db.SaveChanges();
     }
 }
Esempio n. 3
0
 public void AddCustomerAddress(T_Customer_address address)
 {
     try
     {
         ch = new CustomerHelper();
         ch.AddCustomerAddress(address);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 4
0
 internal void UpdateCustomerAddress(T_Customer_address address)
 {
     using (var db = new MEMSContext())
     {
         db.Entry(address).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
Esempio n. 5
0
 private void btn_addressadd_Click(object sender, EventArgs e)
 {
     var ds = (List<T_Customer_address>)this.gvaddress.DataSource;
     var newaddress = new T_Customer_address();
     newaddress.customerid = m_cid;
     modifyaddresslst.Add(newaddress);
     ds.Insert(0, newaddress);
     gvaddress.RefreshData();
 }