Beispiel #1
0
        private void NewPruduct_OnClick(object sender, RoutedEventArgs e)
        {
            var newProduct = new NewProduct();

            newProduct.ShowDialog();

            productsGrid.ItemsSource = GetGridData();
        }
Beispiel #2
0
        private void ProductsGrid_OnRowClick(object sender, RoutedEventArgs e)
        {
            var dataRow = (DataGridRow)sender;

            if (!(dataRow.Item is Medicine))
            {
                return;
            }

            var medicine = (Medicine)dataRow.Item;

            var newProduct = new NewProduct();

            newProduct.Init(medicine);
            newProduct.ShowDialog();

            productsGrid.ItemsSource = GetGridData();
        }