/// <summary> /// 显示下级单位 /// </summary> /// <param name="_node"></param> private void _TryShowNextLevel(TreeListNode _node) { TreeListNode _tn; List <SinoOrganize> _childOrg; SinoOrganize _rci = (SinoOrganize)_node.Tag; if (_node.HasChildren && _node.Nodes.Count < 1) { using (CommonService.CommonServiceClient _csc = new CommonService.CommonServiceClient()) { _childOrg = _csc.GetRootDwList(_rci.Code.ToString(), 2).ToList <SinoOrganize>(); } FindOrgByStr _finder = new FindOrgByStr(_rci.Code.ToString()); List <SinoOrganize> olist = _childOrg.FindAll(new Predicate <SinoOrganize>(_finder.FindByFatherID)); olist.Sort(new SinoOrganizeComparer()); foreach (SinoOrganize _so in olist) { _tn = _pwListTree.AppendNode("", _node); _tn.SetValue(_pwListTreeColumn, _so.Name); _tn.Tag = _so; _tn.HasChildren = true; _tn.Expanded = false; } } }
virtual public void LoadOrgList(string _rootDwid) { this.treeList1.Nodes.Clear(); this.treeList1.BeginUpdate(); using (CommonService.CommonServiceClient _csc = new CommonService.CommonServiceClient()) { RootList = _csc.GetRootDwList(_rootDwid, 1).ToList <SinoOrganize>(); FindOrgByStr _finder = new FindOrgByStr(_rootDwid); List <SinoOrganize> olist = RootList.FindAll(new Predicate <SinoOrganize>(_finder.FindByID)); olist.Sort(new SinoOrganizeComparer()); foreach (SinoOrganize _dw in olist) { TreeListNode _dwnode = treeList1.AppendNode(null, null); _dwnode.SetValue(this.treeListColumn1, ShowTitle(_dw)); _dwnode.SetValue(this.treeListColumn2, (int)0); _dwnode.ImageIndex = 1; _dwnode.SelectImageIndex = 0; _dwnode.Tag = _dw; LoadChildNode(_dwnode, _dw); _dwnode.Expanded = true; } } this.treeList1.EndUpdate(); _initFinished = true; }
public void SelectedCode(decimal _code) { string _sid = _code.ToString(); List <SinoOrganize> _childOrg = ICS_Auth.GetRootDwList(_sid, 1); FindOrgByStr _finder = new FindOrgByStr(_sid); List <SinoOrganize> olist = _childOrg.FindAll(new Predicate <SinoOrganize>(_finder.FindByID)); olist.Sort(new SinoOrganizeComparer()); foreach (SinoOrganize _so in olist) { _ChangeText(_so, true, true); } }
public void SelectedDWDM(string _dwdm) { //string _sid = _code.ToString(); using (CommonService.CommonServiceClient _csc = new CommonService.CommonServiceClient()) { string _sid = _csc.GetDWIDByDWDM(_dwdm).ToString(); List <SinoOrganize> _childOrg = _csc.GetRootDwList(_sid, 1).ToList <SinoOrganize>(); FindOrgByStr _finder = new FindOrgByStr(_sid); List <SinoOrganize> olist = _childOrg.FindAll(new Predicate <SinoOrganize>(_finder.FindByID)); olist.Sort(new SinoOrganizeComparer()); foreach (SinoOrganize _so in olist) { _ChangeText(_so, true, true); } } }
virtual protected void LoadChildNode(TreeListNode _fathernode, SinoOrganize _fatherdw) { List <SinoOrganize> childList = ICS_Auth.GetRootDwList(_fatherdw.Code.ToString(), 2); FindOrgByStr _finder = new FindOrgByStr(_fatherdw.Code.ToString()); List <SinoOrganize> olist = childList.FindAll(new Predicate <SinoOrganize>(_finder.FindByFatherID)); olist.Sort(new SinoOrganizeComparer()); foreach (SinoOrganize _dw in olist) { TreeListNode _dwnode = treeList1.AppendNode(null, _fathernode); _dwnode.SetValue(this.treeListColumn1, ShowTitle(_dw)); _dwnode.ImageIndex = 1; _dwnode.SelectImageIndex = 0; _dwnode.Tag = _dw; _dwnode.Expanded = false; _dwnode.HasChildren = true; } }