public bool UpdateNhomND(NhomND nhomND) { DataClassesDataContext data = new DataClassesDataContext(Connection); NhomND NDOld = data.NhomNDs.Where(i => i.IDNhomND == nhomND.IDNhomND).SingleOrDefault(); NDOld.IsAdminGroup = nhomND.IsAdminGroup; NDOld.Madv = nhomND.Madv; NDOld.MoTa = nhomND.MoTa; NDOld.Parent = nhomND.Parent; try { data.SubmitChanges(); return true; } catch (Exception) { return false; } }
public bool InsertNhomND(NhomND nhomND) { DataClassesDataContext data = new DataClassesDataContext(Connection); data.NhomNDs.InsertOnSubmit(nhomND); try { data.SubmitChanges(); return true; } catch (Exception e) { return false; } }
partial void UpdateNhomND(NhomND instance);
partial void DeleteNhomND(NhomND instance);
partial void InsertNhomND(NhomND instance);