protected void btnNextEmp_Click(object sender, EventArgs e) { clearMsgPanelAndLabel(); countNextClick += 1; string[] splitter = new string[] { PageConstants.GREATER_GREATER_THAN }; VacancyInfoTosplit = (DropDVacancyProcessed.SelectedItem.Text).Split(splitter, StringSplitOptions.RemoveEmptyEntries); vacancyNo = VacancyInfoTosplit[0]; VacancyDate = VacancyInfoTosplit[1]; string[] tempVacancyInfoTosplit = (DropDVacancyProcessed.SelectedValue).Split(splitter, StringSplitOptions.RemoveEmptyEntries); isGenOrGSpecificForm = tempVacancyInfoTosplit[2].Trim(); try { //Verify if vacancy complete is possible. VacancyEvaluationForm evaluationForm = new VacancyEvaluationForm(); evaluationForm.VacancyNo = vacancyNo.Trim(); evaluationForm.VacancyDate = VacancyDate.Trim(); VacancyRegistrationAndEvaluationManager manager = new VacancyRegistrationAndEvaluationManager(evaluationForm); List<string> response = manager.getNextEvaluatedApplicants2ndPhase(Convert.ToInt16(isGenOrGSpecificForm)); if (response.Count > 0 && response != null) { int countNotEvaluatedEmp = response.Count; if (countNextClick >= countNotEvaluatedEmp) { countNextClick = 0; } string nextEmployee = response[countNextClick].ToString(); evaluateAnotherEmployeeform1(); evaluateAnotherEmployeeform2(); txtEmpID.Text = nextEmployee; } else { PanelApplicantmsg.Visible = true; ApplInfoDiv.Visible = true; lblApplicantInfomsg.Text = "All Applicant is evaluated. You can complete the evaluation if you are sure."; } } catch (Exception) { PanelApplicantmsg.Visible = true; ApplInfoDiv.Visible = true; lblApplicantInfomsg.Text = "We have a problem trying to get the next evaluated employee. Please contact your system administrator."; } }