Exemple #1
0
        //搜索商品

        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            FrmProductSearch form1 = new FrmProductSearch();

            form1.ShowInTaskbar = false;
            if (form1.ShowDialog() == DialogResult.OK)
            {
                BindProducts();
            }
        }
Exemple #2
0
        private void 商品ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmProductSearch frmPSearch = new FrmProductSearch();

            frmPSearch.ShowInTaskbar = false;
            if (frmPSearch.ShowDialog() == DialogResult.OK)
            {
                BindProducts();
            }
        }
Exemple #3
0
        private void treeView1_Click(object sender, EventArgs e)
        {
            TreeNode clickNode = treeView1.GetNodeAt(this.treeView1.PointToClient(Cursor.Position));

            this.tabControl1.SelectedTab = this.tabPage1;

            if (clickNode != null)
            {
                Rectangle r = clickNode.Bounds;
                if (r.Contains(this.treeView1.PointToClient(Cursor.Position)))
                {
                    switch (clickNode.Tag.ToString())
                    {
                    case "Vendors":
                        BindVendors();
                        return;

                    case "Customers":
                        BindCustomers();
                        return;

                    case "Products":
                        FrmProductSearch form1 = new FrmProductSearch();
                        form1.ShowInTaskbar = false;
                        if (form1.ShowDialog() == DialogResult.OK)
                        {
                            BindProducts();
                        }
                        return;

                    case "Units":
                        BindUnits();
                        return;

                    case "Colors":
                        BindColors();
                        return;

                    case "Users":
                        BindUsers();
                        return;
                    }
                }
            }
        }