コード例 #1
0
ファイル: AccountsController.cs プロジェクト: WarHatch/PEEKT
 public AccountsController(UserManager <Employee> userManager, SignInManager <Employee> signInManager, IEmployeeRepository employeeRepository, IOfficeRepository officeRepository)
 {
     _userManager        = userManager;
     _signInManager      = signInManager;
     _employeeRepository = employeeRepository;
     _officeRepository   = officeRepository;
 }
コード例 #2
0
 public OrderController(IBikeRepository bikeRepository, IOfficeRepository officeRepository, IClientRepository clientRepository, IOrderRepository orderRepository)
 {
     this._bikeRepository   = bikeRepository;
     this._officeRepository = officeRepository;
     this._clientRepository = clientRepository;
     this._orderRepository  = orderRepository;
 }
コード例 #3
0
 public OfficesService(
     [FromServices] IOfficeRepository officeRepository,
     [FromServices] IMapper automapper)
 {
     this.officeRepository = officeRepository;
     this.automapper       = automapper;
 }
コード例 #4
0
 public LibraryController(ILibraryRepository libraryRepository, IMapper mapper, IOfficeRepository officeRepository, IBookRepository bookRepository)
 {
     _libraryRepository = libraryRepository ?? throw new ArgumentNullException(nameof(libraryRepository));
     _mapper            = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _officeRepository  = officeRepository;
     _bookRepository    = bookRepository;
 }
コード例 #5
0
 public AssetTrackerCommandBase(IConsoleOutput output, IUserInput inputHandle, IAssetRepository assetRepo, IOfficeRepository officeRepo)
 {
     Assets       = assetRepo;
     Offices      = officeRepo;
     OutputHandle = output;
     InputHandle  = inputHandle;
 }
コード例 #6
0
ファイル: TestData.cs プロジェクト: Gulpener/GJ.CQRSCore
        public static void GenerateStartupInfo(ICompanyRepository companyRepo, IOfficeRepository officeRepo)
        {
            var company1 = new Company()
            {
                Id        = Guid.NewGuid(),
                Name      = "The Big Great Company",
                CEO       = "Peter Johnson",
                OfficeIds = new List <Guid>()
            };

            var office1 = new Office()
            {
                Id           = Guid.NewGuid(),
                BuildingName = "Building Numer One",
                Street       = "Downstreet",
                HouseNumber  = 1,
                City         = "Boston",
            };

            company1.OfficeIds.Add(office1.Id);
            companyRepo.Add(company1);
            officeRepo.Add(office1);

            var company2 = new Company()
            {
                Id        = Guid.NewGuid(),
                Name      = "The Small Company",
                CEO       = "Jan Janssen",
                OfficeIds = new List <Guid>()
            };

            companyRepo.Add(company2);
        }
コード例 #7
0
 public ReservationService(IMeetingRoomRepository meetingRoomRepository,
                           IOfficeRepository officeRepository,
                           IReservationRepository reservationRepository)
 {
     _meetingRoomRepository = meetingRoomRepository ?? throw new ArgumentNullException(nameof(meetingRoomRepository));
     _officeRepository      = officeRepository ?? throw new ArgumentNullException(nameof(_officeRepository));
     _reservationRepository = reservationRepository ?? throw new ArgumentNullException(nameof(reservationRepository));
 }
コード例 #8
0
 public EmployeeTravelController(UserManager <Employee> userManager, IEmployeeTravelRepository employeeTravelRepository, IEmployeeRepository employeeRepository, ITravelRepository travelRepository, IApartmentRepository apartmentRepository, IOfficeRepository officeRepository)
 {
     _userManager = userManager;
     _employeeTravelRepository = employeeTravelRepository;
     _employeeRepository       = employeeRepository;
     _travelRepository         = travelRepository;
     _apartmentRepository      = apartmentRepository;
     _officeRepository         = officeRepository;
 }
