예제 #1
0
        void delete_Button_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            productCatDbutils = new ProductCategoryDbUtils();
            productCatDbutils.deleteCategory(code_Textbox.Text);

            var categoryWindow = new CategoryWindow();

            categoryWindow.Show();
            Hide();
        }
예제 #2
0
        void update_Button_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            try {
                productCat        = new ProductCategory();
                productCatDbutils = new ProductCategoryDbUtils();


                productCat.setCategoryCode(code_Textbox.Text);
                productCat.setCategoryDescription(Description_Textbox.Text);
                productCat.setCategoryType(type_Textbox.Text);
                productCatDbutils.updateCategory(productCat);

                var categoryWindow = new CategoryWindow();
                categoryWindow.Show();
                Hide();
            } catch (Exception) {
                MessageBox.Show("Error");
            }
        }