示例#1
0
        private void btAdicionar_Click(object sender, EventArgs e)
        {
            CadastroAnimal tela = new CadastroAnimal();

            tela.FormClosed += Tela_FormClosed;
            tela.MdiParent   = this.MdiParent;
            tela.Show();
        }
示例#2
0
        private void btAlterar_Click(object sender, EventArgs e)
        {
            if (dgAnimal.SelectedRows.Count == 0)
            {
                MessageBox.Show("Selecione um animal");
                return;
            }

            long           animalId = (long)dgAnimal.SelectedRows[0].Cells[0].Value;
            CadastroAnimal tela     = new CadastroAnimal();

            tela.FormClosed += Tela_FormClosed;
            tela.AnimalId    = animalId;
            tela.MdiParent   = this.MdiParent;
            tela.Show();
        }