Beispiel #1
0
 /// <summary>
 /// Constructor OT Request Service
 /// </summary>
 /// <param name="otrequestRepository"></param>
 /// <param name="unitOfWork"></param>
 public OTRequestService(IOTRequestUserRepository oTRequestUserRepository, IOTRequestRepository otrequestRepository, IStatusRequestRepository statusRequestRepository, IUnitOfWork unitOfWork)
 {
     this._otrequestRepository = otrequestRepository;
     _statusRequestRepository  = statusRequestRepository;
     _oTRequestUserRepository  = oTRequestUserRepository;
     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;
 }
 public void Initialize()
 {
     DbContext     = new TMSDbContext();
     dbFactory     = new DbFactory();
     objRepository = new OTRequestRepository(dbFactory);
     unitOfWork    = new UnitOfWork(dbFactory);
     userManager   = new UserManager <AppUser>(new UserStore <AppUser>(DbContext));
     UserID1       = userManager.FindByName("dmtuong").Id;
     UserID2       = userManager.FindByName("tqhuy").Id;
 }
Beispiel #4
0
 public void Initialize()
 {
     DbContext               = new TMSDbContext();
     dbFactory               = new DbFactory();
     objRepository           = new OTRequestRepository(dbFactory);
     statusRequestRepository = new StatusRequestRepository(dbFactory);
     unitOfWork              = new UnitOfWork(dbFactory);
     oTRequestUserRepository = new OTRequestUserRepository(dbFactory);
     objServices             = new OTRequestService(oTRequestUserRepository, objRepository, statusRequestRepository, unitOfWork);
     userManager             = new UserManager <AppUser>(new UserStore <AppUser>(DbContext));
     UserID2 = userManager.FindByName("vxthien").Id;
     UserID3 = userManager.FindByName("tqhuy").Id;
     UserID4 = userManager.FindByName("ltdat").Id;
 }