public IQueryable <Cat_JobTitle> GetCatJobTitles() { using (var context = new VnrHrmHrDataContext()) { IUnitOfWork unitOfWork = (IUnitOfWork)(new UnitOfWork(context)); Cat_JobTitleRepository repo = new Cat_JobTitleRepository(unitOfWork); return(repo.GetAllCatJobTitles().Where(i => i.IsDelete == null)); } }
public IQueryable<Cat_Position> GetCatPositions() { using (var context = new VnrHrmHrDataContext()) { IUnitOfWork unitOfWork = (IUnitOfWork)(new UnitOfWork(context)); Cat_PositionRepository repo = new Cat_PositionRepository(unitOfWork); return repo.GetAllCatPositions().Where(i => i.IsDelete == null); } }
public Cat_Position GetByIdCatPositions(int id) { using (var context = new VnrHrmHrDataContext()) { IUnitOfWork unitOfWork = (IUnitOfWork)(new UnitOfWork(context)); Cat_PositionRepository repo = new Cat_PositionRepository(unitOfWork); Cat_Position CatPosition = new Cat_Position(); CatPosition = repo.GetById(id); if (CatPosition.IsDelete == true) CatPosition = null; return CatPosition; } }
public Cat_JobTitle GetByIdCatJobTitles(int id) { using (var context = new VnrHrmHrDataContext()) { IUnitOfWork unitOfWork = (IUnitOfWork)(new UnitOfWork(context)); Cat_JobTitleRepository repo = new Cat_JobTitleRepository(unitOfWork); Cat_JobTitle CatJobTitle = new Cat_JobTitle(); CatJobTitle = repo.GetById(id); if (CatJobTitle.IsDelete == true) CatJobTitle = null; return CatJobTitle; } }
public Cat_JobTitle GetByIdCatJobTitles(int id) { using (var context = new VnrHrmHrDataContext()) { IUnitOfWork unitOfWork = (IUnitOfWork)(new UnitOfWork(context)); Cat_JobTitleRepository repo = new Cat_JobTitleRepository(unitOfWork); Cat_JobTitle CatJobTitle = new Cat_JobTitle(); CatJobTitle = repo.GetById(id); if (CatJobTitle.IsDelete == true) { CatJobTitle = null; } return(CatJobTitle); } }
public Cat_Position GetByIdCatPositions(int id) { using (var context = new VnrHrmHrDataContext()) { IUnitOfWork unitOfWork = (IUnitOfWork)(new UnitOfWork(context)); Cat_PositionRepository repo = new Cat_PositionRepository(unitOfWork); Cat_Position CatPosition = new Cat_Position(); CatPosition = repo.GetById(id); if (CatPosition.IsDelete == true) { CatPosition = null; } return(CatPosition); } }
public bool AddCatPositions(Cat_Position CatPosition) { using (var context = new VnrHrmHrDataContext()) { IUnitOfWork unitOfWork = (IUnitOfWork)(new UnitOfWork(context)); Cat_PositionRepository repo = new Cat_PositionRepository(unitOfWork); try { repo.Add(CatPosition); repo.SaveChanges(); return true; } catch { return false; } } }
public bool UpdateCatJobTitle(Cat_JobTitle CatJobTitle) { using (var context = new VnrHrmHrDataContext()) { IUnitOfWork unitOfWork = (IUnitOfWork)(new UnitOfWork(context)); Cat_JobTitleRepository repo = new Cat_JobTitleRepository(unitOfWork); try { repo.Edit(CatJobTitle); repo.SaveChanges(); return(true); } catch { return(false); } } }
public bool AddCatEmployeeTypes(Cat_EmployeeType CatEmployeeType) { using (var context = new VnrHrmHrDataContext()) { IUnitOfWork unitOfWork = (IUnitOfWork)(new UnitOfWork(context)); Cat_EmployeeTypeRepository repo = new Cat_EmployeeTypeRepository(unitOfWork); try { repo.Add(CatEmployeeType); repo.SaveChanges(); return(true); } catch { return(false); } } }
public bool UpdateCatJobTitle(Cat_JobTitle CatJobTitle) { using (var context = new VnrHrmHrDataContext()) { IUnitOfWork unitOfWork = (IUnitOfWork)(new UnitOfWork(context)); Cat_JobTitleRepository repo = new Cat_JobTitleRepository(unitOfWork); try { repo.Edit(CatJobTitle); repo.SaveChanges(); return true; } catch { return false; } } }
public bool DeleteEternity(int CatJobTitleId) { using (var context = new VnrHrmHrDataContext()) { IUnitOfWork unitOfWork = (IUnitOfWork)(new UnitOfWork(context)); Cat_JobTitleRepository repo = new Cat_JobTitleRepository(unitOfWork); Cat_JobTitle CatJobTitle = new Cat_JobTitle(); CatJobTitle = repo.GetById(CatJobTitleId); try { repo.Delete(CatJobTitle); repo.SaveChanges(); return(true); } catch { return(false); } } }
public bool DeleteCatEmployeeType(int CatEmployeeTypeId) { using (var context = new VnrHrmHrDataContext()) { IUnitOfWork unitOfWork = (IUnitOfWork)(new UnitOfWork(context)); Cat_EmployeeTypeRepository repo = new Cat_EmployeeTypeRepository(unitOfWork); Cat_EmployeeType CatEmployeeType = new Cat_EmployeeType(); CatEmployeeType = repo.GetById(CatEmployeeTypeId); try { repo.Remove(CatEmployeeType); repo.SaveChanges(); return(true); } catch { return(false); } } }
public bool DeleteCatPosition(int CatPositionId) { using (var context = new VnrHrmHrDataContext()) { IUnitOfWork unitOfWork = (IUnitOfWork)(new UnitOfWork(context)); Cat_PositionRepository repo = new Cat_PositionRepository(unitOfWork); Cat_Position CatPosition = new Cat_Position(); CatPosition = repo.GetById(CatPositionId); try { repo.Remove(CatPosition); repo.SaveChanges(); return(true); } catch { return(false); } } }
public bool DeleteCatPosition(int CatPositionId) { using (var context = new VnrHrmHrDataContext()) { IUnitOfWork unitOfWork = (IUnitOfWork)(new UnitOfWork(context)); Cat_PositionRepository repo = new Cat_PositionRepository(unitOfWork); Cat_Position CatPosition = new Cat_Position(); CatPosition = repo.GetById(CatPositionId); try { repo.Remove(CatPosition); repo.SaveChanges(); return true; } catch { return false; } } }
public bool DeleteCatEmployeeType(int CatEmployeeTypeId) { using (var context = new VnrHrmHrDataContext()) { IUnitOfWork unitOfWork = (IUnitOfWork)(new UnitOfWork(context)); Cat_EmployeeTypeRepository repo = new Cat_EmployeeTypeRepository(unitOfWork); Cat_EmployeeType CatEmployeeType = new Cat_EmployeeType(); CatEmployeeType = repo.GetById(CatEmployeeTypeId); try { repo.Remove(CatEmployeeType); repo.SaveChanges(); return true; } catch { return false; } } }
public bool DeleteEternity(int CatJobTitleId) { using (var context = new VnrHrmHrDataContext()) { IUnitOfWork unitOfWork = (IUnitOfWork)(new UnitOfWork(context)); Cat_JobTitleRepository repo = new Cat_JobTitleRepository(unitOfWork); Cat_JobTitle CatJobTitle = new Cat_JobTitle(); CatJobTitle = repo.GetById(CatJobTitleId); try { repo.Delete(CatJobTitle); repo.SaveChanges(); return true; } catch { return false; } } }