コード例 #1
0
        /// <summary>
        /// This Method Load Questions according to category, type for an exam.
        /// </summary>
        /// <param name="oCategory"> It takes Category Object </param>
        /// <param name="oQuestionType"> It takes QuestionType Object </param>
        /// <param name="oCandidateForExam"> It takes CandidateForExam Object </param>
        /// <returns> It returns Result Object </returns>
        public Result LoadQuestionsForACandidateInExamByCategoryAndType(Category oCategory, QuestionType oQuestionType, CandidateForExam oCandidateForExam)
        {
            logger.Info("Start LoadQuestionsForACandidateInExamByCategoryAndType CandidateExamProcessDAO+DAO");

            Result oResult = new Result();
            DAOUtil oDAOUtil = new DAOUtil();

            SqlDataReader oSqlDataReader = null;

            String sSelect = String.Empty;
            String sChoiceSelect = String.Empty;

            List<Question> oListQuestion = new List<Question>();
            List<CandidateAnswerQuestion> oListCandidateAnswerQuestion = new List<CandidateAnswerQuestion>();

            int i = 0;

            try
            {
                //sSelect = "select EX_Question.QuestionID,EX_Question.QuestionText,EX_Question.QuestionCreatorID,EX_Question.QuestionDefaultMark,EX_Question.QuestionCategoryID,EX_Question.QuestionTypeID from EX_QuestionGeneration inner join EX_Question on EX_QuestionGeneration.QuestionID=EX_Question.QuestionID where EX_QuestionGeneration.ExamID='" + oCandidate.CadidateCandidateExam.CandiadteExamExam.ExamID + "' order by EX_Question.QuestionCategoryID, EX_Question.QuestionTypeID asc";

                //sSelect = "select EX_Question.QuestionID,EX_Question.QuestionText,EX_Question.QuestionCreatorID,EX_QuestionGeneration.SetupQuestionMark,EX_Question.QuestionCategoryID,EX_Question.QuestionTypeID"
                //+" from EX_QuestionGeneration inner join EX_Question on EX_QuestionGeneration.QuestionID=EX_Question.QuestionID"
                //+" where EX_QuestionGeneration.ExamID='" + oCandidate.CadidateCandidateExam.CandiadteExamExam.ExamID + "' order by EX_Question.QuestionCategoryID, EX_Question.QuestionTypeID asc";

                sSelect = "select EX_Question.QuestionID,EX_Question.QuestionText,"
                +" EX_Question.QuestionCreatorID,EX_QuestionGeneration.SetupQuestionMark"
                +" ,EX_Question.QuestionCategoryID,EX_Question.QuestionTypeID"
                +" from EX_QuestionGeneration inner join EX_Question on EX_QuestionGeneration.QuestionID=EX_Question.QuestionID"
                +" where EX_QuestionGeneration.ExamID='" + oCandidateForExam.CadidateCandidateExam.CandiadteExamExam.ExamID + "'"
                +" and EX_Question.QuestionCategoryID='" + oCategory.CategoryID + "'"
                +" and EX_Question.QuestionTypeID='" + oQuestionType.QuestionTypeID + "'";

                oSqlDataReader = oDAOUtil.GetReader(sSelect);

                while (oSqlDataReader.Read())
                {
                    Question oQuestion = new Question();

                    oQuestion.QuestionID = new Guid(oSqlDataReader["QuestionID"].ToString());
                    oQuestion.QuestionText = oSqlDataReader["QuestionText"].ToString();
                    oQuestion.QuestionCreator.SystemUserID = new Guid(oSqlDataReader["QuestionCreatorID"].ToString());
                    oQuestion.QuestionDefaultMark = float.Parse(oSqlDataReader["SetupQuestionMark"].ToString());
                    oQuestion.QuestionCategory.CategoryID = int.Parse(oSqlDataReader["QuestionCategoryID"].ToString());
                    oQuestion.QuestionQuestionType.QuestionTypeID = int.Parse(oSqlDataReader["QuestionTypeID"].ToString());

                    oListQuestion.Add(oQuestion);
                }

                oSqlDataReader.Close();

                foreach (Question oQuestionForChoice in oListQuestion)
                {
                    if (oQuestionForChoice.QuestionQuestionType.QuestionTypeID == 0)
                    {
                        sChoiceSelect = "select ObjectiveAnswer,ObjectiveAnswerIsValid from EX_Objective where ObjectiveQuestionID='" + oQuestionForChoice.QuestionID + "'";

                        List<Choice> oListChoice = new List<Choice>();

                        oSqlDataReader = oDAOUtil.GetReader(sChoiceSelect);

                        while (oSqlDataReader.Read())
                        {
                            //prepare the choices for a particular questtion......
                            //and populate oListQuestion
                            Choice oChoice = new Choice();

                            oChoice.ChoiceName = oSqlDataReader["ObjectiveAnswer"].ToString();
                            //oChoice.ChoiceIsValid = Convert.ToBoolean(oSqlDataReader["ObjectiveAnswerIsValid"].ToString());
                            oChoice.ChoiceIsValid = false;

                            oListChoice.Add(oChoice);
                        }

                        oSqlDataReader.Close();

                        oQuestionForChoice.QuestionObjectiveType.ListOfChoices = oListChoice;
                    }
                }

                for (i = 0; i < oListQuestion.Count; i++)
                {
                    CandidateAnswerQuestion oCandidateAnswerQuestion = new CandidateAnswerQuestion();
                    oCandidateAnswerQuestion.QuestionForCandidateAnswer = oListQuestion[i];
                    oListCandidateAnswerQuestion.Add(oCandidateAnswerQuestion);
                }

                oResult.ResultObject = oListCandidateAnswerQuestion;
                oResult.ResultMessage = "Load Question for Exam Success...";
                oResult.ResultIsSuccess = true;
            }
            catch (Exception oEx)
            {
                oResult.ResultIsSuccess = false;
                oResult.ResultMessage = "Exception in Question Load for Exam...";
                oResult.ResultException = oEx;

                logger.Info("Exception LoadQuestionsForACandidateInExamByCategoryAndType CandidateExamProcessDAO+DAO", oEx);
            }
            finally
            {
                if (oSqlDataReader != null && !oSqlDataReader.IsClosed)
                {
                    oSqlDataReader.Close();
                }
            }

            logger.Info("End LoadQuestionsForACandidateInExamByCategoryAndType CandidateExamProcessDAO+DAO");

            return oResult;
        }
