예제 #1
0
 public override void CreateParameters(System.Data.IDbCommand cmd)
 {
     if (numeroLote != null)
     {
         DALObject.CreateParameter(cmd, "@NumeroLote", System.Data.DbType.Int32, Convert.ToInt32(numeroLote));
     }
     if (codigoSituacao != null)
     {
         DALObject.CreateParameter(cmd, "@CodigoSituacao", System.Data.DbType.Int32, Convert.ToInt32(codigoSituacao));
     }
     if (numeroRecibo != null)
     {
         DALObject.CreateParameter(cmd, "@NumeroRecibo", System.Data.DbType.String, numeroRecibo);
     }
     if (FilterByDate)
     {
         if (dataInicial.ToShortDateString() != "01/01/0001")
         {
             DALObject.CreateParameter(cmd, "@dataInicial", System.Data.DbType.DateTime, dataInicial);
         }
         if (dataFinal.ToShortDateString() != "01/01/0001")
         {
             DALObject.CreateParameter(cmd, "@dataFinal", System.Data.DbType.DateTime,
                                       dataFinal.AddHours(23).AddMinutes(59).AddSeconds(59).AddMilliseconds(999));
         }
     }
     if (empresa != null)
     {
         DALObject.CreateParameter(cmd, "@CNPJ", System.Data.DbType.String, empresa);
     }
 }
예제 #2
0
        protected override void CreateKeyParameters(BusinessObject businessObject, System.Data.IDbCommand cmd)
        {
            ServicoPendente pend = (ServicoPendente)businessObject;

            DALObject.CreateParameter(cmd, "@CNPJ", System.Data.DbType.String, pend.empresa);
            DALObject.CreateParameter(cmd, "@NumeroLote", System.Data.DbType.Int32, pend.numeroLote);
        }
예제 #3
0
 public override void CreateParameters(System.Data.IDbCommand cmd)
 {
     if (empresa != null)
     {
         DALObject.CreateParameter(cmd, "@CNPJ", System.Data.DbType.String, empresa);
     }
 }
예제 #4
0
        public override void CreateParameters(System.Data.IDbCommand cmd)
        {
            if (id != null)
            {
                DALObject.CreateParameter(cmd, "@ID", System.Data.DbType.String, id);
            }
            if (numeroLote != null)
            {
                DALObject.CreateParameter(cmd, "@NumeroLote", System.Data.DbType.String, numeroLote);
            }
            if (chaveNota != null)
            {
                DALObject.CreateParameter(cmd, "@ChaveNota", System.Data.DbType.String, chaveNota);
            }
            if (empresa != null)
            {
                DALObject.CreateParameter(cmd, "@CNPJ", System.Data.DbType.String, empresa);
            }

            if (FilterByDate)
            {
                if (dataInicial.ToShortDateString() != "01/01/0001")
                {
                    DALObject.CreateParameter(cmd, "@dataInicial", System.Data.DbType.DateTime, dataInicial);
                }
                if (dataFinal.ToShortDateString() != "01/01/0001")
                {
                    DALObject.CreateParameter(cmd, "@dataFinal", System.Data.DbType.DateTime,
                                              dataFinal.AddHours(23).AddMinutes(59).AddSeconds(59).AddMilliseconds(999));
                }
            }
        }
예제 #5
0
        protected override void CreateUpdateParameters(BusinessObject businessObject, System.Data.IDbCommand cmd)
        {
            Parametro param = (Parametro)businessObject;

            CreateKeyParameters(businessObject, cmd);
            DALObject.CreateParameter(cmd, "@TipoOperacao", System.Data.DbType.Int32, param.tipoAmbiente);
            DALObject.CreateParameter(cmd, "@ModoOperacao", System.Data.DbType.Int32, param.tipoEmissao);
            DALObject.CreateParameter(cmd, "@UnidadeFederativa", System.Data.DbType.Int32, param.UF);

            DALObject.CreateParameter(cmd, "@QtdeNFLote", System.Data.DbType.Int32, param.qtdeNotasPorLotes);
            DALObject.CreateParameter(cmd, "@TempoFechaLote", System.Data.DbType.Int32, param.tempoParaLote);
            DALObject.CreateParameter(cmd, "@TamanhoLote", System.Data.DbType.Int32, param.tamMaximoLoteKB);

            DALObject.CreateParameter(cmd, "@DiretorioRecibo", System.Data.DbType.String, param.pastaRecibo);
            DALObject.CreateParameter(cmd, "@DiretorioEntrada", System.Data.DbType.String, param.pastaEntrada);
            DALObject.CreateParameter(cmd, "@DiretorioSaida", System.Data.DbType.String, param.pastaSaida);
            DALObject.CreateParameter(cmd, "@DiretorioImpressao", System.Data.DbType.String, param.pastaImpressao);
            DALObject.CreateParameter(cmd, "@DiretorioXSD", System.Data.DbType.String, param.pastaXSD);

            DALObject.CreateParameter(cmd, "@UsaProxy", System.Data.DbType.Boolean, param.prx);
            DALObject.CreateParameter(cmd, "@DominioProxy", System.Data.DbType.String, param.prxDmn);
            DALObject.CreateParameter(cmd, "@SenhaProxy", System.Data.DbType.String, param.prxPsw);
            DALObject.CreateParameter(cmd, "@UrlProxy", System.Data.DbType.String, param.prxUrl);
            DALObject.CreateParameter(cmd, "@UsuarioProxy", System.Data.DbType.String, param.prxUsr);

            DALObject.CreateParameter(cmd, "@TimeOut", System.Data.DbType.Int32, param.timeout);
            DALObject.CreateParameter(cmd, "@NomeCertificado", System.Data.DbType.String, param.certificado);
            DALObject.CreateParameter(cmd, "@WService", System.Data.DbType.Boolean, param.usaWService);
            DALObject.CreateParameter(cmd, "@versao", System.Data.DbType.Int32, param.versao);
        }
