コード例 #1
0
        private void AlterarToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormEmpreAlt frm = new FormEmpreAlt();

            frm.labelIdEm2.Text         = dataGridViewEmpre1.SelectedCells[0].Value.ToString();
            frm.textBoxNomeEm2.Text     = dataGridViewEmpre1.SelectedCells[1].Value.ToString();
            frm.textBoxNissEm2.Text     = dataGridViewEmpre1.SelectedCells[2].Value.ToString();
            frm.comboBoxFunEm2.Text     = dataGridViewEmpre1.SelectedCells[3].Value.ToString();
            frm.textBoxTelEm2.Text      = dataGridViewEmpre1.SelectedCells[4].Value.ToString();
            frm.textBoxEmailEm2.Text    = dataGridViewEmpre1.SelectedCells[5].Value.ToString();
            frm.textBoxCepEm2.Text      = dataGridViewEmpre1.SelectedCells[6].Value.ToString();
            frm.textBoxNumEm2.Text      = dataGridViewEmpre1.SelectedCells[7].Value.ToString();
            frm.textBoxMoradaEm2.Text   = dataGridViewEmpre1.SelectedCells[8].Value.ToString();
            frm.textBoxRefEm2.Text      = dataGridViewEmpre1.SelectedCells[9].Value.ToString();
            frm.textBoxCidadeEm2.Text   = dataGridViewEmpre1.SelectedCells[10].Value.ToString();
            frm.textBoxDistritoEm2.Text = dataGridViewEmpre1.SelectedCells[11].Value.ToString();

            frm.ShowDialog();
        }
コード例 #2
0
        private void ButtonSendEm3_Click(object sender, EventArgs e)
        {
            FormEmpreAlt frm = new FormEmpreAlt();

            frm.labelIdEm2.Text         = labelIdEm4.Text.ToString();
            frm.textBoxNomeEm2.Text     = labelNomeEm4.Text.ToString();
            frm.textBoxNissEm2.Text     = labelNissEm4.Text.ToString();
            frm.comboBoxFunEm2.Text     = labelFunEm4.Text.ToString();
            frm.textBoxTelEm2.Text      = labelTelEm4.Text.ToString();
            frm.textBoxEmailEm2.Text    = labelEmailEm4.Text.ToString();
            frm.textBoxCepEm2.Text      = labelCepEm4.Text.ToString();
            frm.textBoxNumEm2.Text      = labelNumEm4.Text.ToString();
            frm.textBoxMoradaEm2.Text   = labelMoradaEm4.Text.ToString();
            frm.textBoxRefEm2.Text      = labelRef2.Text.ToString();
            frm.textBoxCidadeEm2.Text   = labelCidadeEm4.Text.ToString();
            frm.textBoxDistritoEm2.Text = labelDistritoEm4.Text.ToString();

            this.Close();
            frm.ShowDialog();
        }