Beispiel #1
0
        public ProductApiController(IDocumentRepository _documentRepository,
            ITypeOfTaskRepository _typeOfTaskRepository,
            IFormatsNameRepository _formatsName,
            IProductRepository _productRepository,
            ITaskExecutorRepository _taskExecutorRepository,
            IArticleRepository _articleRepository,
            ICustomerSupplierRepository _customerSupplierRepository,
            IMenuProductRepository _menuProduct,
            ICostDetailRepository _costDetailRepository,
            ITaskCenterRepository _taskCenterRepository)
        {
            typeOfTaskRepository = _typeOfTaskRepository;
            documentRepository = _documentRepository;
            productRepository = _productRepository;
            taskExecutorRepository = _taskExecutorRepository;
            articleRepository = _articleRepository;
            customerSupplierRepository = _customerSupplierRepository;
            menu = _menuProduct;
            costDetailRepository = _costDetailRepository;
            taskCenterRepository = _taskCenterRepository;

            this.Disposables.Add(typeOfTaskRepository);
            this.Disposables.Add(documentRepository);
            this.Disposables.Add(productRepository);
            this.Disposables.Add(taskExecutorRepository);
            this.Disposables.Add(articleRepository);
            this.Disposables.Add(customerSupplierRepository);
            this.Disposables.Add(menu);
            this.Disposables.Add(costDetailRepository);
            this.Disposables.Add(taskCenterRepository);

        }
        public TaskExecutorController(ITaskExecutorRepository _tskExDataRep, ITypeOfTaskRepository _typeOfTask)
        {
            taskExecutorRepository = _tskExDataRep;
            typeOfTaskRepository = _typeOfTask;

            this.Disposables.Add(taskExecutorRepository);
            this.Disposables.Add(typeOfTaskRepository);
        }
Beispiel #3
0
        public ProductController(IProductRepository _productRepository,
            ITypeOfTaskRepository _typeOfTaskRepository,
            IMenuProductRepository _menuProduct,
            IProductTaskNameRepository _productTaskName,
            IFormatsNameRepository _formatsName,
            IDocumentRepository _documentRepository,
            IArticleRepository _articleRepository,
            ICostDetailRepository _costDetailRepository,
            ITaskExecutorRepository _taskExecuteRepository,
            ICustomerSupplierRepository _customerSupplierRepository,
            IWarehouseRepository _warehouseRepository

            )
        {
            formatsRepository = _formatsName;
            prodTskNameRepository = _productTaskName;
            menu = _menuProduct;
            typeOfTaskRepository = _typeOfTaskRepository;
            productRepository = _productRepository;
            documentRepository = _documentRepository;
            articleRepository = _articleRepository;
            costDetailRepository = _costDetailRepository;
            taskExecuteRepository = _taskExecuteRepository;
            customerSupplierRepository = _customerSupplierRepository;
            warehouseRepository = _warehouseRepository;

            this.Disposables.Add(typeOfTaskRepository);
            this.Disposables.Add(documentRepository);
            this.Disposables.Add(productRepository);
            this.Disposables.Add(formatsRepository);
            this.Disposables.Add(articleRepository);
            this.Disposables.Add(prodTskNameRepository);
            this.Disposables.Add(costDetailRepository);
            this.Disposables.Add(taskExecuteRepository);
            this.Disposables.Add(customerSupplierRepository);

            this.Disposables.Add(menu);
        }
