Пример #1
0
 public InventoryConsummer(IMapper mapper, ILogger <InventoryConsummer> logger, IProductionRepository repository, IPublishEndpoint publishEndpoint)
 {
     _mapper          = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _logger          = logger ?? throw new ArgumentNullException(nameof(logger));
     _repository      = repository ?? throw new ArgumentNullException(nameof(repository));
     _publishEndpoint = publishEndpoint ?? throw new ArgumentNullException(nameof(publishEndpoint));
 }
        public ProductionsController(IProductionRepository productionRepository)
        {
            _productionRepository = productionRepository;

            this.Productions = new List <Production>();

            this.Productions.Add(new Production()
            {
                ProductionId = new Guid("abcfa5f5-5af2-44c8-87a0-f58f3a3c6a08"),
                //Restrictions = new List<string>() { "tomatoes", "potatoes", "onions" },
                Restrictions = "tomatoes " + "potatoes " + "onions",
                On           = true
            });

            this.Productions.Add(new Production()
            {
                ProductionId = new Guid("101dd3d3-8e85-4e22-a2c4-735f6b9163ee"),
                //Restrictions = new List<string>() { "guten", "milk", "sugar" },
                Restrictions = "tomatoes " + "potatoes " + "onions",
                On           = true
            });


            this.Productions.Add(new Production()
            {
                ProductionId = new Guid("832d7db2-d1ca-4b03-85a4-f4d9a7df597e"),
                //Restrictions = new List<string>() { "soy", "dairy", "gluten", "peanut" },
                Restrictions = "tomatoes " + "potatoes " + "onions",
                On           = true
            });
        }
Пример #3
0
        private IProductionRepository repository;// = new EfProductionRepository();

        public Cart(string email, IProductionRepository _repository)
        {
            repository = _repository;
            var temp = repository.Customers.SingleOrDefault(x => x.EmailAddress == email);

            customerId = temp == null ? 0 : temp.CustomerID;
        }
 public ProductionPlansController(IProductionRepository repository, IMapper mapper, DataContext context, IConfiguration config)
 {
     _config     = config;
     _context    = context;
     _mapper     = mapper;
     _repository = repository;
 }
Пример #5
0
 public AssemblyManagerControl(BadgerDataModel context)
 {
     InitializeComponent();
     _context             = context;
     productionRepository = new ProductionRepository(_context);
     jobsService          = new JobsService(_context);
     // testing only
     _selectedJob = jobsService.Find(1172);
 }
        public GetAllProductionCommandHandler(IProductionRepository productionRepository, IProductionQueries productionQueries,
                                              ICompanyRepository companyRepository, ICompanyQueries companyQueries,
                                              IGTINService gTINService)
        {
            this.productionRepository = productionRepository;
            this.productionQueries    = productionQueries;

            this.companyRepository = companyRepository;
            this.companyQueries    = companyQueries;

            this.gTINService = gTINService;
        }
Пример #7
0
        public UnitOfWork(FestoContext context)
        {
            _context = context;

            ORDERs = new OrderRepository(_context);

            ITEMs = new ItemRepository(_context);

            ITEMTRACKERs = new ItemTrackerRepository(_context);

            ORDERTRACKERs = new OrderTrackerRepository(_context);

            PRODUCTION = new ProductionRepository(_context);
        }
Пример #8
0
 public ProductsController(IProductsRepository productRepository,
                           IStoreRepository storeRepository,
                           IApiService apiService,
                           IMapper mapper,
                           IProductionRepository productionRepository,
                           ILessOfferService lessOfferService,
                           ILogService logService)
 {
     _apiService           = apiService;
     _mapper               = mapper;
     _productRepository    = productRepository;
     _storeRepository      = storeRepository;
     _productionRepository = productionRepository;
     _lessOfferService     = lessOfferService;
 }
Пример #9
0
        public GTINService(IProductionQueries productionQueries, IProductionRepository productionRepository,
                           ICompanyQueries companyQueries, ICompanyRepository companyRepository,
                           IGTINQueries gTINQueries, IGTINRepository gTINRepository,
                           ISessionBufferService sessionBufferService)
        {
            this.productionQueries    = productionQueries;
            this.productionRepository = productionRepository;

            this.companyQueries    = companyQueries;
            this.companyRepository = companyRepository;

            this.gTINQueries    = gTINQueries;
            this.gTINRepository = gTINRepository;

            this._sessionBufferService = sessionBufferService;
        }
Пример #10
0
        public GS1Service(IProductionQueries productionQueries, IProductionRepository productionRepository,
                          ICompanyQueries companyQueries, ICompanyRepository companyRepository,
                          IGTINQueries gTINQueries, IGTINRepository gTINRepository,
                          ISessionBufferQueries sessionBufferQueries, ISessionBufferRepository sessionBufferRepository)
        {
            this.productionQueries    = productionQueries;
            this.productionRepository = productionRepository;

            this.companyQueries    = companyQueries;
            this.companyRepository = companyRepository;

            this.gTINQueries    = gTINQueries;
            this.gTINRepository = gTINRepository;

            this.sessionBufferQueries    = sessionBufferQueries;
            this.sessionBufferRepository = sessionBufferRepository;
        }
