Ejemplo n.º 1
0
        public TDownloadNFe(Entidade_DownloadNFe ObjEntDownload)
        {
            var DtLoja = FuncoesGerais.Loja(ObjEntDownload.id_loja);

            if (FuncoesGerais.TipoAmbiente() == "HOM")
            {
                this.tpAmb = TAmb.Item2;
            }
            else
            {
                this.tpAmb = TAmb.Item1;
            }
            this.chNFe  = ObjEntDownload.ChaveNFe.ToArray();
            this.CNPJ   = DtLoja.Rows[0]["cnpj"].ToString();
            this.versao = TVerDownloadNFe.Item100;
            this.xServ  = TDownloadNFeXServ.DOWNLOADNFE;
        }
Ejemplo n.º 2
0
        public TEventoInfEvento(int loja, DateTime DtEvento, Entidade_ItemManifestacao objitem)
        {
            var DtEmpresa = FuncoesGerais.Loja(loja);

            this.Id       = "ID" + objitem.codmanifestacao + objitem.chaveacesso + objitem.idseq.ToString().PadLeft(2, '0');
            this.chNFe    = objitem.chaveacesso;
            this.dhEvento = string.Format("{0:s}", Convert.ToDateTime(DtEvento)) + "-03:00";
            this.cOrgao   = TCOrgaoIBGE.Item91; //(TCOrgaoIBGE)NegocioFuncoesGerais.RetornoCodigoIbge(Convert.ToInt32(FuncoesGerais.UfIbgeEmpresa(loja)));
            if (FuncoesGerais.TipoAmbiente() == "PROD")
            {
                this.tpAmb = TAmb.Item1;                        // 1- Produção | 2 - Homologação
            }
            else
            {
                this.tpAmb = TAmb.Item2;
            }
            this.ItemElementName = ItemChoiceType.CNPJ;     // DA EMPRESA EMITENTE
            this.Item            = DtEmpresa.Rows[0]["cnpj"].ToString();

            switch (objitem.codmanifestacao)
            {
            case 210200:
                this.tpEvento = TEventoInfEventoTpEvento.Item210200;
                break;

            case 210210:
                this.tpEvento = TEventoInfEventoTpEvento.Item210210;
                break;

            case 210220:
                this.tpEvento = TEventoInfEventoTpEvento.Item210220;
                break;

            case 210240:
                this.tpEvento = TEventoInfEventoTpEvento.Item210240;
                break;
            }

            this.nSeqEvento = objitem.idseq.ToString();
            this.verEvento  = "1.00";
            this.detEvento  = new TEventoInfEventoDetEvento(objitem);
        }
Ejemplo n.º 3
0
        public TConsNFeDest(int loja)
        {
            var DtLoja = FuncoesGerais.Loja(loja);

            this.versao = TVeConsNFeDest.Item101;
            if (FuncoesGerais.TipoAmbiente() == "HOM")
            {
                this.tpAmb = TAmb.Item2;
            }
            else
            {
                this.tpAmb = TAmb.Item1;
            }

            this.xServ  = TConsNFeDestXServ.CONSULTARNFEDEST;
            this.CNPJ   = DtLoja.Rows[0]["cnpj"].ToString();
            this.indNFe = TConsNFeDestIndNFe.Item0;
            this.indEmi = TConsNFeDestIndEmi.Item1;
            this.ultNSU = "0";
        }