예제 #1
0
        private void btAdicionar_Click(object sender, EventArgs e)
        {
            CadastroVoluntario tela = new CadastroVoluntario();

            tela.FormClosed += Tela_FormClosed;
            tela.MdiParent   = this.MdiParent;
            tela.Show();
        }
예제 #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            if (dgVoluntario.SelectedRows.Count == 0)
            {
                MessageBox.Show("Selecione um voluntário");
                return;
            }

            long voluntarioId       = (long)dgVoluntario.SelectedRows[0].Cells[0].Value;
            CadastroVoluntario tela = new CadastroVoluntario();

            tela.FormClosed  += Tela_FormClosed;
            tela.VoluntarioId = voluntarioId;
            tela.MdiParent    = this.MdiParent;
            tela.Show();
        }