コード例 #1
0
ファイル: Cat_JobTitleServices.cs プロジェクト: radtek/vnr
 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));
     }
 }
コード例 #2
0
ファイル: Cat_PositionServices.cs プロジェクト: dtafe/vnr
        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);

            }
        }
コード例 #3
0
ファイル: Cat_PositionServices.cs プロジェクト: dtafe/vnr
 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;
     }
 }
コード例 #4
0
ファイル: Cat_JobTitleServices.cs プロジェクト: dtafe/vnr
 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;
     }
 }
コード例 #5
0
ファイル: Cat_JobTitleServices.cs プロジェクト: radtek/vnr
 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);
     }
 }
コード例 #6
0
 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);
     }
 }
コード例 #7
0
ファイル: Cat_PositionServices.cs プロジェクト: dtafe/vnr
 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;
         }
     }
 }
コード例 #8
0
ファイル: Cat_JobTitleServices.cs プロジェクト: radtek/vnr
 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);
         }
     }
 }
コード例 #9
0
 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);
         }
     }
 }
コード例 #10
0
ファイル: Cat_JobTitleServices.cs プロジェクト: dtafe/vnr
        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;
                }

            }
        }
コード例 #11
0
ファイル: Cat_JobTitleServices.cs プロジェクト: radtek/vnr
 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);
         }
     }
 }
コード例 #12
0
 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);
         }
     }
 }
コード例 #13
0
 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);
         }
     }
 }
コード例 #14
0
ファイル: Cat_PositionServices.cs プロジェクト: dtafe/vnr
        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;
                }

            }
        }
コード例 #15
0
ファイル: Cat_EmployeeTypeServices.cs プロジェクト: dtafe/vnr
        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;
                }

            }
        }
コード例 #16
0
ファイル: Cat_JobTitleServices.cs プロジェクト: dtafe/vnr
        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;
                }

            }
        }