private void CustomAuthorizationBtn_Click(object sender, RoutedEventArgs e) { string strRoleID = string.Empty; if (DtGrid.SelectedItems == null) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } if (DtGrid.SelectedItems.Count == 0) { ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"), Utility.GetResourceStr("CONFIRMBUTTON")); return; } T_SYS_ROLE_V entRole = DtGrid.SelectedItems[0] as T_SYS_ROLE_V; //SysRoleSetMenu UserInfo = new SysRoleSetMenu(AuthorRole); strRoleID = entRole.ROLEID; //RoleCustomMenuPermission UserInfo = new RoleCustomMenuPermission(FormTypes.Edit, strRoleID);//自定义权限 EntityMenuCustomerPermission2 UserInfo = new EntityMenuCustomerPermission2(FormTypes.Edit, strRoleID);//自定义权限 EntityBrowser browser = new EntityBrowser(UserInfo); browser.MinWidth = 850; browser.MinHeight = 520; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => {}, true); }
private void DataGrid_CurrentCellChanged(object sender, EventArgs e) { DataGrid grid = sender as DataGrid; if (grid.SelectedItem != null) { Role = (T_SYS_ROLE_V)grid.SelectedItems[0];//获取当前选中的行数据并转换为对应的实体 } }
private void DaGr_LoadingRow(object sender, DataGridRowEventArgs e) { //T_OA_SENDDOC OrderInfoT = (T_OA_SENDDOC)e.Row.DataContext; T_SYS_ROLE_V RoleT = (T_SYS_ROLE_V)e.Row.DataContext; Button MyAuthorBtn = DtGrid.Columns[5].GetCellContent(e.Row).FindName("AuthorizationBtn") as Button; MyAuthorBtn.Tag = RoleT; SetRowLogo(DtGrid, e.Row, "T_SYS_ROLE_V"); }
private void AuthorizationBtn_Click(object sender, RoutedEventArgs e) { Button AuthorBtn = sender as Button; T_SYS_ROLE_V AuthorRole = AuthorBtn.Tag as T_SYS_ROLE_V; T_SYS_ROLE role = new T_SYS_ROLE(); role.ROLEID = AuthorRole.ROLEID; //SysRoleSetMenu UserInfo = new SysRoleSetMenu(AuthorRole); SysRoleSetMenu2 UserInfo = new SysRoleSetMenu2(role);//龙康才新增 EntityBrowser browser = new EntityBrowser(UserInfo); browser.MinWidth = 850; browser.MinHeight = 500; browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent); browser.Show <string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => {}, true); }