| | |
| | | using System.ComponentModel; |
| | | using DevExpress.Utils.Extensions; |
| | | using System.ComponentModel; |
| | | using Yw.Dto; |
| | | |
| | | namespace HStation.WinFrmUI.Basic |
| | |
| | | |
| | | public class CurrentViewModel |
| | | { |
| | | public CurrentViewModel(SysTypeLogicalTreeDto rhs) |
| | | public CurrentViewModel(Yw.Vmo.SysTypeLogicalTreeVmo rhs) |
| | | { |
| | | var module = rhs.LogicalModel as Yw.Dto.SysModuleStdDto; |
| | | this.ID = module.ID; |
| | |
| | | public async void SetBindingData() |
| | | { |
| | | _bll = new Yw.BLL.SysTypeStd(); |
| | | _allBindingList = new BindingList<CurrentViewModel>(); |
| | | var alllist = await _bll.GetExtendLogicalTreeList(); |
| | | if (alllist == null) |
| | | return; |
| | | _allBindingList = new BindingList<CurrentViewModel>(); |
| | | foreach (var item in alllist) |
| | | { |
| | | _allBindingList.Add(new CurrentViewModel(item)); |
| | |
| | | this.treeListLookUpEdit1TreeList.ExpandAll(); |
| | | if (_allBindingList.Count > 0) |
| | | { |
| | | var vm = _allBindingList.First(); |
| | | var vm = _allBindingList.Where(x => x.ParentID != 0).First(); |
| | | this.treeListLookUpEdit1.EditValue = vm.ID; |
| | | SelectedChanged(vm); |
| | | } |