private void ProductsViewCurrentChanged(object sender, EventArgs e)
 {
     if (_productsView.CurrentItem != null)
     {
         SelectedProduct = _productsView.CurrentItem as Product;
     }
 }
        private void PrepareProducts()
        {
            var productRepository = new ProductRepository();

            _finishGood1 = new Product { ProductType = ProductType.FinishGood, Name = "F1", DrawingNumber = "6606"};
            _finishGood2 = new Product { ProductType = ProductType.FinishGood, Name = "F2", DrawingNumber = "9393"};
            _rawMaterial1 = new Product { ProductType = ProductType.RawMaterial,Name = "R1"};
            _rawMaterial2 = new Product { ProductType = ProductType.RawMaterial,Name = "R2"};

            productRepository.SaveOrUpdate(_finishGood1);
            productRepository.SaveOrUpdate(_finishGood2);
            productRepository.SaveOrUpdate(_rawMaterial1);
            productRepository.SaveOrUpdate(_rawMaterial2);

            FlushAndClearSession();
        }
        private void PrepareProducts()
        {
            _finishGood1 = new Product { ProductType = ProductType.FinishGood, Name = "F1", DrawingNumber = "6606" };
            _finishGood2 = new Product { ProductType = ProductType.FinishGood, Name = "F2", DrawingNumber = "9393" };
            _rawMaterial1 = new Product { ProductType = ProductType.RawMaterial, Name = "R1" };
            _rawMaterial2 = new Product { ProductType = ProductType.RawMaterial, Name = "R2" };

            _finishGood1.SetIdTo(1);
            _finishGood2.SetIdTo(2);
            _rawMaterial1.SetIdTo(3);
            _rawMaterial2.SetIdTo(4);
        }
Example #4
0
 public RecipeOutput()
 {
     OutputProduct = new Product();
 }