private void add_btn_Click(object sender, EventArgs e) { switch (comboBox1.GetItemText(this.comboBox1.SelectedItem)) { case "Clients": Add_Client_form form2 = new Add_Client_form(); form2.Show(); break; case "Invoices": Add_Invoice invoice_form = new Add_Invoice(); invoice_form.Show(); break; case "Drinks": Add_Drink drinks_form = new Add_Drink(); drinks_form.Show(); break; case "Invoice Items": Add_InvoiceItem1 form = new Add_InvoiceItem1(); form.Show(); break; case "Distributors": Add_Distributor distributor_form = new Add_Distributor(); distributor_form.Show(); break; } }
public Edit_Drink() { InitializeComponent(); Add_Drink obj = new Add_Drink(); CB_distributors.DataSource = obj.getDistributors(new Database()); CB_distributors.ValueMember = "ID"; CB_distributors.DisplayMember = "name"; UpdateFields(); }