private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { //MessageBox.Show("tabindex" + tabControl1.SelectedTab); switch (tabControl1.SelectedIndex) { case 1: Quotation.SetQuotationListBox(QuoteListBox2); break; case 2: Supplier.SetSupplierListBox(supplierListBox); break; case 3: Employee.SetEmployeeComboBox(employeeListBox); break; default: break; } }
private void Form1_Load(object sender, EventArgs e) { Quotation.SetQuotationListBox(QuoteListBox); QuoteListBox.SelectedIndex = 0; Employee.SetEmployeeComboBox(employeeComboBox); }