示例#1
0
        public string GetMode()
        {
            int assessmentId      = Auth.AssessmentForUser();
            QuestionsManager qm   = new QuestionsManager(assessmentId);
            string           mode = GetApplicationMode(assessmentId).Trim().Substring(0, 1);

            if (String.IsNullOrEmpty(mode))
            {
                mode = AssessmentModeData.DetermineDefaultApplicationModeAbbrev();
                SetMode(mode);
            }

            return(mode);
        }
示例#2
0
        /// <summary>
        /// Determines if the assessment is question or requirements based.
        /// </summary>
        /// <param name="assessmentId"></param>
        /// <returns></returns>
        protected string GetApplicationMode(int assessmentId)
        {
            using (var db = new CSET_Context())
            {
                var mode = db.STANDARD_SELECTION.Where(x => x.Assessment_Id == assessmentId).Select(x => x.Application_Mode).FirstOrDefault();

                if (mode == null)
                {
                    mode = AssessmentModeData.DetermineDefaultApplicationModeAbbrev();
                    SetMode(mode);
                }

                return(mode);
            }
        }