示例#1
0
文件: IPM.cs 项目: akretion/uninfe
        public string EmitirNF(string file, TipoAmbiente tpAmb, bool cancelamento = false)
        {
            string result = "";

            using(POSTRequest post = new POSTRequest
                {
                    Proxy = Proxy
                })
            {                 
                //                                                                                                    informe 1 para retorno em xml
                result = post.PostForm("http://sync.nfs-e.net/datacenter/include/nfw/importa_nfw/nfw_import_upload.php?eletron=1", new Dictionary<string, string> {
                     {"login", Usuario  },  //CPF/CNPJ, sem separadores}
                     {"senha", Senha},      //Senha de acesso ao sistema: www.nfse.
                     {"cidade", Cidade.ToString()},   //Código da cidade na receita federal (TOM), pesquisei o código em http://www.ekwbrasil.com.br/municipio.php3.
                     {"f1", file}           //Endereço físico do arquivo
                });
            }

            if(!cancelamento)
                GerarRetorno(file, result, Propriedade.ExtEnvio.EnvLoteRps, Propriedade.ExtRetorno.RetLoteRps);
            else
                GerarRetorno(file, result, Propriedade.ExtEnvio.EnvCancelamento_XML, Propriedade.ExtRetorno.CanNfse);

            return result;
        }
 public EnderecoConsultaPublicaNfce(Estado estado, TipoAmbiente tipoAmbiente, TipoUrlConsultaPublica tipoUrlConsultaPublica, string url)
 {
     TipoAmbiente = tipoAmbiente;
     Estado = estado;
     TipoUrlConsultaPublica = tipoUrlConsultaPublica;
     Url = url;
 }
示例#3
0
 public ConamBase(TipoAmbiente tpAmb, string pastaRetorno, int codMun, string usuario, string senhaWs)
     : base(tpAmb, pastaRetorno)
 {
     CodigoMun = codMun;
     Usuario = usuario;
     SenhaWs = senhaWs;
 }
 public EnderecoNfceDanfe(Estado estado, TipoAmbiente tipoAmbiente, TipoUrlDanfeNfce tipoUrlDanfeNfce, string url)
 {
     TipoAmbiente = tipoAmbiente;
     Estado = estado;
     TipoUrlDanfeNfce = tipoUrlDanfeNfce;
     Url = url;
 }
示例#5
0
 public static TipoAmbiente CrearEntidad(IDataReader lector)
 {
     var aux = new TipoAmbiente();
     aux.Id = lector.GetString(0);
     aux.Descripcion = lector.GetString(1);
     aux.Estado = lector.GetString(2);
     return aux;
 }
示例#6
0
 public EGoverneP(TipoAmbiente tpAmb, string pastaRetorno, string usuarioProxy, string senhaProxy, string domainProxy, X509Certificate certificado)
     : base(tpAmb, pastaRetorno, usuarioProxy, senhaProxy, domainProxy)
 {
     service.Proxy = WebRequest.DefaultWebProxy;
     service.Proxy.Credentials = new NetworkCredential(usuarioProxy, senhaProxy);
     service.Credentials = new NetworkCredential(senhaProxy, senhaProxy);
     service.ClientCertificates.Add(certificado);
 }
        public EstadoUrl GetEstadoUrl(Estado estado, TipoAmbiente tpAmbiente, ServicoNFe servicoNFe)
        {
            var url =
                Urls.FirstOrDefault(
                    c => c.CodigoEstado == estado && c.TipoAmbiente == tpAmbiente && c.TipoServico == servicoNFe);

            return url;
        }
示例#8
0
        public MGMBase(TipoAmbiente tpAmb, string pastaRetorno, int codMun, string usuario, string senha)
            : base(tpAmb, pastaRetorno)
        {
            CodigoMun = codMun;
            Usuario = usuario;
            Senha = senha;

        }
