Esempio n. 1
0
        private void fornecedorToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            frmConsultaFornecedor f = new frmConsultaFornecedor();

            f.ShowDialog();
            f.Dispose();
        }
Esempio n. 2
0
        private void btLocalizar_Click(object sender, EventArgs e)
        {
            frmConsultaFornecedor f = new frmConsultaFornecedor();

            f.ShowDialog();
            if (f.codigo != 0)
            {
                DAOConexao       cx     = new DAOConexao(DAOBanco.StringDeConexao);
                BLLFornecedor    bll    = new BLLFornecedor(cx);
                ModeloFornecedor modelo = bll.CarregaModeloFornecedor(f.codigo);
                txtCodigo.Text   = modelo.ForCod.ToString();
                txtNome.Text     = modelo.ForNome;
                txtRSocial.Text  = modelo.ForRSocial;
                txtCNPJ.Text     = modelo.ForCnpj;
                txtIE.Text       = modelo.ForIe;
                txtCep.Text      = modelo.ForCep;
                txtEstado.Text   = modelo.ForEstado;
                txtCidade.Text   = modelo.ForCidade;
                txtRua.Text      = modelo.ForEndereco;
                txtNumero.Text   = modelo.ForEndNumero;
                txtBairro.Text   = modelo.ForBairro;
                txtEmail.Text    = modelo.ForEmail;
                txtTelefone.Text = modelo.ForFone;
                txtCelular.Text  = modelo.ForCelular;

                alteraBotoes(3);
            }
            else
            {
                this.LimpaTela();
                this.alteraBotoes(1);
            }
            f.Dispose();
        }
Esempio n. 3
0
        private void btLocFor_Click(object sender, EventArgs e)
        {
            frmConsultaFornecedor f = new frmConsultaFornecedor();

            f.ShowDialog();
            if (f.codigo != 0)
            {
                txtForCod.Text = f.codigo.ToString();
                txtForCod_Leave(sender, e);
            }
        }
Esempio n. 4
0
        private void btLocFornecedor_Click(object sender, EventArgs e)
        {
            frmConsultaFornecedor f = new frmConsultaFornecedor();

            f.ShowDialog();
            if (f.codigo != 0)
            {
                txtForCod.Text = f.codigo.ToString();
                DAOConexao       cx     = new DAOConexao(DAOBanco.StringDeConexao);
                BLLFornecedor    bll    = new BLLFornecedor(cx);
                ModeloFornecedor modelo = bll.CarregaModeloFornecedor(f.codigo);
                lbForNome.Text = modelo.ForNome;
                BLLCompra bllCompra = new BLLCompra(cx);
                dgvDados.DataSource = bllCompra.Localizar(f.codigo);
                f.Dispose();
                this.AtualizaCabecalhoDGCompra();
            }
            else
            {
                txtForCod.Text = "";
                lbForNome.Text = "Localize o Fornecedor";
            }
        }