예제 #6
0
        protected override void CreateKeyParameters(BusinessObject businessObject, System.Data.IDbCommand cmd)
        {
            NotaInutilizada nota = (NotaInutilizada)businessObject;

            DALObject.CreateParameter(cmd, "@CNPJ", System.Data.DbType.String, nota.empresa);
            DALObject.CreateParameter(cmd, "@NumeroNota", System.Data.DbType.String, nota.numeroNota);
            DALObject.CreateParameter(cmd, "@SerieNota", System.Data.DbType.String, nota.serieNota);
        }
예제 #7
0
        protected override void CreateKeyParameters(BusinessObject businessObject, System.Data.IDbCommand cmd)
        {
            NotaFiscal nota = (NotaFiscal)businessObject;

            DALObject.CreateParameter(cmd, "@CNPJ", System.Data.DbType.String, nota.empresa);
            DALObject.CreateParameter(cmd, "@ChaveNota", System.Data.DbType.String, nota.chaveNota);
            DALObject.CreateParameter(cmd, "@NumeroLote", System.Data.DbType.Int32, nota.numeroLote);
        }
예제 #8
0
        protected override void CreateKeyParameters(BusinessObject businessObject, System.Data.IDbCommand cmd)
        {
            Evento oEvento = (Evento)businessObject;

            DALObject.CreateParameter(cmd, "@CNPJ", System.Data.DbType.String, oEvento.empresa);
            DALObject.CreateParameter(cmd, "@ChaveNota", System.Data.DbType.String, oEvento.chaveNota);
            DALObject.CreateParameter(cmd, "@NumeroLote", System.Data.DbType.Int32, oEvento.numeroLote);
            DALObject.CreateParameter(cmd, "@ID", System.Data.DbType.Int32, oEvento.id);
        }
예제 #9
0
        protected override void CreateInsertParameters(BusinessObject businessObject, System.Data.IDbCommand cmd)
        {
            NotaInutilizada nota = (NotaInutilizada)businessObject;

            CreateKeyParameters(businessObject, cmd);
            DALObject.CreateParameter(cmd, "@Data", System.Data.DbType.DateTime, nota.data);
            DALObject.CreateParameter(cmd, "@XMLResposta", System.Data.DbType.String, nota.XMLResposta);
            DALObject.CreateParameter(cmd, "@XMLPedido", System.Data.DbType.String, nota.XMLPedido);
        }
예제 #10
0
        protected override void CreateUpdateParameters(BusinessObject businessObject, System.Data.IDbCommand cmd)
        {
            Evento oEvento = (Evento)businessObject;

            CreateKeyParameters(businessObject, cmd);
            DALObject.CreateParameter(cmd, "@situacao", System.Data.DbType.Int32, oEvento.codigoSituacao);
            DALObject.CreateParameter(cmd, "@tpEvento", System.Data.DbType.Int32, oEvento.tpEvento);
            DALObject.CreateParameter(cmd, "@xmlProcesso", System.Data.DbType.String, oEvento.XMLResposta);
            DALObject.CreateParameter(cmd, "@XMLPedido", System.Data.DbType.String, oEvento.XMLPedido);
        }
