private void txt_AdminPW_Leave(object sender, EventArgs e) { if (txt_AdminPW.Text != "" && txt_AdminPW.Text == "c#@123.Nibm") { EPC_email.SetError(txt_AdminPW, "correct"); EPW_email.Clear(); allcorrect = true; } else if (txt_AdminPW.Text == "") { EPW_email.SetError(txt_AdminPW, "Cannot keep admin password blank"); EPC_email.Clear(); allcorrect = false; } }
private void txt_Email_Leave(object sender, EventArgs e) { if (txt_Email.Text != "") { EPC_email.SetError(txt_Email, "correct"); EPW_email.Clear(); allcorrect = true; } else if (txt_Email.Text == "") { EPW_email.SetError(txt_Email, "Cannot keep email blank"); EPC_email.Clear(); allcorrect = false; } }