示例#1
0
 public void Xoa(string MaNV, string MaCa, string MaKV)
 {
     try
     {
         PhanCong pc = db.PhanCong.Find(MaNV, MaCa, MaKV);
         if (pc != null)
         {
             db.PhanCong.Remove(pc);
             db.SaveChanges();
         }
     }
     catch
     {
     }
 }
示例#2
0
        public void Them(PhanCong pc)
        {
            try
            {
                var pc0 = new PhanCong()
                {
                    MaNV = pc.MaNV,
                    MaCa = pc.MaCa,
                    MaKV = pc.MaKV
                };

                db.PhanCong.Add(pc0);
                db.SaveChanges();
            }
            catch
            {
            }
        }