private void button1_Click(object sender, EventArgs e) { if (comboBox1.SelectedIndex == 0) { MessageBox.Show("Lütfen Stok Kartı Seçiniz.", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Hand); } else { listView1.Items.Clear(); EStok MyReserve = new EStok(); MyReserve._stokid = Convert.ToInt32(comboBox1.SelectedValue); DataTable dtt = FStok.StokID(MyReserve); for (int i = 0; i < dtt.Rows.Count; i++) { ListViewItem lolo = new ListViewItem(dtt.Rows[i][1].ToString()); lolo.SubItems.Add(dtt.Rows[i][2].ToString()); lolo.SubItems.Add(dtt.Rows[i][3].ToString()); lolo.SubItems.Add(dtt.Rows[i][4].ToString()); listView1.Items.Add(lolo); } ForReserveID(); } }