private void btnExibir_Click(object sender, EventArgs e) { ItemIndicador itemind = new ItemIndicador(); try { itemind.id = Convert.ToInt32(dataGridView1[0, dataGridView1.CurrentRow.Index].Value); itemind.nome = Convert.ToString(dataGridView1[1, dataGridView1.CurrentRow.Index].Value); itemind.codigo_indicador = Convert.ToInt32(dataGridView1[2, dataGridView1.CurrentRow.Index].Value); itemind.codigo_item = Convert.ToInt32(dataGridView1[3, dataGridView1.CurrentRow.Index].Value); itemind.descricao = Convert.ToString(dataGridView1[4, dataGridView1.CurrentRow.Index].Value); itemind.observacao = Convert.ToString(dataGridView1[5, dataGridView1.CurrentRow.Index].Value); } catch { } finally { RelacionarItemEIndicadorForm telarelacionar = new RelacionarItemEIndicadorForm(itemind); if (telarelacionar.ShowDialog() == DialogResult.OK) { AtualizarDataGrid(); } } }
private void btnRelacionar_Click(object sender, EventArgs e) { RelacionarItemEIndicadorForm telarelacionar = new RelacionarItemEIndicadorForm(user); if (telarelacionar.ShowDialog() == DialogResult.OK) { AtualizarDataGrid(); } }