示例#9
0
 public EstadoUrl(Estado estado, TipoAmbiente tipoAmbiente, ServicoNFe servicoNFe, string url)
     : this()
 {
     this.CodigoEstado = estado;
     this.TipoAmbiente = tipoAmbiente;
     this.TipoServico = servicoNFe;
     this.Url = url;
 }
示例#10
0
 public EGoverneBase(TipoAmbiente tpAmb, string pastaRetorno, int codMun, string usuarioProxy, string senhaProxy, string domainProxy, X509Certificate certificado)
     : base(tpAmb, pastaRetorno)
 {
     CodigoMun = codMun;
     UsuarioProxy = usuarioProxy;
     SenhaProxy = senhaProxy;
     DomainProxy = domainProxy;
     Certificado = certificado;
     
 }
示例#11
0
 public SimplISSBase(TipoAmbiente tpAmb, string pastaRetorno, int codMun, string usuario, string senhaWs, string proxyuser, string proxypass, string proxyserver)
     : base(tpAmb, pastaRetorno)
 {
     CodigoMun = codMun;
     Usuario = usuario;
     SenhaWs = senhaWs;
     ProxyUser = proxyuser;
     ProxyPass = proxypass;
     ProxyServer = proxyserver;
 }
示例#12
0
 public EnderecoServico(ServicoNFe servicoNFe, VersaoServico versaoServico, TipoAmbiente tipoAmbiente, TipoEmissao tipoEmissao, Estado estado, ModeloDocumento modeloDocumento, string url)
 {
     ServicoNFe = servicoNFe;
     VersaoServico = versaoServico;
     TipoAmbiente = tipoAmbiente;
     TipoEmissao = tipoEmissao;
     Estado = estado;
     Url = url;
     ModeloDocumento = modeloDocumento;
 }
示例#13
0
文件: ELBase.cs 项目: akretion/uninfe
 public ELBase(TipoAmbiente tpAmb, string pastaRetorno, int codMun, string usuarioWs, string senhaWs, string usuarioProxy, string senhaProxy, string domainProxy)
     : base(tpAmb, pastaRetorno)
 {
     UsuarioWs = usuarioWs;
     SenhaWs = senhaWs;
     CodigoMun = codMun;
     UsuarioProxy = usuarioProxy;
     SenhaProxy = senhaProxy;
     DomainProxy = domainProxy;
 }
示例#14
0
 public EloTechBase(TipoAmbiente tpAmb, string pastaRetorno, int codMun, string usuario, string senhaWs, string proxyuser, string proxypass, string proxyserver, X509Certificate2 certificado)
     : base(tpAmb, pastaRetorno)
 {
     CodigoMun = codMun;
     Usuario = usuario;
     SenhaWs = senhaWs;
     ProxyUser = proxyuser;
     ProxyPass = proxypass;
     ProxyServer = proxyserver;
     Certificate = certificado;
 }
 public static string TpAmbParaString(TipoAmbiente? tpAmb)
 {
     switch (tpAmb)
     {
         case TipoAmbiente.taHomologacao:
             return "Homologação";
         case TipoAmbiente.taProducao:
             return "Produção";
     }
     return "";
 }
示例#16
0
 public static bool Agregar(TipoAmbiente ent)
 {
     var r = 0;
     using (var cn = Conexion.ConexionDBSqlServer())
     {
         SqlCommand cmd = new SqlCommand("SPU_INSERTAR_TipoAmbiente", cn);
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.Parameters.AddWithValue("@Descripcion", ent.Descripcion);
         cn.Open();
         r = cmd.ExecuteNonQuery();
         cn.Close();
     }
     return r > 0;
 }
示例#17
0
 public static bool Registro(TipoAmbiente ent)
 {
     bool r;
         if (TipoAmbienteAD.Existe(ent.Id))
         {
     r = true;
         TipoAmbienteAD.Modificar(ent);
          }
         else
         {
     r = false;
        TipoAmbienteAD.Agregar(ent);
          }
     return r;
 }
