private void BtnUpdateAdministrator_Click(object sender, RoutedEventArgs e) { if (!Validation()) { return; } btnAddAdministrator.Visibility = Visibility.Visible; btnUpdateAdministrator.Visibility = Visibility.Hidden; btnDeleteAdministrator.Visibility = Visibility.Hidden; Administrator administrator = new Administrator { Id = ad.Id, FullName = tbAdministratorFullName.Text, Login = tbAdministratorLogin.Text, Password = tbAdministratorPassword.Password, CreateDate = DateTime.Today, PhoneNumber = tbPhoneNumber.Text, Address = tbAddress.Text }; dr.UpdateAdministrator(administrator); ResetTextBox(); FillDG(); }