private void BtnAddAdministrator_Click(object sender, RoutedEventArgs e) { if (!Validation()) { return; } Administrator administrator = new Administrator { FullName = tbAdministratorFullName.Text, Login = tbAdministratorLogin.Text, CreateDate = DateTime.Today, Password = tbAdministratorPassword.Password, PhoneNumber = tbPhoneNumber.Text, Address = tbAddress.Text }; dr.AddAdministrator(administrator); ResetTextBox(); FillDG(); }