yusuf

yusuf

  • NA
  • 57
  • 0

MDI forms...

Dec 30 2007 11:18 AM

hello everyone!

i have 2 forms. One of them is Customers the other one is Sales. In Customers i have a listview which lists all customers. In Sales i have a comboBox and a button. 

I have to add all customers to comboBox when i push the button.

in Sales form : 

CustomerForm cf = new CustomerForm();

private void btn_MusteriGetir_Click(object sender, EventArgs e)

{

foreach (ListViewItem lvi in cf.listView1.Items)

{

Customers c = new Customers();

c.Name = lvi.Text;

c.SurName = lvi.SubItems[1].Text;

comboBox1.Items.Add(c);

 

}

 

 


Answers (4)