Пример #1
0
        private void tvUser_function_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            DataRow dr = e.Node.Tag as DataRow;

            HXCPcClient.UCMainLayOut.UCLeftMenu UCLeftMenu;
            SYSModel.clsSysConfig.STR_CURR_MAINMEMU = dr["firstid"].ToString();   //一级菜单id
            SYSModel.clsSysConfig.STR_CURR_TWOMEMU  = dr["parent_id"].ToString(); //二级菜单id
            string threeMenu = e.Node.Name;                                       //三级菜单

            Control[] ctls = this.panel_LeftMenu.Controls.Find(SYSModel.clsSysConfig.STR_CURR_MAINMEMU, false);

            if (ctls.Length == 0)
            {
                UCLeftMenu          = new HXCPcClient.UCMainLayOut.UCLeftMenu();
                UCLeftMenu.Name     = SYSModel.clsSysConfig.STR_CURR_MAINMEMU;
                UCLeftMenu.FunID    = SYSModel.clsSysConfig.STR_CURR_MAINMEMU;
                UCLeftMenu.Dock     = DockStyle.Fill;
                UCLeftMenu.Tag      = "";
                UCLeftMenu.menuName = "";
                UCLeftMenu.FmMain   = this;
                UCLeftMenu.Focus();
                panel_LeftMenu.Controls.Add(UCLeftMenu);
            }
            else
            {
                UCLeftMenu = ctls[0] as HXCPcClient.UCMainLayOut.UCLeftMenu;
            }
            UCLeftMenu.LeftMenuState(SYSModel.clsSysConfig.STR_CURR_TWOMEMU, e.Node.Name);
            UCLeftMenu.BringToFront();
            this.MenuAdd(dr);
            ucMenuBar1.MenuButtonStatus();
        }
Пример #2
0
        /// <summary>
        /// 加载首页
        /// </summary>
        private void loadHome()
        {
            splitContainerEx_Body.SplitterWidth = 6;

            UUCHomeManage ucHome = new UUCHomeManage(); //首页

            ucHome.ID   = "STR_" + SYSModel.clsSysConfig.STR_CS_MEMU_HOMEMANAGE;
            ucHome.Name = SYSModel.clsSysConfig.STR_CS_MEMU_HOMEMANAGE;
            ucHome.Dock = DockStyle.Fill;
            panel_Content.Controls.Add(ucHome);// panel_Main.Controls.Add(ucHome);
            ucHome.BringToFront();

            SYSModel.clsSysConfig.STR_CURR_MAINMEMU = "CL_RepairBusiness";
            childmemu(null, "首页", SYSModel.clsSysConfig.STR_CS_MEMU_HOMEMANAGE, "", SYSModel.clsSysConfig.STR_CURR_MAINMEMU, "");

            if (!this.panel_LeftMenu.Controls.ContainsKey(SYSModel.clsSysConfig.STR_CURR_MAINMEMU))
            {
                HXCPcClient.UCMainLayOut.UCLeftMenu UCLeftMenu = new HXCPcClient.UCMainLayOut.UCLeftMenu(); //系统管理
                UCLeftMenu.Name     = SYSModel.clsSysConfig.STR_CURR_MAINMEMU;
                UCLeftMenu.FunID    = SYSModel.clsSysConfig.STR_CURR_MAINMEMU;
                UCLeftMenu.Dock     = DockStyle.Fill;
                UCLeftMenu.menuName = "维修业务";
                UCLeftMenu.Tag      = UCLeftMenu.menuName;
                UCLeftMenu.FmMain   = this;
                UCLeftMenu.Focus();
                panel_LeftMenu.Controls.Add(UCLeftMenu);
                UCLeftMenu.BringToFront();

                SYSModel.clsSysConfig.STR_CURR_MAINMEMU = UCLeftMenu.FunID;
                ucMenuBar1.MenuButtonStatus();//三级菜单选中时 一级菜单的选中状态
            }
            else
            {
                (panel_LeftMenu.Controls.Find("CL_RepairBusiness", false)[0] as HXCPcClient.UCMainLayOut.UCLeftMenu).BringToFront();
            }
        }
Пример #3
0
        private void tvUser_function_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            DataRow dr = e.Node.Tag as DataRow;
            HXCPcClient.UCMainLayOut.UCLeftMenu UCLeftMenu;
            SYSModel.clsSysConfig.STR_CURR_MAINMEMU = dr["firstid"].ToString();//一级菜单id
            SYSModel.clsSysConfig.STR_CURR_TWOMEMU = dr["parent_id"].ToString();//二级菜单id
            string threeMenu = e.Node.Name;//三级菜单
            Control[] ctls = this.panel_LeftMenu.Controls.Find(SYSModel.clsSysConfig.STR_CURR_MAINMEMU, false);

            if (ctls.Length == 0)
            {
                UCLeftMenu = new HXCPcClient.UCMainLayOut.UCLeftMenu();
                UCLeftMenu.Name = SYSModel.clsSysConfig.STR_CURR_MAINMEMU;
                UCLeftMenu.FunID = SYSModel.clsSysConfig.STR_CURR_MAINMEMU;
                UCLeftMenu.Dock = DockStyle.Fill;
                UCLeftMenu.Tag = "";
                UCLeftMenu.menuName = "";
                UCLeftMenu.FmMain = this;
                UCLeftMenu.Focus();
                panel_LeftMenu.Controls.Add(UCLeftMenu);
            }
            else
            {
                UCLeftMenu = ctls[0] as HXCPcClient.UCMainLayOut.UCLeftMenu;
            }
            UCLeftMenu.LeftMenuState(SYSModel.clsSysConfig.STR_CURR_TWOMEMU, e.Node.Name);
            UCLeftMenu.BringToFront();
            this.MenuAdd(dr);
            ucMenuBar1.MenuButtonStatus();
        }
