public DAIHOI getByDAIHOI(Guid id) { DAIHOI dv = new DAIHOI(); try { using (QLHTDOANVIENDataContext db = new QLHTDOANVIENDataContext()) { dv = db.DAIHOIs.Where(p => p.MASODH == id).Select(c => c).SingleOrDefault(); return(dv); } } catch (Exception) { } return(null); }
public Guid getByIDDAIHOI(Guid id) { DAIHOI dv = new DAIHOI(); try { using (QLHTDOANVIENDataContext db = new QLHTDOANVIENDataContext()) { dv = db.DAIHOIs.Where(p => p.MASODH == id).Select(c => c).SingleOrDefault(); return(dv.MASODH); } } catch (Exception) { } return(new Guid("856ba4ba-fa2a-4d20-a0db-4bfa83a178e2")); }
public bool addDaiHoi(DAIHOI dh) { try { using (QLHTDOANVIENDataContext db = new QLHTDOANVIENDataContext()) { db.DAIHOIs.InsertOnSubmit(dh); db.SubmitChanges(); } } catch (Exception e) { Console.Write(e.Message.ToString()); return(false); } return(true); }
partial void DeleteDAIHOI(DAIHOI instance);
partial void UpdateDAIHOI(DAIHOI instance);
partial void InsertDAIHOI(DAIHOI instance);