public ImportXMLCommand(IBookService bookService, IGenreService genreService, IProducerService producerService, IStudioService studioService, IXMLParser xmlParser)
        {
            if (bookService == null)
            {
                throw new ArgumentNullException("Book service cannnot be null.");
            }

            if (genreService == null)
            {
                throw new ArgumentNullException("Genre service cannnot be null.");
            }

            if (producerService == null)
            {
                throw new ArgumentNullException("Studio service cannnot be null.");
            }

            if (studioService == null)
            {
                throw new ArgumentNullException("Studio service cannnot be null.");
            }

            if (xmlParser == null)
            {
                throw new ArgumentNullException("XML parser cannnot be null.");
            }

            this.bookService     = bookService;
            this.genreService    = genreService;
            this.producerService = producerService;
            this.studioService   = studioService;
            this.xMLParser       = xmlParser;
        }
 public DrugController(IDrugService drugService, IGroupDrugService groupDrugService, IProducerService producerService, IMapper mapper)
 {
     _drugService      = drugService;
     _groupDrugService = groupDrugService;
     _producerService  = producerService;
     _mapper           = mapper;
 }
Example #3
0
 public ChatController(IAspNetUser aspNetUser, IPostService postService, IProducerService producerService, IHubContext <ChatHub> hub)
 {
     _aspNetUser      = aspNetUser;
     _postService     = postService;
     _producerService = producerService;
     _hub             = hub;
 }
 public AvroMessageController(IProducerService _producerService, IConsumerService _consumerService, IConfiguration _configuration, ILogger <AvroMessageController> _logger)
 {
     producerService = _producerService;
     consumerService = _consumerService;
     configuration   = _configuration;
     logger          = _logger;
 }
Example #5
0
 public ProducerController(IMovieService movies, IActorService actors, IProducerService producers, IGenderService genders)
 {
     _movieDbService    = movies;
     _actorDbService    = actors;
     _producerDbService = producers;
     _genderDbService   = genders;
 }
        public MovieService(
            IRepository <Movie> movieRepository,
            IUnitOfWork unitOfWork,
            IMovieFactory movieFactory,
            IProducerService producerService,
            IStudioService studioService,
            IGenreService genreService,
            IBookService bookService,
            IStarService starService)
        {
            if (movieRepository == null)
            {
                throw new ArgumentNullException("Movie repository cannot be null!");
            }

            if (unitOfWork == null)
            {
                throw new ArgumentNullException("Unit of work cannot be null!");
            }

            if (movieFactory == null)
            {
                throw new ArgumentNullException("Movie factory cannot be null!");
            }

            if (producerService == null)
            {
                throw new ArgumentNullException("Producer service cannot be null!");
            }

            if (studioService == null)
            {
                throw new ArgumentNullException("Studio service cannot be null!");
            }

            if (genreService == null)
            {
                throw new ArgumentNullException("Genre service cannot be null!");
            }

            if (bookService == null)
            {
                throw new ArgumentNullException("Book service cannot be null!");
            }

            if (starService == null)
            {
                throw new ArgumentNullException("Star service cannot be null!");
            }

            this.movieRepository = movieRepository;
            this.unitOfWork      = unitOfWork;
            this.movieFactory    = movieFactory;
            this.producerService = producerService;
            this.studioService   = studioService;
            this.genreService    = genreService;
            this.bookService     = bookService;
            this.starService     = starService;
        }
 public void Init()
 {
     this.AutoMapperInitializer();
     this.cache      = new HttpCacheService();
     this.products   = DataInitializer.GetProductsService();
     this.producers  = DataInitializer.GetProducersService();
     this.controller = new HomeController(this.products, this.producers, this.cache);
 }
Example #8
0
 public ProductsController(IProductService products,
                           IImageService images,
                           IProducerService producers)
 {
     this.products  = products;
     this.images    = images;
     this.producers = producers;
 }
 public void Init()
 {
     this.AutoMapperInitializer();
     this.cache = new HttpCacheService();
     this.products = DataInitializer.GetProductsService();
     this.producers = DataInitializer.GetProducersService();
     this.controller = new HomeController(this.products, this.producers, this.cache);
 }
Example #10
0
 public void Init()
 {
     AutoMapperInitializer();
     this.products   = DataInitializer.GetProductsService();
     this.producers  = DataInitializer.GetProducersService();
     this.images     = DataInitializer.GetImagesService();
     this.controller = new ProductsController(this.products, this.images, this.producers);
 }
 public ProductsController(IProductService products,
     IImageService images,
     IProducerService producers)
 {
     this.products = products;
     this.images = images;
     this.producers = producers;
 }
Example #12
0
 public ShoppingCartController(IShoppingCartService shoppingCartService, GobelinsWorldDbContext db, ICategoryService categories, IProducerService producers, UserManager <User> userManager)
 {
     this.shoppingCartService = shoppingCartService;
     this.db          = db;
     this.categories  = categories;
     this.producers   = producers;
     this.userManager = userManager;
 }
