protected void btnShowPrev_Click(object sender, EventArgs e) { clearMsgPanel(); gvRss.DataSource = null; gvRss.DataBind(); Vacancy vacancy = new Vacancy(); VacancyRegistrationAndEvaluationManager manager = null; TransactionResponse response = null; //get vacancy No and date string vacancyDetail = DropDpostedVacancy.SelectedValue; if (vacancyDetail != "-1") { lblVacancy.Visible = false; string[] splitVacancyDetail = vacancyDetail.Split(new string[] { PageConstants.GREATER_GREATER_THAN }, StringSplitOptions.None); vacancyNumber = splitVacancyDetail[0].Trim(); postDate = splitVacancyDetail[1].Trim(); vacancy.VacancyNo = vacancyNumber; vacancy.PostedDate = postDate; manager = new VacancyRegistrationAndEvaluationManager(vacancy); response = manager.getNotAnnouncedVacancyToShowPreviewforHROfficer(); } else { lblVacancy.Visible = true; } DataTable dataTable = null; if (response != null) { gvRss.Visible = true; dataTable = (DataTable)response.Data; } else { if (IsPostBack) { lblInformationMsg.Text = "There is no more vacancy to post. please contact your system administrator if you have any question."; } else { lblInformationMsg.Text = "There is no vacancy to post. please contact your system administrator if you have any question."; } } if (dataTable != null && dataTable.Rows.Count > 0) { gvRss.DataSource = dataTable; gvRss.DataBind(); btnPostVacancy.Visible = true; } else { btnPostVacancy.Visible = false; } }