Ejemplo n.º 1
0
 public FlyerController(IFlyerRepository flyerRepository, IProductRepository productRepository, ICategoryRepository categoryReposity, IMerchantRepository merchantRepository, IMerchantCategoryRepo merchantCategoryRepo)
 {
     _flyerRepository      = flyerRepository;
     _productRepository    = productRepository;
     _categoryReposity     = categoryReposity;
     _merchantRepository   = merchantRepository;
     _merchantCategoryRepo = merchantCategoryRepo;
 }
 public AdditionalLoadingModel(IEmployeeRepository employeeRepository, IFlyerRepository flyerRepository,
                               IDeliveryRulesParametersProvider deliveryRulesParametersProvider, IStockRepository stockRepository)
 {
     _employeeRepository = employeeRepository ?? throw new ArgumentNullException(nameof(employeeRepository));
     _flyerRepository    = flyerRepository ?? throw new ArgumentNullException(nameof(flyerRepository));
     _deliveryRulesParametersProvider = deliveryRulesParametersProvider ?? throw new ArgumentNullException(nameof(deliveryRulesParametersProvider));
     _stockRepository = stockRepository ?? throw new ArgumentNullException(nameof(stockRepository));
 }
Ejemplo n.º 3
0
 public FlyerController(IFlyerRepository flyerRepository, IProductRepository productRepository, ICategoryRepository categoryReposity, IMerchantRepository merchantRepository, IFlyerCategoryRepository flyerCategoryRepository, IMapper mapper)
 {
     _flyerRepository         = flyerRepository;
     _productRepository       = productRepository;
     _categoryReposity        = categoryReposity;
     _merchantRepository      = merchantRepository;
     _flyerCategoryRepository = flyerCategoryRepository;
     _mapper = mapper;
 }
Ejemplo n.º 4
0
        public FlyersJournalViewModel(
            IUnitOfWorkFactory uowFactory,
            ICommonServices commonServices,
            INomenclatureSelectorFactory nomenclatureSelectorFactory,
            IFlyerRepository flyerRepository,
            bool hideJournalForOpenDialog   = false,
            bool hideJournalForCreateDialog = false
            ) : base(uowFactory, commonServices, hideJournalForOpenDialog, hideJournalForCreateDialog)
        {
            _nomenclatureSelectorFactory =
                nomenclatureSelectorFactory ?? throw new ArgumentNullException(nameof(nomenclatureSelectorFactory));
            _flyerRepository = flyerRepository ?? throw new ArgumentNullException(nameof(flyerRepository));

            TabName = "Журнал рекламных листовок";

            UpdateOnChanges(
                typeof(Flyer),
                typeof(FlyerActionTime));
        }
Ejemplo n.º 5
0
        internal CopyingOrder(IUnitOfWork uow, Order copiedOrder, Order resultOrder,
                              INomenclatureParametersProvider nomenclatureParametersProvider, IFlyerRepository flyerRepository)
        {
            _uow         = uow ?? throw new ArgumentNullException(nameof(uow));
            _copiedOrder = copiedOrder ?? throw new ArgumentNullException(nameof(copiedOrder));
            _resultOrder = resultOrder ?? throw new ArgumentNullException(nameof(resultOrder));
            if (resultOrder.Id > 0)
            {
                throw new ArgumentException(
                          $"Заказ, в который переносятся данные из копируемого заказа, должен быть новым. (Свойство {nameof(resultOrder.Id)} должно быть равно 0)");
            }

            _nomenclatureParametersProvider =
                nomenclatureParametersProvider ?? throw new ArgumentNullException(nameof(nomenclatureParametersProvider));
            _flyerRepository = flyerRepository ?? throw new ArgumentNullException(nameof(flyerRepository));

            _paidDeliveryNomenclatureId = _nomenclatureParametersProvider.PaidDeliveryNomenclatureId;
            _flyersNomenclaturesIds     = _flyerRepository.GetAllFlyersNomenclaturesIds(_uow);
            _fastDeliveryNomenclatureId = _nomenclatureParametersProvider.FastDeliveryNomenclatureId;
        }
Ejemplo n.º 6
0
        public FlyerViewModel(
            IEntityUoWBuilder uowBuilder,
            IUnitOfWorkFactory unitOfWorkFactory,
            ICommonServices commonServices,
            INomenclatureJournalFactory nomenclatureSelectorFactory,
            IFlyerRepository flyerRepository) : base(uowBuilder, unitOfWorkFactory, commonServices)
        {
            FlyerAutocompleteSelectorFactory =
                (nomenclatureSelectorFactory ?? throw new ArgumentNullException(nameof(nomenclatureSelectorFactory)))
                .CreateNomenclatureForFlyerJournalFactory();
            _flyerRepository = flyerRepository ?? throw new ArgumentNullException(nameof(flyerRepository));

            if (!uowBuilder.IsNewEntity)
            {
                TabName = $"{Entity.FlyerNomenclature.Name}";
            }

            SetCurrentFlyerActionTime();
            AddServiceToValidationContext();
        }
Ejemplo n.º 7
0
 public OrderCopyModel(INomenclatureParametersProvider nomenclatureParametersProvider, IFlyerRepository flyerRepository)
 {
     _nomenclatureParametersProvider = nomenclatureParametersProvider ?? throw new ArgumentNullException(nameof(nomenclatureParametersProvider));
     _flyerRepository = flyerRepository ?? throw new ArgumentNullException(nameof(flyerRepository));
 }