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

                f2.txtIDfornecedor.Text = this.dgvFale.CurrentRow.Cells[0].Value.ToString();
                f2.txtNomeFantasia.Text = this.dgvFale.CurrentRow.Cells[2].Value.ToString();
                f2.txtRazaoSocial.Text  = this.dgvFale.CurrentRow.Cells[1].Value.ToString();

                f2.mskTelefone.Text = this.dgvFale.CurrentRow.Cells[3].Value.ToString();
                f2.mskCelular.Text  = this.dgvFale.CurrentRow.Cells[4].Value.ToString();
                f2.txtEmail.Text    = this.dgvFale.CurrentRow.Cells[5].Value.ToString();


                f2.mskCEP.Text  = this.dgvFale.CurrentRow.Cells[6].Value.ToString();
                f2.mskCNPJ.Text = this.dgvFale.CurrentRow.Cells[7].Value.ToString();

                f2.txtLogradouro.Text = this.dgvFale.CurrentRow.Cells[8].Value.ToString();
                f2.txtCidade.Text     = this.dgvFale.CurrentRow.Cells[9].Value.ToString();
                f2.cboUF.Text         = this.dgvFale.CurrentRow.Cells[10].Value.ToString();
                f2.txtBairro.Text     = this.dgvFale.CurrentRow.Cells[11].Value.ToString();
                f2.txtNumero.Text     = this.dgvFale.CurrentRow.Cells[12].Value.ToString();


                f2.txtComplemento.Text = this.dgvFale.CurrentRow.Cells[13].Value.ToString();
                f2.cboStatus.Text      = this.dgvFale.CurrentRow.Cells[14].Value.ToString();

                f2.ShowDialog();
            }
        }
예제 #2
0
        public void AbrirFornecedor(object o, EventArgs e)
        {
            addfornecedor add = new addfornecedor();

            add.ShowDialog();
        }