コード例 #9
0
        public OfficeController(IOfficeRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.OfficeRepository = repository;
        }
コード例 #10
0
 public FriendInviteService(IUnitOfWork unitOfWork, IUserAccessCodeInviteRepository userAccessCodeInviteRepository, IUserRepository userRepository, ISMSService SMSService, IUserStatusRepository userStatusRepository, IOfficeRepository officeRepository)
 {
     _unitOfWork = unitOfWork;
     _userAccessCodeInviteRepository = userAccessCodeInviteRepository;
     _userRepository       = userRepository;
     _SMSService           = SMSService;
     _userStatusRepository = userStatusRepository;
     _officeRepository     = officeRepository;
 }
コード例 #11
0
        public OfficeController(IOfficeRepository repository, string catalog, LoginView view)
        {
            this._LoginId = view.LoginId.ToLong();
            this._UserId = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog = catalog;

            this.OfficeRepository = repository;
        }
コード例 #12
0
        public OfficesController(IOfficeRepository officeRepository,
                                 IMapper mapper)
        {
            _officeRepository = officeRepository
                                ?? throw new ArgumentNullException(nameof(officeRepository));

            _mapper = mapper
                      ?? throw new ArgumentNullException(nameof(mapper));
        }
コード例 #13
0
 public OfficeAppService(
     IOfficeRepository officeRepository,
     IMapper mapper,
     IMediatorHandler bus)
 {
     _officeRepository = officeRepository;
     _mapper           = mapper;
     _bus = bus;
 }
コード例 #14
0
ファイル: TravelsController.cs プロジェクト: WarHatch/PEEKT
 public TravelsController(UserManager <Employee> userManager, ITravelRepository travelRepository, IOfficeRepository officeRepository, IEmployeeRepository employeeRepository, IEmployeeTravelRepository employeeTravelRepository, IHotelRepository hotelRepository, ITransportRepository transportRepository)
 {
     _userManager              = userManager;
     _travelRepository         = travelRepository;
     _officeRepository         = officeRepository;
     _employeeRepository       = employeeRepository;
     _employeeTravelRepository = employeeTravelRepository;
     _hotelRepository          = hotelRepository;
     _transportRepository      = transportRepository;
 }
コード例 #15
0
        public OfficeController()
        {
            this._LoginId = AppUsers.GetCurrent().View.LoginId.ToLong();
            this._UserId = AppUsers.GetCurrent().View.UserId.ToInt();
            this._OfficeId = AppUsers.GetCurrent().View.OfficeId.ToInt();
            this._Catalog = AppUsers.GetCurrentUserDB();

            this.OfficeRepository = new MixERP.Net.Schemas.Office.Data.Office
            {
                _Catalog = this._Catalog,
                _LoginId = this._LoginId,
                _UserId = this._UserId
            };
        }
コード例 #16
0
 public StaffCommandHandler(IUnitOfWork uow,
                            IMediatorHandler bus,
                            IOfficeRepository officeRepository,
                            IRoleRepository roleRepository,
                            IStaffRoleRepository staffRoleRepository,
                            IStaffRepository staffRepository, IMapper mapper) : base(uow, bus)
 {
     _officeRepository    = officeRepository;
     _roleRepository      = roleRepository;
     _staffRepository     = staffRepository;
     _staffRoleRepository = staffRoleRepository;
     _mapper       = mapper;
     _md5Encryptor = new Md5Encryptor();
 }
コード例 #17
0
        public OfficeController()
        {
            this._LoginId  = AppUsers.GetCurrent().View.LoginId.To <long>();
            this._UserId   = AppUsers.GetCurrent().View.UserId.To <int>();
            this._OfficeId = AppUsers.GetCurrent().View.OfficeId.To <int>();
            this._Catalog  = AppUsers.GetCatalog();

            this.OfficeRepository = new Frapid.Config.DataAccess.Office
            {
                _Catalog = this._Catalog,
                _LoginId = this._LoginId,
                _UserId  = this._UserId
            };
        }
