public void Update(DS_Turnover Turnover) { using (var ct = new DS_TurnoverDataContext(DbHelperSQL.Connection)) { ct.DS_Turnover.Attach(Turnover, true); ct.SubmitChanges(); } }
public void Add(DS_Turnover Turnover) { using (var ct = new DS_TurnoverDataContext(DbHelperSQL.Connection)) { ct.DS_Turnover.InsertOnSubmit(Turnover); ct.SubmitChanges(); } }
public void Delete(int ID) { using (var ct = new DS_TurnoverDataContext(DbHelperSQL.Connection)) { DS_Turnover st = ct.DS_Turnover.Single(a => a.ID == ID); ct.DS_Turnover.DeleteOnSubmit(st); ct.SubmitChanges(); } }