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 { } }
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 { } }