Esempio n. 1
0
        public void Categories()
        {
            CategoriesWindow categoriesWindow = new CategoriesWindow();

            categoriesWindow.CategoriesDataGrid.ItemsSource = _model.GetCategories().DefaultView;
            categoriesWindow.ShowDialog();
            _model.RefreshData();
            var categories     = _model.GetCategories().Select();
            var categoriesList = (from c in categories
                                  select new Category {
                Name = (string)c.ItemArray[1], Id = (int)c.ItemArray[0]
            });

            _view.CategoriesListBox.ItemsSource = categoriesList;
        }
Esempio n. 2
0
        private void btnCreateCategory_Click(object sender, RoutedEventArgs e)
        {
            CategoriesWindow window = new CategoriesWindow(Database);

            window.ShowDialog();
        }