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