Пример #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();
        }