private void countryToolStripMenuItem_Click(object sender, EventArgs e) { Country_insert = new Form_CountryInsert(this) { Visible = true }; this.Visible = false; }
private void button_edit_Click(object sender, EventArgs e) { Form_CountryInsert countryInsert = null; int selectedRow = table_countries.CurrentRow.Index; if (selectedRow < countryList.Count) { Country c = countryList.Find(x => x.Country_Id.ToString() == table_countries.Rows[table_countries.CurrentCell.RowIndex].Cells[0].Value.ToString()); countryInsert = new Form_CountryInsert(c, this) { Visible = true }; this.Visible = false; } else { MessageBox.Show("Select a Country to Edit", "Attention", MessageBoxButtons.OK, MessageBoxIcon.Information); } }