public void Insert(DAL.DangKyLamThemGio dky) { if (dky != null) { dataContext.DangKyLamThemGios.InsertOnSubmit(dky); Save(); } }
public void Delete(int id) { DAL.DangKyLamThemGio tmp = dataContext.DangKyLamThemGios.SingleOrDefault(t => t.ID == id); if (tmp != null) { dataContext.DangKyLamThemGios.DeleteOnSubmit(tmp); Save(); } }
public void Update(DAL.DangKyLamThemGio dky) { DAL.DangKyLamThemGio tmp = dataContext.DangKyLamThemGios.SingleOrDefault(t => t.ID == dky.ID); if (tmp != null) { tmp.MaCB = dky.MaCB; tmp.TuNgay = dky.TuNgay; tmp.DenNgay = dky.DenNgay; tmp.FrkeyMaCa = dky.FrkeyMaCa; tmp.GhiChu = dky.GhiChu; tmp.GioKetThucSauCa = dky.GioKetThucSauCa; tmp.GioBatDauSauCa = dky.GioBatDauSauCa; Save(); } }