Esempio n. 1
0
        private void dgvFale_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dgvFale.CurrentRow == null)
            {
                MessageBox.Show("NÃO HÁ FUNCIONÁRIOS CADASTRADOS!", "AVISO!", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                addfuncionario f2 = new addfuncionario();

                f2.txtIDfuncionario.Text = this.dgvFale.CurrentRow.Cells[0].Value.ToString();
                f2.txtNome.Text          = this.dgvFale.CurrentRow.Cells[1].Value.ToString();
                f2.mskTelefone.Text      = this.dgvFale.CurrentRow.Cells[2].Value.ToString();
                f2.mskCelular.Text       = this.dgvFale.CurrentRow.Cells[3].Value.ToString();
                f2.txtEmail.Text         = this.dgvFale.CurrentRow.Cells[4].Value.ToString();
                f2.cboSexo.Text          = this.dgvFale.CurrentRow.Cells[5].Value.ToString();
                f2.cboCargo.Text         = this.dgvFale.CurrentRow.Cells[6].Value.ToString();
                f2.mskNascimento.Text    = this.dgvFale.CurrentRow.Cells[7].Value.ToString();
                f2.mskCEP.Text           = this.dgvFale.CurrentRow.Cells[8].Value.ToString();
                f2.txtLogradouro.Text    = this.dgvFale.CurrentRow.Cells[9].Value.ToString();
                f2.txtCidade.Text        = this.dgvFale.CurrentRow.Cells[10].Value.ToString();
                f2.cboUF.Text            = this.dgvFale.CurrentRow.Cells[11].Value.ToString();
                f2.txtBairro.Text        = this.dgvFale.CurrentRow.Cells[12].Value.ToString();
                f2.txtNumero.Text        = this.dgvFale.CurrentRow.Cells[13].Value.ToString();
                f2.mskRG.Text            = this.dgvFale.CurrentRow.Cells[14].Value.ToString();
                f2.mskCPF.Text           = this.dgvFale.CurrentRow.Cells[15].Value.ToString();
                f2.txtComplemento.Text   = this.dgvFale.CurrentRow.Cells[16].Value.ToString();
                f2.cboStatus.Text        = this.dgvFale.CurrentRow.Cells[17].Value.ToString();


                f2.ShowDialog();
            }
        }
Esempio n. 2
0
        public void Abrirfuncionario(object o, EventArgs e)
        {
            addfuncionario add = new addfuncionario();

            add.ShowDialog();
        }