private void enrolleeIdNoTextBox_Leave(object sender, EventArgs e) { if ((enrolleeNoTextBox.Text.Length > 0) && (enrolleeIdNoTextBox.Text.Length > 0)) { string sTempName; if (IsDuplicate(out sTempName)) { errorProvider1.SetError(enrolleeIdNoTextBox, "This ID No belongs to " + sTempName); //enrolleeIdNoTextBox.Focus(); //enrolleeBindingSource.CancelEdit(); } else { errorProvider1.SetError(enrolleeIdNoTextBox, ""); if (departmentIdComboBox.Items.Count > 0) { departmentIdComboBox.SelectedIndex = 0; } if (positionIdComboBox.Items.Count > 0) { positionIdComboBox.SelectedIndex = 0; } if (settingIdComboBox.Items.Count > 0) { settingIdComboBox.SelectedIndex = 0; } } } UtilityClass.ChangeColor(enrolleeIdNoTextBox, false); }
private void middleNameTextBox_Leave(object sender, EventArgs e) { UtilityClass.ChangeColor(middleNameTextBox, false); if (middleNameTextBox.Text.Length > 0) { errorProvider1.SetError(middleNameTextBox, ""); } else { errorProvider1.SetError(middleNameTextBox, "Fill Middle Name"); middleNameTextBox.Focus(); } }
private void settingIdComboBox_Leave(object sender, EventArgs e) { UtilityClass.ChangeColor(settingIdComboBox, false); }
private void settingIdComboBox_Enter(object sender, EventArgs e) { UtilityClass.ChangeColor(settingIdComboBox, true); }
private void positionIdComboBox_Enter(object sender, EventArgs e) { UtilityClass.ChangeColor(positionIdComboBox, true); }
private void positionIdComboBox_Leave(object sender, EventArgs e) { UtilityClass.ChangeColor(positionIdComboBox, false); }
private void departmentIdComboBox_Leave(object sender, EventArgs e) { UtilityClass.ChangeColor(departmentIdComboBox, false); }
private void departmentIdComboBox_Enter(object sender, EventArgs e) { UtilityClass.ChangeColor(departmentIdComboBox, true); }
private void addressTextBox_Leave(object sender, EventArgs e) { UtilityClass.ChangeColor(addressTextBox, false); }
private void addressTextBox_Enter(object sender, EventArgs e) { UtilityClass.ChangeColor(addressTextBox, true); }
private void middleNameTextBox_Enter(object sender, EventArgs e) { UtilityClass.ChangeColor(middleNameTextBox, true); }
private void enrolleeNoTextBox_Enter(object sender, EventArgs e) { UtilityClass.ChangeColor(enrolleeNoTextBox, true); }
private void textBoxPassword_Leave(object sender, EventArgs e) { UtilityClass.ChangeColor(textBoxPassword, false); }
private void textBoxPassword_Enter(object sender, EventArgs e) { UtilityClass.ChangeColor(textBoxPassword, true); }
private void textBoxUserName_Leave(object sender, EventArgs e) { UtilityClass.ChangeColor(textBoxUserName, false); }
private void textBoxUserName_Enter(object sender, EventArgs e) { UtilityClass.ChangeColor(textBoxUserName, true); }