private void ButNew_ButtonOnClick(object sender, EventArgs e) { FrmCityUpdate form = new FrmCityUpdate(Database); form.ShowDialog(); LoadDataGridView(""); }
private void DataGridViewCity_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { object value = ((DataGridView)sender)?.Rows[e.RowIndex]?.Cells[0].Value; if (int.TryParse(value.ToString(), out int id)) { FrmCityUpdate form = new FrmCityUpdate(Database, id); form.ShowDialog(); LoadDataGridView(""); } }