コード例 #2
0
    private void PopulateWithCurrentGridViewState(CandidateAnswerQuestion oCandidateAnswerQuestion, int iQuestionIndex)
    {
        //ctl00_CPH_MainCandidate_ctl00_Grid_Answers_ctl02_txtTempDescriptive

        //ctl00_CPH_MainCandidate_ctl00_Grid_Answers_ctl02_chk1
        //ctl00_CPH_MainCandidate_ctl00_Grid_Answers_ctl02_chk2

        //ctl00_CPH_MainCandidate_ctl00_HiddenForGridChoices
        //ctl00_CPH_MainCandidate_ctl00_HiddenForGridTextBox

        try
        {
            int iNextStartIndex = 0;
            int Index = 0;
            int iChoiceCount=0;

            String sHiddenChoices = String.Empty;
            String sHiddenTextBox = String.Empty;
            String sChkValue = String.Empty;

            if (oCandidateAnswerQuestion.QuestionForCandidateAnswer.QuestionQuestionType.QuestionTypeID == 0)
            {
                sHiddenChoices = HiddenForGridChoices.Value;

                while (iNextStartIndex < sHiddenChoices.Length && sHiddenChoices.IndexOf('@', iNextStartIndex) >= 0)
                {
                    Index = sHiddenChoices.IndexOf('@', iNextStartIndex);

                    sChkValue = sHiddenChoices.Substring(iNextStartIndex, Index - iNextStartIndex);

                    oListCandidateAnswerQuestion[iQuestionIndex].QuestionForCandidateAnswer.QuestionObjectiveType.ListOfChoices[iChoiceCount].ChoiceIsValid = Convert.ToBoolean(sChkValue);

                    iChoiceCount = iChoiceCount + 1;

                    iNextStartIndex = Index + 1;
                }

                Utils.SetSession(SessionManager.csExamProcess, oListCandidateAnswerQuestion);
                //Utils.SetSession(Utils.GetSession(SessionManager.csLastCategoryAndExam).ToString(), oListCandidateAnswerQuestion);
                //this.ViewState.Add("Common", oListCandidateAnswerQuestion);
            }
            else if (oCandidateAnswerQuestion.QuestionForCandidateAnswer.QuestionQuestionType.QuestionTypeID == 1)
            {
                sHiddenTextBox = HiddenForGridTextBox.Value;

                Char[] cArr = new Char[sHiddenTextBox.Length];

                cArr = sHiddenTextBox.ToCharArray();

                for (int i = 0; i < cArr.Length; i++)
                {
                    if (cArr[i].ToString().Equals("'"))
                    {
                        cArr[i] = ' ';
                    }
                }

                sHiddenTextBox = new String(cArr);

                oListCandidateAnswerQuestion[iQuestionIndex].DescriptiveQuestionAnswerText = sHiddenTextBox;

                if (IsValidAttachedFile((FileUpload)Grid_Answers.Rows[0].FindControl("fupAnswerAttach")))
                {
                    oListCandidateAnswerQuestion[iQuestionIndex].ClientFileBytes = (Grid_Answers.Rows[0].FindControl("fupAnswerAttach") as FileUpload).FileBytes;
                    oListCandidateAnswerQuestion[iQuestionIndex].sAnswerAttachFilePath = (Grid_Answers.Rows[0].FindControl("fupAnswerAttach") as FileUpload).FileName;//HiddenForGetClientFileName.Value.Substring(HiddenForGetClientFileName.Value.LastIndexOf('\\') + 1, HiddenForGetClientFileName.Value.Length - HiddenForGetClientFileName.Value.LastIndexOf('\\') - 1); //Here sAnswerAttachFilePath is used to show only the client Answer File Name
                }

                Utils.SetSession(SessionManager.csExamProcess, oListCandidateAnswerQuestion);
                //Utils.SetSession(Utils.GetSession(SessionManager.csLastCategoryAndExam).ToString(), oListCandidateAnswerQuestion);
                //this.ViewState.Add("Common", oListCandidateAnswerQuestion);
            }
        }
        catch (Exception oEx)
        {

        }
    }
