Пример #1
0
 public SalesDataService(IProductRepository pRepo, IImageRepository iRepo,
                         IBillsRepository bRepo, IBusinessRepository businessRepo)
 {
     _imagesRepo   = iRepo;
     _billRepo     = bRepo;
     _businessRepo = businessRepo;
 }
Пример #2
0
 public BusinessService(IBusinessRepository businessRepository, ILocationRepository locationRepository, IBusinessTypeRepository businessTypeRepository, IMapper mapper)
 {
     this._businessRepository     = businessRepository;
     this._locationRepository     = locationRepository;
     this._businessTypeRepository = businessTypeRepository;
     this._mapper = mapper;
 }
Пример #3
0
 public BusinessController(IBusinessRepository businessRepository, IMapper mapper, LinkGenerator linkGenerator, IAuthenticationHelper authenticationHelper)
 {
     BusinessRepository   = businessRepository;
     Mapper               = mapper;
     LinkGenerator        = linkGenerator;
     AuthenticationHelper = authenticationHelper;
 }
Пример #4
0
 public CategoryService(IBusinessRepository brepo, IImageRepository _imgRepo, IProductService _productService, IFoldersDataService _foldersDs)
 {
     businessRepo   = brepo;
     imgRepo        = _imgRepo;
     productService = _productService;
     foldersDs      = _foldersDs;
 }
Пример #5
0
 public RouteHandler(ICmsApiProxy cmsApiProxy, ILogger <CmsApiProxy> logger, IBusinessRepository businessRepository, IRegionRepository regionRepository)
 {
     _cmsApiProxy       = cmsApiProxy;
     _logger            = logger;
     BusinessRepository = businessRepository;
     _regionRepository  = regionRepository;
 }
Пример #6
0
 public AuthenticationHelper(IConfiguration configuration, IBusinessRepository businessRepository, IIndividualRepository individualRepository, IStationRepository stationRepository)
 {
     BusinessRepository   = businessRepository;
     IndividualRepository = individualRepository;
     StationRepository    = stationRepository;
     Configuration        = configuration;
 }
Пример #7
0
 public TestBLL()
 {
     shopRepo     = new ShopRepository(conn);
     businessRepo = new BusinessRepository(conn);
     imgRepo      = new ImagesRepository(conn);
     prodRepo     = new ProductRepository(conn);
     unitRepo     = new UnitRepository(conn);
     priceRepo    = new PriceRepository(conn);
     costRepo     = new CostRepository(conn);
     stockRepo    = new StockRepository(conn);
     userRepo     = new UserRepository(conn);
     billsRepo    = new BillsRepository(conn);
     expRepo      = new ExpensesRepository(conn);
     foldersRepo  = new FoldersRepository(conn);
     dbBase       = new DropBoxBase("o9340xsv2mzn7ws", "xzky2fzfnmssik1");
     checker      = new ShopsChecker(shopRepo);
     dbBase.GeneratedAuthenticationURL();
     dbBase.GenerateAccessToken();
     prodService = new ProductService(shopRepo, businessRepo, imgRepo, dbBase, prodRepo, unitRepo, priceRepo,
                                      costRepo, stockRepo, ordersRepo, strategy, new FoldersDataService(foldersRepo, prodRepo));
     orderStockRepo     = new OrderStockRepository(conn);
     strategy           = new FifoStrategy(orderStockRepo, stockRepo, costRepo);
     salesService       = new SalesSerivce(userRepo, shopRepo, billsRepo, prodRepo, priceRepo, imgRepo, strategy, checker, costRepo);
     ordersRepo         = new OrdersRepository(conn);
     productDataService = new ProductDataService(dbBase);
 }
Пример #8
0
 public CreateProduct(IProductRepository productRepository, IBusinessRepository businessRepository,
                      ILogger logger)
 {
     _repository         = productRepository;
     _businessRepository = businessRepository;
     _logger             = logger;
 }
Пример #9
0
 public AtomicBusinessWork(IGroupRepository groupRepository)
 {
     _businessRepository = new BusinessRepository(new MongoContextGeneric <Models.Business.Business>());
     _userRepository     = new SpotUserRepository(new MongoContextGeneric <SpotUser>());
     _locationRepository = new LocationRepository(new MongoContextGeneric <Models.Location.Location>());
     _groupRepository    = groupRepository;
 }
