public void UpdateNfTpEmisVersaoNFe(string tpEmis, string conting, string versao, string nrlote, string notafiscal, string loja, string serie, int CodFornec, NotaFiscal TipoNF) { if (TipoNF == NotaFiscal.Saida) { if (string.IsNullOrEmpty(conting)) { BancoDados.InsertAlterarExcluir(" UPDATE NfSaida \n" + " SET tpEmis= " + tpEmis + ", cdConting= NULL, NrVersaoNFe = '" + versao + "' \n" + " WHERE (NrLote = " + nrlote + ") AND (NrNf = " + notafiscal + ") AND (id_loja = " + loja + ") AND (serienf = '" + serie + "')"); } else { BancoDados.InsertAlterarExcluir(" UPDATE NfSaida \n" + " SET tpEmis= " + tpEmis + ", cdConting= " + conting + ", NrVersaoNFe = '" + versao + "' \n" + " WHERE (NrLote = " + nrlote + ") AND (NrNf = " + notafiscal + ") AND (id_loja = " + loja + ") AND (serienf = '" + serie + "')"); } } else { if (string.IsNullOrEmpty(conting)) { BancoDados.InsertAlterarExcluir(" UPDATE NfEntrada \n" + " SET tpEmis= " + tpEmis + ", cdConting= NULL, NrVersaoNFe = '" + versao + "' \n" + " WHERE (NrLote = " + nrlote + ") AND (NrNf = " + notafiscal + ") AND (id_loja = " + loja + ") AND (serienf = '" + serie + "') AND (CdFornec = " + CodFornec + ")"); } else { BancoDados.InsertAlterarExcluir(" UPDATE NfEntrada \n" + " SET tpEmis= " + tpEmis + ", cdConting= " + conting + ", NrVersaoNFe = '" + versao + "' \n" + " WHERE (NrLote = " + nrlote + ") AND (NrNf = " + notafiscal + ") AND (id_loja = " + loja + ") AND (serienf = '" + serie + "') AND (CdFornec = " + CodFornec + ")"); } } }
public void AtualizaRetornoNfeSaida(string Retorno, string ProtAutoriz, int loja, string ChAcesso, NotaFiscal TipoNf) { if (TipoNf == NotaFiscal.Saida) { if (string.IsNullOrEmpty(ProtAutoriz)) { BancoDados.InsertAlterarExcluir(" UPDATE NfSaida SET CdRetorno = " + Retorno + ", NrProtocoloAutorizNfe = NULL \n" + " WHERE id_loja = " + loja + " AND TxChAcessoNfe = '" + ChAcesso.Trim() + "'"); } else { BancoDados.InsertAlterarExcluir(" UPDATE NfSaida SET CdRetorno = " + Retorno + ", NrProtocoloAutorizNfe = " + ProtAutoriz + " \n" + " WHERE id_loja = " + loja + " AND TxChAcessoNfe = '" + ChAcesso.Trim() + "'"); } } else { if (string.IsNullOrEmpty(ProtAutoriz)) { BancoDados.InsertAlterarExcluir(" UPDATE NfEntrada SET CdRetorno = " + Retorno + ", NrProtocoloAutorizNfe = NULL \n" + " WHERE id_loja = " + loja + " AND TxChAcessoNfe = '" + ChAcesso.Trim() + "'"); } else { BancoDados.InsertAlterarExcluir(" UPDATE NfEntrada SET CdRetorno = " + Retorno + ", NrProtocoloAutorizNfe = " + ProtAutoriz.Trim() + " \n" + " WHERE id_loja = " + loja + " AND TxChAcessoNfe = '" + ChAcesso.Trim() + "'"); } } }
public bool ItemLoteNfe(string Retorno, string ChAcesso, string XmlProtNFe) { BancoDados.InsertAlterarExcluir(" UPDATE ItemLoteNFe \n" + " SET CdRetorno = " + Retorno + ", xmlprotNFe = '" + XmlProtNFe + "'\n" + " WHERE TxChAcessoNfe = '" + ChAcesso + "' "); return(true); }
public bool LoteProcessado(string Retorno, DateTime DtProcessamento, string Recibo) { BancoDados.InsertAlterarExcluir(" UPDATE LoteNFe " + " SET StLote = 'P', CdRetorno =" + Retorno + ", DtResultProcSefaz = '" + string.Format("{0:dd/MM/yyyy HH:mm:ss}", DtProcessamento) + "' " + " WHERE (NrRecibo = '" + Recibo + "')"); return(true); }
public void UpdateManifestacao(int idManifestacao, int codretorno, string ProtReb, DateTime dhRegEvento) { BancoDados.InsertAlterarExcluir(" UPDATE ItemManifestacao " + " SET codretorno =" + codretorno + "," + " dtregmanifestacao = '" + string.Format("{0:dd/MM/yyyy HH:mm:ss}", dhRegEvento) + "'," + " nprot = '" + ProtReb + "'" + " WHERE id =" + idManifestacao); }
/// <summary> /// Update da chave de acesso e codigo da nfe /// </summary> /// <param name="NotaFiscal"></param> /// <param name="Serie"></param> /// <param name="Loja"></param> /// <param name="fornecedor"></param> /// <param name="ChAcessoNfe"></param> /// <param name="CodigoNFe"> E o código randomico gerado</param> /// <returns></returns> public bool UpdateChavedeAcessocNfe(int NotaFiscal, string Serie, int Loja, int fornecedor, string ChAcessoNfe, string CodigoNFe) { if (fornecedor == 0) { BancoDados.InsertAlterarExcluir("UPDATE NfSaida SET TxChAcessoNfe='" + ChAcessoNfe + "', CNf = " + CodigoNFe + " WHERE NrNf =" + NotaFiscal + " AND SerieNf = '" + Serie.Trim() + "' AND id_Loja = " + Loja); } else { BancoDados.InsertAlterarExcluir("UPDATE NfEntrada SET TxChAcessoNfe='" + ChAcessoNfe + "', CNf = " + CodigoNFe + " WHERE NrNf =" + NotaFiscal + " AND SerieNf = '" + Serie.Trim() + "' AND id_Loja = " + Loja + " AND CdFornec = " + fornecedor); } return(true); }
public void UpdateNfErro(int retorno, int loja, string Serie, int notafiscal, int CodFornec, NotaFiscal TipoNF) { if (TipoNF == NotaFiscal.Saida) { BancoDados.InsertAlterarExcluir(" UPDATE NfSaida \n" + " SET CdRetorno = " + retorno + " \n" + " WHERE (id_loja = " + loja + ") AND (SerieNf = '" + Serie + "') AND (NrNf = " + notafiscal + ")"); } else { BancoDados.InsertAlterarExcluir(" UPDATE NfEntrada \n" + " SET CdRetorno = " + retorno + " \n" + " WHERE (id_loja = " + loja + ") AND (serienf = '" + Serie + "') AND (NrNf = " + notafiscal + ") AND CdFornec = " + CodFornec); } }
public void UpdateNfRetorno(int retorno, string ProtAutoriz, int loja, string ChAcessoNfe, NotaFiscal TipoNF) { if (TipoNF == NotaFiscal.Saida) { BancoDados.InsertAlterarExcluir(" UPDATE NfSaida \n" + " SET CdRetorno = " + retorno + " \n" + " WHERE (id_loja = " + loja + ") AND (TxChAcessoNFe = '" + ChAcessoNfe + "')"); } else { BancoDados.InsertAlterarExcluir(" UPDATE NfEntrada \n" + " SET CdRetorno = " + retorno + " \n" + " WHERE (id_loja = " + loja + ") AND (TxChAcessoNFe = '" + ChAcessoNfe + "')"); } }
public bool EmailNaoEnviados(int Loja, int NotaFiscal, string SerieNf) { BancoDados.InsertAlterarExcluir(" INSERT INTO NFEmailSemEnvio VALUES (" + Loja + "," + NotaFiscal + ",'" + SerieNf + "')"); return(true); }
public bool UpdateLoteNFe(int Loja, int nrlote) { BancoDados.InsertAlterarExcluir("UPDATE LoteNFe SET CdRetorno=103 WHERE id_loja =" + Loja + " AND NrLote =" + nrlote + ""); return(true); }
public bool AtualizarEnvioXmlCliente(string ChAcessoNFe, int Loja, bool FlXmlEnviado) { BancoDados.InsertAlterarExcluir(" UPDATE ItemLoteNFe SET FlXmlEnviado='" + FlXmlEnviado + "'\n" + " WHERE id_loja =" + Loja + " AND TxChAcessoNfe = '" + ChAcessoNFe + "'"); return(true); }
public bool Salvar(Entidade_Status ObjDados) { BancoDados.InsertAlterarExcluir("INSERT INTO StatusServNFe(tpambiente,status, dtstatus,uf) values(" + ObjDados.tpAmbiente + "," + ObjDados.cStatus + ",'" + string.Format("{0:dd/MM/yyyy HH:mm:ss}", DateTime.Now) + "','" + ObjDados.Uf + "')"); return(true); }
public bool IncluirXmlCliente(string ChAcessoNFe, int Loja, string XmlCliente) { BancoDados.InsertAlterarExcluir(" UPDATE ItemLoteNFe SET XmlCliente='" + XmlCliente + "'\n" + " WHERE id_loja =" + Loja + " AND TxChAcessoNfe = '" + ChAcessoNFe + "'"); return(true); }
public void UpdateLoteRecebidos(string StatusLote, DateTime RecSefaz, string NrTempoProcSefaz, string NumeroRecibo, string Retorno, string NrLote, int Loja) { BancoDados.InsertAlterarExcluir(" UPDATE LoteNFe \n" + " SET NrRecibo = '" + NumeroRecibo.Trim() + "', StLote = '" + StatusLote.Trim() + "', CdRetorno= " + Retorno + ", DtRecSefaz = '" + string.Format("{0:dd/MM/yyyy HH:mm:ss}", RecSefaz) + "', NrTempoProcSefaz = '" + NrTempoProcSefaz.Trim() + "' \n" + " WHERE (NrLote = " + NrLote + ") AND (id_loja = " + Loja + ")"); }
public bool UpdateRetornoCCeConsSit(int NrSeqLote, int CdRetorno, string ChAcessoNFe) { BancoDados.InsertAlterarExcluir("UPDATE ItemCCe SET CdRetorno=" + CdRetorno + " WHERE NrSeqEnvio =" + NrSeqLote + " AND TxChAcessoNFe = '" + ChAcessoNFe.Trim() + "'"); return(true); }
public bool UpdateRetornoCCe(int Id_Lote_CCe, int CdRetorno, string ChAcessoNFe) { BancoDados.InsertAlterarExcluir("UPDATE ItemCCe SET CdRetorno=" + CdRetorno + " WHERE id_cce_lote =" + Id_Lote_CCe + " AND TxChAcessoNFe = '" + ChAcessoNFe.Trim() + "'"); return(true); }
public bool Salvar(Entidade_Inutilizacao ObjDados) { BancoDados.InsertAlterarExcluir("UPDATE InutilizacaoNFe Set CdRetorno=" + ObjDados.CdRetorno + ",TxChAcessoInutilizNfe='" + ObjDados.ChaveAcessoNfe + "' WHERE numero_ini = " + ObjDados.NrIni + " AND numero_fim = " + ObjDados.NrFim + " AND id_loja = " + ObjDados.Loja); return(true); }
public void UpdateXmlTpSaida(int loja, int nf, string serienf, int lote, string tpemis, string xml, int Fornecedor = 0) { BancoDados.InsertAlterarExcluir(" UPDATE ItemLoteNFe \n" + " SET xmlNFe = '" + xml + "', tpEmis = " + tpemis + " \n" + " WHERE (id_loja = " + loja + ") AND (serienf = '" + serienf + "') AND (NrNf = " + nf + ") AND (NrLote = " + lote + ")" + (Fornecedor == 0 ? " " : " AND CdFornec = " + Fornecedor)); }
public void UpdateLoteErro(int retorno, int loja, string Serie, int notafiscal, int Fornecedor = 0) { BancoDados.InsertAlterarExcluir(" UPDATE ItemLoteNFe \n" + " SET CdRetorno = " + retorno + " \n" + " WHERE (id_loja = " + loja + ") AND (serienf = '" + Serie + "') AND (NrNf = " + notafiscal + ")" + (Fornecedor == 0 ? " " : " AND CdFornec = " + Fornecedor)); }
public void UpdateChAcessoItemLote(int loja, int nf, string serienf, int lote, string chAcessoNfe) { BancoDados.InsertAlterarExcluir(" UPDATE ItemLoteNFe \n" + " SET TxChAcessoNfe = '" + chAcessoNfe + "' \n" + " WHERE (NrNf = " + nf + ") AND (serienf = '" + serienf + "') AND (id_loja = " + loja + ") AND (NrLote = " + lote + ")"); }
public void InsertErroLog(string DescErro) { BancoDados.InsertAlterarExcluir(" INSERT INTO LogNfe (DtOcor, TxOcor) \n" + " VALUES (now()::timestamp,'" + DescErro + "')"); }
public bool UpdateRetornoCCe(int Id_Lote_CCe, string ChAcessoNFe, int CdRetorno, DateTime DtAprov) { BancoDados.InsertAlterarExcluir("UPDATE ItemCCe SET CdRetorno=" + CdRetorno + ", Dt_Aprovacao = '" + string.Format("{0:MM/dd/yyyy hh:mm:ss}", DtAprov) + "' WHERE id_cce_lote =" + Id_Lote_CCe + " AND TxChAcessoNFe = '" + ChAcessoNFe.Trim() + "'"); return(true); }