| | |
| | | using HStation.WinFrmUI.Dict.Core; |
| | | using DevExpress.XtraDiagram.Bars; |
| | | using HStation.WinFrmUI.Dict.Core; |
| | | using Yw; |
| | | |
| | | namespace HStation.WinFrmUI.Dict |
| | |
| | | this.gridView1.RegistCustomDrawRowIndicator(); |
| | | this.PageTitle.HeaderSvgImage = this.svgImageCollection1[0]; |
| | | this.PageTitle.SvgImageSize = new Size(24, 24); |
| | | this.dictGroupTreeListCtrl1.RloadEvent += ValveTypeTreeListCtrl1_RloadEvent; |
| | | this.dictGroupTreeListCtrl1.RloadEvent += DictTreeListCtrl1_RloadEvent; |
| | | } |
| | | |
| | | private List<DictTypeViewModel> _allBindingList = null; |
| | | |
| | | private Yw.BLL.SysDictType _bll = null; |
| | | |
| | | private long _groupId; |
| | | |
| | | //初始化数据 |
| | | public override async void InitialDataSource() |
| | | public override void InitialDataSource() |
| | | { |
| | | _bll = new Yw.BLL.SysDictType(); |
| | | _allBindingList = new List<DictTypeViewModel>(); |
| | |
| | | this.dictGroupTreeListCtrl1.SetBindingData(); |
| | | } |
| | | |
| | | private async void ValveTypeTreeListCtrl1_RloadEvent(long groupId) |
| | | private async void DictTreeListCtrl1_RloadEvent(long groupId) |
| | | { |
| | | _groupId = groupId; |
| | | var alllist = await _bll.GetByGroupID(groupId); |
| | | _allBindingList.Clear(); |
| | | if (alllist != null) |
| | |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | //编辑阀门 |
| | | //编辑 |
| | | private async void BtnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | var vm = this.gridView1.GetCurrentViewModel(_allBindingList); |
| | |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | //删除阀门 |
| | | //删除 |
| | | private async void BtnDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | var currentVm = this.gridView1.GetCurrentViewModel(_allBindingList); |
| | |
| | | dlg.ShowDialog(); |
| | | } |
| | | } |
| | | |
| | | private void btnRefresh_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | DictTreeListCtrl1_RloadEvent(_groupId); |
| | | } |
| | | } |
| | | } |