예제 #11
0
        protected override void CreateInsertParameters(BusinessObject businessObject, System.Data.IDbCommand cmd)
        {
            Log oLog = (Log)businessObject;

            CreateKeyParameters(businessObject, cmd);
            DALObject.CreateParameter(cmd, "@CodigoSituacao", System.Data.DbType.Int32, oLog.codigoSituacao);
            DALObject.CreateParameter(cmd, "@DataLog", System.Data.DbType.DateTime, oLog.data);
            DALObject.CreateParameter(cmd, "@DescricaoSituacao", System.Data.DbType.String, oLog.descricaoSituacao);
            DALObject.CreateParameter(cmd, "@CNPJ", System.Data.DbType.String, oLog.empresa);
            DALObject.CreateParameter(cmd, "@ChaveNota", System.Data.DbType.String, oLog.chaveNota);
        }
예제 #12
0
        protected override void CreateUpdateParameters(BusinessObject businessObject, System.Data.IDbCommand cmd)
        {
            ServicoPendente pend = (ServicoPendente)businessObject;

            CreateKeyParameters(businessObject, cmd);
            DALObject.CreateParameter(cmd, "@CodigoSituacao", System.Data.DbType.Int32, pend.codigoSituacao);
            DALObject.CreateParameter(cmd, "@DataSituacao", System.Data.DbType.DateTime, pend.dataSituacao);
            DALObject.CreateParameter(cmd, "@NumeroRecibo", System.Data.DbType.String, pend.numeroRecibo);
            DALObject.CreateParameter(cmd, "@XMLRecibo", System.Data.DbType.String, pend.xmlRecibo);
            DALObject.CreateParameter(cmd, "@erroEnvio", System.Data.DbType.Boolean, pend.erroEnvio);
            DALObject.CreateParameter(cmd, "@xmlRetConsulta", System.Data.DbType.String, pend.xmlRetConsulta);

            DALObject.CreateParameter(cmd, "@TipoOperacao", System.Data.DbType.Int32, pend.tipoAmbiente);
            DALObject.CreateParameter(cmd, "@ModoOperacao", System.Data.DbType.Int32, pend.tipoEmissao);

            DALObject.CreateParameter(cmd, "@UnidadeFederativa", System.Data.DbType.Int32, pend.UF);
            DALObject.CreateParameter(cmd, "@versao", System.Data.DbType.Int32, pend.versao);
        }
예제 #13
0
        protected override void CreateUpdateParameters(BusinessObject businessObject, System.Data.IDbCommand cmd)
        {
            NotaFiscal nota = (NotaFiscal)businessObject;

            CreateKeyParameters(businessObject, cmd);
            DALObject.CreateParameter(cmd, "@CodigoSituacao", System.Data.DbType.Int32, nota.codigoSituacao);
            DALObject.CreateParameter(cmd, "@DescricaoSituacao", System.Data.DbType.String, nota.descricaoSituacao);
            DALObject.CreateParameter(cmd, "@DataSituacao", System.Data.DbType.DateTime, nota.dataSituacao);
            DALObject.CreateParameter(cmd, "@XMLNotaFiscal", System.Data.DbType.String, nota.xmlNota);
            DALObject.CreateParameter(cmd, "@XMLProcesso", System.Data.DbType.String, nota.xmlProcesso);
            DALObject.CreateParameter(cmd, "@cStat", System.Data.DbType.String, nota.cStat);
            DALObject.CreateParameter(cmd, "@xMotivo", System.Data.DbType.String, nota.xMotivo);
            DALObject.CreateParameter(cmd, "@nProt", System.Data.DbType.String, nota.nProt);
            DALObject.CreateParameter(cmd, "@xmlPedidoCancelamento", System.Data.DbType.String, nota.xmlPedidoCancelamento);
            DALObject.CreateParameter(cmd, "@xmlProcessoCancelamento", System.Data.DbType.String, nota.xmlProcessoCancelamento);
            DALObject.CreateParameter(cmd, "@nProtCancelamento", System.Data.DbType.String, nota.nProtCancelamento);
            DALObject.CreateParameter(cmd, "@versao", System.Data.DbType.Int32, nota.versao);
        }
예제 #14
0
        public bool ValidateUser(string username, string password)
        {
            this.DALConnection = new DALUsuario();

            CUsuario usuario = new CUsuario();

            usuario.Usuario    = username;
            usuario.Contrasena = password;

            usuario = ((this.DALConnection as DALUsuario).Read(usuario) as CUsuario);

            if (usuario != null)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #15
0
        protected override void CreateKeyParameters(BusinessObject businessObject, System.Data.IDbCommand cmd)
        {
            Parametro param = (Parametro)businessObject;

            DALObject.CreateParameter(cmd, "@CNPJ", System.Data.DbType.String, param.empresa);
        }
예제 #16
0
        protected override void CreateKeyParameters(BusinessObject businessObject, System.Data.IDbCommand cmd)
        {
            Log oLog = (Log)businessObject;

            DALObject.CreateParameter(cmd, "@NumeroLog", System.Data.DbType.Int32, oLog.numero);
        }