Ejemplo n.º 1
0
        private ControlInfo BuildStages(TblCurriculums curriculum, TreeNode node, DateTime?date)
        {
            IList <TblStages> stages = StudentRecordFinder.GetStagesForCurriculum(curriculum);

            ControlInfo controlInfo = new ControlInfo();

            foreach (TblStages stage in stages)
            {
                var child = new IdendtityNode(stage);

                if (StudentPermissionsHelper.IsDateAllowed(date, _userId, stage.ID, NodeType.Stage, GetOperationType))
                {
                    controlInfo = BuildThemes(stage, child);

                    if (controlInfo.IsControlStartsNow)
                    {
                        controlInfo.AddCurriculumnToInfo(curriculum);
                        return(controlInfo);
                    }
                    if (child.ChildNodes.Count != 0)
                    {
                        node.ChildNodes.Add(child);
                    }
                }
            }

            return(controlInfo);
        }