private void RefreshResList(TreeListNode node) { if (IsChanged()) { DialogResult rst = EFMessageBox.Show(EP.EPES.EPESC0000089 /*已修改群组资源权限,是否保存?*/, EP.EPES.EPESC0000024, MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (rst == DialogResult.Yes) { SaveAuth(); } } listFormGrant.Clear(); listFormRevok.Clear(); listButtGrant.Clear(); listButtRevok.Clear(); subjType = GetSubjType(node); if (node.Tag != null) { subjEname = node.Tag.ToString(); } else { subjEname = treeListUser.FocusedNode.GetValue("ID").ToString(); } subjDescript = node.GetDisplayText(2) == null ? "" : node.GetDisplayText(2); if (treeListForm.Nodes.Count == 0) { QryAuthForm(); } else { RefreshFormList(); } }
private void tabbedControlGroup1_SelectedPageChanged(object sender, DevExpress.XtraLayout.LayoutTabPageChangedEventArgs e) { if (e.Page == layoutControlGroupGroup) { if (treeListGroup.FocusedNode != null) { switch (treeListGroup.FocusedNode.SelectImageIndex) { case GROUPICON: subjType = SUBJTYPE.GROUP; break; case USERICON: subjType = SUBJTYPE.USER; break; } subjEname = treeListGroup.FocusedNode.GetValue("ID").ToString(); } } else if (e.Page == layoutControlGroupUser) { if (treeListUser.FocusedNode != null) { switch (treeListUser.FocusedNode.SelectImageIndex) { case USERICON: subjType = SUBJTYPE.USER; break; case GROUPICON: subjType = SUBJTYPE.GROUP; break; case GROUPICON2: subjType = SUBJTYPE.NOAUTHGROUP; break; } subjEname = treeListGroup.FocusedNode.GetValue("ID").ToString(); } } }
private void xtraTabControlSubj_SelectedPageChanged(object sender, DevExpress.XtraTab.TabPageChangedEventArgs e) { if (e.Page == xtraTabPageGroup) { if (treeListGroup.FocusedNode != null) { switch (treeListGroup.FocusedNode.SelectImageIndex) { case GROUP_ICON: subjType = SUBJTYPE.GROUP; break; case GROUP_GRAY: subjType = SUBJTYPE.NOAUTHGROUP; break; case GROUP_USER: subjType = SUBJTYPE.USER; break; } subjEname = treeListGroup.FocusedNode.GetDisplayText(treeListColumn2); } } else if (e.Page == xtraTabPageUser) { if (treeListUser.FocusedNode != null) { switch (treeListUser.FocusedNode.SelectImageIndex) { case USERICON: subjType = SUBJTYPE.USER; break; case GROUPICON: subjType = SUBJTYPE.GROUP; break; case GROUPICON2: subjType = SUBJTYPE.NOAUTHGROUP; break; } subjEname = treeListUser.FocusedNode.GetDisplayText(0); } } if (xtraTabControlObj.SelectedTabPage == lblR) { if (subjEname != string.Empty) { QryParentResGroup(); } else { foreach (TreeListNode node in treeListResGroup.Nodes) { node.CheckState = CheckState.Unchecked; } } } }
private void xtraTabControl2_SelectedPageChanging(object sender, DevExpress.XtraTab.TabPageChangingEventArgs e) { if (fgButtonTree.Enabled) { DialogResult rst = MessageBox.Show(EP.EPES.EPESC0000089/*已修改群组资源权限,是否保存?*/, EP.EPES.EPESC0000024, MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (rst == DialogResult.Yes) { SaveAuth(); fgButtonTree.Enabled = false; } else { if (treeListForm.Nodes.Count == 0) { QryAuthForm(); } else { RfgreshFormList(); } fgButtonTree.Enabled = false; } } else if (fgButtonList.Enabled) { DialogResult rst = MessageBox.Show(EP.EPES.EPESC0000089/*已修改群组资源权限,是否保存?*/, EP.EPES.EPESC0000024, MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (rst == DialogResult.Yes) { SaveAuth(); fgButtonList.Enabled = false; } else { if (treeListForm.Nodes.Count == 0) { QryAuthForm(); } else { RfgreshFormList(); } fgButtonList.Enabled = false; } } else if (fgButtonOthRes.Enabled) { DialogResult rst = MessageBox.Show(EP.EPES.EPESC0000089/*已修改群组资源权限,是否保存?*/, EP.EPES.EPESC0000024, MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (rst == DialogResult.Yes) { SaveOthResAuth(); fgButtonOthRes.Enabled = false; } } else if (fgButtonResGroup.Enabled) { DialogResult rst = MessageBox.Show(EP.EPES.EPESC0000089/*已修改群组资源权限,是否保存?*/, EP.EPES.EPESC0000024, MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (rst == DialogResult.Yes) { SaveGroupToResGroup(); } else { QryParentResGroup(); fgButtonResGroup.Enabled = false; } } this.fgLabel1.Text = ""; if (xtraTabControlSubj.SelectedTabPage == xtraTabPageUser) //用户 { subjType = SUBJTYPE.USER; subjEname = ""; } else //群组 { subjType = SUBJTYPE.GROUP; subjEname = ""; } this.treeListRes.Nodes.Clear(); this.treeListForm.Nodes.Clear(); this.treeListOthRes.Nodes.Clear(); }
private void treeListUser_AfterFocusNode(object sender, DevExpress.XtraTreeList.NodeEventArgs e) { if (treeListUser.Nodes.Count == 0) return; //this.//EFMsgInfo = ""; TreeListNode node = treeListUser.FocusedNode; subjType = GetSubjType(treeListUser.FocusedNode); subjEname = node.GetDisplayText(0); if (subjType == SUBJTYPE.NOAUTHGROUP) { treeListForm.Nodes.Clear(); LoadTree(); //EFMsgInfo = EP.EPES.EPESC0000087/*您没有该群组的查询权限!*/; return; } if (xtraTabControlObj.SelectedTabPage == xtraTabPageTree) //formtree { if (treeListRes.Nodes.Count == 0) { LoadTree(); } else { RfgreshTree(); } fgButtonTree.Enabled = false; } else if (xtraTabControlObj.SelectedTabPage == xtraTabPageList) //formlist { if (treeListForm.Nodes.Count == 0) { QryAuthForm(); } else { RfgreshFormList(); } fgButtonList.Enabled = false; } else if (xtraTabControlObj.SelectedTabPage == xtraTabPageOtherRes) //细部资源 { QryOthResAuth(); fgButtonOthRes.Enabled = false; } else if (xtraTabControlObj.SelectedTabPage == lblR) { QryParentResGroup(); } }
private void treeListGroup_BeforeFocusNode(object sender, DevExpress.XtraTreeList.BeforeFocusNodeEventArgs e) { if (treeListGroup.FocusedNode == null) return; string ename = treeListGroup.FocusedNode.GetDisplayText(treeListColumn2); switch (treeListGroup.FocusedNode.ImageIndex) { case 0: subjType = SUBJTYPE.GROUP; break; case 1: subjType = SUBJTYPE.NOAUTHGROUP; break; case 2: subjType = SUBJTYPE.USER; break; } subjEname = ename; if (fgDevCheckEdit1.Checked) { //this.//EFMsgInfo = ""; if ((xtraTabControlObj.SelectedTabPage == xtraTabPageList && fgButtonList.Enabled) || (xtraTabControlObj.SelectedTabPage == xtraTabPageTree && fgButtonTree.Enabled)) { DialogResult rst = MessageBox.Show(EP.EPES.EPESC0000089/*已修改群组资源权限,是否保存?*/, EP.EPES.EPESC0000024, MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (rst == DialogResult.Yes) { SaveAuth(); } } else if (xtraTabControlObj.SelectedTabPage == xtraTabPageOtherRes && fgButtonOthRes.Enabled) { DialogResult rst = MessageBox.Show(EP.EPES.EPESC0000089/*已修改群组资源权限,是否保存?*/, EP.EPES.EPESC0000024, MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (rst == DialogResult.Yes) { SaveOthResAuth(); } } else if (xtraTabControlObj.SelectedTabPage == lblR && fgButtonResGroup.Enabled) { DialogResult rst = MessageBox.Show(EP.EPES.EPESC0000089/*已修改群组资源权限,是否保存?*/, EP.EPES.EPESC0000024, MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (rst == DialogResult.Yes) { SaveGroupToResGroup(); } } listFormGrant.Clear(); listFormRevok.Clear(); listButtGrant.Clear(); listButtRevok.Clear(); listOthResGrant.Clear(); listOthResRevok.Clear(); htGroupResAdd.Clear(); htGroupResRmv.Clear(); htResGroupAdd.Clear(); htResGroupRmv.Clear(); } }
private void treeListGroup_AfterFocusNode(object sender, DevExpress.XtraTreeList.NodeEventArgs e) { if (treeListGroup.FocusedNode == null) return; if (fgDevCheckEdit2.Checked) return; string ename = treeListGroup.FocusedNode.GetDisplayText(treeListColumn2); switch (treeListGroup.FocusedNode.ImageIndex) { case 0: subjType = SUBJTYPE.GROUP; break; case 1: subjType = SUBJTYPE.NOAUTHGROUP; break; case 2: subjType = SUBJTYPE.USER; break; } subjEname = ename; if (subjType == SUBJTYPE.NOAUTHGROUP) { treeListForm.Nodes.Clear(); LoadTree(); //EFMsgInfo = EP.EPES.EPESC0000087/*您没有该群组的查询权限!*/; return; } if (xtraTabControlObj.SelectedTabPage == xtraTabPageTree) //formtree { if (treeListRes.Nodes.Count == 0) { LoadTree(); } else { RfgreshTree(); } fgButtonTree.Enabled = false; } else if (xtraTabControlObj.SelectedTabPage == xtraTabPageList) //formlist { if (treeListForm.Nodes.Count == 0) { QryAuthForm(); } else { RfgreshFormList(); } if (fgDevCheckEdit1.Checked) { fgButtonList.Enabled = false; } } else if(xtraTabControlObj.SelectedTabPage == xtraTabPageOtherRes) //细部资源 { treeListOthRes.Nodes.Clear(); QryOthResAuth(); fgButtonOthRes.Enabled = false; } else if (xtraTabControlObj.SelectedTabPage == lblR) //资源组 { htResGroupAdd.Clear(); htGroupResAdd.Clear(); htGroupResRmv.Clear(); htResGroupRmv.Clear(); QryParentResGroup(); fgButtonResGroup.Enabled = false; } }
private void RefreshResList(TreeListNode node) { if (IsChanged()) { DialogResult rst = EFMessageBox.Show(EP.EPES.EPESC0000089/*已修改群组资源权限,是否保存?*/, EP.EPES.EPESC0000024, MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (rst == DialogResult.Yes) { SaveAuth(); } } listFormGrant.Clear(); listFormRevok.Clear(); listButtGrant.Clear(); listButtRevok.Clear(); subjType = GetSubjType(node); if (node.Tag != null) { subjEname = node.Tag.ToString(); } else { subjEname = treeListUser.FocusedNode.GetValue("ID").ToString(); } subjDescript = node.GetDisplayText(2) == null ? "" : node.GetDisplayText(2); if (treeListForm.Nodes.Count == 0) { QryAuthForm(); } else { RefreshFormList(); } }