Example #13
0
 public ProducersAdminController(
     ICountryService countries,
     IProducerService producers,
     ICacheService cache)
 {
     this.countries = countries;
     this.producers = producers;
     this.cache     = cache;
 }
Example #14
0
 public HomeController(
     IProductService products,
     IProducerService producers,
     ICacheService cache)
 {
     this.products  = products;
     this.producers = producers;
     this.cache     = cache;
 }
Example #15
0
 public CategoryViewComponent(IProductCategoryService productCategoryService, IMapper mapper,
                              IProducerService producerService,
                              IProductService productService)
 {
     _productCategoryService = productCategoryService;
     _producerService        = producerService;
     _productService         = productService;
     _mapper = mapper;
 }
Example #16
0
 public HomeController(
     IProductService products, 
     IProducerService producers,
     ICacheService cache)
 {
     this.products = products;
     this.producers = producers;
     this.cache = cache;
 }
 public ProducersAdminController(
     ICountryService countries, 
     IProducerService producers,
     ICacheService cache)
 {
     this.countries = countries;
     this.producers = producers;
     this.cache = cache;
 }
Example #18
0
 public HandlerClick(IProductProcess productProcess, ICheckLast checkLast, IProductAdapter productAdapter, IProducerService producerService,
                     WSS.Service.Report.ProductOnClick.Error.Model.ISettingRepository settingRepository, ICheckLinkValid checkLinkValid)
 {
     _productProcess  = productProcess;
     _checkLast       = checkLast;
     _productAdapter  = productAdapter;
     _producerService = producerService;
     _checkLinkValid  = checkLinkValid;
     _producer        = new ProducerBasic(RabbitMQManager.GetRabbitMQServer(settingRepository.RabbitMq), "Product.ErrorRequest");
 }
Example #19
0
 public MainController
 (
     IProducerService producerService,
     IConsumerService consumerService,
     MessageHub messageHub
 )
 {
     _producerService = producerService;
     _consumerService = consumerService;
     _messageHub      = messageHub;
 }
 public ProductsController(IProductService productService, IMapper mapper,
                           IProductCategoryService productCategoryService,
                           IProducerService producerService,
                           ISupplierService supplierService)
 {
     _productService         = productService;
     _productCategoryService = productCategoryService;
     _producerService        = producerService;
     _supplierService        = supplierService;
     _mapper = mapper;
 }
Example #21
0
        public GoodsInMarketLessPage(IGoodsInMarketService goodsInMarketService, IOptions <AppSettings> settings,
                                     IMapper mapper, IProducerService producerService, ICategoryService categoryService)
        {
            _goodsInMarketService = goodsInMarketService;
            _mapper          = mapper;
            _producerService = producerService;
            _categoryService = categoryService;
            _settings        = settings.Value;

            InitializeComponent();
        }
Example #22
0
 public MovieController(IMovieService movieService,
                        IDirectorService directorService,
                        IProducerService producerService,
                        IPublisherService publisherService,
                        ILogger <MovieController> logger)
 {
     _movieService     = movieService;
     _directorService  = directorService;
     _producerService  = producerService;
     _publisherService = publisherService;
     _logger           = logger;
 }
Example #23
0
        public ProducerPage(IProducerService producerService, ICountryService countryService,
                            IOptions <AppSettings> settings, IMapper mapper)
        {
            _producerService = producerService;
            _countryService  = countryService;
            _mapper          = mapper;
            _settings        = settings.Value;

            InitializeComponent();

            UpdateDataGrid();
        }
Example #24
0
 public ImportDrug(IDrugService drugService, IGroupDrugService groupDrugService, IProducerService producerService, IMapper mapper, IUserService userService, SignInManager <IdentityUser> signInManager, UserManager <IdentityUser> userManager, IReceiptImportService receiptImportService, IDetailReceiptImportService detailReceiptImportService)
 {
     _drugService                = drugService;
     _groupDrugService           = groupDrugService;
     _producerService            = producerService;
     _mapper                     = mapper;
     _userService                = userService;
     _signInManager              = signInManager;
     _userManager                = userManager;
     _receiptImportService       = receiptImportService;
     _detailReceiptImportService = detailReceiptImportService;
 }
 public ProductController(IProductService productService, IMapper mapper,
                          IProducerService producerService,
                          ISupplierService supplierService,
                          IProductCategoryService productCategoryService,
                          IHostingEnvironment env)
 {
     _productService         = productService;
     _producerService        = producerService;
     _supplierService        = supplierService;
     _productCategoryService = productCategoryService;
     _env    = env;
     _mapper = mapper;
 }
 public ProductsAdminController(
     IProducerService producers,
     ICommonRepositoryService commons,
     IProductService products,
     ISanitizer sanitizer,
     ICacheService cache)
 {
     this.producers = producers;
     this.commons   = commons;
     this.products  = products;
     this.sanitizer = sanitizer;
     this.cache     = cache;
 }
Example #27
0
        public ManagerProducerController(IProducerService producerService)
        {
            _producerService = producerService;

            var producer = _producerService.GetAll();

            if (producer != null)
            {
                var producerViewModel = Mapper.Map <IEnumerable <ProducerViewModel> >(producer);

                _listProducerViewModel = producerViewModel.ToList();
            }
        }