Пример #10
0
 public GetProductsByBusiness(IProductRepository productRepository, IBusinessRepository businessRepository,
                              ILogger logger)
 {
     _productRepository  = productRepository;
     _businessRepository = businessRepository;
     _logger             = logger;
 }
Пример #11
0
        public BusinessController(IBusinessRepository businessRepository)
        {
            _businessRepository = businessRepository;
            //inject _IBusinessRepository

            //inject logger
        }
Пример #12
0
 /// <summary>
 /// 更新打印机关联的菜品
 /// </summary>
 /// <param name="id"></param>
 /// <param name="ids"></param>
 /// <param name="service"></param>
 /// <returns></returns>
 public IActionResult PutPrinterProducts(int id, [FromQuery] string ids, [FromServices] IBusinessRepository service)
 {
     service.PutPrinterProducts(id, ids);
     return(Json(new JsonData {
         Success = true, Msg = "ok"
     }));
 }
 public BusinessController(ILogger <BusinessController> logger, IBusinessRepository businessRepository, ICmsApiProxy apiProxy, ITagRepository tagRepository, IRegionRepository regionRepository)
 {
     _logger             = logger;
     _businessRepository = businessRepository;
     _apiProxy           = apiProxy;
     _tagRepository      = tagRepository;
     _regionRepository   = regionRepository;
 }
Пример #14
0
 public AuthController(IUserRepository userRepository,
                       IBusinessRepository businessRepository,
                       IMapper mapper)
 {
     _userRepository     = userRepository;
     _businessRepository = businessRepository;
     _mapper             = mapper;
 }
Пример #15
0
 //private readonly ISuccessResponseRepository _successRepository;
 public GatewayService(IHMRCResponseRepository hmrcResponseRepository, IUnitOfWork unitOfWork, IPeriodDataRepository periodRepository, IBusinessRepository businessRepository)
 {
     this._hmrcResponseRepository = hmrcResponseRepository;
     this._unitOfWork             = unitOfWork;
     this._periodRepository       = periodRepository;
     this._businessrepository     = businessRepository;
     //this._successRepository = successRepository;
 }
Пример #16
0
 public CreateSiteHandler(IVmsLogger <CreateSiteHandler> logger, ISiteServiceFactory factory, ISiteRepository siteRepository, IServiceBusMessagePublisher publisher, IBusinessRepository businessRepository)
 {
     _logger             = logger;
     _factory            = factory;
     _siteRepository     = siteRepository;
     _publisher          = publisher;
     _businessRepository = businessRepository;
 }
 public AtomicEventWork()
 {
     _userRepository     = new SpotUserRepository(new MongoContextGeneric <SpotUser>());
     _businessRepository = new BusinessRepository(new MongoContextGeneric <Models.Business.Business>());
     _locationRepository = new LocationRepository(new MongoContextGeneric <Models.Location.Location>());
     _spotRepository     = new SpotRepository(new MongoContextGeneric <Models.Spot.Spot>());
     _eventRepository    = new EventRepository(new MongoContextGeneric <Models.Event.Event>());
 }
Пример #18
0
 public BusinessService(IBusinessRepository repository, IMapper mapper,
                        IAccountManager <Business> accountManager, AddressValidator addressValidator)
 {
     _repository       = repository;
     _accountManager   = accountManager;
     _addressValidator = addressValidator;
     _mapper           = mapper;
 }
Пример #19
0
 public CreateBusinessHandler(IBusinessRepository repository, IVmsLogger <CreateBusinessHandler> logger, IServiceBusMessagePublisher publisher, IBusinessesFactory businessesFactory, INumberGenerator numberGenerator)
 {
     _repository        = repository;
     _logger            = logger;
     _publisher         = publisher;
     _businessesFactory = businessesFactory;
     _numberGenerator   = numberGenerator;
 }
Пример #20
0
 public UpdateBusinessHandler(IBusinessRepository repository,
                              IBusinessServiceRepository businessServicesRepository,
                              IMapper mapper)
 {
     _repository = repository;
     _businessServiceRepository = businessServicesRepository;
     _mapper = mapper;
 }
Пример #21
0
        public void Setup()
        {
            loggerFake = Substitute.For <IsolationFrameWorkComparison.ExternalDependencies.ILogger>();
            notificationServiceFake = Substitute.For <INotificationService>();
            businessRepositoryFake  = Substitute.For <IBusinessRepository>();

            main = new Main(loggerFake, notificationServiceFake, businessRepositoryFake);
        }