示例#18
0
        /// <summary>
        /// Obtém a URL para o QR-Code versão 2.0 com o tratamento de parâmetro query no final da url
        /// </summary>
        /// <returns></returns>
        public static string ObterUrlQrCode2ComParametro(this infNFeSupl infNFeSupl, TipoAmbiente tipoAmbiente, Estado estado, VersaoServico versaoServico)
        {
            const string interrogacao = "?";
            const string parametro    = "p=";

            var url = ObterUrl(infNFeSupl, tipoAmbiente, estado, TipoUrlConsultaPublica.UrlQrCode, versaoServico, VersaoQrCode.QrCodeVersao2);

            if (!url.EndsWith(interrogacao))
            {
                url += interrogacao;
            }
            if (!url.EndsWith(parametro))
            {
                url += parametro;
            }
            return(url);
        }
示例#19
0
        public static bool Modificar(TipoAmbiente ent)
        {
            var r = 0;

            using (var cn = Conexion.ConexionDBSqlServer())
            {
                SqlCommand cmd = new SqlCommand("SPU_Modificar_TipoAmbiente", cn);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@Id", ent.Id);
                cmd.Parameters.AddWithValue("@Descripcion", ent.Descripcion);
                cmd.Parameters.AddWithValue("@Estado", ent.Estado);
                cn.Open();
                r = cmd.ExecuteNonQuery();
                cn.Close();
            }
            return(r > 0);
        }
示例#20
0
        public FiorilliH(TipoAmbiente tpAmb, string pastaRetorno, string usuario, string senhaWs, string proxyuser, string proxypass, string proxyserver)
            : base(tpAmb, pastaRetorno)
        {
            System.Net.ServicePointManager.Expect100Continue = false;
            UsuarioWs = usuario;
            SenhaWs   = senhaWs;

            if (!String.IsNullOrEmpty(proxyuser))
            {
                System.Net.NetworkCredential credentials = new System.Net.NetworkCredential(proxyuser, proxypass, proxyserver);
                System.Net.WebRequest.DefaultWebProxy.Credentials = credentials;

                service.Proxy             = WebRequest.DefaultWebProxy;
                service.Proxy.Credentials = new NetworkCredential(proxyuser, proxypass);
                service.Credentials       = new NetworkCredential(proxyuser, proxypass);
            }
        }
示例#21
0
        public FISSLEXP(TipoAmbiente tpAmb, string pastaRetorno, string usuario, string senhaWs, string proxyuser, string proxypass, string proxyserver)
            : base(tpAmb, pastaRetorno)
        {
            Ambiente = tpAmb;

            #region Definições de proxy
            if (!String.IsNullOrEmpty(proxyuser))
            {
                ProxyUser   = proxyuser;
                ProxyPass   = proxypass;
                ProxyServer = proxyserver;

                System.Net.NetworkCredential credentials = new System.Net.NetworkCredential(proxyuser, proxypass, proxyserver);
                System.Net.WebRequest.DefaultWebProxy.Credentials = credentials;
            }
            #endregion
        }
示例#22
0
 public static List<TipoAmbiente> Buscar(TipoAmbiente ent)
 {
     var lista = new List<TipoAmbiente>();
     using (var cn = Conexion.ConexionDBSqlServer())
     {
         SqlCommand cmd = new SqlCommand("SPU_BUSCAR_TipoAmbiente", cn);
         cmd.CommandType = CommandType.StoredProcedure;
         cn.Open();
         cmd.Parameters.AddWithValue("@TipoAmbienteDescripcion", ent.Descripcion);
         var r = cmd.ExecuteReader();
         while (r.Read())
         {
             lista.Add(CrearEntidad(r));
         }
         cn.Close();
     }
     return lista;
 }
