Beispiel #1
0
 private void dgvRoleList_SelectionChanged(object sender, EventArgs e)
 {
     if (dgvRoleList.CurrentRow != null)
     {
         mnsRight.Items.Clear();
         FrmMainBLL.InitMenuItem(mnsRight);                                                        //初始化权限菜单
         FrmMainBLL.SetMenuItemByRole(mnsRight, dgvRoleList.CurrentRow.Cells[1].Value.ToString()); //初始化角色权限
         tvwRoleRight.Nodes.Clear();
         FrmRightBLL.TreeGetNodeForMns(tvwRoleRight, mnsRight);
         tvwRoleRight.ExpandAll();
         //FrmRightBLL.TreeAddButtonsNode(tvwRoleRight, dgvUserList.CurrentRow.Cells[0].Value.ToString());//遍历窗口中的按钮,加到指定的Tree的叶子节点上
     }
 }
Beispiel #2
0
        private void dgvUserList_SelectionChanged(object sender, EventArgs e)
        {
            if (dgvUserList.CurrentRow != null)
            {
                cboRoleName.Text = "";
                mnsRight.Items.Clear();
                FrmMainBLL.InitMenuItem(mnsRight);                                                            //初始化权限菜单
                FrmMainBLL.SetMenuItemByRole(mnsRight, dgvUserList.CurrentRow.Cells[5].Value.ToString());     //初始化用户权限
                FrmMainBLL.SetMenuItemByPersonal(mnsRight, dgvUserList.CurrentRow.Cells[0].Value.ToString()); //初始化用户"个人"权限

                //初始化treeView1
                tvwUserRight.Nodes.Clear();
                FrmRightBLL.TreeGetNodeForMns(tvwUserRight, mnsRight);
                tvwUserRight.ExpandAll();
                FrmRightBLL.TreeAddButtonsNode(tvwUserRight, dgvUserList.CurrentRow.Cells[0].Value.ToString());//遍历窗口中的按钮,加到指定的Tree的叶子节点上
            }
        }
Beispiel #3
0
        public static MenuStrip mnsMain = new MenuStrip();//主菜单

        public FrmMain()
        {
            frmMain = this;
            InitializeComponent();
            toolStripContainer1.TopToolStripPanel.Controls.Add(mnsMain);
            //PSAP.BLL.BSBLL.BSBLL.InitUserMenus(this);//初始化主菜单用户权限(不用了这是以前设置实例菜单的)
            FrmMainBLL.InitMenuItem(mnsMain);                                             //初始化菜单
            FrmMainBLL.SetMenuItemByRole(mnsMain, SystemInfo.user.RoleNo);                //初始化用户"角色"权限
            FrmMainBLL.SetMenuItemByPersonal(mnsMain, SystemInfo.user.AutoId.ToString()); //初始化用户"个人"权限
            //FrmMainTool frmMainTool = new FrmMainTool(mnsMain);//menuStrip1(实例菜单)
            ////frmMainTool.HideOnClose = true;//使用就无法触发窗口关闭事件了
            //frmMainTool.Show(this.dockPanel1, DockState.DockLeft);

            //BSBLL.RefreshUserThemeConfigFile();//刷新用户主题配置文件(暂不用了)
            BSBLL.InitThemeVariable();//初始化主题变量(暂不用了)

            if (SystemInfo.user.Lanuage != "Chinese")
            {
                BSBLL.SetFormLanguages(this);//设置DockContent中的语种
            }
        }