Beispiel #1
0
        /// <summary>
        /// Fetch Assessment types
        /// </summary>
        public void GetBatteryTypes()
        {
            if (BatteryTypeList.Any())
            {
                BatteryTypeList.Clear();
            }

            if (OfflineStudentID != 0)
            {
                CalculateAgeDiff();
                var testRecords             = (_clinicalTestFormService.GetStudentTestFormsByStudentID(OfflineStudentID));
                var filteredBatteryTypeList = testRecords.OrderBy(x => x.assessmentId).Select(x => x.assessmentId).Distinct();
                foreach (var item in filteredBatteryTypeList)
                {
                    if (item == AssignmentTypes.BattelleDevelopmentalCompleteID)
                    {
                        BatteryTypeList.Add(new BatteryTypes()
                        {
                            assessmentId = item,
                            Description  = AssignmentTypes.BattelleDevelopmentalCompleteString,
                            selected     = false
                        });
                    }
                    if (item == AssignmentTypes.BattelleDevelopmentalScreenerID)
                    {
                        BatteryTypeList.Add(new BatteryTypes()
                        {
                            assessmentId = item,
                            Description  = AssignmentTypes.BattelleDevelopmentScreenerString,
                            selected     = false
                        });
                    }
                    if (item == AssignmentTypes.BattelleDevelopmentalAcademicSurveyID)
                    {
                        BatteryTypeList.Add(new BatteryTypes()
                        {
                            assessmentId = item,
                            Description  = AssignmentTypes.BattelleEarlyAcademicSurveyString,
                            selected     = false
                        });
                    }
                }
            }
            BatteryTypeList.OrderBy(x => x.assessmentId);

            if (!BatteryTypeList.Any())
            {
                IsBatteryTypeButtonEnabled = false;
                IsRecordFormButtonEnabled  = false;
                SelectedAssessmentType     = "No results found";
            }
            else
            {
                SelectedAssessmentType = null;
            }
        }
        public Battery()
        {
            //Assign defaults to each list
            WorkModeList.Add("Option1");
            WorkModeList.Add("Option2");
            WorkModeList.Add("Option3");
            WorkModeList.Add("Option4");

            BatteryTypeList.Add("Option1");
            BatteryTypeList.Add("Option2");
            BatteryTypeList.Add("Option3");
            BatteryTypeList.Add("Option4");
        }