Пример #11
0
        // GET: Cart/Return
        public ActionResult Return(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            _orderProductRepository = new OrderProductRepository(new Data.DAL.Context.ApplicationDbContext());
            OrderProduct orderProduct = _orderProductRepository.GetDetails(id);

            orderProduct.Quantity -= 1;

            if (orderProduct.Quantity == 0)
            {
                _orderProductRepository.Delete(id.GetValueOrDefault());
            }
            else
            {
                _orderProductRepository.Update(orderProduct);
            }
            _orderProductRepository.Save();

            return(RedirectToAction("Index"));
        }
Пример #12
0
        private IProductionRepository repository; // = new EfProductionRepository();

        #endregion Fields

        #region Constructors

        public Cart(string email, IProductionRepository _repository)
        {
            repository = _repository;
            var temp = repository.Customers.SingleOrDefault(x => x.EmailAddress == email);
            customerId = temp == null ? 0 : temp.CustomerID;
        }
Пример #13
0
 public ProductionService(IProductionRepository repository)
 {
     this._repository = repository;
 }
 public ProductionsController(IProductionRepository productionRepository, IProductInventoryRepository productInventoryRepository)
 {
     _productionRepository       = productionRepository;
     _productInventoryRepository = productInventoryRepository;
 }
Пример #15
0
 public CustomerController(IProductionRepository _repository)
 {
     repository = _repository;
 }
 public RepositoryWrapper(
     FactoryManagementContext dbContext,
     IAddressRepository Address,
     ICustomerRepository Customer,
     IDepartmentRepository Department,
     IEquipmentRepository Equipment,
     IEquipmentCategoryRepository EquipmentCategory,
     IExpenseRepository Expense,
     IExpenseTypeRepository ExpenseType,
     IFactoryRepository Factory,
     IIncomeRepository Income,
     IIncomeTypeRepository IncomeType,
     IInvoiceRepository Invoice,
     IInvoiceTypeRepository InvoiceType,
     IItemRepository Item,
     IItemCategoryRepository ItemCategory,
     IItemStatusRepository ItemStatus,
     IPayableRepository Payable,
     IPaymentStatusRepository PaymentStatus,
     IPhoneRepository Phone,
     IProductionRepository Production,
     IPurchaseRepository Purchase,
     IPurchaseTypeRepository PurchaseType,
     IRecievableRepository Recievable,
     IRoleRepository Role,
     ISalesRepository Sales,
     IStaffRepository Staff,
     IStockRepository Stock,
     IStockInRepository StockIn,
     IStockOutRepository StockOut,
     ISupplierRepository Supplier,
     ITransactionRepository Transaction,
     ITransactionTypeRepository TransactionType,
     IUserAuthInfoRepository UserAuthInfo,
     IUserRoleRepository UserRole,
     IUtilService util,
     IApiResourceMappingRepository ApiResourceMappingRepository)
 {
     this.dbContext          = dbContext;
     this._Address           = Address;
     this._Customer          = Customer;
     this._Department        = Department;
     this._Equipment         = Equipment;
     this._EquipmentCategory = EquipmentCategory;
     this._Expense           = Expense;
     this._ExpenseType       = ExpenseType;
     this._Income            = Income;
     this._IncomeType        = IncomeType;
     this._Invoice           = Invoice;
     this._InvoiceType       = InvoiceType;
     this._Item            = Item;
     this._ItemCategory    = ItemCategory;
     this._ItemStatus      = ItemStatus;
     this._Payable         = Payable;
     this._PaymentStatus   = PaymentStatus;
     this._Phone           = Phone;
     this._Production      = Production;
     this._Purchase        = Purchase;
     this._PurchaseType    = PurchaseType;
     this._Recievable      = Recievable;
     this._Role            = Role;
     this._Sales           = Sales;
     this._Staff           = Staff;
     this._Stock           = Stock;
     this._StockIn         = StockIn;
     this._StockOut        = StockOut;
     this._Supplier        = Supplier;
     this._Transaction     = Transaction;
     this._TransactionType = TransactionType;
     this._UserAuthInfo    = UserAuthInfo;
     this._UserRole        = UserRole;
     this._util            = util;
     this._ApiResourceMappingRepository = ApiResourceMappingRepository;
 }
Пример #17
0
 public ProductionController(IProductionRepository productionRepository)
 {
     _productionRepository = productionRepository;
 }
Пример #18
0
 public CartController(IProductionRepository _repository)
 {
     repository = _repository;
 }
Пример #19
0
 public ProductController()
 {
     this._productRepository      = new ProductRepository(new ApplicationDbContext());
     this._categoryRepository     = new CategoryRepository(new ApplicationDbContext());
     this._orderProductRepository = new OrderProductRepository(new ApplicationDbContext());
 }
