Beispiel #1
0
        public override void SetKey(BusinessObject businessObject)
        {
            ServicoPendente pend = (ServicoPendente)businessObject;

            empresa    = pend.empresa;
            numeroLote = pend.numeroLote.ToString();
        }
Beispiel #2
0
        protected override void DataReaderToPersistentObject(System.Data.IDataReader dataReader, BusinessObject businessObject, string radical)
        {
            ServicoPendente pend = (ServicoPendente)businessObject;

            pend.BeginInit();
            try
            {
                pend.numeroLote     = Utils.FieldAsInt32(dataReader, "NumeroLote");
                pend.empresa        = Utils.FieldAsString(dataReader, "CNPJ");
                pend.codigoSituacao = (TipoSituacaoServico)Utils.FieldAsInt32(dataReader, "CodigoSituacao");
                pend.dataSituacao   = Utils.FieldAsDateTime(dataReader, "DataSituacao");
                pend.numeroRecibo   = Utils.FieldAsString(dataReader, "NumeroRecibo");
                pend.xmlRecibo      = Utils.FieldAsString(dataReader, "XMLRecibo");
                pend.erroEnvio      = Utils.FieldAsBoolean(dataReader, "erroEnvio");
                pend.xmlRetConsulta = Utils.FieldAsString(dataReader, "xmlRetConsulta");
                pend.tipoAmbiente   = (TAmb)Utils.FieldAsInt32(dataReader, "TipoOperacao");
                pend.tipoEmissao    = (TNFeInfNFeIdeTpEmis)Utils.FieldAsInt32(dataReader, "ModoOperacao");
                pend.UF             = (TCodUfIBGE)Utils.FieldAsInt32(dataReader, "UnidadeFederativa");
                pend.versao         = (VersaoXML)Utils.FieldAsInt32(dataReader, "versao");

                pend.isRecorded = true;
                pend.isModified = false;
            }
            finally
            {
                pend.EndInit();
            }
        }
Beispiel #3
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);
        }
Beispiel #4
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);
        }