Example #1
0
 public bool UpdateNCC(DGNCCModel m)
 {
     try
     {
         tbl        = db.tbl_DG_NCC.Find(m.Id);
         tbl.Ma_NCC = m.Ma_NCC;
         db.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Example #2
0
        public bool DeleteNCC(int Id)
        {
            try
            {
                tbl = db.tbl_DG_NCC.Find(Id);

                db.tbl_DG_NCC.Remove(tbl);

                db.SaveChanges();
                return(true);
            }
            catch
            {
                return(false);
            }
        }
Example #3
0
 public DeXuatNCCDao()
 {
     db  = new EFDbContext();
     tbl = new tbl_DG_NCC();
 }