private void txt_lastName_TextChanged(object sender, EventArgs e) { if (txt_lastName.Text.Length == 0) { Error_empInfo.SetError(txt_lastName, "Employee Name required"); } else { if (txt_lastName.Text.Length >= 3) { formValidator3.Clear(); Error_empInfo.Clear(); } } }
private void txt_city_TextChanged(object sender, EventArgs e) { if (txt_city.Text.Length == 0) { Error_empInfo.SetError(txt_city, "Address should be filled"); } else { if (txt_city.Text.Length >= 3) { formValidator3.Clear(); Error_empInfo.Clear(); } } }
private void txt_mobile_TextChanged(object sender, EventArgs e) { formValidator3.Clear(); // to make sure that error provider is emppty if (txt_mobile.Text.Length > 10) { Error_empInfo.SetError(txt_mobile, "invalid mobile number.check again"); }//end of the mobile number will more than 10 digits else if (txt_mobile.Text.Length < 10) { Error_empInfo.SetError(txt_mobile, "invalid mobile number.check again"); } else { Error_empInfo.Clear(); } }
private void txt_firstName_TextChanged(object sender, EventArgs e) { if (txt_firstName.Text.Length == 0) { Error_empInfo.SetError(txt_firstName, "Supplier Name required"); } else { if (txt_firstName.Text.Length >= 3) { formValidator3.Clear(); Error_empInfo.Clear(); } } Thread th = new Thread(new ThreadStart(genarateSupplierID)); th.Start(); }