private void ConsultarDestinatario(Object o, EventArgs e)
        {
            try
            {
                Telas.Cadastrar.FrmDestinatário fcu = new Cadastrar.FrmDestinatário();
                fcu.lblTitulo.Text       = "Consultando o Destinatario";
                fcu.txtDestinatario.Text = Convert.ToString(dataGridView1.CurrentRow.Cells[1].Value);
                fcu.txtLogradouro.Text   = Convert.ToString(dataGridView1.CurrentRow.Cells[2].Value);
                fcu.txtBairro.Text       = Convert.ToString(dataGridView1.CurrentRow.Cells[3].Value);
                fcu.txtCidade.Text       = Convert.ToString(dataGridView1.CurrentRow.Cells[4].Value);
                fcu.cbUf.Text            = Convert.ToString(dataGridView1.CurrentRow.Cells[5].Value);
                fcu.txtCEP.Text          = Convert.ToString(dataGridView1.CurrentRow.Cells[6].Value);
                fcu.txtNum.Text          = Convert.ToString(dataGridView1.CurrentRow.Cells[7].Value);

                fcu.txtTel.Text = Convert.ToString(dataGridView1.CurrentRow.Cells[9].Value);


                fcu.btnCadastrar.Visible     = false;
                fcu.txtDestinatario.ReadOnly = true;
                fcu.txtLogradouro.ReadOnly   = true;
                fcu.txtBairro.ReadOnly       = true;
                fcu.txtCidade.ReadOnly       = true;
                //fcu.cbUf.DropDown = true;
                fcu.txtComplemento.ReadOnly = true;
                fcu.txtCEP.ReadOnly         = true;
                fcu.txtNum.ReadOnly         = true;
                fcu.txtTel.ReadOnly         = true;



                fcu.ShowDialog();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
                //throw;
            }
        }
示例#2
0
 private void button2_Click(object sender, EventArgs e)
 {
     Cadastrar.FrmDestinatário dest = new Cadastrar.FrmDestinatário();
     dest.ShowDialog();
 }