Example #28
0
 public EditMovieController(
     IMovieService movieService,
     IMapper mapper,
     IProducerService producerService,
     IGenreService genreService,
     IActorService actorService)
 {
     _movieService    = movieService;
     _mapper          = mapper;
     _actorService    = actorService;
     _producerService = producerService;
     _genreService    = genreService;
 }
 public ProductsAdminController(
     IProducerService producers,
     ICommonRepositoryService commons,
     IProductService products,
     ISanitizer sanitizer,
     ICacheService cache)
 {
     this.producers = producers;
     this.commons = commons;
     this.products = products;
     this.sanitizer = sanitizer;
     this.cache = cache;
 }
Example #30
0
 public EditorController(IMovieService movies,
                         IActorService actors,
                         IProducerService producers,
                         IGenderService genders,
                         IMappingService mappings)
 {
     _movieDbService    = movies;
     _actorDbService    = actors;
     _producerDbService = producers;
     _genderDbService   = genders;
     _mappingService    = mappings;
     _genders           = _genderDbService.GetGenders();
 }
 public AccountController(
     UserManager <User> userManager,
     SignInManager <User> signInManager,
     IEmailSender emailSender,
     ILogger <AccountController> logger,
     ICategoryService categories,
     IProducerService producers)
 {
     _userManager    = userManager;
     _signInManager  = signInManager;
     _emailSender    = emailSender;
     _logger         = logger;
     this.categories = categories;
     this.producers  = producers;
 }
        public ProducerPresenter(IProducerView view, IProducerService producerService)
        {
            if (view == null)
            {
                throw new ArgumentNullException(nameof(view));
            }
            if (producerService == null)
            {
                throw new ArgumentNullException(nameof(producerService));
            }

            _view            = view;
            _view.Observer   = this;
            _producerService = producerService;
        }
Example #33
0
 public ListingController(
     IMovieService movies,
     IActorService actors,
     IProducerService producers,
     IMappingService mappingService,
     IHostingEnvironment hostingEnvironment,
     IGenderService genders)
 {
     _movieDbService     = movies;
     _actorDbService     = actors;
     _producerDbService  = producers;
     _genderDbService    = genders;
     _mappingService     = mappingService;
     _hostingEnvironment = hostingEnvironment;
     _genders            = _genderDbService.GetGenders();
 }
Example #34
0
        public CarValidator(IProducerService producerService)
        {
            _producerService = producerService;

            RuleFor(n => n.Name)
            .NotNull().WithMessage("Name can not be null")
            .Length(1, 256).WithMessage("Name lenght has to bo in [1, 255] range");

            RuleFor(n => n.Year)
            .GreaterThanOrEqualTo(1900).WithMessage("Year must be greater than 1900")
            .LessThanOrEqualTo(DateTime.UtcNow.Year).WithMessage($"Year must be lower than {DateTime.UtcNow.Year}");

            var availableProducersIds = _producerService.GetAll().Select(n => n.Id).ToList();

            RuleFor(n => n.ProducerId)
            .Must(n => availableProducersIds.Any(m => m == n)).WithMessage("ProducerId is out of range");
        }
Example #35
0
 public MovieController(
     IMovieService movieService,
     IActorService actorService,
     ICategoryService categoryService,
     IGenreService genreService,
     IProducerService producerService,
     IProductionService productionService,
     ILogger <MovieController> logger)
 {
     _movieService      = movieService;
     _actorService      = actorService;
     _categoryService   = categoryService;
     _genreService      = genreService;
     _producerService   = producerService;
     _productionService = productionService;
     _logger            = logger;
 }
        public ActionResult All(string sortOrder, int page = GlobalConstants.DefaultPage)
        {
            ViewBag.NameSortParm = string.IsNullOrEmpty(sortOrder) ? "name_desc" : "";
            ViewBag.CountrySortParm = sortOrder == "Country" ? "country_desc" : "Country";
            var producers = this.producers.GetProducers();

            switch (sortOrder)
            {
                case "name_desc":
                    producers = producers.OrderByDescending(p => p.Name);
                    break;
                case "Country":
                    producers = producers.OrderBy(p => p.Country.Name);
                    break;
                case "country_desc":
                    producers = producers.OrderByDescending(p => p.Country.Name);
                    break;
                default:
                    producers = producers.OrderBy(p => p.Name);
                    break;
            }

            var allProducers = producers
                .Skip((page - 1) * GlobalConstants.ProducersPerPage)
                .Take(GlobalConstants.ProducersPerPage)
                .To<ProducerViewModel>()
                .ToList();
            var totalPages = (int)Math.Ceiling(producers.Count() / (decimal)GlobalConstants.ProducersPerPage);
            var model = new PagedProducersViewModel
            {
                PageCount = totalPages,
                PageNumber = page,
                Producers = allProducers,
                Order = sortOrder
            };

            return View(model);
        }
 public ProducersController(IProducerService producers)
 {
     this.producers = producers;
 }