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

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

            f.ShowDialog();
            if (f.codigo != 0)
            {
                DALConexao    cx     = new DALConexao(DadosDaConexao.StringDeConexao);
                BLLCliente    bll    = new BLLCliente(cx);
                ModeloCliente modelo = bll.CarregaModeloCliente(f.codigo);
                txtCodigo.Text   = modelo.IDCliente.ToString();
                txtNome.Text     = modelo.NomeCliente;
                txtTelefone.Text = Convert.ToString(modelo.TelefoneCliente);
                txtCelular.Text  = Convert.ToString(modelo.CelularCliente);

                BLLCidade    bllCidade    = new BLLCidade(cx);
                ModeloCidade modeloCidade = bllCidade.CarregaModeloCidade(modelo.IDCidade);
                cbCidade.Text = Convert.ToString(modeloCidade.NomeCidade);

                BLLBairro    bllBairro    = new BLLBairro(cx);
                ModeloBairro modeloBairro = bllBairro.CarregaModeloBairro(modelo.IDBairro);
                cbBairro.Text = Convert.ToString(modeloBairro.NomeBairro);

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

            f.ShowDialog();
            if (f.codigo != 0)
            {
                DALConexao    cx     = new DALConexao(DadosDaConexao.StringDeConexao);
                BLLCliente    bll    = new BLLCliente(cx);
                ModeloCliente modelo = bll.CarregaModeloCliente(f.codigo);
                txtCodigo.Text    = modelo.CliCod.ToString();
                txtNome.Text      = modelo.CliNome;
                txtCpfCnpj.Text   = modelo.CliCpfCnpj;
                txtRsocial.Text   = modelo.CliRSocial;
                txtIe.Text        = modelo.CliRgie;
                txtEndereco.Text  = modelo.CliEndereco;
                txtEndNumero.Text = modelo.CliEndNumero;
                txtBairro.Text    = modelo.CliBairro;
                txtCep.Text       = modelo.CliCep;
                txtCidade.Text    = modelo.CliCidade;
                txtEstado.Text    = modelo.CliEstado;
                txtEmail.Text     = modelo.CliEmail;
                txtTipo.Text      = modelo.CliTipo;
                alteraBotoes(3);
            }
            else
            {
                this.LimpaTela();
                this.alteraBotoes(1);
            }
            f.Dispose();
        }
Example #4
0
        private void clienteToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            frmConsultaCliente f = new frmConsultaCliente();

            f.ShowDialog();
            f.Dispose();
        }
Example #5
0
        public void btnLocalizar_Click(object sender, EventArgs e)
        {
            frmConsultaCliente f = new frmConsultaCliente();

            Close();
            f.ShowDialog();
            f.Dispose();
        }
Example #6
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);
            }
        }
Example #7
0
        private void btnLocalCli_Click(object sender, EventArgs e)
        {
            frmConsultaCliente f = new frmConsultaCliente();

            f.ShowDialog();
            if (f.codigo != 0)
            {
                txtCodCli.Text = f.codigo.ToString();
                txtCodCli_Leave(sender, e);
                //chamada do método do txtForCod
            }
        }
Example #8
0
        private void btCliente_Click(object sender, EventArgs e)
        {
            frmConsultaCliente f = new frmConsultaCliente();

            f.ShowDialog();
            if (f.codigo != 0)
            {
                DALConexao    cx     = new DALConexao(DadosDaConexao.StringDeConexao);
                BLLCliente    bll    = new BLLCliente(cx);
                ModeloCliente modelo = bll.CarregaModeloCliente(f.codigo);
                cbCliente.Text = Convert.ToString(modelo.NomeCliente);
            }
        }
