private void Vend_combo_SelectedIndexChanged(object sender, EventArgs e) { Get_VendorID(vend_combo.Text); switch (vendorId) { case 0: VendorSetup popup = new VendorSetup(ms); popup.label1.Text = "Vendor does not exist! Do you want to Add " + vend_combo.Text + " to the Vendor table?"; popup.venName_textBox.Text = vend_combo.Text; popup.venNum_textBox.Text = ""; popup.contact_textBox.Text = ""; popup.phone_textBox.Text = ""; popup.email_textBox.Text = ""; popup.ShowDialog(); break; default: break; } }
private void NewVendorToolStripMenuItem_Click(object sender, EventArgs e) { VendorSetup vs = new VendorSetup(this); vs.label1.Text = "Add New Vendor To Vendor Table"; vs.FormClosed += new FormClosedEventHandler(VendorSetupClosed); vs.Show(); }