private void btnAlterar_Click(object sender, EventArgs e) { RelacaoItemIndicador relacao = new RelacaoItemIndicador(); try { relacao.id = Convert.ToInt32(dtgRelacao[0, dtgRelacao.CurrentRow.Index].Value); relacao.nome = Convert.ToString(dtgRelacao[1, dtgRelacao.CurrentRow.Index].Value); relacao.cod1 = Convert.ToInt32(dtgRelacao[2, dtgRelacao.CurrentRow.Index].Value); relacao.cod2 = Convert.ToInt32(dtgRelacao[3, dtgRelacao.CurrentRow.Index].Value); relacao.descricao = Convert.ToString(dtgRelacao[4, dtgRelacao.CurrentRow.Index].Value); relacao.observacao = Convert.ToString(dtgRelacao[5, dtgRelacao.CurrentRow.Index].Value); } catch { } finally { RelacionarEntreItensIndicadoresForm telarelacionar = new RelacionarEntreItensIndicadoresForm(user, relacao); if (telarelacionar.ShowDialog() == DialogResult.OK) { Atualizar_DataGrid(); } } }
private void btnRelacionar_Click(object sender, EventArgs e) { RelacionarEntreItensIndicadoresForm telarelacionar = new RelacionarEntreItensIndicadoresForm(user); if (telarelacionar.ShowDialog() == DialogResult.OK) { Atualizar_DataGrid(); } }
private void btnexibir_Click(object sender, EventArgs e) { RelacaoItemIndicador relacao = new RelacaoItemIndicador(); try { relacao.id = Convert.ToInt32(dtgRelacao[0, dtgRelacao.CurrentRow.Index].Value); relacao.nome = Convert.ToString(dtgRelacao[1, dtgRelacao.CurrentRow.Index].Value); relacao.cod1 = Convert.ToInt32(dtgRelacao[2, dtgRelacao.CurrentRow.Index].Value); relacao.cod2 = Convert.ToInt32(dtgRelacao[3, dtgRelacao.CurrentRow.Index].Value); relacao.descricao = Convert.ToString(dtgRelacao[4, dtgRelacao.CurrentRow.Index].Value); relacao.observacao = Convert.ToString(dtgRelacao[5, dtgRelacao.CurrentRow.Index].Value); } catch { } finally { RelacionarEntreItensIndicadoresForm telarelacionar = new RelacionarEntreItensIndicadoresForm(relacao); telarelacionar.Show(); } }