Example #1
0
        private void clienteToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Frm_ConsultaCliente consultaCliente = new Frm_ConsultaCliente();

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

            consultaCliente.ShowDialog();

            if (consultaCliente.Codigo != 0)
            {
                DALConexao dalConexao = new DALConexao(DadosDaConexao.StringDeConexao);
                BLLCliente bllCliente = new BLLCliente(dalConexao);

                ModeloCliente modelo = bllCliente.CarregaModeloCliente(consultaCliente.Codigo); //CRIA O DLL. carrega o modelo ! Apartir do modelo criado por meio do CarregaModelo, e tem como parametro o CODIGO  que o usuario selecionou.
                txtCodigo.Text = modelo.CliCod.ToString();

                //PREENCHE RADIOBUTTON
                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;

                AlterarBotoes(3);
            }
            else
            {
                LimpaTela();
                AlterarBotoes(1);
            }

            consultaCliente.Dispose();
        }