public void Insert(DAL.CacMonThiTuyen mt) { if (mt != null) { dataContext.CacMonThiTuyens.InsertOnSubmit(mt); Save(); } }
public void Delete(int id) { DAL.CacMonThiTuyen temp = dataContext.CacMonThiTuyens.SingleOrDefault(t => t.ID == id); if (temp != null) { dataContext.CacMonThiTuyens.DeleteOnSubmit(temp); Save(); } }
public void Update(DAL.CacMonThiTuyen mt) { DAL.CacMonThiTuyen temp = dataContext.CacMonThiTuyens.SingleOrDefault(t => t.ID == mt.ID); if (temp != null) { temp.GhiChu = mt.GhiChu; temp.MaMonThi = mt.MaMonThi; temp.NguoiChamThi = mt.NguoiChamThi; temp.PlanID = mt.PlanID; temp.TrongSo = mt.TrongSo; temp.Vong = mt.Vong; temp.DiemDat = mt.DiemDat; Save(); } }