Пример #22
0
 public BusinessSetupController(IBusinessRepository businessRepository,
                                IUserRepository userRepository,
                                IMapper mapper)
 {
     _businessRepository = businessRepository;
     _userRepository     = userRepository;
     _mapper             = mapper;
 }
        public BusinessRepositoryTest()
        {
            var options = new DbContextOptionsBuilder <DealLocatorDbContext>()
                          .UseInMemoryDatabase(databaseName: "LocationDatabase")
                          .Options;

            context = new DealLocatorDbContext(options);
            sut     = new BusinessRepository(context);
        }
Пример #24
0
 public static void DropListingCollections(
     ICategoriesRepository _categoriesRepo,
     IEventsRepository _eventRepo,
     IBusinessRepository _businessRepo)
 {
     _businessRepo.Db.DropCollection("businesses");
     _eventRepo.Db.DropCollection("events");
     //_categoriesRepo.Db.DropCollection("categories");
 }
 public GetBusinessServicesListHandler(
     IBusinessServiceRepository businessServiceRepository,
     IBusinessRepository businessRepository,
     IMapper mapper)
 {
     _businessServiceRepository = businessServiceRepository;
     _businessRepository        = businessRepository;
     _mapper = mapper;
 }
Пример #26
0
 public GreetingSystemService(IVmsLogger <GreetingSystemService> logger, IPasswordManager passwordManager, IIdentityRepository identityRepository, IBusinessRepository businessRepository, IJwtManager jwtManager, IRefreshTokenService tokenService)
 {
     _logger             = logger;
     _passwordManager    = passwordManager;
     _identityRepository = identityRepository;
     _businessRepository = businessRepository;
     _jwtManager         = jwtManager;
     _tokenService       = tokenService;
 }
Пример #27
0
 public AtomicSpotWork(ISpotUserRepository spotUserRepository, IGroupRepository groupGroupRepository)
 {
     _businessRepository = new BusinessRepository(new MongoContextGeneric <Models.Business.Business>());
     _locationRepository = new LocationRepository(new MongoContextGeneric <Models.Location.Location>());
     _spotRepository     = new SpotRepository(new MongoContextGeneric <Models.Spot.Spot>());
     _eventRepository    = new EventRepository(new MongoContextGeneric <Models.Event.Event>());
     _spotUserRepository = spotUserRepository;
     _groupRepository    = groupGroupRepository;
 }
 public BusinessPageController(ILogger <BusinessPageController> logger,
                               IBusinessRepository businessRepository,
                               ICmsApiProxy cmsApiProxy,
                               IConfiguration configuration) : base(logger)
 {
     _businessRepository = businessRepository;
     _cmsApiProxy        = cmsApiProxy;
     _cmsDomain          = configuration["web-cms:base-url"];
 }
Пример #29
0
        /// <summary>
        /// 客户端数据初始化
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        //public IActionResult InitClient(int id, [FromServices]IBusinessRepository service, [FromServices]IProductRepository productRepository)
        //{
        //    var desk = service.GetDeskTypes(id);                // 餐桌信息
        //    var Types = productRepository.GetTypes(new Business { ID = id });
        //    return Json(new
        //    {
        //        Desk = desk,
        //        Types
        //    });
        //}

        #region 打印机处理不再使用这里的代码

        /// <summary>
        /// 获取打印机列表
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public IActionResult GetPrinters(int id, [FromServices] IBusinessRepository service)
        {
            var result   = new JsonData();
            var printers = service.GetClientPrinters(id);

            result.Success = true;
            result.Data    = printers.Count == 0 ? null : printers;
            return(Json(result));
        }
Пример #30
0
 private void resetRepositories()
 {
     businessRepository = null;
     userRepository     = null;
     roleRepository     = null;
     menuRepository     = null;
     productRepository  = null;
     addressRepository  = null;
 }
Пример #31
0
 public MyBusinessObjectFactory(IBusinessRepository businessRepository)
 {
     _businessRepository = businessRepository;
 }
Пример #32
0
 public BusinessService(IUnitOfWork unitOfWork, ILogger logger, IConfiguration configuration, IBusinessRepository businessRepository)
     : base(unitOfWork, logger, configuration)
 {
     _businessRepository = businessRepository;
 }
Пример #33
0
 public BusinessController()
 {
     repository = new BusinessRepository();
     commons = new CommonRepository();
     agentRepository = new AgentRepository();
 }