示例#23
0
        public FiorilliP(TipoAmbiente tpAmb, string pastaRetorno, string usuario, string senhaWs, string proxyuser, string proxypass, string proxyserver, X509Certificate2 certificado)
            : base(tpAmb, pastaRetorno)
        {
            ServicePointManager.Expect100Continue = false;
            UsuarioWs = usuario;
            SenhaWs   = senhaWs;

            Service.ClientCertificates.Add(certificado);

            if (!String.IsNullOrEmpty(proxyuser))
            {
                NetworkCredential credentials = new NetworkCredential(proxyuser, proxypass, proxyserver);
                WebRequest.DefaultWebProxy.Credentials = credentials;

                Service.Proxy             = WebRequest.DefaultWebProxy;
                Service.Proxy.Credentials = new NetworkCredential(proxyuser, proxypass);
                Service.Credentials       = new NetworkCredential(proxyuser, proxypass);
            }
        }
示例#24
0
        public static List <TipoAmbiente> Buscar(TipoAmbiente ent)
        {
            var lista = new List <TipoAmbiente>();

            using (var cn = Conexion.ConexionDBSqlServer())
            {
                SqlCommand cmd = new SqlCommand("SPU_BUSCAR_TipoAmbiente", cn);
                cmd.CommandType = CommandType.StoredProcedure;
                cn.Open();
                cmd.Parameters.AddWithValue("@TipoAmbienteDescripcion", ent.Descripcion);
                var r = cmd.ExecuteReader();
                while (r.Read())
                {
                    lista.Add(CrearEntidad(r));
                }
                cn.Close();
            }
            return(lista);
        }
        public TipoAmbiente BuscarOuCriar(string ambienteNome)
        {
            ambienteNome = ambienteNome.Trim();

            var          tpsAmbientes = _context.TipoAmbiente.Where(x => x.Descricao.Trim().ToLower() == ambienteNome.ToLower()).ToList();
            TipoAmbiente tipoAmbiente;

            if (tpsAmbientes.Count == 0)
            {
                tipoAmbiente = new TipoAmbiente(ambienteNome);
                CriarTipoAmbiente(tipoAmbiente);
            }
            else
            {
                tipoAmbiente = tpsAmbientes.First();
            }

            return(tipoAmbiente);
        }
示例#26
0
        /// <summary>
        ///     Obtém a URL para uso no DANFE da NFCe
        /// </summary>
        public static string ObterUrl(this infNFeSupl infNFeSupl, TipoAmbiente tipoAmbiente, Estado estado, TipoUrlConsultaPublica tipoUrlConsultaPublica, VersaoServico versaoServico, VersaoQrCode versaoQrCode)
        {
            var query = from qr in EndQrCodeNfce
                        where qr.TipoAmbiente == tipoAmbiente && qr.Estado == estado &&
                        qr.TipoUrlConsultaPublica == tipoUrlConsultaPublica && qr.VersaoServico == versaoServico &&
                        qr.VersaoQrCode == versaoQrCode
                        select qr.Url;
            var listaRetorno = query as IList <string> ?? query.ToList();
            var qtdeRetorno  = listaRetorno.Count();

            if (qtdeRetorno == 0)
            {
                throw new Exception(string.Format("Não foi possível obter o {0}, para o Estado {1}, ambiente: {2}", tipoUrlConsultaPublica.Descricao(), estado, tipoAmbiente.Descricao()));
            }
            if (qtdeRetorno > 1)
            {
                throw new Exception("A função ObterUrl obteve mais de um resultado!");
            }
            return(listaRetorno.FirstOrDefault());
        }
