private bool Verification() { if (EN_No.Text == "G") { EN_No.Focus(); string errorEnrollmentNumber = "Please Provide Enrollment Number"; errorPro.SetError(EN_No, errorEnrollmentNumber); MessageBox.Show("Please Provide Enrollment Number"); return(false); } if (C_Name.Text == string.Empty) { C_Name.Focus(); string errorCousrse = "Please Choose Course"; errorPro.SetError(C_Name, errorCousrse); return(false); } if (C_Sem.Text == string.Empty) { C_Sem.Focus(); string errorSemester = "Please Choose Semester"; errorPro.SetError(C_Sem, errorSemester); MessageBox.Show("Please Choose Semester"); return(false); } if (Batch.Text == string.Empty) { Batch.Focus(); string errorBatch = "Please Choose Batch"; errorPro.SetError(Batch, errorBatch); return(false); } if (S_FName.Text == string.Empty) { S_FName.Focus(); string errorFname = "Please Provide First Name"; errorPro.SetError(S_FName, errorFname); MessageBox.Show("Please Provide First Name"); return(false); } if (DOB.Text == string.Empty) { DOB.Focus(); string errorDOB = "Please Provide Date Of Birth"; errorPro.SetError(DOB, errorDOB); return(false); } if (Father.Text == string.Empty) { Father.Focus(); string errorFather = "Please Provide Father Name"; errorPro.SetError(Father, errorFather); return(false); } if (MtxtFContact.Text == "+91-") { MtxtFContact.Focus(); string errorMtxtFContact = "Please Provide Father Contact Number"; errorPro.SetError(MtxtFContact, errorMtxtFContact); return(false); } return(true); }