Example #9
0
        //=============================================================================================================
        private void btLocalizar_Click(object sender, EventArgs e)
        {
            frmConsultaCliente f = new frmConsultaCliente();

            f.ShowDialog();

            //verificar se tem um codigo carregado:{diferente de zero}
            if (f.codigo != 0)
            {
                DALConexao    cx     = new DALConexao(DadosDaConexao.StringDeConexao);
                BLLCliente    bll    = new BLLCliente(cx);
                ModeloCliente modelo = bll.CarregaModeloCliente(f.codigo);
                txtCodigo.Text = modelo.CliCod.ToString();

                //passar os valores dos campos para tela:
                txtNome.Text     = modelo.CliNome;
                txtCpfCnpj.Text  = modelo.CliCpfCnpj;
                txtRgIe.Text     = modelo.CliRgIe;
                txtRSocial.Text  = modelo.CliRSocial;
                txtCep.Text      = modelo.CliCep;
                txtEndereco.Text = modelo.CliEndereco;
                txtBairro.Text   = modelo.CliBairro;
                txtFone.Text     = modelo.CliFone;
                txtCelular.Text  = modelo.CliCel;
                txtEmail.Text    = modelo.CliEmail;
                txtNumero.Text   = modelo.CliEndNumero;
                txtCidade.Text   = modelo.CliCidade;
                txtEstado.Text   = modelo.CliEstado;

                //verificar o tipo do cliente:
                if (modelo.CliTipo == "Física")
                {
                    rbFisica.Checked = true; //pessoa fisica
                }
                else
                {
                    rbJuridica.Checked = true; //pessoa "Jurídica";
                }

                alteraBotoes(3);
            }
            else
            {
                this.LimpaTela();
                this.alteraBotoes(1);
            }

            //destroi o obejto
            f.Dispose();
        }
        private void btLocalizar_Click(object sender, EventArgs e)
        {
            frmConsultaCliente f = new frmConsultaCliente();
            // obj para gravar os dados no banco
            DALConexao cx  = new DALConexao(DadosDaConexao.StringDeConexao);
            BLLCliente bll = new BLLCliente(cx);

            //exibe o frmConsultaCategoria para seleção da alteração
            f.ShowDialog();
            //verifica se foi armazenado uma categoria no frmConsultaCategoria
            if (f.codigo != 0)
            {
                ModeloCliente modelo = bll.CarregarModeloCliente(f.codigo);
                txtCodigo.Text = modelo.CliCod.ToString();
                if (modelo.CliTipo == "Física")
                {
                    rbFisica.Checked = true;
                }
                else
                {
                    rbJuridica.Checked = true;
                }

                txtNome.Text        = modelo.CliNome;
                txtRazaoSocial.Text = modelo.CliRsocial;
                txtCpfCnpj.Text     = modelo.CliCpfCnpj;
                txtRgIe.Text        = modelo.CliRgIe;
                txtEmail.Text       = modelo.CliEmail;
                txtTel.Text         = modelo.CliFone;
                txtCel.Text         = modelo.CliCel;
                txtCep.Text         = modelo.CliCep;
                txtBairro.Text      = modelo.CliBairro;
                txtEnd.Text         = modelo.CliEndereco;
                txtEndNumero.Text   = modelo.CliEndNumero;
                txtCidade.Text      = modelo.CliCidade;
                txtEstado.Text      = modelo.CliEstado;
                alteraBotoes(3);
            }
            else
            {
                this.limpaTela();
                this.alteraBotoes(1);
            }
            f.Dispose();
        }
        private void btLocalizar_Click(object sender, EventArgs e)
        {
            frmConsultaCliente f = new frmConsultaCliente();

            f.ShowDialog();
            if (f.codigo != 0)
            {
                DaoConexao    cx     = new DaoConexao(DadosDeConexao.StringDeConexao);
                BLLCliente    bll    = new BLLCliente(cx);
                ModeloCliente modelo = bll.CarregaModeloCliente(f.codigo);
                txtCodigo.Text = modelo.CliCod.ToString();
                if (modelo.CliTipo == "FISICA")
                {
                    rbFisica.Checked = true;
                }
                else
                {
                    rbJuridica.Checked = true;
                }
                txtdatacadastro.Value = modelo.Clidatacadastro;
                txtNome.Text          = modelo.CliNome;
                txtCpfCnpj.Text       = modelo.CliCpfCnpj;
                txtRgie.Text          = modelo.CliRgIe;
                txtdtnascimento.Value = modelo.CliDtnascimento;
                txtSexo.Text          = modelo.CliSexo;
                txtRsocial.Text       = modelo.CliRsocial;
                txtCep.Text           = modelo.CliCep;
                txtLogradouro.Text    = modelo.CliLogradouro;
                txtBairro.Text        = modelo.CliBairro;
                txtFone.Text          = modelo.CliFone;
                txtCel.Text           = modelo.CliCelular;
                txtEmail.Text         = modelo.CliEmail;
                txtEndNumero.Text     = modelo.CliEndNumero;
                txtCidade.Text        = modelo.CliCidade;
                txtEstado.Text        = modelo.CliEstado;
                alteraBotoes(3);
            }
            else
            {
                this.LimpaTela();
                this.alteraBotoes(1);
            }
            f.Dispose();
        }
        private void btLocalizar_Click(object sender, EventArgs e)
        {
            frmConsultaCliente f = new frmConsultaCliente();

            f.ShowDialog();
            if (f.codigo != 0)
            {
                DALConexao    cx     = new DALConexao(DadosDaConexao.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;
                txtFone.Text    = modelo.CliFone;
                txtCelular.Text = modelo.CliCelular;

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

            f.ShowDialog();
            if (f.codigo != 0)
            {
                txtCliCod.Text = f.codigo.ToString();
                DALConexao    cx     = new DALConexao(DadosDaConexao.StringDeConexao);
                BLLCliente    bll    = new BLLCliente(cx);
                ModeloCliente modelo = bll.CarregaModeloCliente(f.codigo);
                lbCliNome.Text = "Nome do cliente: " + modelo.CliNome;
                BLLVenda bllvenda = new BLLVenda(cx);
                dgvDados.DataSource = bllvenda.Localizar(f.codigo);
                f.Dispose();
                this.AtualizaCabecalhoDGVenda();
            }
            else
            {
                txtCliCod.Text = ""; lbCliNome.Text = "Nome do Cliente:";
            }
        }
 private void btLocalizar_Click(object sender, EventArgs e)
 {
     frmConsultaCliente f = new frmConsultaCliente();
     f.ShowDialog();
     if (f.codigo != 0)
     {
         DALConexao cx = new DALConexao(DadosDaConexao.StringDeConexao);
         BLLCliente bll = new BLLCliente(cx);
         ModeloCliente modelo = bll.CarregaModeloCliente(f.codigo);
         txtCodigo.Text = modelo.CliCod.ToString();
         txtNome.Text = modelo.CliNome;
         txtCpfCnpj.Text = modelo.CliCpfCnpj;
         txtRsocial.Text = modelo.CliRSocial;
         txtIe.Text = modelo.CliRgie;
         txtEndereco.Text = modelo.CliEndereco;
         txtEndNumero.Text = modelo.CliEndNumero;
         txtBairro.Text = modelo.CliBairro;
         txtCep.Text = modelo.CliCep;
         txtCidade.Text = modelo.CliCidade;
         txtEstado.Text = modelo.CliEstado;
         txtEmail.Text = modelo.CliEmail;
         txtTipo.Text = modelo.CliTipo;
         alteraBotoes(3);
     }
     else
     {
         this.LimpaTela();
         this.alteraBotoes(1);
     }
     f.Dispose();
 }
        private void clienteToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            frmConsultaCliente f = new frmConsultaCliente();

            CheckMdiChildren(f);
        }
Example #16
0
        private void btLocalizar_Click(object sender, EventArgs e)
        {
            frmConsultaCliente f = new frmConsultaCliente();
            f.ShowDialog();
            f.Dispose();

            if (f.codigo != 0)
            {
                DALConexao cx = new DALConexao(DadosConexao.StringDeConexao);
                BLLCliente bll = new BLLCliente(cx);
                ModeloCliente modelo = bll.CarregaModeloCliente(f.codigo);

                txtCodigo.Text = modelo.CliCod.ToString();
                txtBairro.Text = modelo.CliBairro;
                txtCelular.Text = modelo.CliCel;
                txtCEP.Text = modelo.CliCep;
                txtCidade.Text = modelo.CliCidade;
                txtCPF.Text = modelo.CliCPF_CNPJ;
                txtEmail.Text = modelo.CliEmail;
                txtEndereco.Text = modelo.CliEndereco;
                txtNome.Text = modelo.CliNome;
                txtNumero.Text = modelo.CliEndNumero;
                txtRG.Text = modelo.CliRG;
                txtTelefone.Text = modelo.CliFone;
                txtEstado.Text = modelo.CliEstado;
                if (modelo.CliTipo == "Pessoa Física")
                {
                    rbnPessoajuridica.Checked = false;
                    rbnPessoaFísica.Checked = true;
                }
                else
                {
                    rbnPessoaFísica.Checked = false;
                    rbnPessoajuridica.Checked = true;
                }

                this.alteraBotoes(3);
            }
            else
            {
                this.LimpaTela();
                this.alteraBotoes(1);
            }
            f.Dispose();
        }
Example #17
0
        private void btLocalizar_Click(object sender, EventArgs e)
        { 
            frmConsultaCliente consulta = new frmConsultaCliente();
            consulta.ShowDialog();
            if (consulta.codigo != 0)
            {
                DALConexao cx = new DALConexao(DadosDaConexao.srtConexao);
                BLLCliente bll = new BLLCliente(cx);
                ModeloCliente modelo = bll.CarregaModeloCliente(consulta.codigo);

                txCodigo.Text = modelo.CliCod.ToString();

                txNome.Text= modelo.CliNome.ToString();

                txCPFCNPJ.Text = modelo.CliCpfcnpj.ToString();
                txRGIE.Text = modelo.CliRgie.ToString();
                txRazaoSocial.Text = modelo.CliRsocial.ToString();  
               
                if (modelo.CliTipo.ToString() == "0")
                {
                    rbFisica.Checked = true;
                }
                else
                {
                    rbJuridica.Checked = true;
                }

                txCEP.Text = modelo.CliCep.ToString();
                txEndereco.Text = modelo.CliEndereco.ToString();
                txBairro.Text = modelo.CliBairro.ToString();
                txTelefone.Text = modelo.CliFone.ToString();
                txCelular.Text = modelo.CliCel.ToString();
                txEmail.Text = modelo.CliEmail.ToString();
                txNumero.Text = modelo.CliEndnumero.ToString();
                txCidade.Text = modelo.CliCidade.ToString();
                txUF.Text = modelo.CliEstado.ToString();
                txComplemento.Text = modelo.CliComplemento.ToString();  


                
           

                AlteraBotoes(3);
            }
            else
            {
                this.LimpaCampos();
                this.AlteraBotoes(1);
            }
            consulta.Dispose();
        }
 private void clienteToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     frmConsultaCliente f = new frmConsultaCliente();
     f.ShowDialog();
     f.Dispose();
 }