示例#27
0
        public ActionResult CadastrarTipoAmbiente(TipoAmbienteViewModel tipoAmbienteViewmodel)
        {
            TipoAmbiente model = null;

            try
            {
                model = TipoAmbienteViewModel.MapToModel(tipoAmbienteViewmodel);
                BL.TipoAmbiente.InserirTipoAmbiente(model);
                TempData["Sucesso"]        = true;
                TempData["SucessoMessage"] = "Cadastro de Tipo de Ambiente realizado com sucesso.";
            }
            catch (Exception ex)
            {
                TempData["Error"]        = true;
                TempData["ErrorMessage"] = (ex.GetType().Name == "CustomException") ? ex.Message : "Erro ao cadastrar Tipo de Ambiente";
                Logging.getInstance().Error(TempData["ErrorMessage"].ToString(), ex);
            }

            return(RedirectToAction("Index"));
        }
        /// <summary>
        /// Salva o XML conforme ambiente "Homologação/Produção"
        /// </summary>
        /// <param name="arquivoNome"></param>
        /// <param name="conteudoXML"></param>
        /// <param name="pastaNFe"></param>
        /// <param name="tpAmb"></param>
        public void SalvarXmlArquivo(string arquivoNome, string conteudoXML, TipoAmbiente tpAmb)
        {
            //string caminho = System.Environment.CurrentDirectory;
            StreamWriter  streamWriter;
            DirectoryInfo di;


            if (tpAmb == TipoAmbiente.Homologacao)
            {
                di = Directory.CreateDirectory(Path.Combine("XmlDestinatarioHom\\"));
            }
            else
            {
                di = Directory.CreateDirectory(Path.Combine("XmlDestinatario\\"));
            }

            streamWriter = File.CreateText(di.FullName + arquivoNome + ".xml");

            streamWriter.Write(conteudoXML.ToString());
            streamWriter.Close();
        }
示例#29
0
文件: ProninP.cs 项目: Klegy/uninfe
        public ProninP(TipoAmbiente tpAmb, string pastaRetorno, string usuarioProxy, string senhaProxy, string domainProxy, X509Certificate certificado)
            : base(tpAmb, pastaRetorno)
        {
            ServiceGeracao.Proxy             = WebRequest.DefaultWebProxy;
            ServiceGeracao.Proxy.Credentials = new NetworkCredential(usuarioProxy, senhaProxy);
            ServiceGeracao.Credentials       = new NetworkCredential(senhaProxy, senhaProxy);
            ServiceGeracao.ClientCertificates.Add(certificado);

            ServiceConsultas.Proxy             = WebRequest.DefaultWebProxy;
            ServiceConsultas.Proxy.Credentials = new NetworkCredential(usuarioProxy, senhaProxy);
            ServiceConsultas.Credentials       = new NetworkCredential(senhaProxy, senhaProxy);
            ServiceConsultas.ClientCertificates.Add(certificado);

            Cabecalho cabecMsg = new Cabecalho();

            cabecMsg.versao      = "1.00";
            cabecMsg.versaoDados = "1.00";

            ServiceGeracao.cabecalho   = cabecMsg;
            ServiceConsultas.cabecalho = cabecMsg;
        }
        public void SalvarPDFArquivo(string arquivoNome, string conteudoXML, TipoAmbiente tpAmb)
        {
            DirectoryInfo di;

            if (tpAmb == TipoAmbiente.Homologacao)
            {
                di = Directory.CreateDirectory(Path.Combine("pdfHom\\"));
            }
            else
            {
                di = Directory.CreateDirectory(Path.Combine("pdf\\"));
            }


            #region Carrega um XML com nfeProc para a variável
            nfeProc proc = null;

            try
            {
                proc = new nfeProc().CarregarDeXmlString(conteudoXML);
            }
            catch //Carregar NFe ainda não transmitida à sefaz, como uma pré-visualização.
            {
                proc = new nfeProc()
                {
                    NFe = new Classes.NFe().CarregarDeXmlString(conteudoXML), protNFe = new protNFe()
                };
            }
            #endregion

            #region Abre a visualização do relatório para impressão
            var danfe = new DanfeFrNfe(proc: proc,
                                       configuracaoDanfeNfe: new ConfiguracaoDanfeNfe(),
                                       desenvolvedor: SoftHouse,
                                       arquivoRelatorio: string.Empty);


            danfe.ExportarPdf(di.FullName + arquivoNome + ".pdf");
            #endregion
        }
