private void getVacancyReportAndDisplayToUser(Vacancy vacancy, string reportPhase, int isfromAll) { TransactionResponse response = null; VacancyRegistrationAndEvaluationManager manager = new VacancyRegistrationAndEvaluationManager(vacancy); try { // Notification Manager. response = manager.getVacancyEvaluationResult(reportPhase); DataTable dataTable = null; if (response.isSuccessful()) { //get Data from TransactionResponse dataTable = (DataTable)response.Data; if (dataTable != null) { if (isfromAll == 0) { if (PageConstants.REPORT_PHASE1.Equals(reportPhase)) { firstPhaseDataTable = dataTable; firstPhaseResultGV.DataSource = dataTable; firstPhaseResultGV.DataBind(); } else { finalPhaseDataTable = dataTable; gvFinalReport.DataSource = dataTable; gvFinalReport.DataBind(); } } else if (isfromAll == 1) { firstPhaseDataTable = dataTable; allPhaseReportGV.DataSource = dataTable; allPhaseReportGV.DataBind(); } } } //display message to user. displayMessageToTheUser(response); } //CATCH ANY OTHER EXCEPTION, dont let user see any kind of unexpected error catch (Exception ex) { //Write this exception to file for investigation of the issue later. LoggerManager.LogError(ex.ToString(), logger); ErroroDIV.Visible = true; if (response != null) { lblErrorMsg.Text = response.getMessage() + response.getErrorCode(); } else { lblErrorMsg.Text = DBOperationErrorConstants.M_UNKNOWN_EVIL_ERROR + DBOperationErrorConstants.E_UNKNOWN_EVIL_ERROR; } } }