Exemple #1
0
        private void btnNovo_Click(object sender, EventArgs e)
        {
            this.Hide();
            FormImovel formImovel = new FormImovel();

            formImovel.Show();
        }
Exemple #2
0
        private void gridImovel_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridView dgv = sender as DataGridView;

            imovel.idImovel     = Convert.ToInt32(dgv.CurrentRow.Cells[0].Value.ToString());
            imovel.nome         = dgv.CurrentRow.Cells[1].Value.ToString();
            imovel.cep          = dgv.CurrentRow.Cells[2].Value.ToString();
            imovel.logradouro   = dgv.CurrentRow.Cells[3].Value.ToString();
            imovel.bairro       = dgv.CurrentRow.Cells[4].Value.ToString();
            imovel.cidade       = dgv.CurrentRow.Cells[5].Value.ToString();
            imovel.uf           = dgv.CurrentRow.Cells[6].Value.ToString();
            imovel.dataCadastro = dgv.CurrentRow.Cells[7].Value.ToString();
            imovel.dataLocacao  = dgv.CurrentRow.Cells[8].Value.ToString();
            imovel.observacao   = dgv.CurrentRow.Cells[9].Value.ToString();
            imovel.status       = dgv.CurrentRow.Cells[10].Value.ToString();

            this.Hide();
            FormImovel formImovel = new FormImovel(imovel);

            formImovel.Show();
        }