Example #1
0
 public CreateProduct()
 {
     InitializeComponent();
     _productsPresenter  = new ProductsPresenter(new ProductsServices());
     supplierProductList = new BindingList <ProductosProveedor>();
     plusList            = new BindingList <PLUProductos>();
     impuestosList       = new BindingList <ImpuestoProducto>();
     productCodeTxtBox.PreviewTextInput  += productCodeTxtBox.OnlyNumbersValidationTextBox;
     descriptionTextBox.PreviewTextInput += descriptionTextBox.LettersAndNumbersValidationTextBox;
     minTextBox.PreviewTextInput         += minTextBox.OnlyNumbersValidationTextBox;
     maxTextBox.PreviewTextInput         += maxTextBox.OnlyNumbersValidationTextBox;
     minBuyTextBox.PreviewTextInput      += minBuyTextBox.OnlyNumbersValidationTextBox;
     priceTextBox.PreviewTextInput       += minBuyTextBox.NumberValidationTextBox;
     sellPriceTextBox.PreviewTextInput   += minBuyTextBox.NumberValidationTextBox;
     gainTextBox.PreviewTextInput        += minBuyTextBox.OnlyNumbersValidationTextBox;
     impuestosList.ListChanged           += ImpuestosList_ListChanged;
     suppliersProduct.ItemsSource         = supplierProductList;
     listTax.ItemsSource  = impuestosList;
     listPlus.ItemsSource = plusList;
     GetAllUnidades();
     GetAllDepartamentos();
     GetAllMarcas();
     GetAllCatalogoSat();
     GetAllUnidadesSat();
     GetAllSuppliers();
     GetAllImpuestos();
     HomeProductsGrid.ItemsSource = _productsPresenter.GetAllProductos();
 }
Example #2
0
 private void initButton_Click(object sender, RoutedEventArgs e)
 {
     cleanView();
     HomeProductsGrid.ItemsSource     = _productsPresenter.GetAllProductos();
     productsTabControl.SelectedIndex = 0;
 }