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); } }
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); }
public override void CreateParameters(System.Data.IDbCommand cmd) { if (empresa != null) { DALObject.CreateParameter(cmd, "@CNPJ", System.Data.DbType.String, empresa); } }
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)); } } }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); } }
protected override void CreateKeyParameters(BusinessObject businessObject, System.Data.IDbCommand cmd) { Parametro param = (Parametro)businessObject; DALObject.CreateParameter(cmd, "@CNPJ", System.Data.DbType.String, param.empresa); }
protected override void CreateKeyParameters(BusinessObject businessObject, System.Data.IDbCommand cmd) { Log oLog = (Log)businessObject; DALObject.CreateParameter(cmd, "@NumeroLog", System.Data.DbType.Int32, oLog.numero); }