コード例 #1
0
 public void Create(ThoiKhoaBieu tkb)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         context.ThoiKhoaBieux.Add(tkb);
         context.SaveChanges();
     }
 }
コード例 #2
0
 /// <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();
     }
 }
コード例 #3
0
 /// <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();
     }
 }
コード例 #4
0
 /// <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();
     }
 }
コード例 #5
0
 public void Create(HeDaoTao hdt)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         context.HeDaoTaos.Add(hdt);
         context.SaveChanges();
     }
 }
コード例 #6
0
 public void Create(GiangVien giangVien)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         context.GiangViens.Add(giangVien);
         context.SaveChanges();
     }
 }
コード例 #7
0
 /// <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();
     }
 }
コード例 #8
0
 public void Create(SinhVien sv)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         context.SinhViens.Add(sv);
         context.SaveChanges();
     }
 }
コード例 #9
0
 /// <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();
     }
 }
コード例 #10
0
 /// <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();
     }
 }
コード例 #11
0
 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();
     }
 }
コード例 #12
0
 /// <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();
     }
 }
コード例 #13
0
 public void Delete(string maGV)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         GiangVien giangVien = context.GiangViens.Find(maGV);
         context.GiangViens.Remove(giangVien);
         context.SaveChanges();
     }
 }
コード例 #14
0
 public void Delete(string maHDT)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         HeDaoTao hdt = context.HeDaoTaos.Find(maHDT);
         context.HeDaoTaos.Remove(hdt);
         context.SaveChanges();
     }
 }
コード例 #15
0
 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();
     }
 }
コード例 #16
0
 /// <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();
     }
 }
コード例 #17
0
 /// <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();
     }
 }
コード例 #18
0
 /// <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();
     }
 }
コード例 #19
0
 /// <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();
     }
 }
コード例 #20
0
 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();
     }
 }
コード例 #21
0
 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();
     }
 }
コード例 #22
0
 public void Delete(string id)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         SinhVien sv = context.SinhViens.Find(id);
         context.SinhViens.Remove(sv);
         context.SaveChanges();
     }
 }
コード例 #23
0
 /// <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();
     }
 }
コード例 #24
0
 /// <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();
         }
     }
 }
コード例 #25
0
 /// <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();
         }
     }
 }
コード例 #26
0
 /// <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();
         }
     }
 }
コード例 #27
0
 /// <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();
         }
     }
 }
コード例 #28
0
 /// <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();
         }
     }
 }
コード例 #29
0
 /// <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();
         }
     }
 }