public bool InsertPhanCong(PhanCong nv)
 {
     if (nv != null)
     {
         db.PhanCong.Add(nv);
         db.SaveChanges();
         return(true);
     }
     return(false);
     //return new PhanCongViewModel(db).GetDsPhanCong();
 }
        public bool EditPhanCong(PhanCong PhanCong)
        {
            //Edit bằng id nghe
            PhanCong nv = db.PhanCong.Find(PhanCong.MaPhanCong);

            if (nv != null)
            {
                db.Entry(nv).CurrentValues.SetValues(PhanCong);
                db.SaveChanges();
                return(true);
            }
            return(false);
            //return new PhanCongViewModel(db).GetDsPhanCong();
        }