示例#31
0
文件: ProninH.cs 项目: Klegy/uninfe
        public ProninH(TipoAmbiente tpAmb, string pastaRetorno, string usuarioProxy, string senhaProxy, string domainProxy, X509Certificate certificado)
            : base(tpAmb, pastaRetorno)
        {
            ServicePointManager.ServerCertificateValidationCallback = MyCertHandler;
            ServiceGeracao.Proxy             = WebRequest.DefaultWebProxy;
            ServiceGeracao.Proxy.Credentials = new NetworkCredential(usuarioProxy, senhaProxy);
            ServiceGeracao.Credentials       = new NetworkCredential(senhaProxy, senhaProxy);
            ServiceGeracao.ClientCertificates.Add(certificado);

            ServiceConsultas.Proxy             = WebRequest.DefaultWebProxy;
            ServiceConsultas.Proxy.Credentials = new NetworkCredential(usuarioProxy, senhaProxy);
            ServiceConsultas.Credentials       = new NetworkCredential(senhaProxy, senhaProxy);
            ServiceConsultas.ClientCertificates.Add(certificado);

            Cabecalho cabecMsg = new Cabecalho();

            cabecMsg.versao      = "2.03";
            cabecMsg.versaoDados = "2.03";

            ServiceGeracao.cabecalho   = cabecMsg;
            ServiceConsultas.cabecalho = cabecMsg;
        }
示例#32
0
        public ELP(TipoAmbiente tpAmb,
                   string pastaRetorno,
                   string usuarioWs,
                   string senhaWs,
                   string usuarioProxy,
                   string senhaProxy,
                   string domainProxy)
            : base(tpAmb, pastaRetorno)
        {
            UsuarioWs    = usuarioWs;
            SenhaWs      = senhaWs;
            UsuarioProxy = usuarioProxy;
            SenhaProxy   = senhaProxy;
            DomainProxy  = domainProxy;

            if (!String.IsNullOrEmpty(UsuarioProxy))
            {
                Credentials = new System.Net.NetworkCredential(UsuarioProxy, SenhaProxy, DomainProxy);
                System.Net.WebRequest.DefaultWebProxy.Credentials = Credentials;
                service.Proxy             = WebRequest.DefaultWebProxy;
                service.Proxy.Credentials = new NetworkCredential(usuarioProxy, senhaProxy);
                service.Credentials       = new NetworkCredential(senhaProxy, senhaProxy);
            }
        }
示例#33
0
文件: ELP.cs 项目: akretion/uninfe
        public ELP(TipoAmbiente tpAmb,
                         string pastaRetorno,
                         string usuarioWs,
                         string senhaWs,
                         string usuarioProxy,
                         string senhaProxy,
                         string domainProxy)
            : base(tpAmb, pastaRetorno)
        {
            UsuarioWs = usuarioWs;
            SenhaWs = senhaWs;
            UsuarioProxy = usuarioProxy;
            SenhaProxy = senhaProxy;
            DomainProxy = domainProxy;

            if (!String.IsNullOrEmpty(UsuarioProxy))
            {
                Credentials = new System.Net.NetworkCredential(UsuarioProxy, SenhaProxy, DomainProxy);
                System.Net.WebRequest.DefaultWebProxy.Credentials = Credentials;
                service.Proxy = WebRequest.DefaultWebProxy;
                service.Proxy.Credentials = new NetworkCredential(usuarioProxy, senhaProxy);
                service.Credentials = new NetworkCredential(senhaProxy, senhaProxy);
            }
        }
示例#34
0
 public static List<TipoAmbiente> Buscar(TipoAmbiente ent)
 {
     return TipoAmbienteAD.Buscar(ent);
 }
