public HolidayController(IErrorService errorService, IHolidayService holidayService, ITimeDayService timedayService, IOTRequestService otRequestService, IStatusRequestService statusRequestService, IRequestService requestService) : base(errorService) { _holidayService = holidayService; _timedayService = timedayService; _otRequestService = otRequestService; _statusRequestService = statusRequestService; _requestService = requestService; }
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; }
/// <summary> /// Contructor of OTRequestController class /// </summary> /// <param name="errorService"></param> public OTRequestController(IErrorService errorService, IOTRequestService otrequestService, IOTTimeTypeService ottimetypeService, IOTDateTypeService otdatetypeService, IOTRequestUserService otRequestUserService, IStatusRequestService statusRequestService, IUserService userService, IFingerTimeSheetService fingerTimeSheetService, ISystemService systemService, ICommonService commonService ) : base(errorService) { _otrequestService = otrequestService; _ottimetypeService = ottimetypeService; _otdatetypeService = otdatetypeService; _otRequestUserService = otRequestUserService; _statusRequestService = statusRequestService; _userService = userService; _fingerTimeSheetService = fingerTimeSheetService; _systemService = systemService; _commonService = commonService; }
public OTRequestController(IOTRequestService _service) { service = _service; }