Beispiel #1
0
        public void BuscaDados()
        {
            CommandNfePadrao Cmd = new CommandNfePadrao();

            Cmd.CriarBancoNfePadrao();

            List <NfePadrao> LNfeP = Cmd.GetNfePadrao();

            if (LNfeP.Count > 0)
            {
                foreach (NfePadrao Crt in LNfeP)
                {
                    InputNomFantasia.Text      = Crt.NOME_PN;
                    InputCnpj.Text             = Crt.CNPJ_PN;
                    InputLogradouro.Text       = Crt.ENDERECO_PN;
                    InputNumero.Text           = Crt.NUMERO_PN;
                    InputComplemento.Text      = Crt.CPL_PN;
                    InputBairro.Text           = Crt.bairro_pn;
                    InputCodMunicipio.Text     = Crt.CODMUN_PN;
                    InputMunicipio.Text        = Crt.CIDADE_PN;
                    InputUF.Text               = Crt.uf_PN;
                    InputCEP.Text              = Crt.CEP_PN;
                    InputFone.Text             = Crt.FONE_PN;
                    InputInsEstadual.Text      = Crt.IE_PN;
                    InputNtFiscal.Text         = Crt.SERIE_PN.ToString();
                    InputPathCertificado.Text  = Crt.PATH_CHAVE;
                    InputSenhaCertificado.Text = Crt.SENHA_CERTIFICADO;
                    InputAmbAt.Text            = Crt.AMBIENTE_PN.ToString();
                    InputCodUF.Text            = Crt.CODUF_PN;
                    InputRazaoSocial.Text      = Crt.RAZAO_PN;
                    int BcIcms = Crt.BASEICMS_PN;
                    PkModalBcICMS.SelectedIndex = BcIcms;
                    int iBaseIcmsSt = Crt.BASEST_PN;
                    PkModalBcICMSST.SelectedIndex = iBaseIcmsSt - 1;
                    int IRgt = Crt.SIMPLES_PN;
                    PkRegimeTrib.SelectedIndex = IRgt - 1;
                    InputEmailDestino.Text     = Crt.EMAIL_PN;
                    DownInputAlicotaICMS.Text  = Crt.PERCREDCSO.ToString();
                    Boolean Ipi = Crt.IPI_PN;
                    InputContribIpi.IsChecked = Ipi;
                    Boolean Imprimi = Crt.IMPRIMEAMBOS_PN;
                    InputDadClie.Text = Crt.ISENTO_ATE;
                    InputIdTolk.Text  = Crt.cIdToken;
                    InputCSC.Text     = Crt.CSC;
                    //Crt.TIPOCNPJBAIXAR_PN = ;
                    //Crt.CNPJBAIXAR_prd = "";
                    //Crt.MODELO_PN   = .Text;
                    //Crt.Msg_fisco  = "";
                    //Crt.Msg_Contri  = "";
                    //Crt.LOCBACK_PN   = "";
                    //Crt.PATH_SCHEMAS  = null;
                    //Crt.PATH_MOVIMENTO = null;
                }
            }
        }