public void DangKy(int maLopTC, string maSV) { using (var context = new QuanLyDaoTaoEntities()) { context.Insert_DangKy(maSV, maLopTC); } }
/// <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); } }
/// <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); } }
public void Create(SinhVien sv) { using (var context = new QuanLyDaoTaoEntities()) { context.SinhViens.Add(sv); context.SaveChanges(); } }
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); } }
/// <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); } }
public void Create(HeDaoTao hdt) { using (var context = new QuanLyDaoTaoEntities()) { context.HeDaoTaos.Add(hdt); context.SaveChanges(); } }
public HeDaoTao GetById(string id) { using (var context = new QuanLyDaoTaoEntities()) { HeDaoTao hdt = context.HeDaoTaos.Find(id); return(hdt); } }
/// <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); } }
/// <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(); } }
/// <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); } }
/// <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); } }
/// <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(); } }
/// <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); } }
/// <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); } }
/// <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); } }
public SinhVien GetById(string maSV) { using (var context = new QuanLyDaoTaoEntities()) { var sinhVien = context.SinhViens.Find(maSV); return(sinhVien); } }
public void Create(ThoiKhoaBieu tkb) { using (var context = new QuanLyDaoTaoEntities()) { context.ThoiKhoaBieux.Add(tkb); context.SaveChanges(); } }
/// <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); } }
/// <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); } }
/// <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); } }