Example #1
0
        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);
        }
Example #2
0
        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"));
        }
Example #3
0
 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);
 }
Example #4
0
 partial void DeleteDAIHOI(DAIHOI instance);
Example #5
0
 partial void UpdateDAIHOI(DAIHOI instance);
Example #6
0
 partial void InsertDAIHOI(DAIHOI instance);