Example #1
0
        private void Refresh(object sender, RoutedEventArgs e)
        {
            DbCategoryAction dbCategoryAction = new DbCategoryAction(RefreshCategories);

            dbCategoryAction.BeginInvoke(null, null);
            if (categoriesComboBox.SelectedItem != null)
            {
                DbProductAction dbProductAction = new DbProductAction(RefreshProducts);
                dbProductAction.BeginInvoke((Category)categoriesComboBox.SelectedItem, null, null);
            }
        }
Example #2
0
 private void CategoriesComboBoxSelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (categoriesComboBox.SelectedItem != null)
     {
         DbProductAction dbProductAction = new DbProductAction(RefreshProducts);
         dbProductAction.BeginInvoke((Category)categoriesComboBox.SelectedItem, null, null);
     }
     else
     {
         MessageBox.Show("Выберите категорию");
     }
 }