//编辑 private void HyperlinkButton_Click(object sender, RoutedEventArgs e) { if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Vendor_Role_Edit)) { Window.Alert(ResVendorInfo.Msg_HasNoRight); return; } RoleMgmtSearchResultVM item = this.ResultGrid.SelectedItem as RoleMgmtSearchResultVM; UserRoleAdd roleAddCtrl = new UserRoleAdd(item.SysNo.Value, item.RoleName, item.Status, true); roleAddCtrl.Dialog = Window.ShowDialog( "编辑角色" , roleAddCtrl , (s, args) => { if (args.DialogResult == DialogResultType.OK) { ResultGrid.PageIndex = 0; ResultGrid.SelectedIndex = -1; ResultGrid.Bind(); } } , new Size(850, 600) ); }
//新建 private void btnNew_Click(object sender, RoutedEventArgs e) { if (!AuthMgr.HasFunctionPoint(AuthKeyConst.Vendor_Role_Add)) { Window.Alert(ResVendorInfo.Msg_HasNoRight); return; } UserRoleAdd roleAddCtrl = new UserRoleAdd(0, "", ValidStatus.DeActive, false); roleAddCtrl.Dialog = Window.ShowDialog( "新建角色" , roleAddCtrl , (s, args) => { if (args.DialogResult == DialogResultType.OK) { ResultGrid.PageIndex = 0; ResultGrid.SelectedIndex = -1; ResultGrid.Bind(); } } , new Size(850, 600) ); }