private void editBrandBtn_Click(object sender, RoutedEventArgs e) { if (editBrand.Text == "") { MessageBox.Show("Field is empty", "Edit Category Failed", MessageBoxButton.OK, MessageBoxImage.Warning); } else { editCategory(); usc_brand.catchData(); } }
// Add Category private void adBrandBtn_Click(object sender, RoutedEventArgs e) { if (addBrand.Text == "") { MessageBox.Show("Field is empty!", "Add Category Failed", MessageBoxButton.OK, MessageBoxImage.Warning); } else { addBrands(); addBrand.Text = ""; usc_brand.catchData(); } }