コード例 #18
0
        public OfficeController()
        {
            this._LoginId  = AppUsers.GetCurrent().View.LoginId.ToLong();
            this._UserId   = AppUsers.GetCurrent().View.UserId.ToInt();
            this._OfficeId = AppUsers.GetCurrent().View.OfficeId.ToInt();
            this._Catalog  = AppUsers.GetCurrentUserDB();

            this.OfficeRepository = new MixERP.Net.Schemas.Office.Data.Office
            {
                _Catalog = this._Catalog,
                _LoginId = this._LoginId,
                _UserId  = this._UserId
            };
        }
コード例 #19
0
        protected override void Initialize(HttpControllerContext context)
        {
            base.Initialize(context);

            if (this.OfficeRepository == null)
            {
                this.OfficeRepository = new Frapid.Core.DataAccess.Office
                {
                    _Catalog = this.MetaUser.Catalog,
                    _LoginId = this.MetaUser.LoginId,
                    _UserId = this.MetaUser.UserId
                };
            }
        }
コード例 #20
0
 public MakeReservationCommandHandler(IMediator mediator,
                                      IReservationRepository reservationRepository,
                                      IOfficeRepository officeRepository,
                                      IMeetingRoomRepository meetingRoomRepository,
                                      ReservationService reservationService,
                                      ILogger <MakeReservationCommandHandler> logger)
 {
     _mediator = mediator ?? throw new ArgumentNullException(nameof(mediator));
     _reservationRepository = reservationRepository ?? throw new ArgumentNullException(nameof(reservationRepository));
     _officeRepository      = officeRepository ?? throw new ArgumentNullException(nameof(officeRepository));
     _meetingRoomRepository = meetingRoomRepository ?? throw new ArgumentNullException(nameof(meetingRoomRepository));
     _reservationService    = reservationService ?? throw new ArgumentNullException(nameof(reservationService));
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
 }
コード例 #21
0
 public AccountController(
     UserManager <AppUser> userManager,
     SignInManager <AppUser> signInManager,
     ITokenService tokenService,
     IMapper mapper,
     IOfficeRepository officeRepo
     )
 {
     _userManager   = userManager;
     _signInManager = signInManager;
     _tokenService  = tokenService;
     _mapper        = mapper;
     _officeRepo    = officeRepo;
 }
コード例 #22
0
 public UserService(IMapper mapper, IOfficeRepository officeRepository, IUserRepository userRepository, IShopUserRepository shopUserRepository, IUserStatusRepository userStatusRepository, IUserStatusLogRepository userStatusLogRepository, IUserAccessCodeExpirationRepository userAccessCodeExpirationRepository, IUnitOfWork unitOfWork, ILogger logger, IHostingEnvironment env, ISMSService SMSService, IEmailService emailService)
 {
     _mapper                             = mapper;
     _userRepository                     = userRepository;
     _shopUserRepository                 = shopUserRepository;
     _userStatusRepository               = userStatusRepository;
     _userStatusLogRepository            = userStatusLogRepository;
     _userAccessCodeExpirationRepository = userAccessCodeExpirationRepository;
     _unitOfWork                         = unitOfWork;
     _logger                             = logger;
     _env              = env;
     _SMSService       = SMSService;
     _emailService     = emailService;
     _officeRepository = officeRepository;
 }