コード例 #3
0
    private void PopulateWithCurrentGridViewState(CandidateAnswerQuestion oCandidateAnswerQuestion, int iQuestionIndex)
    {
        //ctl00_CPH_MainCandidate_ctl00_Grid_Answers_ctl02_txtTempDescriptive

        //ctl00_CPH_MainCandidate_ctl00_Grid_Answers_ctl02_chk1
        //ctl00_CPH_MainCandidate_ctl00_Grid_Answers_ctl02_chk2

        //ctl00_CPH_MainCandidate_ctl00_HiddenForGridChoices
        //ctl00_CPH_MainCandidate_ctl00_HiddenForGridTextBox
        float fMark = 0f;
        float f = 0f;

        try
        {
            if (oCandidateAnswerQuestion.QuestionForCandidateAnswer.QuestionQuestionType.QuestionTypeID == 1)
            {
                TextBox txtObtainMark = Grid_Answers.Rows[0].FindControl("txtObtainMark") as TextBox;

                if(float.TryParse(txtObtainMark.Text,out f))
                {
                    fMark = float.Parse(txtObtainMark.Text);

                    if (fMark >= 0f && fMark <= oCandidateAnswerQuestion.QuestionForCandidateAnswer.QuestionDefaultMark)
                    {
                        oListCandidateAnswerQuestion[iQuestionIndex].ObtainMark = fMark;
                    }
                }

                //Utils.SetSession(SessionManager.csStoreGridView, oListCandidateAnswerQuestion);
                this.ViewState.Add(SessionManager.csStoreGridView, oListCandidateAnswerQuestion);

                //Utils.SetSession(Utils.GetSession(SessionManager.csLastCategoryAndExam).ToString(), oListCandidateAnswerQuestion);
                //this.ViewState.Add("Common", oListCandidateAnswerQuestion);
            }
        }
        catch (Exception oEx)
        {

        }
    }
