Beispiel #1
0
 public FingerMachineUserService(IFingerMachineUserRepository fingerMachineUserRepository, IFingerTimeSheetRepository fingerTimeSheetRepository, IAbnormalCaseRepository abnormalCaseRepository, IUnitOfWork unitOfWork)
 {
     this._fingerTimeSheetRepository   = fingerTimeSheetRepository;
     this._abnormalCaseRepository      = abnormalCaseRepository;
     this._fingerMachineUserRepository = fingerMachineUserRepository;
     this._unitOfWork = unitOfWork;
 }
Beispiel #2
0
 public UserService(IAppUserRepository appUserRepository, IUserOnsiteRepository userOnsiteRepository, IUnitOfWork unitOfWork,
                    IOTRequestUserRepository oTRequestUserRepository,
                    IRequestRepository requestRepository,
                    IOTRequestRepository oTRequestRepository,
                    IExplanationRequestRepository explanationRequestRepository,
                    IEntitleDayAppUserRepository entitleDayAppUserRepository,
                    IAbnormalCaseRepository abnormalCaseRepository,
                    IFingerTimeSheetRepository fingerTimeSheetRepository,
                    IFingerMachineUserRepository fingerMachineUserRepository,
                    IChildcareLeaveRepository childcareLeaveRepository,
                    IAnnouncementRepository announcementRepository,
                    IAnnouncementUserRepository announcementUserRepository,
                    ITimeSheetRepository timeSheetRepository
                    )
 {
     this._appUserRepository            = appUserRepository;
     this._userOnsiteRepository         = userOnsiteRepository;
     this._unitOfWork                   = unitOfWork;
     this._oTRequestUserRepository      = oTRequestUserRepository;
     this._requestRepository            = requestRepository;
     this._oTRequestRepository          = oTRequestRepository;
     this._explanationRequestRepository = explanationRequestRepository;
     this._entitleDayAppUserRepository  = entitleDayAppUserRepository;
     this._abnormalCaseRepository       = abnormalCaseRepository;
     this._fingerTimeSheetRepository    = fingerTimeSheetRepository;
     this._fingerMachineUserRepository  = fingerMachineUserRepository;
     this._childcareLeaveRepository     = childcareLeaveRepository;
     this._announcementRepository       = announcementRepository;
     this._announcementUserRepository   = announcementUserRepository;
     this._timeSheetRepository          = timeSheetRepository;
 }
Beispiel #3
0
 /// <summary>
 /// Constructor TimeSheet Service
 /// </summary>
 /// <param name="TimeSheetRepository"></param>
 /// <param name="unitOfWork"></param>
 public TimeSheetService(ITimeSheetRepository timeSheetRepository, IAbnormalCaseRepository abnormalCaseRepository,
                         IExplanationRequestRepository explanationReQuestRepository, IUnitOfWork unitOfWork)
 {
     this._timeSheetRepository          = timeSheetRepository;
     this._abnormalCaseRepository       = abnormalCaseRepository;
     this._explanationRequestRepository = explanationReQuestRepository;
     this._unitOfWork = unitOfWork;
 }
Beispiel #4
0
 public AbnormalCaseService(IAbnormalCaseRepository AbnormalCaseRepository, IExplanationRequestRepository explanationRequestRepository,
                            IUnitOfWork unitOfWork, IAbnormalReasonRepository abnormalReasonRepository)
 {
     this.explanationRequestRepository = explanationRequestRepository;
     this._abnormalCaseRepository      = AbnormalCaseRepository;
     this._abnormalReasonRepository    = abnormalReasonRepository;
     this._unitOfWork = unitOfWork;
 }/// <summary>
        public void Initialize()
        {
            dbFactory = new DbFactory();
            DbContext = new TMSDbContext();
            explanationRequestRepository = new ExplanationRequestRepository(dbFactory);
            abnormalcaseRepository       = new AbnormalCaseRepository(dbFactory);
            unitOfWork = new UnitOfWork(dbFactory);
            //abnormalcaseService = new AbnormalCaseService(abnormalcaseRepository, explanationRequestRepository, unitOfWork);
            userManager = new UserManager <AppUser>(new UserStore <AppUser>(DbContext));
            userId1     = userManager.FindByName("admin").Id;
            userId2     = userManager.FindByName("ltdat").Id;

            //approveID = statusRequestRepository.GetSingleByCondition(x => x.Name == "Approved").ID.ToString();
            //rejectID = statusRequestRepository.GetSingleByCondition(x => x.Name == "Reject").ID.ToString();
            //cancelID = statusRequestRepository.GetSingleByCondition(x => x.Name == "Cancel").ID.ToString();
            //delegationID = statusRequestRepository.GetSingleByCondition(x => x.Name == "Delegation").ID.ToString();
            //pendingID = statusRequestRepository.GetSingleByCondition(x => x.Name == "Pending").ID.ToString();
        }
Beispiel #6
0
 public void Initialize()
 {
     DbContext               = new TMSDbContext();
     dbFactory               = new DbFactory();
     timeSheetRepository     = new TimeSheetRepository(dbFactory);
     statusRequestRepository = new StatusRequestRepository(dbFactory);
     AbnormalCaseRepository  = new AbnormalCaseRepository(dbFactory);
     ExplanationRepository   = new ExplanationRequestRepository(dbFactory);
     unitOfWork              = new UnitOfWork(dbFactory);
     timeSheetService        = new TimeSheetService(timeSheetRepository, AbnormalCaseRepository, ExplanationRepository, unitOfWork);
     userManager             = new UserManager <AppUser>(new UserStore <AppUser>(DbContext));
     memberID     = userManager.FindByName("tqhuy").Id;
     adminID      = userManager.FindByName("dmtuong").Id;
     approveID    = statusRequestRepository.GetSingleByCondition(x => x.Name == "Approved").ID.ToString();
     rejectID     = statusRequestRepository.GetSingleByCondition(x => x.Name == "Approved").ID.ToString();
     cancelID     = statusRequestRepository.GetSingleByCondition(x => x.Name == "Approved").ID.ToString();
     delegationID = statusRequestRepository.GetSingleByCondition(x => x.Name == "Approved").ID.ToString();
     pendingID    = statusRequestRepository.GetSingleByCondition(x => x.Name == "Approved").ID.ToString();
 }