private void BtnDeleteCustomer_Click(object sender, RoutedEventArgs e) { if (!Validation()) { return; } if (MessageBox.Show("Do you want to delete this Customer?", "Question", MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes) { dr.DeleteCustomer(cr.Id); btnAddCustomer.Visibility = Visibility.Visible; btnUpdateCustomer.Visibility = Visibility.Hidden; btnDeleteCustomer.Visibility = Visibility.Hidden; FillDG(); ResetTextBox(); } }