| | |
| | | InitializeComponent(); |
| | | this.gridView1.SetNormalView(30); |
| | | this.PageTitle.Caption = "角色管理"; |
| | | flyoutPanel1.Options.AnchorType = DevExpress.Utils.Win.PopupToolWindowAnchor.Right; |
| | | this.PageTitle.SvgImageSize = new Size(24, 24); |
| | | } |
| | | |
| | |
| | | private async void InitialData() |
| | | { |
| | | var overlay = this.ShowOverlay(); |
| | | var allBindingList = await BLLFactory<Yw.BLL.Role>.Instance.GetByCorpID(0); |
| | | var allBindingList = await BLLFactory<Yw.BLL.Role>.Instance.GetByCorpID(GlobalParas._GlobalParas.CorpID); |
| | | _allBindingList = new List<RoleViewModel>(); |
| | | if (allBindingList != null && allBindingList.Count > 0) |
| | | { |
| | |
| | | //查看 |
| | | private void View() |
| | | { |
| | | /* var vm = GetCurrentViewModel(); |
| | | if (vm == null) |
| | | { |
| | | return; |
| | | } |
| | | var dlg = new ViewAssetsRoleDlg(); |
| | | dlg.SetBindingData(vm.Vmo); |
| | | dlg.ShowDialog();*/ |
| | | var vm = GetCurrentViewModel(); |
| | | if (vm == null) |
| | | { |
| | | return; |
| | | } |
| | | var dlg = new ViewRoleDlg(); |
| | | dlg.SetBindingData(vm); |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | //上移 |
| | |
| | | flyoutPanel1.HidePopup(); |
| | | } |
| | | } |
| | | |
| | | //使用状态 |
| | | private void BtnEditStatus_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | var vm = GetCurrentViewModel(); |
| | | 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.Role>.Instance.UpdateUseStatus(vm.ID, (int)status); |
| | | if (bol) |
| | | { |
| | | vm.UseStatus = (eUseStatus)status; |
| | | this.gridView1.RefreshRow(this.gridView1.FocusedRowHandle); |
| | | return true; |
| | | } |
| | | return false; |
| | | }; |
| | | dlg.ShowDialog(); |
| | | } |
| | | } |
| | | } |