コード例 #23
0
 public HierarchyFileService(IMapper mapper, IHierarchyFileDataRepository hierarchyFileDataRepository, IHierarchyFileDataErrorRepository hierarchyFileDataErrorRepository, IHierarchyFileRepository hierarchyFileRepository, IFileStatusRepository fileStatusRepository, IUserRepository userRepository, IUserStatusRepository userStatusRepository, INetworkRepository networkRepository, IShopRepository shopRepository, IShopUserRepository shopUserRepository, IHostingEnvironment env, IUnitOfWork unitOfWork, IOfficeRepository officeRepository, ISaleRepository saleRepository)
 {
     _mapper = mapper;
     _hierarchyFileDataRepository      = hierarchyFileDataRepository;
     _hierarchyFileDataErrorRepository = hierarchyFileDataErrorRepository;
     _hierarchyFileRepository          = hierarchyFileRepository;
     _fileStatusRepository             = fileStatusRepository;
     _userRepository       = userRepository;
     _userStatusRepository = userStatusRepository;
     _networkRepository    = networkRepository;
     _shopRepository       = shopRepository;
     _shopUserRepository   = shopUserRepository;
     _env              = env;
     _unitOfWork       = unitOfWork;
     _officeRepository = officeRepository;
     _saleRepository   = saleRepository;
 }
コード例 #24
0
 public HavanService(IProductRepository productRepository, ILogger logger, IUserRepository userRepository, IShopUserRepository shopUserRepository, IShopRepository shopRepository, IUserStatusRepository userStatusRepository, IUserStatusLogRepository userStatusLogRepository, IOfficeRepository officeRepository, ISaleFileRepository saleFileRepository, ISaleFileDataRepository saleFileDataRepository, IFileStatusRepository fileStatusRepository, ISaleFileSkuStatusRepository saleFileSkuStatusRepository, ISaleRepository saleRepository, INetworkRepository networkRepository, IUnitOfWork unitOfWork)
 {
     _logger                      = logger;
     _productRepository           = productRepository;
     _userRepository              = userRepository;
     _shopUserRepository          = shopUserRepository;
     _shopRepository              = shopRepository;
     _userStatusRepository        = userStatusRepository;
     _userStatusLogRepository     = userStatusLogRepository;
     _officeRepository            = officeRepository;
     _saleFileRepository          = saleFileRepository;
     _saleFileDataRepository      = saleFileDataRepository;
     _fileStatusRepository        = fileStatusRepository;
     _saleFileSkuStatusRepository = saleFileSkuStatusRepository;
     _saleRepository              = saleRepository;
     _networkRepository           = networkRepository;
     _unitOfWork                  = unitOfWork;
 }
コード例 #25
0
 public HierarchyProcessesService(ISaleFileRepository saleFileRepository, IEmailService emailService, IUserAccessCodeInviteRepository userAccessCodeInviteRepository, IUserPunctuationSourceRepository userPunctuationSourceRepository, IUserPunctuationRepository userPunctuationRepository, IUserStatusLogRepository userStatusLogRepository, ILogger logger, IHierarchyFileDataRepository hierarchyFileDataRepository, IHierarchyFileDataErrorRepository hierarchyFileDataErrorRepository, IHierarchyFileRepository hierarchyFileRepository, IFileStatusRepository fileStatusRepository, IUserRepository userRepository, IUserStatusRepository userStatusRepository, IShopRepository shopRepository, IShopUserRepository shopUserRepository, IUnitOfWork unitOfWork, IOfficeRepository officeRepository, ISaleRepository saleRepository)
 {
     _logger       = logger;
     _emailService = emailService;
     _userPunctuationRepository        = userPunctuationRepository;
     _userPunctuationSourceRepository  = userPunctuationSourceRepository;
     _hierarchyFileDataRepository      = hierarchyFileDataRepository;
     _hierarchyFileDataErrorRepository = hierarchyFileDataErrorRepository;
     _hierarchyFileRepository          = hierarchyFileRepository;
     _fileStatusRepository             = fileStatusRepository;
     _userRepository                 = userRepository;
     _userStatusRepository           = userStatusRepository;
     _shopRepository                 = shopRepository;
     _shopUserRepository             = shopUserRepository;
     _unitOfWork                     = unitOfWork;
     _officeRepository               = officeRepository;
     _saleRepository                 = saleRepository;
     _userStatusLogRepository        = userStatusLogRepository;
     _userAccessCodeInviteRepository = userAccessCodeInviteRepository;
     _saleFileRepository             = saleFileRepository;
 }
