Exemple #1
0
        private void ValidateBtn_Click(object sender, RoutedEventArgs e)
        {
            ExternalBusiness Supplier = (ExternalBusiness)SupplierMenu.SelectedItem;
            string           Type     = "";
            string           Name     = NameTextBox.Text;
            int     SupplierID        = Supplier.getPersonID();
            string  Units             = UnitsTextBox.Text;
            double  Quantity          = double.Parse(QuantityTextBox.Text);
            decimal Cost  = decimal.Parse(CostTextBox.Text);
            decimal Price = 0;

            Type = TypesComboBox.SelectedItem.ToString();
            try { Price = decimal.Parse(PriceTextBox.Text); }
            catch { IsProduct = false; };
            int Min = int.Parse(MinTextBox.Text);

            DB.AddItem(SupplierID, Name, Units, Quantity, Cost, Price, Type, Min, IsProduct);
            Content = new StockManagement(DB);
        }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     Content = new StockManagement(DB);
 }