Пример #4
0
 /// <summary>
 /// 添加左侧菜单
 /// </summary>
 /// <param name="menuId">一级菜单的Tag 菜单id</param>
 /// <param name="munuName">菜单名</param>
 private void AddLeftMenu(string menuId, string munuName)
 {
     SYSModel.clsSysConfig.STR_CURR_MAINMEMU = menuId;
     if (!this.panel_LeftMenu.Controls.ContainsKey(menuId))
     {
         UCLeftMenu UCLeftMenu = new UCLeftMenu(); //系统管理
         UCLeftMenu.Name = menuId;//SYSModel.clsSysConfig.STR_CS_MEMU_FUNCTIONMANAGE;
         // UCLeftMenu.dtFunction = dt;
         UCLeftMenu.FunID = menuId;
         //UCLeftMenu.panel_MainHeight = pnlxLeftMenu.Height;
         UCLeftMenu.Dock = DockStyle.Fill;
         UCLeftMenu.Tag = munuName;
         UCLeftMenu.menuName = munuName;
         UCLeftMenu.FmMain = this;
         UCLeftMenu.Focus();
         panel_LeftMenu.Controls.Add(UCLeftMenu);
         UCLeftMenu.BringToFront();
     }
     else
     {
         UCLeftMenu UCLeftMenu = panel_LeftMenu.Controls.Find(menuId, false)[0] as UCLeftMenu;
         UCLeftMenu.LeftMenuState(SYSModel.clsSysConfig.STR_CURR_TWOMEMU, SYSModel.clsSysConfig.STR_CURR_MEMU, SYSModel.clsSysConfig.STR_CURR_MEMU);
         UCLeftMenu.BringToFront();
     }
 }
Пример #5
0
        /// <summary>
        /// 加载首页
        /// </summary>
        private void loadHome()
        {
            splitContainerEx_Body.SplitterWidth = 6;

            UUCHomeManage ucHome = new UUCHomeManage(); //首页               
            ucHome.ID = "STR_" + SYSModel.clsSysConfig.STR_CS_MEMU_HOMEMANAGE;
            ucHome.Name = SYSModel.clsSysConfig.STR_CS_MEMU_HOMEMANAGE;
            ucHome.Dock = DockStyle.Fill;            
            panel_Content.Controls.Add(ucHome);// panel_Main.Controls.Add(ucHome);
            ucHome.BringToFront();            

            SYSModel.clsSysConfig.STR_CURR_MAINMEMU = "CL_RepairBusiness";
            childmemu(null, "首页", SYSModel.clsSysConfig.STR_CS_MEMU_HOMEMANAGE, "", SYSModel.clsSysConfig.STR_CURR_MAINMEMU, "");

            if (!this.panel_LeftMenu.Controls.ContainsKey(SYSModel.clsSysConfig.STR_CURR_MAINMEMU))
            {
                HXCPcClient.UCMainLayOut.UCLeftMenu UCLeftMenu = new HXCPcClient.UCMainLayOut.UCLeftMenu(); //系统管理
                UCLeftMenu.Name = SYSModel.clsSysConfig.STR_CURR_MAINMEMU;
                UCLeftMenu.FunID = SYSModel.clsSysConfig.STR_CURR_MAINMEMU;
                UCLeftMenu.Dock = DockStyle.Fill;                
                UCLeftMenu.menuName = "维修业务";
                UCLeftMenu.Tag = UCLeftMenu.menuName;
                UCLeftMenu.FmMain = this;
                UCLeftMenu.Focus();
                panel_LeftMenu.Controls.Add(UCLeftMenu);
                UCLeftMenu.BringToFront();

                SYSModel.clsSysConfig.STR_CURR_MAINMEMU = UCLeftMenu.FunID;
                ucMenuBar1.MenuButtonStatus();//三级菜单选中时 一级菜单的选中状态               
            }
            else
            {
                (panel_LeftMenu.Controls.Find("CL_RepairBusiness", false)[0] as HXCPcClient.UCMainLayOut.UCLeftMenu).BringToFront();
            }
        }
Пример #6
0
        /// <summary>
        /// 添加左侧菜单
        /// </summary>
        /// <param name="menuId">一级菜单的Tag 菜单id</param>
        /// <param name="munuName">菜单名</param>
        private void AddLeftMenu(string menuId, string munuName)
        {
            SYSModel.clsSysConfig.STR_CURR_MAINMEMU = menuId;

            this.ucHome.LoadMap(SYSModel.clsSysConfig.STR_CURR_MAINMEMU);

            if (!this.panel_LeftMenu.Controls.ContainsKey(menuId))
            {
                UCLeftMenu UCLeftMenu = new UCLeftMenu(); //系统管理
                UCLeftMenu.Name = menuId;//SYSModel.clsSysConfig.STR_CS_MEMU_FUNCTIONMANAGE;              
                UCLeftMenu.FunID = menuId;
                UCLeftMenu.Dock = DockStyle.Fill;
                UCLeftMenu.Tag = munuName;
                UCLeftMenu.menuName = munuName;
                UCLeftMenu.FmMain = this;
                UCLeftMenu.Focus();
                panel_LeftMenu.Controls.Add(UCLeftMenu);
                UCLeftMenu.BringToFront();
                foreach (Control ctl in this.panel_LeftMenu.Controls)
                {
                    if (ctl is UCLeftMenu && ctl.Name != menuId)
                    {
                        ctl.Dispose();
                    }
                }
            }
            else
            {
                Control ctl = panel_LeftMenu.Controls.Find(menuId, false)[0];
                ctl.BringToFront();
                ctl.Visible = true;
            }
        }