예제 #1
0
        private void GetAllChildGuideLine(MD_GuideLine _guideLine, MetaDataServiceClient _mdc)
        {
            List <MD_GuideLine> _childGuideLineList = _mdc.GetChildGuideLines(_guideLine.ID).ToList <MD_GuideLine>();

            _guideLine.Children = _childGuideLineList;
            foreach (MD_GuideLine _gl in _childGuideLineList)
            {
                GetAllChildGuideLine(_gl, _mdc);
            }
        }
예제 #2
0
        private void LoadChildData(TreeListNode _fnode, object _value)
        {
            using (MetaDataServiceClient _mdc = new MetaDataServiceClient())
            {
                if (_value is MD_Nodes)
                {
                    _fnode.Nodes.Clear();
                    MD_Nodes _nodes = _value as MD_Nodes;

                    MD_Title     _mt      = new MD_Title("统计指标", "MD_TJZB", _nodes);
                    TreeListNode _newnode = treeList1.AppendNode(null, _fnode);
                    _newnode.SetValue(this.treeListColumn1, _mt);
                    _newnode.HasChildren      = true;
                    _newnode.ImageIndex       = 1;
                    _newnode.SelectImageIndex = 2;

                    _mt      = new MD_Title("报表指标", "MD_REPORTGUIDLINE", _nodes);
                    _newnode = treeList1.AppendNode(null, _fnode);
                    _newnode.SetValue(this.treeListColumn1, _mt);
                    _newnode.HasChildren      = true;
                    _newnode.ImageIndex       = 1;
                    _newnode.SelectImageIndex = 2;
                }

                if (_value is MD_Title)
                {
                    IList <MD_GuideLineGroup> _guideLineGroups = null;
                    _fnode.Nodes.Clear();
                    MD_Title _mdtitle = _value as MD_Title;
                    MD_Nodes _nodes   = (MD_Nodes)_mdtitle.FatherObj;
                    switch (_mdtitle.TitleType)
                    {
                    case "MD_TJZB":

                        _guideLineGroups = _mdc.GetGuideLineGroup(_nodes.DWDM, "3");      //参数3表示统计指标
                        foreach (MD_GuideLineGroup _tb in _guideLineGroups)
                        {
                            TreeListNode _newnode = treeList1.AppendNode(null, _fnode);
                            _newnode.SetValue(this.treeListColumn1, _tb);
                            _newnode.ImageIndex       = 0;
                            _newnode.SelectImageIndex = 2;
                            _newnode.HasChildren      = true;
                        }
                        break;

                    case "MD_REPORTGUIDLINE":
                        _guideLineGroups = _mdc.GetGuideLineGroup(_nodes.DWDM, "1");      //参数1表示报表指标

                        foreach (MD_GuideLineGroup _tb in _guideLineGroups)
                        {
                            TreeListNode _newnode = treeList1.AppendNode(null, _fnode);
                            _newnode.SetValue(this.treeListColumn1, _tb);
                            _newnode.ImageIndex       = 0;
                            _newnode.SelectImageIndex = 2;
                            _newnode.HasChildren      = true;
                        }
                        break;
                    }
                }

                if (_value is MD_GuideLineGroup)
                {
                    MD_GuideLineGroup _glg = _value as MD_GuideLineGroup;
                    switch (_glg.LX)
                    {
                    case 1:             //报表指标
                        break;

                    case 3:             //统计指标
                        List <MD_GuideLine> _guideLineList = _mdc.GetGuideLineOfGroup(_glg.ZBZTMC).ToList <MD_GuideLine>();
                        _glg.ChildGuideLines = _guideLineList;
                        foreach (MD_GuideLine _gl in _guideLineList)
                        {
                            TreeListNode _newnode = treeList1.AppendNode(null, _fnode);
                            _newnode.SetValue(this.treeListColumn1, _gl);
                            _newnode.ImageIndex       = 0;
                            _newnode.SelectImageIndex = 2;
                            _newnode.HasChildren      = true;
                            _gl.MD_GuideLineGroup     = _glg;
                        }
                        break;
                    }
                }

                if (_value is MD_GuideLine)
                {
                    MD_GuideLine        _gline = _value as MD_GuideLine;
                    List <MD_GuideLine> _childGuideLineList = _mdc.GetChildGuideLines(_gline.ID).ToList <MD_GuideLine>();
                    _gline.Children = _childGuideLineList;
                    foreach (MD_GuideLine _gl in _childGuideLineList)
                    {
                        TreeListNode _newnode = treeList1.AppendNode(null, _fnode);
                        _newnode.SetValue(this.treeListColumn1, _gl);
                        _newnode.ImageIndex       = 0;
                        _newnode.SelectImageIndex = 2;
                        _newnode.HasChildren      = true;
                    }
                }
            }
        }