public bool insertChiTiet(THAMDUDAIHOI data) { try { using (QLHTDOANVIENDataContext db = new QLHTDOANVIENDataContext()) { db.THAMDUDAIHOIs.InsertOnSubmit(data); db.SubmitChanges(); return(true); } } catch (Exception e) { Console.WriteLine(e.Message.ToString()); } return(false); }
public bool setStatus(Guid idDV, Guid idDH) { THAMDUDAIHOI data = new THAMDUDAIHOI(); try { using (QLHTDOANVIENDataContext db = new QLHTDOANVIENDataContext()) { data = db.THAMDUDAIHOIs.Where(p => p.MASODH == idDH && p.MASODV == idDV).SingleOrDefault(); if (data != null) { data.TRANGTHAI = true; db.SubmitChanges(); return(true); } } } catch (Exception) { } return(false); }
private void detach_THAMDUDAIHOIs(THAMDUDAIHOI entity) { this.SendPropertyChanging(); entity.DOANVIEN = null; }
partial void DeleteTHAMDUDAIHOI(THAMDUDAIHOI instance);
partial void UpdateTHAMDUDAIHOI(THAMDUDAIHOI instance);
partial void InsertTHAMDUDAIHOI(THAMDUDAIHOI instance);
private void attach_THAMDUDAIHOIs(THAMDUDAIHOI entity) { this.SendPropertyChanging(); entity.DAIHOI = this; }