Beispiel #4
0
        /// <summary>
        /// returns Product initialization by id
        /// </summary>
        /// <param name="id"></param>
        /// <param name="prodTskNameRepository"></param>
        /// <param name="formatsRepository"></param>
        /// <param name="typeOfTaskRepository"></param>
        /// <returns></returns>
        public Product InitProduct(string id, IProductTaskNameRepository prodTskNameRepository, IFormatsNameRepository formatsRepository, ITypeOfTaskRepository typeOfTaskRepository)
        {

            Product product;
            product = new ProductEmpty();

            if (id == "Buste" ||
                id == "Volantini" ||
                id == "Pieghevoli" ||
                id == "EtichetteCartellini" ||
                id == "CartaIntestata" ||
                id == "Locandine" ||
                id == "FogliMacchina")
            {
                product = new ProductSingleSheet();
            }

            if (
                id == "BigliettiVisita" ||
                id == "EtichetteCartelliniSago" ||
                id == "CartolineInviti" ||
                id == "CartolinePostali" ||
                id == "AltriFormati")
            {
                product = new ProductSingleSheet();
                product.ShowDCut = true;
                //                product.DCut = 0.5;
                product.DCut1 = 0.5;
                product.DCut2 = 0.5;
            }

            if (id == "PuntoMetallico" ||
                id == "SpiraleMetallica" ||
                id == "BrossuraFresata" ||
                id == "BrossuraCucitaFilo" ||
                id == "RivistePostalizzazione" ||
                id == "SchedeNonRilegate")
            {
                product = new ProductBookSheet();
            }

            if (
                id == "Fotoquadri" ||
                id == "SuppRigidi")
            {
                product = new ProductRigid();
                product.ShowDCut = true;
                product.DCut = 0;
                product.DCut1 = 1;
                product.DCut2 = 1;

            }

            if (
                id == "PVC" ||
                id == "Manifesti" ||
                id == "Striscioni" ||
                id == "Poster")
            {
                product = new ProductSoft();
            }

            if (
                id == "EtichetteRotolo" ||
                id == "EtichetteSagRotolo" ||
                id.StartsWith("FasceGommateRotolo"))
            {
                product = new ProductSingleLabelRoll();
            }

            if (
                id == "EtichetteRotoloDouble")
            {
                product = new ProductDoubleLabelRoll();
            }

            product.CodMenuProduct = id;
            product.ProductTaskName = prodTskNameRepository.GetAllById(id);
            product.FormatsName = formatsRepository.GetAllById(id);

            product.SystemTaskList = typeOfTaskRepository.GetAll().ToList();

            product.ProductNameGenerator = ProductRepository.GetProductNameGenerator(id).Generator;
            product.InitProduct();

            return product;

        }
Beispiel #5
0
        //constructor
        public AccountController(IProfileRepository _profDataRep,
            IMenuProductRepository _profMenuRep,
            ICustomerSupplierRepository _crFrom,
            ICustomerSupplierRepository _crTo,
            IArticleRepository _arFrom,
            IArticleRepository _arTo,
            ITaskExecutorRepository _trFrom,
            ITaskExecutorRepository _trTo,
            ITypeOfTaskRepository _ttrFrom,
            ITypeOfTaskRepository _ttrTo,
            IWarehouseRepository _warehouseRepository)
        {
            //passare al costruttore anche un riferimento di tipo IMenuProductRepository
            //e fare le stesse cose che si fanno ora per il IProfileRepository
            profMenuRep = _profMenuRep;
            profDataRep = _profDataRep;
            crFrom = _crFrom;
            crTo = _crTo;
            arFrom = _arFrom;
            arTo = _arTo;
            trFrom = _trFrom;
            trTo = _trTo;
            ttrFrom = _ttrFrom;
            ttrTo = _ttrTo;

            warehouseRepository = _warehouseRepository;

            this.Disposables.Add(profMenuRep);
            this.Disposables.Add(profDataRep);
            this.Disposables.Add(crFrom);
            this.Disposables.Add(crTo);
            this.Disposables.Add(arFrom);
            this.Disposables.Add(arTo);
            this.Disposables.Add(trFrom);
            this.Disposables.Add(trTo);
            this.Disposables.Add(ttrFrom);
            this.Disposables.Add(ttrTo);
            this.Disposables.Add(warehouseRepository);

        }
Beispiel #6
0
        private void Init()
        {

            typeOfTaskRepository = new TypeOfTaskRepository();
            documentRepository = new DocumentRepository();
            productRepository = new ProductRepository();
            taskExecutorRepository = new TaskExecutorRepository();
            articleRepository = new ArticleRepository();
            customerSupplierRepository = new CustomerSupplierRepository();
            costDetailRepository = new CostDetailRepository();
            taskCenterRepository = new TaskCenterRepository();

            this.Disposables.Add(typeOfTaskRepository);
            this.Disposables.Add(documentRepository);
            this.Disposables.Add(productRepository);
            this.Disposables.Add(taskExecutorRepository);
            this.Disposables.Add(articleRepository);
            this.Disposables.Add(customerSupplierRepository);
            this.Disposables.Add(menu);
            this.Disposables.Add(costDetailRepository);
            this.Disposables.Add(taskCenterRepository);



        }