public void DangKy(int maLopTC, string maSV)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         context.Insert_DangKy(maSV, maLopTC);
     }
 }
示例#2
0
 /// <summary>
 /// Lấy danh sách điểm danh theo mã sinh viên
 /// </summary>
 /// <param name="maSV"></param>
 /// <returns>List điểm danh</returns>
 public List <DiemDanh> GetByMaSV(string maSV)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         var query = context.DiemDanhs.Where(x => x.MaSV == maSV).ToList();
         return(query);
     }
 }
示例#3
0
 /// <summary>
 /// Lấy 1 record dựa vào ma khoa
 /// </summary>
 /// <param name="maKhoa"></param>
 /// <returns>Khoa</returns>
 public Khoa GetById(string maKhoa)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         Khoa khoa = context.Khoas.Where(x => x.MaKhoa == maKhoa).FirstOrDefault();
         return(khoa);
     }
 }
示例#4
0
 public void Create(SinhVien sv)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         context.SinhViens.Add(sv);
         context.SaveChanges();
     }
 }
示例#5
0
 public List <SinhVien> GetAll()
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         var sinhViens = context.SinhViens.Include(s => s.DiemDanhs).Include(s => s.DongHocPhis).Include(s => s.LopTinChis).Include(s => s.Lop).ToList();
         return(sinhViens);
     }
 }
示例#6
0
 /// <summary>
 /// Get login SinhVien
 /// </summary>
 /// <param name="maSV"></param>
 /// <returns>NULL : false</returns>
 /// <return>#NULL : true</return>
 public SinhVien GetLoginSinhVien(string email, string pass)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         var query = context.SinhViens.Where(x => x.Email == email && x.MatKhau == pass).FirstOrDefault();
         return(query);
     }
 }
 /// <summary>
 /// Lấy 1 record dựa vào ma lop
 /// </summary>
 /// <param name="maMH"></param>
 /// <returns>Khoa</returns>
 public MonHoc GetById(string maMonHoc)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         MonHoc mh = context.MonHocs.Where(x => x.MaMH == maMonHoc).FirstOrDefault();
         return(mh);
     }
 }
 /// <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();
     }
 }
 public GiangVien GetById(string maGV)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         var query = context.GiangViens.Where(x => x.MaGV == maGV).FirstOrDefault();
         return(query);
     }
 }
示例#10
0
 public void Create(HeDaoTao hdt)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         context.HeDaoTaos.Add(hdt);
         context.SaveChanges();
     }
 }
示例#11
0
 public HeDaoTao GetById(string id)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         HeDaoTao hdt = context.HeDaoTaos.Find(id);
         return(hdt);
     }
 }
示例#12
0
 /// <summary>
 /// Lấy tất cả record
 /// </summary>
 /// <returns>List</returns>
 public List <HeDaoTao> GetAll()
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         List <HeDaoTao> listHDT = context.HeDaoTaos.ToList();
         return(listHDT);
     }
 }
示例#13
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();
     }
 }
示例#14
0
 /// <summary>
 /// Lấy 1 record dựa vào mã phiếu điểm danh
 /// </summary>
 /// <param name="maPDD"></param>
 /// <returns>Khoa</returns>
 public DiemDanh GetById(string maPDD)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         DiemDanh dd = context.DiemDanhs.Where(x => x.MaPhieuDD == maPDD).FirstOrDefault();
         return(dd);
     }
 }
示例#15
0
 /// <summary>
 /// Lấy tất cả record
 /// </summary>
 /// <returns>List</returns>
 public List <DiemDanh> GetAll()
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         var listLop = context.DiemDanhs.Include(l => l.LopTinChi).Include(l => l.SinhVien).ToList();
         return(listLop);
     }
 }
 /// <summary>
 /// Lấy tất cả record
 /// </summary>
 /// <returns>List</returns>
 public List <GiaTinChi> GetAll()
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         var listLop = context.GiaTinChis.Include(l => l.HeDaoTao).ToList();
         return(listLop);
     }
 }
 /// <summary>
 /// Lấy 1 record dựa vào ma giá tín chỉ
 /// </summary>
 /// <param name="maGiaTC">Mã giá tín chỉ</param>
 /// <returns>Khoa</returns>
 public GiaTinChi GetById(string maGiaTC)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         GiaTinChi giaTC = context.GiaTinChis.Where(x => x.MaGiaTC == maGiaTC).FirstOrDefault();
         return(giaTC);
     }
 }
 public List <GiangVien> GetAll()
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         var query = context.GiangViens.Include(g => g.Khoa).ToList();
         return(query);
     }
 }
示例#19
0
 /// <summary>
 /// Lấy tất cả record
 /// </summary>
 /// <returns>List</returns>
 public List <MonHoc> GetAll()
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         var monHocs = context.MonHocs.ToList();
         return(monHocs);
     }
 }
 public void Create(GiangVien giangVien)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         context.GiangViens.Add(giangVien);
         context.SaveChanges();
     }
 }
示例#21
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();
     }
 }
 public GiangVien GetByEmailAndPass(string email, string pass)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         GiangVien giangVien = context.GiangViens.Where(x => x.Email == email && x.MatKhau == pass).FirstOrDefault();
         return(giangVien);
     }
 }
示例#23
0
 /// <summary>
 /// Lấy danh sach sinh vien theo lop
 /// </summary>
 /// <param name="maLop"></param>
 /// <returns>List<Sinhvien></returns>
 public List <SinhVien> GetByMaLop(string maLop)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         var query = context.SinhViens.Where(x => x.MaLop == maLop).ToList();
         return(query);
     }
 }
示例#24
0
 /// <summary>
 /// Lấy record theo maLopTC
 /// </summary>
 /// <returns>List</returns>
 public List <ThoiKhoaBieu> GetByMaLopTC(int maLopTC)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         List <ThoiKhoaBieu> listThoiKhoaBieu = context.ThoiKhoaBieux.Where(x => x.MaLopTC == maLopTC).ToList();
         return(listThoiKhoaBieu);
     }
 }
示例#25
0
 public SinhVien GetById(string maSV)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         var sinhVien = context.SinhViens.Find(maSV);
         return(sinhVien);
     }
 }
示例#26
0
 public void Create(ThoiKhoaBieu tkb)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         context.ThoiKhoaBieux.Add(tkb);
         context.SaveChanges();
     }
 }
示例#27
0
 /// <summary>
 /// Lấy tất cả record
 /// </summary>
 /// <returns>List</returns>
 public List <Khoa> GetAll()
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         List <Khoa> listKhoa = context.Khoas.ToList();
         return(listKhoa);
     }
 }
示例#28
0
 /// <summary>
 /// Lấy tất cả record trong nam hiện tại
 /// </summary>
 /// <returns>List</returns>
 public List <ThoiKhoaBieu> GetCurent()
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         List <ThoiKhoaBieu> listThoiKhoaBieu = context.ThoiKhoaBieux.ToList();
         return(listThoiKhoaBieu);
     }
 }
示例#29
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();
     }
 }
 /// <summary>
 /// Lấy 1 record dựa vào mã hệ đào tào
 /// </summary>
 /// <param name="maHeDT">Mã hệ đào tào</param>
 /// <returns>Khoa</returns>
 public List <GiaTinChi> GetByHeDT(string maHeDT)
 {
     using (var context = new QuanLyDaoTaoEntities())
     {
         List <GiaTinChi> giaTCs = context.GiaTinChis.Where(x => x.MaHDT == maHeDT).ToList();
         return(giaTCs);
     }
 }