Пример #1
0
        public void SaveSelectedLevels(int assessment_id, String levelName, String value)
        {
            try
            {
                if (value != null)
                {
                    string storeValue = value;

                    //Store DOD_Conf and DOD_Mis as StandardLevel
                    if (levelName == LevelManager.CONF_LEVEL_DOD || levelName == LevelManager.MAC_LEVEL_DOD)
                    {
                        storeValue = dodDisplayNameToStandardName[value];
                    }


                    ASSESSMENT_SELECTED_LEVELS saveSal;
                    if (dictionarySelectedLevels.TryGetValue(levelName, out saveSal))
                    {
                        saveSal.Standard_Specific_Sal_Level = storeValue;
                    }
                    else
                    {
                        saveSal = new ASSESSMENT_SELECTED_LEVELS()
                        {
                            Assessment_Id = assessment_id,
                            Level_Name    = levelName,
                            Standard_Specific_Sal_Level = storeValue
                        };
                        db.ASSESSMENT_SELECTED_LEVELS.Add(saveSal);
                    }
                    db.SaveChanges();
                }
            }catch (Exception e)
            {
                throw e;
            }
        }
Пример #2
0
 public void AddSelectedLevel(ASSESSMENT_SELECTED_LEVELS selectedLevel)
 {
     this.dictionarySelectedLevels[selectedLevel.Level_Name] = selectedLevel;
 }