private void txt_TextChanged(object sender, TextChangedEventArgs e) { bool noEmptyFields = true; if (txtSecondName.Text == string.Empty) { noEmptyFields = false; } if (txtFirstName.Text == string.Empty) { noEmptyFields = false; } if (txtPatronymic.Text == string.Empty) { noEmptyFields = false; } if (!dtpBirthDate.SelectedDate.HasValue) { noEmptyFields = false; } if (noEmptyFields) { txtLogin.Text = AuthorizationInfoGenerator.GenerateLogin(txtSecondName.Text, txtFirstName.Text, txtPatronymic.Text, dtpBirthDate.SelectedDate.Value); } }
public WCreatePersonnel() { InitializeComponent(); txtPassword.Text = AuthorizationInfoGenerator.GenerateRandomPassword(); }