private void BtnUpdateCustomer_Click(object sender, RoutedEventArgs e) { if (!Validation()) { return; } Customer customer = new Customer { Id = cr.Id, FullName = tbCustomerFullName.Text, CreateDate = DateTime.Today, PhoneNumber = tbPhoneNumber.Text, Address = tbAddress.Text }; dr.UpdateCustomer(customer); btnAddCustomer.Visibility = Visibility.Visible; btnUpdateCustomer.Visibility = Visibility.Hidden; btnDeleteCustomer.Visibility = Visibility.Hidden; FillDG(); ResetTextBox(); }