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)); }
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; }
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)); }
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; }
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(); }
public OrderCopyModel(INomenclatureParametersProvider nomenclatureParametersProvider, IFlyerRepository flyerRepository) { _nomenclatureParametersProvider = nomenclatureParametersProvider ?? throw new ArgumentNullException(nameof(nomenclatureParametersProvider)); _flyerRepository = flyerRepository ?? throw new ArgumentNullException(nameof(flyerRepository)); }