コード例 #4
0
        /// <summary>
        /// This method Load questions at the time of candidate evaluation, if that system user setup questions.
        /// The system user can see the questions which are setup by him
        /// Administrator can always see all questions
        /// </summary>
        /// <param name="sCandidateID"> It takes string Object </param>
        /// <param name="oExam"> It takes Exam Object </param>
        /// <param name="oSystemUser"> It takes SystemUser Object </param>
        /// <param name="flagForEvaluation"> It takes Boolean Object.It is only to show the Objective answer Name </param>
        /// <returns> It returns Result Object </returns>
        public Result LoadQuestionsForACandidateWhichSetupByAParticularUser(string sCandidateID, Exam oExam, SystemUser oSystemUser, Boolean flagForEvaluation)
        {
            //new CLogger("Start LoadQuestionsForACandidateWhichSetupByAParticularUser EvaluateProcessDAO+DAO", FileNameManagerInDLL.sLogFileName, 1).WriteLog("Start LoadQuestionsForACandidateWhichSetupByAParticularUser EvaluateProcessDAO+DAO", ELogLevel.Debug);

            logger.Info("Start LoadQuestionsForACandidateWhichSetupByAParticularUser EvaluateProcessDAO+DAO");

            Result oResult = new Result();
            DAOUtil oDAOUtil = new DAOUtil();

            SqlDataReader oSqlDataReader = null;

            String sSelect = String.Empty;
            String sTempAnswer = String.Empty;
            String sObtainMark = String.Empty;

            List<CandidateAnswerQuestion> oListCandidateAnswerQuestion = new List<CandidateAnswerQuestion>();

            float f =0f;

            try
            {
                if (oSystemUser.SystemUserName.ToLower().Equals("administrator"))
                {
                    //sSelect = "select EX_CandidateExam.AnswerStringOrBits from EX_CandidateExam inner join EX_QuestionGeneration on EX_CandidateExam.QuestionID=EX_QuestionGeneration.QuestionID where EX_CandidateExam.CandidateID='" + sCandidateID + "' and EX_CandidateExam.ExamID='"+oExam.ExamID+"' and EX_CandidateExam.QuestionID in (select EX_QuestionGeneration.QuestionID from EX_QuestionGeneration where EX_QuestionGeneration.ExamID='" + oExam.ExamID + "')";
                    //sSelect = "select EX_CandidateExam.AnswerStringOrBits,EX_Question.QuestionID,EX_Question.QuestionText,EX_Question.QuestionDefaultMark,EX_Question.QuestionTypeID,EX_Question.QuestionCategoryID from EX_CandidateExam inner join EX_QuestionGeneration on EX_CandidateExam.QuestionID=EX_QuestionGeneration.QuestionID inner join EX_Question on EX_Question.QuestionID = EX_QuestionGeneration.QuestionID where EX_CandidateExam.CandidateID='" + sCandidateID + "' and EX_CandidateExam.ExamID='" + oExam.ExamID + "' and EX_CandidateExam.QuestionID in (select EX_QuestionGeneration.QuestionID from EX_QuestionGeneration where EX_QuestionGeneration.ExamID='" + oExam.ExamID + "') order by EX_Question.QuestionCategoryID,EX_Question.QuestionTypeID asc";
                    //sSelect = "select distinct EX_CandidateExam.AnswerStringOrBits,EX_CandidateExam.ObtainMark, EX_Question.QuestionID,EX_Question.QuestionText,EX_Question.QuestionDefaultMark,EX_Question.QuestionTypeID,EX_Question.QuestionCategoryID from EX_Question inner join EX_QuestionGeneration on EX_Question.QuestionID = EX_QuestionGeneration.QuestionID inner join EX_CandidateExam on EX_CandidateExam.QuestionID=EX_QuestionGeneration.QuestionID where EX_CandidateExam.CandidateID='" + sCandidateID + "' and EX_CandidateExam.ExamID='" + oExam.ExamID + "' and EX_CandidateExam.QuestionID in (select EX_QuestionGeneration.QuestionID from EX_QuestionGeneration where EX_QuestionGeneration.ExamID='" + oExam.ExamID + "') order by EX_Question.QuestionCategoryID,EX_Question.QuestionTypeID asc";
                    sSelect = "select distinct EX_CandidateExam.AnswerStringOrBits,EX_CandidateExam.ObtainMark,"
                    +" EX_CandidateExam.AnswerAttachmentPath, EX_Question.QuestionID,"
                    +" EX_Question.QuestionText,EX_QuestionGeneration.SetupQuestionMark,"
                    +" EX_Question.QuestionTypeID,EX_Question.QuestionCategoryID"
                    +" from EX_Question inner join EX_QuestionGeneration on"
                    +" EX_Question.QuestionID = EX_QuestionGeneration.QuestionID"
                    +" inner join EX_CandidateExam on EX_CandidateExam.QuestionID=EX_QuestionGeneration.QuestionID"
                    +" where EX_CandidateExam.CandidateID='" + sCandidateID + "'"
                    +" and EX_QuestionGeneration.ExamID='" + oExam.ExamID + "'"
                    +" and EX_CandidateExam.ExamID='" + oExam.ExamID + "' and"
                    +" EX_CandidateExam.QuestionID in"
                    +" (select EX_QuestionGeneration.QuestionID from EX_QuestionGeneration"
                    +" where EX_QuestionGeneration.ExamID='" + oExam.ExamID + "')"
                    +" order by EX_Question.QuestionCategoryID,EX_Question.QuestionTypeID asc";
                }
                else
                {
                    //sSelect = "select EX_CandidateExam.AnswerStringOrBits from EX_CandidateExam inner join EX_QuestionGeneration on EX_CandidateExam.QuestionID=EX_QuestionGeneration.QuestionID where EX_CandidateExam.CandidateID='" + sCandidateID + "' and EX_CandidateExam.ExamID='" + oExam.ExamID + "' and EX_CandidateExam.QuestionID in (select EX_QuestionGeneration.QuestionID from EX_QuestionGeneration where EX_QuestionGeneration.ExamID='" + oExam.ExamID + "' and EX_QuestionGeneration.GeneratorID='" + oSystemUser.SystemUserID + "')";
                    //sSelect = "select EX_CandidateExam.AnswerStringOrBits,EX_Question.QuestionID,EX_Question.QuestionText,EX_Question.QuestionDefaultMark,EX_Question.QuestionTypeID,EX_Question.QuestionCategoryID from EX_CandidateExam inner join EX_QuestionGeneration on EX_CandidateExam.QuestionID=EX_QuestionGeneration.QuestionID inner join EX_Question on EX_Question.QuestionID = EX_QuestionGeneration.QuestionID where EX_CandidateExam.CandidateID='" + sCandidateID + "' and EX_CandidateExam.ExamID='" + oExam.ExamID + "' and EX_CandidateExam.QuestionID in (select EX_QuestionGeneration.QuestionID from EX_QuestionGeneration where EX_QuestionGeneration.ExamID='" + oExam.ExamID + "' and EX_QuestionGeneration.GeneratorID='" + oSystemUser.SystemUserID + "') order by EX_Question.QuestionCategoryID,EX_Question.QuestionTypeID asc";
                    //sSelect = "select distinct EX_CandidateExam.AnswerStringOrBits,EX_CandidateExam.ObtainMark, EX_Question.QuestionID,EX_Question.QuestionText,EX_Question.QuestionDefaultMark,EX_Question.QuestionTypeID,EX_Question.QuestionCategoryID from EX_Question inner join EX_QuestionGeneration on EX_Question.QuestionID = EX_QuestionGeneration.QuestionID inner join EX_CandidateExam on EX_CandidateExam.QuestionID=EX_QuestionGeneration.QuestionID where EX_CandidateExam.CandidateID='" + sCandidateID + "' and EX_CandidateExam.ExamID='" + oExam.ExamID + "' and EX_CandidateExam.QuestionID in (select EX_QuestionGeneration.QuestionID from EX_QuestionGeneration where EX_QuestionGeneration.ExamID='" + oExam.ExamID + "' and EX_QuestionGeneration.GeneratorID='" + oSystemUser.SystemUserID + "') order by EX_Question.QuestionCategoryID,EX_Question.QuestionTypeID asc";
                    sSelect = "select distinct EX_CandidateExam.AnswerStringOrBits,EX_CandidateExam.ObtainMark,"
                    +" EX_CandidateExam.AnswerAttachmentPath, EX_Question.QuestionID,"
                    +" EX_Question.QuestionText,EX_QuestionGeneration.SetupQuestionMark,"
                    +" EX_Question.QuestionTypeID,EX_Question.QuestionCategoryID"
                    +" from EX_Question inner join EX_QuestionGeneration on EX_Question.QuestionID = EX_QuestionGeneration.QuestionID"
                    +" inner join EX_CandidateExam on EX_CandidateExam.QuestionID=EX_QuestionGeneration.QuestionID"
                    +" where EX_CandidateExam.CandidateID='" + sCandidateID + "'"
                    +" and EX_QuestionGeneration.ExamID='" + oExam.ExamID + "'"
                    +" and EX_CandidateExam.ExamID='" + oExam.ExamID + "' and"
                    +" EX_CandidateExam.QuestionID in"
                    +" (select EX_QuestionGeneration.QuestionID from EX_QuestionGeneration"
                    +" where EX_QuestionGeneration.ExamID='" + oExam.ExamID + "' and"
                    +" EX_QuestionGeneration.GeneratorID='" + oSystemUser.SystemUserID + "')"
                    +" order by EX_Question.QuestionCategoryID,EX_Question.QuestionTypeID asc";
                }

                oSqlDataReader = oDAOUtil.GetReader(sSelect);

                while (oSqlDataReader.Read())
                {
                    CandidateAnswerQuestion oCandidateAnswerQuestion = new CandidateAnswerQuestion();

                    sTempAnswer = oSqlDataReader["AnswerStringOrBits"].ToString();

                    sObtainMark = oSqlDataReader["ObtainMark"].ToString();

                    if (float.TryParse(sObtainMark, out f))
                    {
                        oCandidateAnswerQuestion.ObtainMark = float.Parse(sObtainMark);
                    }
                    else
                    {
                        oCandidateAnswerQuestion.ObtainMark = 0f;
                    }

                    oCandidateAnswerQuestion.sAnswerAttachFilePath = oSqlDataReader["AnswerAttachmentPath"].ToString();
                    oCandidateAnswerQuestion.QuestionForCandidateAnswer.QuestionID = new Guid(oSqlDataReader["QuestionID"].ToString());
                    oCandidateAnswerQuestion.QuestionForCandidateAnswer.QuestionText = oSqlDataReader["QuestionText"].ToString();
                    oCandidateAnswerQuestion.QuestionForCandidateAnswer.QuestionDefaultMark = float.Parse(oSqlDataReader["SetupQuestionMark"].ToString());
                    oCandidateAnswerQuestion.QuestionForCandidateAnswer.QuestionCategory.CategoryID = int.Parse(oSqlDataReader["QuestionCategoryID"].ToString());

                    //Objective@True:True:False:True:
                    //Descriptive@IQ Des Exam:
                    //DES@IQ
                    String sTempObjective = String.Empty;
                    String sCheck = String.Empty;
                    List<Choice> oListAnswers = new List<Choice>();
                    int iColonIndex = 0;

                    if (sTempAnswer.IndexOf("Objective@", 0)>=0)
                    {
                        sTempObjective = sTempAnswer.Substring(sTempAnswer.IndexOf("@",0)+1);

                        while (sTempObjective != String.Empty)
                        {
                            iColonIndex = sTempObjective.IndexOf(":");

                            if(iColonIndex>=0)
                            {
                                sCheck = sTempObjective.Substring(0, iColonIndex);

                                Choice oChoice = new Choice();

                                oChoice.ChoiceIsValid = Boolean.Parse(sCheck);

                                oListAnswers.Add(oChoice);

                                if (iColonIndex + 1 < sTempObjective.Length)
                                {
                                    sTempObjective = sTempObjective.Substring(iColonIndex + 1, sTempObjective.Length - iColonIndex - 1);
                                }
                                else
                                {
                                    sTempObjective = String.Empty;
                                }
                            }
                        }

                        oCandidateAnswerQuestion.QuestionForCandidateAnswer.QuestionObjectiveType.ListOfAnswers = oListAnswers;
                        oCandidateAnswerQuestion.QuestionForCandidateAnswer.QuestionQuestionType.QuestionTypeID = 0;
                    }
                    else if (sTempAnswer.IndexOf("Descriptive@", 0)>=0)
                    {
                        oCandidateAnswerQuestion.DescriptiveQuestionAnswerText = sTempAnswer.Substring(sTempAnswer.IndexOf("@",0)+1,sTempAnswer.Length-(sTempAnswer.IndexOf("@",0)+1)-1);
                        oCandidateAnswerQuestion.QuestionForCandidateAnswer.QuestionQuestionType.QuestionTypeID = 1;
                    }

                    oListCandidateAnswerQuestion.Add(oCandidateAnswerQuestion);
                }

                oSqlDataReader.Close();

                //this is for show the Objective answer Name
                if (!flagForEvaluation)
                {
                    foreach (CandidateAnswerQuestion oCandidateAnswerQuestionInList in oListCandidateAnswerQuestion)
                    {
                        if (oCandidateAnswerQuestionInList.QuestionForCandidateAnswer.QuestionQuestionType.QuestionTypeID == 0)
                        {
                            if (oSystemUser.SystemUserName.ToLower().Equals("administrator"))
                            {
                                sSelect = "select EX_Objective.ObjectiveQuestionID,EX_Objective.ObjectiveAnswer,"
                                + " EX_Objective.ObjectiveAnswerIsValid"
                                + " from EX_Objective where"
                                + " EX_Objective.ObjectiveQuestionID='" + oCandidateAnswerQuestionInList.QuestionForCandidateAnswer.QuestionID + "'";

                            }
                            else
                            {
                                sSelect = "select EX_Objective.ObjectiveQuestionID,EX_Objective.ObjectiveAnswer,"
                                + " EX_Objective.ObjectiveAnswerIsValid"
                                + " from EX_Objective where"
                                + " EX_Objective.ObjectiveQuestionID='" + oCandidateAnswerQuestionInList.QuestionForCandidateAnswer.QuestionID + "'";
                            }

                            //String sCheckValid = String.Empty;
                            //String sCheckName = String.Empty;

                            List<Choice> oListChoices = new List<Choice>();

                            oSqlDataReader = oDAOUtil.GetReader(sSelect);

                            int iChoiceCounter = -1;

                            while (oSqlDataReader.Read())
                            {
                                iChoiceCounter = iChoiceCounter + 1;

                                Choice oChoice = new Choice();
                                oChoice.ChoiceIsValid = Boolean.Parse(oSqlDataReader["ObjectiveAnswerIsValid"].ToString());

                                oListChoices.Add(oChoice);
                                //oChoice.ChoiceName = oSqlDataReader["ObjectiveAnswer"].ToString();

                                oCandidateAnswerQuestionInList.QuestionForCandidateAnswer.QuestionObjectiveType.ListOfAnswers[iChoiceCounter].ChoiceName = oSqlDataReader["ObjectiveAnswer"].ToString();

                            }

                            oSqlDataReader.Close();

                            oCandidateAnswerQuestionInList.QuestionForCandidateAnswer.QuestionObjectiveType.ListOfChoices = oListChoices;
                        }
                    }
                }

                oResult.ResultObject = oListCandidateAnswerQuestion;
                oResult.ResultMessage = "LoadQuestionsForACandidateWhichSetupByAParticularUser Success...";
                oResult.ResultIsSuccess = true;

            }
            catch (Exception oEx)
            {
                oResult.ResultIsSuccess = false;
                oResult.ResultException = oEx;
                oResult.ResultMessage = "LoadQuestionsForACandidateWhichSetupByAParticularUser Exception...";

                logger.Info("Exception LoadQuestionsForACandidateWhichSetupByAParticularUser EvaluateProcessDAO+DAO", oEx);

                //new CLogger("Exception LoadQuestionsForACandidateWhichSetupByAParticularUser EvaluateProcessDAO+DAO", FileNameManagerInDLL.sLogFileName, 1).WriteLog("Exception LoadQuestionsForACandidateWhichSetupByAParticularUser EvaluateProcessDAO+DAO", ELogLevel.Debug, oEx);
            }
            finally
            {
                if (oSqlDataReader!=null && !oSqlDataReader.IsClosed)
                {
                    oSqlDataReader.Close();
                }
            }

            //new CLogger("Out LoadQuestionsForACandidateWhichSetupByAParticularUser EvaluateProcessDAO+DAO", FileNameManagerInDLL.sLogFileName, 1).WriteLog("Out LoadQuestionsForACandidateWhichSetupByAParticularUser EvaluateProcessDAO+DAO", ELogLevel.Debug); ;

            logger.Info("End LoadQuestionsForACandidateWhichSetupByAParticularUser EvaluateProcessDAO+DAO");

            return oResult;
        }