public void ResetAddStudentControl(bool clearLog = true) { /* * This function contains all code that needs to be executed when the control is reloaded * * You need to edit this code. * Example: Emptying textboxes and gridviews * */ phoneNumbers.Clear(); phoneTypes.Clear(); StudentidTextbox.ResetText(); FirstnameTextbox.ResetText(); LastnameTextbox.ResetText(); GenderTextbox.ResetText(); StreetadressTextbox.ResetText(); ZipcodeTextbox.ResetText(); CityTextbox.ResetText(); CountryTextbox.ResetText(); BirthdateDatepicker.Value = BirthdateDatepicker.MaxDate; PhoneNumberTextbox.ResetText(); AddedPhoneNumbers_Readonly.ResetText(); if (clearLog) { RegisterStatusTextbox.ResetText(); } }
private void ClearForm() { if (UserId == 0) { IdTextbox.Text = "0"; UsernameTextbox.Clear(); FirstnameTextbox.Clear(); LastnameTextbox.Clear(); PasswordTextbox.Clear(); ConfirmTextbox.Clear(); IsAdminCheckbox.Checked = false; IsApproverCheckbox.Checked = false; IsVisitorCheckbox.Checked = false; } else { LoadUserDetails(); } passwordNotMatch = false; }
void ReleaseDesignerOutlets() { if (CreateUserButton != null) { CreateUserButton.Dispose(); CreateUserButton = null; } if (EmailAddress != null) { EmailAddress.Dispose(); EmailAddress = null; } if (EmailTextbox != null) { EmailTextbox.Dispose(); EmailTextbox = null; } if (LastnameLabel != null) { LastnameLabel.Dispose(); LastnameLabel = null; } if (LastnameTextbox != null) { LastnameTextbox.Dispose(); LastnameTextbox = null; } if (NameLabel != null) { NameLabel.Dispose(); NameLabel = null; } if (NameTextbox != null) { NameTextbox.Dispose(); NameTextbox = null; } if (PasswordLabel != null) { PasswordLabel.Dispose(); PasswordLabel = null; } if (PasswordTextbox != null) { PasswordTextbox.Dispose(); PasswordTextbox = null; } if (PhoneNumberLabel != null) { PhoneNumberLabel.Dispose(); PhoneNumberLabel = null; } if (PhoneTextbox != null) { PhoneTextbox.Dispose(); PhoneTextbox = null; } if (UserNameLabel != null) { UserNameLabel.Dispose(); UserNameLabel = null; } if (UserNameTextbox != null) { UserNameTextbox.Dispose(); UserNameTextbox = null; } }