Пример #1
0
        private void btAdicionar_Click(object sender, EventArgs e)
        {
            CadastroRaca tela = new CadastroRaca();

            tela.FormClosed += Tela_FormClosed;
            tela.MdiParent   = this.MdiParent;
            tela.Show();
        }
Пример #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            if (dgRaca.SelectedRows.Count == 0)
            {
                MessageBox.Show("Selecione uma raça");
                return;
            }

            long         racaId = (long)dgRaca.SelectedRows[0].Cells[0].Value;
            CadastroRaca tela   = new CadastroRaca();

            tela.FormClosed += Tela_FormClosed;
            tela.RacaId      = racaId;
            tela.MdiParent   = this.MdiParent;
            tela.Show();
        }