public void Create(ThoiKhoaBieu tkb) { using (var context = new QuanLyDaoTaoEntities()) { context.ThoiKhoaBieux.Add(tkb); context.SaveChanges(); } }
/// <summary> /// Tạo mới 1 record /// </summary> /// <param name="nienKhoaHocKy">Niên khóa học kỳ</param> public void Create(NienKhoaHocKy nienKhoaHocKy) { using (var context = new QuanLyDaoTaoEntities()) { context.NienKhoaHocKies.Add(nienKhoaHocKy); context.SaveChanges(); } }
/// <summary> /// Tạo mới 1 record /// </summary> /// <param name="lop">lop</param> public void Create(GiaTinChi giaTC) { using (var context = new QuanLyDaoTaoEntities()) { context.GiaTinChis.Add(giaTC); context.SaveChanges(); } }
/// <summary> /// Tạo mới 1 record /// </summary> /// <param name="mh">môn học</param> public void Create(MonHoc mh) { using (var context = new QuanLyDaoTaoEntities()) { context.MonHocs.Add(mh); context.SaveChanges(); } }
public void Create(HeDaoTao hdt) { using (var context = new QuanLyDaoTaoEntities()) { context.HeDaoTaos.Add(hdt); context.SaveChanges(); } }
public void Create(GiangVien giangVien) { using (var context = new QuanLyDaoTaoEntities()) { context.GiangViens.Add(giangVien); context.SaveChanges(); } }
/// <summary> /// Tạo mới 1 record /// </summary> /// <param name="dd">Điểm danh</param> public void Create(DiemDanh dd) { using (var context = new QuanLyDaoTaoEntities()) { context.DiemDanhs.Add(dd); context.SaveChanges(); } }
public void Create(SinhVien sv) { using (var context = new QuanLyDaoTaoEntities()) { context.SinhViens.Add(sv); context.SaveChanges(); } }
/// <summary> /// Tạo mới 1 record /// </summary> /// <param name="lop">lop</param> public void Create(Lop lop) { using (var context = new QuanLyDaoTaoEntities()) { context.Lops.Add(lop); context.SaveChanges(); } }
/// <summary> /// Tạo mới 1 record /// </summary> /// <param name="khoa">khoa</param> public void Create(Khoa khoa) { using (var context = new QuanLyDaoTaoEntities()) { context.Khoas.Add(khoa); context.SaveChanges(); } }
public void Delete(ThoiKhoaBieu tkb) { using (var context = new QuanLyDaoTaoEntities()) { ThoiKhoaBieu thoiKhoaBieu = context.ThoiKhoaBieux.Where(x => x.Ngay == tkb.Ngay && x.Buoi == tkb.Buoi && x.MaLopTC == tkb.MaLopTC).FirstOrDefault(); context.ThoiKhoaBieux.Remove(thoiKhoaBieu); context.SaveChanges(); } }
/// <summary> /// Chỉnh sửa 1 record /// </summary> /// <param name="khoa"></param> public void Edit(Khoa khoa) { using (var context = new QuanLyDaoTaoEntities()) { var query = context.Khoas.Where(x => x.MaKhoa == khoa.MaKhoa).FirstOrDefault(); context.Entry(query).CurrentValues.SetValues(khoa); context.SaveChanges(); } }
public void Delete(string maGV) { using (var context = new QuanLyDaoTaoEntities()) { GiangVien giangVien = context.GiangViens.Find(maGV); context.GiangViens.Remove(giangVien); context.SaveChanges(); } }
public void Delete(string maHDT) { using (var context = new QuanLyDaoTaoEntities()) { HeDaoTao hdt = context.HeDaoTaos.Find(maHDT); context.HeDaoTaos.Remove(hdt); context.SaveChanges(); } }
public void Edit(HeDaoTao hdt) { using (var context = new QuanLyDaoTaoEntities()) { var query = context.HeDaoTaos.Where(x => x.MaHDT == hdt.MaHDT).FirstOrDefault(); context.Entry(query).CurrentValues.SetValues(hdt); context.SaveChanges(); } }
/// <summary> /// Chỉnh sửa 1 record /// </summary> /// <param name="dd">Điểm danh</param> public void Edit(DiemDanh dd) { using (var context = new QuanLyDaoTaoEntities()) { var query = context.DiemDanhs.Where(x => x.MaPhieuDD == dd.MaPhieuDD).FirstOrDefault(); context.Entry(query).CurrentValues.SetValues(dd); context.SaveChanges(); } }
/// <summary> /// Chỉnh sửa 1 record /// </summary> /// <param name="lop"></param> public void Edit(Lop lop) { using (var context = new QuanLyDaoTaoEntities()) { var query = context.Lops.Where(x => x.MaLop == lop.MaLop).FirstOrDefault(); context.Entry(query).CurrentValues.SetValues(lop); context.SaveChanges(); } }
/// <summary> /// Chỉnh sửa 1 record /// </summary> /// <param name="lop"></param> public void Edit(GiaTinChi giaTC) { using (var context = new QuanLyDaoTaoEntities()) { var query = context.GiaTinChis.Where(x => x.MaGiaTC == giaTC.MaGiaTC).FirstOrDefault(); context.Entry(query).CurrentValues.SetValues(giaTC); context.SaveChanges(); } }
/// <summary> /// Chỉnh sửa 1 record /// </summary> /// <param name="nienKhoaHocKy"></param> public void Edit(NienKhoaHocKy nienKhoaHocKy) { using (var context = new QuanLyDaoTaoEntities()) { var query = context.NienKhoaHocKies.Where(x => x.ID == nienKhoaHocKy.ID).FirstOrDefault(); context.Entry(query).CurrentValues.SetValues(nienKhoaHocKy); context.SaveChanges(); } }
public void Edit(ThoiKhoaBieu tkb) { using (var context = new QuanLyDaoTaoEntities()) { var query = context.ThoiKhoaBieux.Where(x => x.Ngay == tkb.Ngay && x.Buoi == tkb.Buoi && x.MaLopTC == tkb.MaLopTC).FirstOrDefault(); context.Entry(query).CurrentValues.SetValues(tkb); context.SaveChanges(); } }
public void Edit(SinhVien sinhVien) { using (var context = new QuanLyDaoTaoEntities()) { var query = context.SinhViens.Where(x => x.MaSV == sinhVien.MaSV).FirstOrDefault(); context.Entry(query).CurrentValues.SetValues(sinhVien); context.SaveChanges(); } }
public void Delete(string id) { using (var context = new QuanLyDaoTaoEntities()) { SinhVien sv = context.SinhViens.Find(id); context.SinhViens.Remove(sv); context.SaveChanges(); } }
/// <summary> /// Chỉnh sửa 1 record /// </summary> /// <param name="mh">Môn học</param> public void Edit(MonHoc mh) { using (var context = new QuanLyDaoTaoEntities()) { var query = context.MonHocs.Where(x => x.MaMH == mh.MaMH).FirstOrDefault(); context.Entry(query).CurrentValues.SetValues(mh); context.SaveChanges(); } }
/// <summary> /// Xoa 1 record dựa vào mã phiếu điểm danh /// </summary> /// <param name="maPDD">Mã phiếu điểm danh</param> public void Delete(string maPDD) { using (var context = new QuanLyDaoTaoEntities()) { DiemDanh dd = context.DiemDanhs.Find(maPDD); if (dd != null) { context.DiemDanhs.Remove(dd); context.SaveChanges(); } } }
/// <summary> /// Xoa 1 record dựa vào mã lop /// </summary> /// <param name="maMH">Mã môn học</param> public void Delete(string maMH) { using (var context = new QuanLyDaoTaoEntities()) { MonHoc mh = context.MonHocs.Find(maMH); if (mh != null) { context.MonHocs.Remove(mh); context.SaveChanges(); } } }
/// <summary> /// Xoa 1 record dựa vào mã lop /// </summary> /// <param name="maLop"></param> public void Delete(string maLop) { using (var context = new QuanLyDaoTaoEntities()) { Lop lp = context.Lops.Find(maLop); if (lp != null) { context.Lops.Remove(lp); context.SaveChanges(); } } }
/// <summary> /// Xoa 1 record dựa vào mã giá tín chỉ /// </summary> /// <param name="maGiaTC">mã giá tín chỉ</param> public void Delete(string maGiaTC) { using (var context = new QuanLyDaoTaoEntities()) { GiaTinChi gtc = context.GiaTinChis.Find(maGiaTC); if (gtc != null) { context.GiaTinChis.Remove(gtc); context.SaveChanges(); } } }
/// <summary> /// Xoa 1 record dựa vào mã khoa /// </summary> /// <param name="maKhoa"></param> public void Delete(string maKhoa) { using (var context = new QuanLyDaoTaoEntities()) { Khoa kh = context.Khoas.Find(maKhoa); if (kh != null) { context.Khoas.Remove(kh); context.SaveChanges(); } } }
/// <summary> /// Xoa 1 record dựa vào ID /// </summary> /// <param name="ID"></param> public void Delete(string ID) { using (var context = new QuanLyDaoTaoEntities()) { NienKhoaHocKy nkhk = context.NienKhoaHocKies.Find(ID); if (nkhk != null) { context.NienKhoaHocKies.Remove(nkhk); context.SaveChanges(); } } }