Beispiel #1
0
 public void Update(DS_Purchase Purchase)
 {
     using (var ct = new DS_PurchaseDataContext(DbHelperSQL.Connection))
     {
         ct.DS_Purchase.Attach(Purchase, true);
         ct.SubmitChanges();
     }
 }
Beispiel #2
0
 public void Add(DS_Purchase Purchase)
 {
     using (var ct = new DS_PurchaseDataContext(DbHelperSQL.Connection))
     {
         ct.DS_Purchase.InsertOnSubmit(Purchase);
         ct.SubmitChanges();
     }
 }
Beispiel #3
0
 public void Delete(int ID)
 {
     using (var ct = new DS_PurchaseDataContext(DbHelperSQL.Connection))
     {
         DS_Purchase st = ct.DS_Purchase.Single(a => a.ID == ID);
         ct.DS_Purchase.DeleteOnSubmit(st);
         ct.SubmitChanges();
     }
 }