private void CreateThemeList() { ThemeDropDownList.Items.Clear(); if (StageDropDownList.SelectedItem != null) { var selectedStage = ServerModel.DB.Load <TblStages>(int.Parse(StageDropDownList.SelectedItem.Value)); var themes = StudentRecordFinder.GetThemesForStage(selectedStage); foreach (var s in themes) { ThemeDropDownList.Items.Add(new ListItem(s.Name, s.ID.ToString())); } } }
private ControlInfo BuildThemes(TblStages stage, TreeNode node) { var themes = StudentRecordFinder.GetThemesForStage(stage); ControlInfo controlInfo = new ControlInfo(); foreach (TblThemes theme in themes) { controlInfo = StudentPermissionsHelper.IsTimeForControl(_userId, stage, theme); if (controlInfo.IsControlStartsNow) { return(controlInfo); } if (!theme.IsControl) { node.ChildNodes.Add(new IdendtityNode(theme)); } } return(controlInfo); }