| | |
| | | using DevExpress.Utils.DragDrop; |
| | | using DevExpress.XtraEditors; |
| | | using HStation.WinFrmUI; |
| | | using Yw; |
| | | using Yw.WinFrmUI; |
| | | |
| | | namespace PBS.WinFrmUI |
| | |
| | | { |
| | | InitializeComponent(); |
| | | this.gridView1.SetNormalView(30); |
| | | this.gridView1.Columns["PlaceID"].GroupIndex = 0; |
| | | this.gridView1.GroupFormat = "{1}"; |
| | | behaviorManager1.Detach<DragDropBehavior>(gridView1); |
| | | } |
| | | |
| | |
| | | this.facilityViewModelBindingSource.ResetBindings(false); |
| | | this.gridView1.FocusedRowHandle = nextHandle; |
| | | } |
| | | |
| | | private void barBtnUpdateUseStatus_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 new PBS.BLL.Facility().UpdateUseStatus(vm.ID, status); |
| | | if (bol) |
| | | { |
| | | vm.UseStatus = (Yw.Vmo.eUseStatus)(int)status; |
| | | this.gridView1.RefreshRow(this.gridView1.FocusedRowHandle); |
| | | return true; |
| | | } |
| | | return false; |
| | | }; |
| | | dlg.ShowDialog(); |
| | | } |
| | | } |
| | | } |