public ThuyenChuyen CapNhatThuyenChuyen(ThuyenChuyen thuyenChuyen) { using (var _db = new TCCBDB()) { thuyenChuyen.BangTotNghiep = null; thuyenChuyen.ChuyenNganhDaoTao = null; thuyenChuyen.HinhThucDaoTao = null; thuyenChuyen.MonDuTuyen = null; thuyenChuyen.School = null; thuyenChuyen.School1 = null; thuyenChuyen.StatusThuyenChuyen = null; thuyenChuyen.TrinhDoCaoNhat = null; thuyenChuyen.Ward = null; thuyenChuyen.Ward1 = null; thuyenChuyen.XepLoaiHocLuc = null; _db.Entry(thuyenChuyen).State = EntityState.Modified; try { _db.SaveChanges(); } catch (Exception) { return(null); } return(thuyenChuyen); } }
public List <HoaDon> GetHoaDonByDVQLId() { using (var _db = new TCCBDB()) { List <HoaDon> hoaDons = _db.HoaDons.OrderByDescending(s => s.Id).ToList(); return(hoaDons); } }
public List <MonDuTuyen> GetAllMonDuTuyens() { using (var _db = new TCCBDB()) { List <MonDuTuyen> monDuTuyens = _db.MonDuTuyens.OrderBy(s => s.PositionInterviewId).ThenBy(s => s.Name).ToList(); return(monDuTuyens); } }
public Account GetAccountByUsernameAndPassword(string username, string password) { using (var _db = new TCCBDB()) { Account account = _db.Accounts.Where(s => s.Username == username.Trim() && s.Password == password.Trim()).SingleOrDefault(); return(account); } }
public List <Ward> GetWardByDistrictId(int id) { using (var _db = new TCCBDB()) { List <Ward> wards = _db.Wards.Where(s => s.DistrictID == id).OrderBy(s => s.Name).ToList(); return(wards); } }
public MaNgach GetMaNgachById(string id) { using (var _db = new TCCBDB()) { MaNgach maNgach = _db.MaNgaches.Where(s => s.ID == id).SingleOrDefault(); return(maNgach); } }
public List <TrinhDoCaoNhat> GetTrinhDoCaoNhats() { using (var _db = new TCCBDB()) { List <TrinhDoCaoNhat> trinhDoCaoNhatHienNays = _db.TrinhDoCaoNhats.ToList(); return(trinhDoCaoNhatHienNays); } }
public List <BangTotNghiep> GetBangTotNghieps() { using (var _db = new TCCBDB()) { List <BangTotNghiep> bangTotNghieps = _db.BangTotNghieps.Where(s => s.IsActive == true).ToList(); return(bangTotNghieps); } }
public int GetRegistrationInterviewsDaHoanThanhSoLuong() { using (var _db = new TCCBDB()) { int count = _db.RegistrationInterviews.Where(s => s.CreatedAt.Value.Year == DateTime.Now.Year && (s.IsActive == true || s.IsActive == null) && s.UpdatedAt != null).Count(); return(count); } }
public List <RegistrationInterview> GetRegistrationInterviewsDaHoanThanh() { using (var _db = new TCCBDB()) { List <RegistrationInterview> registrationInterviews = _db.RegistrationInterviews.Where(s => s.CreatedAt.Value.Year == DateTime.Now.Year && (s.IsActive == true || s.IsActive == null) && s.UpdatedAt != null).ToList(); return(registrationInterviews); } }
public List <LamViecTrongNganh> GetLamViecTrongNganhs() { using (var _db = new TCCBDB()) { List <LamViecTrongNganh> lamViecTrongNganhs = _db.LamViecTrongNganhs.Where(s => s.IsActive == true).ToList(); return(lamViecTrongNganhs); } }
public List <HinhThucDaoTao> GetHinhThucDaoTaos() { using (var _db = new TCCBDB()) { List <HinhThucDaoTao> hinhThucDaoTaos = _db.HinhThucDaoTaos.Where(s => s.IsActive == true).ToList(); return(hinhThucDaoTaos); } }
public List <TrinhDoTinHoc> GetTrinhDoTinHocs() { using (var _db = new TCCBDB()) { List <TrinhDoTinHoc> trinhDoTinHocs = _db.TrinhDoTinHocs.Where(s => s.IsActive == true).ToList(); return(trinhDoTinHocs); } }
public List <UserPermission> GetUserPermissionsByAccountId(int id) { using (var _db = new TCCBDB()) { List <UserPermission> userPermissions = _db.UserPermissions.Include("Permission").Where(s => s.AccountId == id).ToList(); return(userPermissions); } }
public List <StatusThuyenChuyen> GetStatusThuyenChuyens() { using (var _db = new TCCBDB()) { List <StatusThuyenChuyen> statusThuyenChuyens = _db.StatusThuyenChuyens.Where(s => s.IsActive == true).ToList(); return(statusThuyenChuyens); } }
public int GetRegistrationInterviewsHopLeSoLuong() { using (var _db = new TCCBDB()) { int count = _db.RegistrationInterviews.Where(s => s.CreatedAt.Value.Year == DateTime.Now.Year && s.NguoiRaSoat != null && (s.IsActive == true || s.IsActive == null)).Count(); return(count); } }
public StatusThuyenChuyen GetStatusThuyenChuyensById(int id) { using (var _db = new TCCBDB()) { StatusThuyenChuyen statusThuyenChuyens = _db.StatusThuyenChuyens.Where(s => s.Id == id).SingleOrDefault(); return(statusThuyenChuyens); } }
public List <RegistrationInterview> GetRegistrationInterviewsHopLe() { using (var _db = new TCCBDB()) { List <RegistrationInterview> registrationInterviews = _db.RegistrationInterviews.Where(s => s.CreatedAt.Value.Year == DateTime.Now.Year && s.NguoiRaSoat != null && (s.IsActive == true || s.IsActive == null)).ToList(); return(registrationInterviews); } }
public List <CapTruong> GetCapTruongs() { using (var _db = new TCCBDB()) { List <CapTruong> capTruongs = _db.CapTruongs.Where(s => s.IsActive == true).ToList(); return(capTruongs); } }
public List <RegistrationInterview> GetRegistrationInterviewsByCmnd(string cmnd) { using (var _db = new TCCBDB()) { List <RegistrationInterview> registrationInterviews = _db.RegistrationInterviews.Where(s => s.IdentifyCard.Trim() == cmnd.Trim()).OrderByDescending(s => s.CreatedAt).ToList(); return(registrationInterviews); } }
public List <TrinhDoNgoaiNgu> GetTrinhDoNgoaiNgus() { using (var _db = new TCCBDB()) { List <TrinhDoNgoaiNgu> trinhDoNgoaiNgus = _db.TrinhDoNgoaiNgus.ToList(); return(trinhDoNgoaiNgus); } }
public List <Province> GetProvinceByCountryId(int id) { using (var _db = new TCCBDB()) { List <Province> provinces = _db.Provinces.Where(s => s.CountryId == id).OrderBy(s => s.Name).ToList(); return(provinces); } }
public List <MaNgach> GetMaNgaches() { using (var _db = new TCCBDB()) { List <MaNgach> maNgaches = _db.MaNgaches.OrderBy(s => s.ChucDanh).ToList(); return(maNgaches); } }
public School GetSchoolById(int?id) { using (var _db = new TCCBDB()) { School school = _db.Schools.Include("Ward.District").Where(s => s.Id == id).SingleOrDefault(); return(school); } }
public List <ChuyenNganhDaoTao> GetChuyenNganhDaoTaos() { using (var _db = new TCCBDB()) { List <ChuyenNganhDaoTao> chuyenNganhDaoTaos = _db.ChuyenNganhDaoTaos.Where(s => s.IsActive == true).OrderBy(s => s.Name).ToList(); return(chuyenNganhDaoTaos); } }
public List <School> GetSchoolsByDistrictAndCapHoc(int?districtId, int?caphoc) { using (var _db = new TCCBDB()) { List <School> schools = _db.Schools.Where(s => s.Ward.DistrictID == districtId).Where(s => s.CapTruongId == caphoc).ToList(); return(schools); } }
public List <Account> GetAccounts() { using (var _db = new TCCBDB()) { List <Account> accounts = _db.Accounts.ToList(); return(accounts); } }
public List <GroupPermission> GetGroupPermissions() { using (var _db = new TCCBDB()) { List <GroupPermission> groupPermissions = _db.GroupPermissions.Where(s => s.IsActive == true).ToList(); return(groupPermissions); } }
public List <MonDuTuyen> GetMonDuTuyens() { using (var _db = new TCCBDB()) { List <MonDuTuyen> monDuTuyens = _db.MonDuTuyens.Include("ViTriUngTuyen").Where(s => s.IsActive == true).OrderBy(s => s.PositionInterviewId).ThenBy(s => s.Name).ToList(); return(monDuTuyens); } }
public List <BacLuong> GetBacLuongByNhomMaNgach(string nhom) { using (var _db = new TCCBDB()) { List <BacLuong> bacLuongs = _db.BacLuongs.Where(s => s.Nhom.Trim() == nhom.Trim()).OrderBy(s => s.ID).ToList(); return(bacLuongs); } }