//搜索商品 private void toolStripButton2_Click(object sender, EventArgs e) { FrmProductSearch form1 = new FrmProductSearch(); form1.ShowInTaskbar = false; if (form1.ShowDialog() == DialogResult.OK) { BindProducts(); } }
private void 商品ToolStripMenuItem_Click(object sender, EventArgs e) { FrmProductSearch frmPSearch = new FrmProductSearch(); frmPSearch.ShowInTaskbar = false; if (frmPSearch.ShowDialog() == DialogResult.OK) { BindProducts(); } }
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; } } } }