Exemple #1
0
        private void NewCategoryBtn_Click(object sender, RoutedEventArgs e)
        {
            var newCategoryWindow = new CategoryWindow();

            if (newCategoryWindow.ShowDialog().Value)
            {
                Helper.GetCategoriesList();
                RefreshList();
                result = true;
            }
        }
Exemple #2
0
        private void ModifyCategoryBtn_Click(object sender, RoutedEventArgs e)
        {
            var border = (Border)CategoriesListBox.SelectedItem;

            if (border != null)
            {
                var category             = Helper.GetCategoryByBorder(border);
                var modifyCategoryWindow = new CategoryWindow(category);
                if (modifyCategoryWindow.ShowDialog().Value)
                {
                    Helper.GetCategoriesList();
                    RefreshList();
                    result = true;
                }
            }
            else
            {
                MessageBox.Show("Please select category do modify");
            }
        }