Exemplo n.º 1
0
        private void trMenu_AfterSelect(object sender, TreeViewEventArgs e)
        {
            //trMenu.SelectedNode = trMenu.Nodes[0];
            string name = e.Node.Text.ToString();

            switch (name)
            {
            case "首页":
                pnlCentral.Controls.Clear();
                BHome zhuye = new BHome();
                zhuye.Parent = pnlCentral;
                zhuye.Dock   = DockStyle.Fill;
                zhuye.Show();
                break;

            case "订单管理":
                pnlCentral.Controls.Clear();
                OrderManagement zhu1 = new OrderManagement();
                zhu1.Parent = pnlCentral;
                zhu1.Dock   = DockStyle.Fill;
                zhu1.Show();
                break;

            case "商品管理":
                pnlCentral.Controls.Clear();
                WaresManage wares = new WaresManage();
                wares.Parent = pnlCentral;
                wares.Dock   = DockStyle.Fill;
                wares.Show();
                break;

            case "进货管理":
                pnlCentral.Controls.Clear();
                PurchaseManage purchase = new PurchaseManage();
                purchase.Parent = pnlCentral;
                purchase.Dock   = DockStyle.Fill;
                purchase.Show();
                break;

            case "库存管理":
                pnlCentral.Controls.Clear();
                StockManage stock = new StockManage();
                stock.Parent = pnlCentral;
                stock.Dock   = DockStyle.Fill;
                stock.Show();
                break;

            case "销售管理":
                pnlCentral.Controls.Clear();
                SaleManage sale = new SaleManage();
                sale.Parent = pnlCentral;
                sale.Dock   = DockStyle.Fill;
                sale.Show();
                break;

            case "业绩管理":
                pnlCentral.Controls.Clear();
                AchievementManage achievement = new AchievementManage();
                pnlCentral.Controls.Add(achievement);
                //achievement.Parent = pnlCentral;
                achievement.Dock = DockStyle.Fill;
                achievement.Show();
                break;

            case "信息修改":
                pnlCentral.Controls.Clear();
                ModifyInformation modify = new ModifyInformation();
                modify.Parent = pnlCentral;
                modify.Dock   = DockStyle.Fill;
                modify.Show();
                break;

            case "退出登录":
                login login = new login();
                this.Dispose();
                login.ShowDialog();
                break;

            default:
                break;
            }
        }
Exemplo n.º 2
0
        private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
            string name = e.Node.Text.ToString();

            switch (name)
            {
            case "个人信息":
                panel1.Controls.Clear();
                PInformation pInformation = new PInformation(userID);
                panel1.Controls.Add(pInformation);
                pInformation.Dock = DockStyle.Fill;
                pInformation.Show();
                break;

            case "我的订单":
                panel1.Controls.Clear();
                UserOder userOder = new UserOder(userID);
                panel1.Controls.Add(userOder);
                userOder.Dock = DockStyle.Fill;
                userOder.Show();
                break;

            case "购物车":
                panel1.Controls.Clear();
                Shopping_cart shopping_Cart = new Shopping_cart();
                panel1.Controls.Add(shopping_Cart);
                shopping_Cart.Dock = DockStyle.Fill;
                shopping_Cart.Show();
                break;

            case "收藏夹":
                panel1.Controls.Clear();
                UserFavorite userFavorite = new UserFavorite();
                panel1.Controls.Add(userFavorite);
                userFavorite.Dock = DockStyle.Fill;
                userFavorite.Show();
                break;

            case "评价晒单":
                panel1.Controls.Clear();
                Comment_Dryinglist comment_Dryinglist = new Comment_Dryinglist();
                panel1.Controls.Add(comment_Dryinglist);
                comment_Dryinglist.Dock = DockStyle.Fill;
                comment_Dryinglist.Show();
                break;

            case "退款维权":
                panel1.Controls.Clear();
                UserRefund userRefund = new UserRefund(userID);
                panel1.Controls.Add(userRefund);
                userRefund.Dock = DockStyle.Fill;
                userRefund.Show();
                break;

            case "账号安全":
                panel1.Controls.Clear();
                UserAccount_Security userAccount_Security = new UserAccount_Security();
                panel1.Controls.Add(userAccount_Security);
                userAccount_Security.Dock = DockStyle.Fill;
                userAccount_Security.Show();
                break;

            case "信息修改":
                panel1.Controls.Clear();
                ModifyInformation modify = new ModifyInformation();
                modify.Parent = panel1;
                modify.Dock   = DockStyle.Fill;
                modify.Show();
                break;

            default:
                MessageBox.Show("出错了!!!!!!", "ERROR");
                break;
            }
        }