private void LoadCandidatesAccordingToSystemUserForEvaluate() { try { EvaluateProcessBO oEvaluateProcess = new EvaluateProcessBO(); Result oResult = new Result(); if (oExam != null && oSystemUser != null) { oResult = oEvaluateProcess.LoadCandidatesAccordingToSystemUserForEvaluate(oSystemUser, oExam); if (oResult.ResultIsSuccess) { oListCandidateForExamForGrid = (List<CandidateForExam>)oResult.ResultObject; //Utils.SetSession(SessionManager.csStoreGridView,oListCandidateForGrid); this.ViewState.Add(SessionManager.csStoreGridView, oListCandidateForExamForGrid); if (oSystemUser.SystemUserName.ToLower().Equals("administrator")) { oResult = oEvaluateProcess.EvaluateObjectiveAnswersForAllCandidateOfAnExma(oListCandidateForExamForGrid, oSystemUser, oExam); if (oResult.ResultIsSuccess) { lbl_error.ForeColor = Color.Green; lbl_error.Text = oResult.ResultMessage; } else { lbl_error.ForeColor = Color.Red; lbl_error.Text = oResult.ResultMessage; } } if (oListCandidateForExamForGrid.Count <= 0) { lbl_error.ForeColor = Color.Red; lbl_error.Text = "No Candidate Found For Evaluation."; tbl_candidateLink.Visible = false; } else { tbl_candidateLink.Visible = true; gridCandidates.DataSource = oListCandidateForExamForGrid; gridCandidates.DataBind(); } } else { lbl_error.ForeColor = Color.Red; lbl_error.Text = oResult.ResultMessage; } } else { } } catch (Exception oEx) { lbl_error.ForeColor = Color.Red; lbl_error.Text = "LoadCandidatesAccordingToSystemUserForEvaluate Exception."; } }