Beispiel #1
0
        private void clienteToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            frmConsultaCliente f = new frmConsultaCliente();

            f.ShowDialog();
            f.Dispose();
        }
Beispiel #2
0
        private void btLocCli_Click(object sender, EventArgs e)
        {
            frmConsultaCliente f = new frmConsultaCliente();

            f.ShowDialog();
            if (f.codigo != 0)
            {
                txtCliCod.Text = f.codigo.ToString();
                txtCliCod_Leave(sender, e);
            }
        }
Beispiel #3
0
        private void btLocalizar_Click(object sender, EventArgs e)
        {
            frmConsultaCliente f = new frmConsultaCliente();

            f.ShowDialog();
            if (f.codigo != 0)
            {
                DAOConexao    cx     = new DAOConexao(DAOBanco.StringDeConexao);
                BLLCliente    bll    = new BLLCliente(cx);
                ModeloCliente modelo = bll.CarregaModeloCliente(f.codigo);
                txtCodigo.Text = modelo.CliCod.ToString();

                if (modelo.CliTipo == "Física")
                {
                    rbFisica.Checked = true;
                }
                else
                {
                    rbJuridica.Checked = true;
                }

                txtNome.Text     = modelo.CliNome;
                txtRSocial.Text  = modelo.CliRSocial;
                txtCPFCNPJ.Text  = modelo.CliCpfCnpj;
                txtRGIE.Text     = modelo.CliRgIe;
                txtCep.Text      = modelo.CliCep;
                txtEstado.Text   = modelo.CliEstado;
                txtCidade.Text   = modelo.CliCidade;
                txtRua.Text      = modelo.CliEndereco;
                txtNumero.Text   = modelo.CliEndNumero;
                txtBairro.Text   = modelo.CliBairro;
                txtEmail.Text    = modelo.CliEmail;
                txtTelefone.Text = modelo.CliFone;
                txtCelular.Text  = modelo.CliCelular;

                alteraBotoes(3);
            }
            else
            {
                this.LimpaTela();
                this.alteraBotoes(1);
            }
            f.Dispose();
        }
Beispiel #4
0
        private void btLocCliente_Click(object sender, EventArgs e)
        {
            frmConsultaCliente f = new frmConsultaCliente();

            f.ShowDialog();
            if (f.codigo != 0)
            {
                txtCliCod.Text = f.codigo.ToString();
                DAOConexao    cx     = new DAOConexao(DAOBanco.StringDeConexao);
                BLLCliente    bll    = new BLLCliente(cx);
                ModeloCliente modelo = bll.CarregaModeloCliente(f.codigo);
                lbCliNome.Text = modelo.CliNome;
                BLLVenda bllVenda = new BLLVenda(cx);
                dgvDados.DataSource = bllVenda.Localizar(f.codigo);
                f.Dispose();
                this.AtualizaCabecalhoDGVenda();
            }
            else
            {
                txtCliCod.Text = "";
                lbCliNome.Text = "Localize o Cliente";
            }
        }