Ejemplo n.º 1
0
        private void btAdicionar_Click(object sender, EventArgs e)
        {
            CadastroCidade tela = new CadastroCidade();

            tela.FormClosed += Tela_FormClosed;
            tela.MdiParent   = this.MdiParent;
            tela.Show();
        }
Ejemplo n.º 2
0
        private void button3_Click(object sender, EventArgs e) //alterar
        {
            if (dgCidade.SelectedRows.Count == 0)
            {
                MessageBox.Show("Selecione uma cidade");
                return;
            }

            long           cidadeId = (long)dgCidade.SelectedRows[0].Cells[0].Value;
            CadastroCidade tela     = new CadastroCidade();

            tela.FormClosed += Tela_FormClosed;
            tela.CidadeId    = cidadeId;
            tela.MdiParent   = this.MdiParent;
            tela.Show();
        }