private void BtnCategoryAdd_Click(object sender, RoutedEventArgs e) { if (MessageBox.Show("Kategoriyi kaydetmek istediğinize emin misiniz", "Uyarı!", MessageBoxButton.YesNoCancel) == MessageBoxResult.Yes) { category.CategoryName = txtCategoryName.Text.Trim(); ProductCategory.ProductCategoryName = txtPerCategory.Text.Trim(); servis.NewCategory(category); servis.NewPerCategory(ProductCategory, txtCategoryName.Text); var getCategory = servis.GetCategories(); dtGridCategory.ItemsSource = getCategory; } else { } }