private static QuestionTypeModel ConvertToQuestionType(Dictionary <string, string> fieldValues)
        {
            QuestionTypeModel qt = new QuestionTypeModel();

            foreach (KeyValuePair <string, string> row in fieldValues)
            {
                switch (row.Key)
                {
                case "id":
                    try
                    {
                        qt.QuestionTypeId = int.Parse(row.Value);
                    }
                    catch (Exception)
                    {
                        throw;
                    }
                    break;

                case "name":
                    qt.Name = row.Value;
                    break;

                case "QuestionType":
                    qt.Type = row.Value;
                    break;

                default:
                    break;
                }
            }
            return(qt);
        }
        public QuestionsSelectionModel(string Subject)
        {
            subjects = SubjectModel.GetSubject(null, new List <string> {
                " name = '" + Subject + "'"
            });
            outcomesList = OutcomeModel.GetOutcome(null, new List <string> {
                "SubjectID = " + subjects[0].SubjectId
            });
            outcomeDetailsList = OutcomeDetailsModel.GetOutcomeDetails(null, null);
            foreach (OutcomeModel item in outcomesList)
            {
                foreach (OutcomeDetailsModel item2 in outcomeDetailsList)
                {
                    if (item.OutcomeId == item2.OutcomeId)
                    {
                        outcomeDetailsListRelavent.Add(item2);
                    }
                }
            }

            questionTypesList = QuestionTypeModel.GetQuestionType(null, null);
            questionsList     = question.GetQuestion(null, null);

            foreach (QuestionModel item in questionsList)
            {
                foreach (OutcomeDetailsModel item2 in outcomeDetailsListRelavent)
                {
                    if (item.OutcomeDetailsId == item2.OutcomeDetailsId)
                    {
                        questionListRelavent.Add(item);
                    }
                }
            }
        }
        private List <string> ConvertToColumnValues(QuestionTypeModel qt)
        {
            List <string> colValues = new List <string>();

            try
            {
                colValues.Add("'" + qt.Name + "'");
                colValues.Add("'" + qt.Type + "'");
            }
            catch (Exception)
            {
                throw;
            }

            return(colValues);
        }