示例#35
0
 public EmiteNFSeBase(TipoAmbiente tpAmb, string pastaRetorno)
 {
     this.tpAmb = tpAmb;
     this.PastaRetorno = pastaRetorno;
 }
示例#36
0
 public SigCorpH(TipoAmbiente tpAmb, string pastaRetorno)
     : base(tpAmb, pastaRetorno)
 {
 }
示例#37
0
 public Pronin(TipoAmbiente tpAmb, string pastaRetorno, int codMun, string usuarioProxy, string senhaProxy, string domainProxy, X509Certificate certificado)
     : base(tpAmb, pastaRetorno, codMun, usuarioProxy, senhaProxy, domainProxy, certificado)
 {
 }
示例#38
0
 public BAURU_SPP(TipoAmbiente tpAmb, string pastaRetorno)
     : base(tpAmb, pastaRetorno)
 {
 }
示例#39
0
 public SigCorpBase(TipoAmbiente tpAmb, string pastaRetorno, int codMun)
     : base(tpAmb, pastaRetorno)
 {
     CodigoMun = codMun;
 }
示例#40
0
 public Fiorilli(TipoAmbiente tpAmb, string pastaRetorno, int codMun, string usuario, string senhaWs, string proxyuser, string proxypass, string proxyserver, X509Certificate2 certificado)
     : base(tpAmb, pastaRetorno, codMun, usuario, senhaWs, proxyuser, proxypass, proxyserver, certificado)
 {
 }
示例#41
0
 public Rlz_Informatica(TipoAmbiente tpAmb, string pastaRetorno, int codMun)
     : base(tpAmb, pastaRetorno, codMun)
 { }
示例#42
0
 public SigCorp(TipoAmbiente tpAmb, string pastaRetorno, int codMun)
     : base(tpAmb, pastaRetorno, codMun)
 { }
示例#43
0
文件: TinusH.cs 项目: Klegy/uninfe
 public TinusH(TipoAmbiente tpAmb, string pastaRetorno, string proxyuser, string proxypass, string proxyserver, X509Certificate2 certificado)
     : base(tpAmb, pastaRetorno)
 {
     ServicePointManager.Expect100Continue = false;
     Certificado = certificado;
 }
示例#44
0
 public MGMH(TipoAmbiente tpAmb, string pastaRetorno)
     : base(tpAmb, pastaRetorno)
 {
 }
        /// <summary>
        ///     Obtém a URL para uso no DANFE da NFCe
        /// </summary>
        /// <param name="tipoAmbiente"></param>
        /// <param name="estado"></param>
        /// <param name="tipoUrlDanfeNfce"></param>
        /// <returns></returns>
        public static string ObterUrl(TipoAmbiente tipoAmbiente, Estado estado, TipoUrlDanfeNfce tipoUrlDanfeNfce)
        {
            var query = from qr in EndQrCodeNfce where qr.TipoAmbiente == tipoAmbiente && qr.Estado == estado && qr.TipoUrlDanfeNfce == tipoUrlDanfeNfce select qr.Url;
            var listaRetorno = query as IList<string> ?? query.ToList();
            var qtdeRetorno = listaRetorno.Count();

            if (qtdeRetorno == 0)
                throw new Exception(string.Format("Não foi possível obter o {0}, para o Estado {1}, ambiente: {2}", tipoUrlDanfeNfce.Descricao(), estado, tipoAmbiente.Descricao()));
            if (qtdeRetorno > 1)
                throw new Exception("A função ObterUrl obteve mais de um resultado!");
            return listaRetorno.FirstOrDefault();
        }
示例#46
0
 public Rlz_InformaticaBase(TipoAmbiente tpAmb, string pastaRetorno, int codMun)
     : base(tpAmb, pastaRetorno)
 {
     CodigoMun = codMun;
 }
