public AddBook() { InitializeComponent(); AddPublication ap = new AddPublication(); foreach (DataGridViewRow row in ap.dataGridView1.Rows) { comboBox1.Items.Add(row.Cells[0].Value.ToString()); } AddBranch ab = new AddBranch(); foreach (DataGridViewRow row in ab.dataGridView1.Rows) { comboBox2.Items.Add(row.Cells[0].Value.ToString()); } }
private void button1_Click(object sender, EventArgs e) { AddPublication a = new AddPublication(); a.Show(); }