public int remove1datafromCongTrinh(CongTrinh ct) { var tmp = db.CongTrinhs.Where(x => x.MACT == ct.MACT).FirstOrDefault(); if (tmp == null) { return(0); } db.CongTrinhs.DeleteOnSubmit(tmp); db.SubmitChanges(); return(1); }
public int insertCt(CongTrinh ct) { var tmp = db.CongTrinhs.Where(x => x.MACT == ct.MACT).FirstOrDefault(); if (tmp != null) { return(0); } db.CongTrinhs.InsertOnSubmit(ct); db.SubmitChanges(); return(1);; }
partial void UpdateCongTrinh(CongTrinh instance);
partial void DeleteCongTrinh(CongTrinh instance);
partial void InsertCongTrinh(CongTrinh instance);