Пример #20
0
        protected override async Task ExecuteAsync(CancellationToken stoppingToken)
        {
            using (IServiceScope scope = _provider.CreateScope())
            {
                Debug.Write($"InicializadorAPI Iniciando...");
                _logService.SendMessagesAsync("StoreCatalog Iniciando InitializeCheck");

                List <Store> stores = new List <Store>();
                stores.AddRange(new List <Store> {
                    new Store {
                        Name = "California - Pasadena", StoreId = new Guid("8048e9ec-80fe-4bad-bc2a-e4f4a75c834e")
                    },
                    new Store {
                        Name = "Los Angeles - Beverly Hills", StoreId = new Guid("8d618778-85d7-411e-878b-846a8eef30c0")
                    }
                });

                _productsRepository   = scope.ServiceProvider.GetRequiredService <IProductsRepository>();
                _productionRepository = scope.ServiceProvider.GetRequiredService <IProductionRepository>();
                _storeRepository      = scope.ServiceProvider.GetRequiredService <IStoreRepository>();
                _apiService           = scope.ServiceProvider.GetRequiredService <IApiService>();

                List <Production.Contract.Production> areas = _apiService.GetProductionAreas().Result;

                var store = stores.Find(x => x.Name.Contains(_appSettings.LojaSettings.Nome));

                var productions = _mapper.Map <IEnumerable <Model.Production> >(areas);
                var products    = _mapper.Map <IEnumerable <Product> >(_apiService.GetProducts(_appSettings.LojaSettings.Nome).Result);

                if (products != null)
                {
                    foreach (var item in products)
                    {
                        _productsRepository.Create(item);
                    }
                }
                else
                {
                    _logService.SendMessagesAsync(
                        JsonConvert.SerializeObject(HttpStatusCode.ServiceUnavailable));
                }

                if (store != null)
                {
                    _storeRepository.Create(store);
                }
                else
                {
                    _logService.SendMessagesAsync(
                        JsonConvert.SerializeObject(HttpStatusCode.ServiceUnavailable));
                }

                if (productions != null)
                {
                    foreach (var item in productions)
                    {
                        _productionRepository.Create(item);
                    }
                }
                else
                {
                    _logService.SendMessagesAsync(
                        JsonConvert.SerializeObject(HttpStatusCode.ServiceUnavailable));
                }

                StoreCatalogReady storeCatalogReady = new StoreCatalogReady()
                {
                    Ready   = true,
                    StoreId = store.StoreId
                };

                _storeCatalogReadyService.SendMessagesAsync(JsonConvert.SerializeObject(storeCatalogReady));

                _logService.SendMessagesAsync("StoreCatalog Finalizando InitializeCheck");

                stoppingToken.Register(() =>
                                       Debug.Write($" InicializadorAPI Parando"));
            }
        }
 public ProductionSessionsController(IProductionRepository repository, IMapper mapper)
 {
     _mapper     = mapper;
     _repository = repository;
 }
Пример #22
0
 public NavigationController(IProductionRepository _repository)
 {
     repository = _repository;
 }
Пример #23
0
 public HomeController(ILogger <HomeController> logger, IProductionRepository productionRepository)
 {
     _logger = logger;
     _productionRepository = productionRepository;
 }
Пример #24
0
 public AdminController(IProductionRepository _repository)
 {
     repository = _repository;
 }
Пример #25
0
 public AccountController(IAuthProvider _authProvider, IProductionRepository _repository)
 {
     authProvider = _authProvider;
     repository   = _repository;
 }
Пример #26
0
 public CustomerController(IProductionRepository _repository)
 {
     repository = _repository;
 }
Пример #27
0
 public FormsAuthProvider(IProductionRepository _repository)
 {
     repository = _repository;
 }
Пример #28
0
 public FormsAuthProvider(IProductionRepository _repository)
 {
     repository = _repository;
 }
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="areaRepository">IProductionRepository</param>
 /// <param name="logService">ILogService</param>
 public ProductionController(IProductionRepository areaRepository, IOrderRepository orderRepository, ILogService logService)
 {
     _areaRepository  = areaRepository;
     _orderRepository = orderRepository;
     _logService      = logService;
 }
Пример #30
0
 public NavigationController(IProductionRepository _repository)
 {
     repository = _repository;
 }
Пример #31
0
 public ProductionController(IProductionRepository repository)
 {
     _repository = repository;
 }
Пример #32
0
 public ProductionService(IProductionRepository productionRepository)
 {
     _productionRepository = productionRepository;
 }
Пример #33
0
 public ProductionService(IProductionRepository productionRepository,
                          IProductionAreaChangedService productionAreaChangedService)
 {
     _productionRepository         = productionRepository;
     _productionAreaChangedService = productionAreaChangedService;
 }
Пример #34
0
 public ProductController(IProductionRepository _repository)
 {
     repository = _repository;
 }
Пример #35
0
 public CartController()
 {
     _orderProductRepository = new OrderProductRepository(new Data.DAL.Context.ApplicationDbContext());
 }
Пример #36
0
 public AccountController(IAuthProvider _authProvider, IProductionRepository _repository)
 {
     authProvider = _authProvider;
     repository = _repository;
 }
Пример #37
0
 public IngredientsController(IProductionRepository repository, IMapper mapper, DataContext context)
 {
     _context    = context;
     _mapper     = mapper;
     _repository = repository;
 }