示例#47
0
 public SimplISS(TipoAmbiente tpAmb, string pastaRetorno, int codMun, string usuario, string senhaWs, string proxyuser, string proxypass, string proxyserver)
     : base(tpAmb, pastaRetorno, codMun, usuario, senhaWs, proxyuser, proxypass, proxyserver)
 {
 }
示例#48
0
 public Rlz_InformaticaBase(TipoAmbiente tpAmb, string pastaRetorno, int codMun)
     : base(tpAmb, pastaRetorno)
 {
     CodigoMun = codMun;
 }
示例#49
0
 public NFeEndereco(NFeTipoServico tipoServico, NFeModelo modelo, string autorizadora, NFeVersao versao, TipoAmbiente ambiente, string url)
 {
     TipoServico  = tipoServico;
     Modelo       = modelo;
     Autorizadora = autorizadora;
     Versao       = versao;
     Ambiente     = ambiente;
     Url          = url;
 }
示例#50
0
 public SystemPro(TipoAmbiente tpAmb, string pastaRetorno, X509Certificate certificate)
     : base(tpAmb, pastaRetorno, certificate)
 { }
示例#51
0
 public SimplISS(TipoAmbiente tpAmb, string pastaRetorno, int codMun, string usuario, string senhaWs, string proxyuser, string proxypass, string proxyserver)
     : base(tpAmb, pastaRetorno, codMun, usuario, senhaWs, proxyuser, proxypass, proxyserver)
 { }
示例#52
0
文件: MGMP.cs 项目: akretion/uninfe
 public MGMP(TipoAmbiente tpAmb, string pastaRetorno, string usuario, string senha)
     : base(tpAmb, pastaRetorno)
 {
     Login = usuario;
     Senha = senha;
 }
示例#53
0
 public MGMP(TipoAmbiente tpAmb, string pastaRetorno, string usuario, string senha)
     : base(tpAmb, pastaRetorno)
 {
     Login = usuario;
     Senha = senha;
 }
示例#54
0
文件: Conam.cs 项目: Klegy/uninfe
 public Conam(TipoAmbiente tpAmb, string pastaRetorno, int codMun, string usuario, string senhaWs)
     : base(tpAmb, pastaRetorno, codMun, usuario, senhaWs)
 {
 }
示例#55
0
 public EmiteNFSeBase(TipoAmbiente tpAmb, string pastaRetorno)
 {
     this.tpAmb        = tpAmb;
     this.PastaRetorno = pastaRetorno;
 }
示例#56
0
 public EloTech(TipoAmbiente tpAmb, string pastaRetorno, int codMun, string usuario, string senhaWs, string proxyuser, string proxypass, string proxyserver, X509Certificate2 certificado)
     : base(tpAmb, pastaRetorno, codMun, usuario, senhaWs, proxyuser, proxypass, proxyserver, certificado)
 { }
示例#57
0
文件: EL.cs 项目: matBatista/uninfe
 public EL(TipoAmbiente tpAmb, string pastaRetorno, int codMun, string usuarioWs, string senhaWs, string usuarioProxy, string senhaProxy, string domainProxy)
     : base(tpAmb, pastaRetorno, codMun, usuarioWs, senhaWs, usuarioProxy, senhaProxy, domainProxy)
 {
 }
示例#58
0
 public SystemPro(TipoAmbiente tpAmb, string pastaRetorno, X509Certificate certificate)
     : base(tpAmb, pastaRetorno, certificate)
 {
 }
示例#59
0
文件: Conam.cs 项目: akretion/uninfe
 public Conam(TipoAmbiente tpAmb, string pastaRetorno, int codMun, string usuario, string senhaWs)
     : base(tpAmb, pastaRetorno, codMun, usuario, senhaWs)
 { }
示例#60
0
 public ConamP(TipoAmbiente tpAmb, string pastaRetorno, string usuario, string senhaWs)
     : base(tpAmb, pastaRetorno)
 {
     UsuarioWs = usuario;
     SenhaWs   = senhaWs;
 }