| | |
| | | using HStation.WinFrmUI.Assets; |
| | | using DevExpress.XtraBars; |
| | | using HStation.WinFrmUI.Assets; |
| | | using Yw; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | { |
| | |
| | | } |
| | | |
| | | #endregion 事件 |
| | | |
| | | private void BtnUseStatus_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | var vm = this.gridView1.GetCurrentViewModel(_allBindingList); |
| | | if (vm == null) |
| | | { |
| | | return; |
| | | } |
| | | var dlg = new SetUseStatusDlg(); |
| | | dlg.SetBindingData((Yw.Model.eUseStatus)vm.UseStatus); |
| | | dlg.ReloadDataEvent += async (status) => |
| | | { |
| | | var bol = await BLLFactory<Yw.BLL.User>.Instance.UpdateUseStatus(vm.ID, status); |
| | | if (bol) |
| | | { |
| | | vm.UseStatus = status; |
| | | this.gridView1.RefreshRow(this.gridView1.FocusedRowHandle); |
| | | return true; |
| | | } |
| | | return false; |
| | | }; |
| | | dlg.ShowDialog(); |
| | | } |
| | | } |
| | | } |