コード例 #26
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env,
                              ICompanyRepository companyRepo,
                              IOfficeRepository officeRepo)
        {
            TestData.GenerateStartupInfo(companyRepo, officeRepo);

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseHttpsRedirection();

            app.UseRouting();

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }
コード例 #27
0
        public AppQuery(IOfficeRepository repository)
        {
            Field <ListGraphType <OfficeType> >(
                "officesAll",
                resolve: context => repository.GetAll()
                );
            Field <ListGraphType <OfficeType> >(
                "officesByDistance",
                arguments: new QueryArguments(new QueryArgument <NonNullGraphType <FloatGraphType> > {
                Name = "latitude"
            },
                                              new QueryArgument <NonNullGraphType <FloatGraphType> > {
                Name = "longitude"
            }),
                resolve: context => {
                var lat   = context.GetArgument <double>("latitude");
                var longi = context.GetArgument <double>("longitude");

                return(repository.GetByLatLong(lat, longi));
            }
                );
        }
コード例 #28
0
        public AssetTrackerMainMenu(IConsoleOutput outputHandle, IUserInput inputHandle, IAssetRepository assetRepo, IOfficeRepository officeRepo)
            : base(outputHandle, inputHandle, "")
        {
            Assets  = assetRepo;
            Offices = officeRepo;

            AddAssetCommand     = new AddAssetsCommand(outputHandle, inputHandle, assetRepo, officeRepo);
            ListAssetsCommand   = new ListAssetsCommand(outputHandle, inputHandle, assetRepo, officeRepo);
            UpdateAssetsCommand = new UpdateAssetsCommand(outputHandle, inputHandle, assetRepo, officeRepo);
            DeleteAssetsCommand = new DeleteAssetsCommand(outputHandle, inputHandle, assetRepo, officeRepo);

            ReportGenerator = new ReportGenerationCommand(outputHandle, inputHandle, assetRepo, officeRepo);

            AddCommand("add", AddAssetCommand.AddAssetCommand);
            AddCommand("list", ListAssetsCommand.ListAllAssetsCommand); // Alias for list-all
            AddCommand("list-all", ListAssetsCommand.ListAllAssetsCommand);
            AddCommand("list-not-expired", ListAssetsCommand.ListNotExpiredAssetsCommand);
            AddCommand("update", UpdateAssetsCommand.UpdateAssetCommand);
            AddCommand("delete", DeleteAssetsCommand.DeleteAssetCommand);

            AddCommand("reports", ReportGenerator.GenerateReport);
        }
コード例 #29
0
 public SaleFileService(IMapper mapper, ISaleProcessesService saleProcessesService, ISaleFileDataErrorRepository saleFileDataErrorRepository, ISaleFileDataRepository saleFileDataRepository, ISaleFileRepository saleFileRepository, IFileStatusRepository fileStatusRepository, IUserRepository userRepository, IUserStatusRepository userStatusRepository, INetworkRepository networkRepository, IHostingEnvironment env, IShopRepository shopRepository, IShopUserRepository shopUserRepository, IProductRepository productRepository, IFocusProductRepository focusProductRepository, IParticipantProductRepository participantProductRepository, IOfficeRepository officeRepository, IUnitOfWork unitOfWork, ISaleRepository saleRepository, ISaleFileSkuStatusRepository saleFileSkuStatusRepository, ICategoryProductRepository categoryProductRepository)
 {
     _mapper = mapper;
     _saleProcessesService        = saleProcessesService;
     _saleFileDataErrorRepository = saleFileDataErrorRepository;
     _saleFileDataRepository      = saleFileDataRepository;
     _saleFileRepository          = saleFileRepository;
     _fileStatusRepository        = fileStatusRepository;
     _userRepository       = userRepository;
     _userStatusRepository = userStatusRepository;
     _networkRepository    = networkRepository;
     _env                          = env;
     _shopRepository               = shopRepository;
     _shopUserRepository           = shopUserRepository;
     _productRepository            = productRepository;
     _focusProductRepository       = focusProductRepository;
     _participantProductRepository = participantProductRepository;
     _officeRepository             = officeRepository;
     _unitOfWork                   = unitOfWork;
     _saleRepository               = saleRepository;
     _saleFileSkuStatusRepository  = saleFileSkuStatusRepository;
     _categoryProductRepository    = categoryProductRepository;
 }
