Exemplo n.º 1
0
        private void ButNew_ButtonOnClick(object sender, EventArgs e)
        {
            FrmUfUpdate form = new FrmUfUpdate(Database);

            form.ShowDialog();
            LoadDataGridView("");
        }
Exemplo n.º 2
0
        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("");
            }
        }