Exemplo n.º 1
0
 public void Update(DS_BusType BusType)
 {
     using (var ct = new DS_BusTypeDataContext(DbHelperSQL.Connection))
     {
         ct.DS_BusType.Attach(BusType, true);
         ct.SubmitChanges();
     }
 }
Exemplo n.º 2
0
 public void Add(DS_BusType BusType)
 {
     using (var ct = new DS_BusTypeDataContext(DbHelperSQL.Connection))
     {
         ct.DS_BusType.InsertOnSubmit(BusType);
         ct.SubmitChanges();
     }
 }
Exemplo n.º 3
0
 public void Delete(int ID)
 {
     using (var ct = new DS_BusTypeDataContext(DbHelperSQL.Connection))
     {
         DS_BusType st = ct.DS_BusType.Single(a => a.ID == ID);
         ct.DS_BusType.DeleteOnSubmit(st);
         ct.SubmitChanges();
     }
 }