コード例 #30
0
 public SaleProcessesService(IEmailService emailService, ISaleFileDataErrorRepository saleFileDataErrorRepository, ISaleFileDataRepository saleFileDataRepository, ISaleFileRepository saleFileRepository, IFileStatusRepository fileStatusRepository, IUserRepository userRepository, IUserStatusRepository userStatusRepository, INetworkRepository networkRepository, IShopRepository shopRepository, IShopUserRepository shopUserRepository, IProductRepository productRepository, IFocusProductRepository focusProductRepository, IParticipantProductRepository participantProductRepository, IOfficeRepository officeRepository, IUnitOfWork unitOfWork, ISaleRepository saleRepository, ILogger logger, ISaleFileSkuStatusRepository saleFileSkuStatusRepository, ICategoryProductRepository categoryProductRepository, IUserPunctuationRepository userPunctuationRepository, IUserPunctuationSourceRepository userPunctuationSourceRepository)
 {
     _saleFileDataErrorRepository = saleFileDataErrorRepository;
     _emailService                 = emailService;
     _saleFileDataRepository       = saleFileDataRepository;
     _saleFileRepository           = saleFileRepository;
     _fileStatusRepository         = fileStatusRepository;
     _userRepository               = userRepository;
     _userStatusRepository         = userStatusRepository;
     _networkRepository            = networkRepository;
     _shopRepository               = shopRepository;
     _shopUserRepository           = shopUserRepository;
     _productRepository            = productRepository;
     _focusProductRepository       = focusProductRepository;
     _participantProductRepository = participantProductRepository;
     _officeRepository             = officeRepository;
     _unitOfWork     = unitOfWork;
     _saleRepository = saleRepository;
     _logger         = logger;
     _saleFileSkuStatusRepository     = saleFileSkuStatusRepository;
     _categoryProductRepository       = categoryProductRepository;
     _userPunctuationRepository       = userPunctuationRepository;
     _userPunctuationSourceRepository = userPunctuationSourceRepository;
 }
コード例 #31
0
 public OfficeController(IOfficeRepository repository)
 {
     this.OfficeRepository = repository;
 }
コード例 #32
0
 public OfficeService(IOfficeRepository officeRepository, IUnitOfWork unitOfWork)
 {
     this._officeRepository = officeRepository;
     this._unitOfWork = unitOfWork;
 }
コード例 #33
0
 public OfficeApiService(IOfficeRepository repository)
 {
     _repository = repository;
 }
コード例 #34
0
 public GetOfficeByUniqueIdQueryHandler(IOfficeRepository officeRepository, IMapper mapper)
 {
     _officeRepository = officeRepository;
     _mapper           = mapper;
 }
コード例 #35
0
        static int IndexdPad = Pad / 3; // Smaller numbers

        /// <summary>
        /// The 'list' command implementation.
        /// </summary>
        public ListAssetsCommand(IConsoleOutput outputHandle, IUserInput inputHandle, IAssetRepository assetRepo, IOfficeRepository officeRepo)
            : base(outputHandle, inputHandle, assetRepo, officeRepo)
        {
        }
コード例 #36
0
 public OfficeService(IOfficeRepository officeRepository)
 {
     OfficeRepository = officeRepository;
 }