Esempio n. 1
0
        /// <summary>
        /// Sybase internal use only.
        /// <summary>
        public void RbsReplayInternal(YPF.Comercial.RRCC.SUP.Interaccion entity)
        {
            YPF.Comercial.RRCC.SUP.intrnl.OperationReplay _replay = new YPF.Comercial.RRCC.SUP.intrnl.OperationReplay();
            _replay.RemoteId  = (".");
            _replay.Component = ("CRMMobileDesa.Interaccion_rs");
            _replay.EntityKey = (entity.KeyToString());
            _replay.Operation = (entity.LastOperation);
            bool _includeBig = !("delete").Equals(_replay.Operation);

            com.sybase.afx.json.JsonObject _parameters = new com.sybase.afx.json.JsonObject();
            _parameters.Put("entity", YPF.Comercial.RRCC.SUP.Interaccion.__toJSON(entity, _includeBig));
            //_replay.Parameters =(_parameters.ToString());
            //lock(typeof(YPF.Comercial.RRCC.SUP.CRMMobileDesaDB))
            //{
            Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBWriteConnection();
            Sybase.Persistence.LocalTransaction  _tran = null;
            try
            {
                _tran = _conn.BeginTransaction();

                com.sybase.afx.json.JsonObject _json = new com.sybase.afx.json.JsonObject();
                _replay.Attributes = (_json.ToString());
                _replay.Save();
                _replay.SaveParameter(_parameters);
                _tran.Commit();
            }
            catch (Sybase.Persistence.PersistenceException pe)
            {
                _tran.Rollback();
                throw pe;
            }
            catch (System.ApplicationException e)
            {
                _tran.Rollback();
                throw e;
            }
            //}
        }
Esempio n. 2
0
 /// <summary>
 /// copy the MBO attributes to current MBO
 /// </summary>
 public void CopyAll(YPF.Comercial.RRCC.SUP.FormularioTransporte entity)
 {
     this._isNew = entity._isNew;
     this.__idInteraccion = entity.__idInteraccion;
     this.__flota = entity.__flota;
     this.__empresasCliente = entity.__empresasCliente;
     this.__recorrido = entity.__recorrido;
     this.__SYMA = entity.__SYMA;
     this.__RAZ_SOC_2 = entity.__RAZ_SOC_2;
     this.__interaccion = entity.__interaccion;
     this.__interaccionValid = entity.__interaccionValid;
     this.__pending = entity.__pending;
     this.__pendingChange = entity.__pendingChange;
     this.__replayPending = entity.__replayPending;
     this.__replayFailure = entity.__replayFailure;
     this.__interaccionFK = entity.__interaccionFK;
     this.__surrogateKey = entity.SurrogateKey;
     this.__replayCounter = entity.__replayCounter;
     this.__disableSubmit = entity.__disableSubmit;
 }
Esempio n. 3
0
 /// <summary>
 /// copy the MBO attributes to current MBO
 /// </summary>
 public void CopyAll(YPF.Comercial.RRCC.SUP.FormularioPrecios entity)
 {
     this._isNew = entity._isNew;
     this.__idInteraccion = entity.__idInteraccion;
     this.__formularioPreciosZonaInspeccion_CodigoSAP = entity.__formularioPreciosZonaInspeccion_CodigoSAP;
     this.__zonaPrecios = entity.__zonaPrecios;
     this.__cluster = entity.__cluster;
     this.__formularioPreciosRed_CodigoSAP = entity.__formularioPreciosRed_CodigoSAP;
     this.__APIES = entity.__APIES;
     this.__formularioPreciosMercado_CodigoSAP = entity.__formularioPreciosMercado_CodigoSAP;
     this.__submercado = entity.__submercado;
     this.__tasaServicio = entity.__tasaServicio;
     this.__observacionesTasaServicio = entity.__observacionesTasaServicio;
     this.__tasaIncluida = entity.__tasaIncluida;
     this.__estrategica = entity.__estrategica;
     this.__camara = entity.__camara;
     this.__programaFidelizacion = entity.__programaFidelizacion;
     this.__otrosNegocios = entity.__otrosNegocios;
     this.__mediosPago = entity.__mediosPago;
     this.__interaccion = entity.__interaccion;
     this.__interaccionValid = entity.__interaccionValid;
     this.__pending = entity.__pending;
     this.__pendingChange = entity.__pendingChange;
     this.__replayPending = entity.__replayPending;
     this.__replayFailure = entity.__replayFailure;
     this.__interaccionFK = entity.__interaccionFK;
     this.__surrogateKey = entity.SurrogateKey;
     this.__replayCounter = entity.__replayCounter;
     this.__disableSubmit = entity.__disableSubmit;
 }
 /// <summary>
 /// copy the MBO attributes to current MBO
 /// </summary>
 public void CopyAll(YPF.Comercial.RRCC.SUP.RelevamientoTransporte entity)
 {
     this._isNew = entity._isNew;
     this.__idInteraccion = entity.__idInteraccion;
     this.__interaccion_nroOperacionSAP = entity.__interaccion_nroOperacionSAP;
     this.__relevamientoTransporteCompetidor_CodigoSAP = entity.__relevamientoTransporteCompetidor_CodigoSAP;
     this.__relevamientoTransporteProducto_CodigoSAP = entity.__relevamientoTransporteProducto_CodigoSAP;
     this.__volumen = entity.__volumen;
     this.__volumenDireccionEntrega = entity.__volumenDireccionEntrega;
     this.__interaccion = entity.__interaccion;
     this.__interaccionValid = entity.__interaccionValid;
     this.__pending = entity.__pending;
     this.__pendingChange = entity.__pendingChange;
     this.__replayPending = entity.__replayPending;
     this.__replayFailure = entity.__replayFailure;
     this.__interaccionFK = entity.__interaccionFK;
     this.__surrogateKey = entity.SurrogateKey;
     this.__replayCounter = entity.__replayCounter;
     this.__disableSubmit = entity.__disableSubmit;
 }
Esempio n. 5
0
 internal static YPF.Comercial.RRCC.SUP.Interaccion FromJSON(object _json)
 {
     if (_json == null)
     {
         return null;
     }
     else
     {
         YPF.Comercial.RRCC.SUP.Interaccion _obj = new YPF.Comercial.RRCC.SUP.Interaccion();
         _obj._fromJSON((com.sybase.afx.json.JsonObject)_json);
         return _obj;
     }
 }
Esempio n. 6
0
 /// <summary>
 /// Find a List of YPF.Comercial.RRCC.SUP.Interaccion
 /// </summary>
 /// <exception cref="PersistentException">Thrown if unable to retrieve mobile business object.</exception>
 /// <remarks> </remarks>
 public static Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.Interaccion> GetPendingObjects(char pendingChange, int skip, int take)
 {
         skip = skip + 1;
     Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.Interaccion> result_2 = new Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.Interaccion>();
     System.Data.IDataReader rs_4 = null;
     int count_5 = 0;
     Sybase.Persistence.ConnectionWrapper _conn = null;
     try
     {
         _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection();
         string _selectSQL = " x.\"a\",x.\"b\",x.\"c\",x.\"d\",x.\"e\",x.\"f\",x.\"g\",x.\"h\",x.\"i\",x.\"j\",x.\"l\",x.\"m\",x.\"n\",x.\"o\",x.\"p\",x.\"q\",x.\"r\",x.\"s\",x.\"t\",x.\"u\",x.\"v\",x.\"w\",x.\"x\",x.\"y\",x.\"z\",x.\"ba\",x.\"bb\",x.\"bc\",x.\"bd\",x.\"be\",x.\"bf\",x.\"bg\",x.\"bh\",x.\"bi\",x.\"bj\",x.\"bl\",x.\"bm\",x.\"bn\",x.\"bo\",x.\"bp\",x.\"bq\",x.\"br\","
                                 + "x.\"pending\",x.\"_pc\",x.\"_rp\",x.\"_rf\",x.\"bs\",x.\"_rc\",x.\"_ds\" from \"crmmobiledesa_1_0_interaccion\" x where x.\"_pc\" = ?";
         _selectSQL = "select top " + take + " start at " + skip + " " + _selectSQL;
         System.Data.IDbCommand ps_3 = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, _selectSQL);
         com.sybase.afx.db.CommandUtil.SetChar(_conn.GetConnectionProfile(), ps_3, "pendingChange", pendingChange);
         rs_4 = ps_3.ExecuteReader();
         Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile();
         while (com.sybase.afx.db.ReaderUtil.Read(profile, rs_4))
         {       
             YPF.Comercial.RRCC.SUP.Interaccion entity_6 = new YPF.Comercial.RRCC.SUP.Interaccion();
             entity_6.Bind(profile, rs_4);
             count_5++;
             result_2.Add(entity_6);
         }
         if (rs_4 != null) com.sybase.afx.db.ReaderUtil.Close(profile, rs_4, count_5);
         if (ps_3 != null) ps_3.Dispose();
         _selectSQL = null;
     }
     catch (System.Data.DataException ex)
     {
         throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex);
     }
     finally
     {
         YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
     } 
     return result_2; 
   
 }
 /// <summary>
 /// Clear the reference of relationships in memory.
 /// </summary>
 public void ClearRelationshipObjects()
 {
     __interaccionValid = false;
     __interaccion = null;
 }
Esempio n. 8
0
 /// <summary>
 /// Sybase internal use only.
 /// <summary>
 public void SetOriginalState(YPF.Comercial.RRCC.SUP.Interaccion orig)
 {
     __originalStateValid = true;
     __originalState = orig;
 }
Esempio n. 9
0
 private void Internal_Create()
 {
     bool ok = true;
     Sybase.Persistence.LocalTransaction localTransaction = null;
     try
     {
         localTransaction = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.BeginTransaction();
         if(__surrogateKey == 0) __surrogateKey = (long)(YPF.Comercial.RRCC.SUP.KeyGenerator.GenerateId());
         YPF.Comercial.RRCC.SUP.Interaccion os_1 = new YPF.Comercial.RRCC.SUP.Interaccion();
         os_1.CopyAll(this);
         this.SetOriginalState(os_1);
         PendingChange = 'C';
         SetReplayCounter(KeyGenerator.GenerateId());
         SetReplayFailure(0);
         ReplayPending = 0;
         if(_isNew)
         {
             Create(true);
         }
         else
         {
             Update(true);
         }
     }
     catch(System.SystemException e)
     {
         ok = false;
         throw e;
     }
     finally
     {
         if(localTransaction != null)
         {
             localTransaction.EndTransaction(ok);
         }
     }
 }
Esempio n. 10
0
 protected  override void Bind(Sybase.Persistence.ConnectionProfile profile, System.Data.IDataReader rs) 
 {
     this.__idInteraccion = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"idInteraccion",0);
     this.__tipoInteraccion_CodigoSAP = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"tipoInteraccion_CodigoSAP",1);
     this.__titulo = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"titulo",2);
     this.__tipoInteraccion_CategoriaSAP = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"tipoInteraccion_CategoriaSAP",3);
     this.__GUID = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"GUID",4);
     this.__nroOperacionSAP = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"nroOperacionSAP",5);
     this.__segmento_CodigoSAP = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"segmento_CodigoSAP",6);
     this.__negocio_CodigoSAP = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"negocio_CodigoSAP",7);
     this.__formulario_CodigoSAP = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"formulario_CodigoSAP",8);
     this.__puntaje = com.sybase.afx.db.ReaderUtil.GetNullableDecimal(profile,rs,"puntaje",9);
     this.__latitud = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"latitud",10);
     this.__longitud = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"longitud",11);
     this.__comentarios = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"comentarios",12);
     this.__notasPreparacion = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"notasPreparacion",13);
     this.__notasResultado = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"notasResultado",14);
     this.__notasResultadoAdministrativo = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"notasResultadoAdministrativo",15);
     this.__notasResultadoComercial = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"notasResultadoComercial",16);
     this.__notasResultadoOperativo = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"notasResultadoOperativo",17);
     this.__notasResultadoMercado = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"notasResultadoMercado",18);
     this.__notasResultadoAsesoramiento = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"notasResultadoAsesoramiento",19);
     this.__fechaInicioPlanificada = com.sybase.afx.db.ReaderUtil.GetNullableDate(profile,rs,"fechaInicioPlanificada",20);
     this.__horaInicioPlanificada = com.sybase.afx.db.ReaderUtil.GetNullableTime(profile,rs,"horaInicioPlanificada",21);
     this.__fechaFinPlanificada = com.sybase.afx.db.ReaderUtil.GetNullableDate(profile,rs,"fechaFinPlanificada",22);
     this.__horaFinPlanificada = com.sybase.afx.db.ReaderUtil.GetNullableTime(profile,rs,"horaFinPlanificada",23);
     this.__fechaInicioReal = com.sybase.afx.db.ReaderUtil.GetNullableDate(profile,rs,"fechaInicioReal",24);
     this.__horaInicioReal = com.sybase.afx.db.ReaderUtil.GetNullableTime(profile,rs,"horaInicioReal",25);
     this.__fechaFinReal = com.sybase.afx.db.ReaderUtil.GetNullableDate(profile,rs,"fechaFinReal",26);
     this.__horaFinReal = com.sybase.afx.db.ReaderUtil.GetNullableTime(profile,rs,"horaFinReal",27);
     this.__idDireccionEntrega = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"idDireccionEntrega",28);
     this.__direccionEntregaNombre = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"direccionEntregaNombre",29);
     this.__representanteComercial_CodigoInterlocutor = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"representanteComercial_CodigoInterlocutor",30);
     this.__representanteComercial_Nombre = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"representanteComercial_Nombre",31);
     this.__responsable_CodigoInterlocutor = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"responsable_CodigoInterlocutor",32);
     this.__responsableNombre = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"responsableNombre",33);
     this.__estadoInteraccion_CodigoSAP = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"estadoInteraccion_CodigoSAP",34);
     this.__motivo_CodigoSAP = com.sybase.afx.db.ReaderUtil.GetString(profile,rs,"motivo_CodigoSAP",35);
     this.__calle = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"calle",36);
     this.__direccionNro = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"direccionNro",37);
     this.__codigoPostal = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"codigoPostal",38);
     this.__ciudad = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"ciudad",39);
     this.__provincia_CodigoSAP = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"provincia_CodigoSAP",40);
     this.__pais_CodigoSAP = com.sybase.afx.db.ReaderUtil.GetNullableStringUL(profile,rs,"pais_CodigoSAP",41);
     RelevamientosTransporte =(null);
     RelevamientosProducto =(null);
     RelevamientosPrecio =(null);
     RelevamientosProveedor =(null);
     RespuestasInteraccionFormulario =(null);
     this.__pending = com.sybase.afx.db.ReaderUtil.GetBoolean(profile,rs,"pending",42);
     this.__pendingChange = com.sybase.afx.db.ReaderUtil.GetChar(profile,rs,"pendingChange",43);
     this.__replayPending = com.sybase.afx.db.ReaderUtil.GetLong(profile,rs,"replayPending",44);
     this.__replayFailure = com.sybase.afx.db.ReaderUtil.GetLong(profile,rs,"replayFailure",45);
     this.__surrogateKey = com.sybase.afx.db.ReaderUtil.GetLong(profile,rs,"surrogateKey",46);
     this.__replayCounter = com.sybase.afx.db.ReaderUtil.GetLong(profile,rs,"replayCounter",47);
     this.__disableSubmit = com.sybase.afx.db.ReaderUtil.GetBoolean(profile,rs,"disableSubmit",48);
     _isNew = false;
     _isDirty = false;
     if (this.IsPending)
     {
         this.SetOriginalState(null);
         this.__originalStateValid = false;
     }
     else
     {
         YPF.Comercial.RRCC.SUP.Interaccion os_1 = new YPF.Comercial.RRCC.SUP.Interaccion();
         os_1.CopyAll(this);
         this.SetOriginalState(os_1);
     }
 }
Esempio n. 11
0
 /// <summary>
 /// Set current MBO attributes by specified MBO.
 /// </summary>
 public static YPF.Comercial.RRCC.SUP.Interaccion Merge(YPF.Comercial.RRCC.SUP.Interaccion entity)
 {
     YPF.Comercial.RRCC.SUP.Interaccion ent = Find(entity._pk());
     if (ent == null)
     {
         ent = new YPF.Comercial.RRCC.SUP.Interaccion();
     }
     ent.CopyAll(entity);
     ent.Save();
     return ent;
 }
Esempio n. 12
0
 private static YPF.Comercial.RRCC.SUP.Interaccion _find(long id, String sql, bool findOs, bool findNonPending)
 {
     Sybase.Persistence.ConnectionWrapper _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection();
     System.Data.IDataReader _rs = null;
     int count = 0;
     try
     {
         YPF.Comercial.RRCC.SUP.Interaccion _rt = null;
         System.Data.IDbCommand ps = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, sql);
         com.sybase.afx.db.CommandUtil.SetLong(_conn.GetConnectionProfile(), ps, "surrogateKey", id);
         _rs = ps.ExecuteReader();
         Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile();
         while (com.sybase.afx.db.ReaderUtil.Read(profile, _rs))
         {
             _rt = new YPF.Comercial.RRCC.SUP.Interaccion();
             _rt.Bind(profile, _rs);
             count++;
             if(findOs)
             {
                 _rt.__isOsEntity = true;
                 _rt.__pending = false;  
             }
             if( !findNonPending )
             {
                 if(_rt.IsPending)
                 {
                     break;
                 }
             }
             else
             {
                 if( !_rt.IsPending )
                 {
                     break;
                 }
                 else
                 {
                     _rt = null;
                 }
             }
         }
         if (_rs != null) com.sybase.afx.db.ReaderUtil.Close(profile, _rs, count);
         if (ps != null) ps.Dispose();
         return _rt;
     }
     catch(System.Data.DataException ex)
     {
         throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex);
     }
     finally
     {
         YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
     }
 }
Esempio n. 13
0
 /// <summary>
 /// Refresh the mobile business object from database.
 /// </summary>
 public void Refresh()
 {
     if (!_isNew && !__isOsEntity)
     {
         YPF.Comercial.RRCC.SUP.Interaccion ent = Load(_pk());
         CopyAll(ent);
         if (this.IsPending)
         {
             this.SetOriginalState(null);
             this.__originalStateValid = false;
         }
         else
         {
             YPF.Comercial.RRCC.SUP.Interaccion os_1 = new YPF.Comercial.RRCC.SUP.Interaccion();
             os_1.CopyAll(this);
             this.SetOriginalState(os_1);
         }
         _isNew = false;
         _isDirty = false;
     }
 }
Esempio n. 14
0
        public void Finish_rbsReplayInternal(Sybase.Persistence.IOperationReplay _call_tmp)
        {
            YPF.Comercial.RRCC.SUP.intrnl.OperationReplay _call = (YPF.Comercial.RRCC.SUP.intrnl.OperationReplay)_call_tmp;
            com.sybase.afx.json.JsonObject parameters           = (com.sybase.afx.json.JsonObject)(com.sybase.afx.json.JsonReader
                                                                                                   .Parse(_call.Parameters));
            string exception = _call.Exception;

            YPF.Comercial.RRCC.SUP.Interaccion entity = (YPF.Comercial.RRCC.SUP.Interaccion)(YPF.Comercial.RRCC.SUP.Interaccion.__fromJSON(parameters.Get("entity")));

            //lock(typeof(YPF.Comercial.RRCC.SUP.CRMMobileDesaDB))
            //{
            Sybase.Persistence.ConnectionWrapper conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBWriteConnection();
            Sybase.Persistence.LocalTransaction  tran = null;
            try
            {
                tran = conn.BeginTransaction();

                long ____id = entity.ReplayCounter;
                YPF.Comercial.RRCC.SUP.Interaccion _client        = YPF.Comercial.RRCC.SUP.Interaccion.Find(entity._pk());
                YPF.Comercial.RRCC.SUP.Interaccion _downloadState = null;
                if (_client != null)
                {
                    _downloadState = _client.DownloadState;
                }
                if (exception == null)
                {
                    YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.GetCallbackHandler().OnReplaySuccess(_client == null ? entity : _client);
                    YPF.Comercial.RRCC.SUP.Interaccion.GetCallbackHandler().OnReplaySuccess(_client == null ? entity : _client);
                    if ((_client != null) && _client.IsPending)
                    {
                        long _rc = _client.ReplayPending;
                        if (_rc == ____id)
                        {
                            if (_rc == _client.ReplayCounter)
                            {
                                _client._cancelPending2(false);
                            }
                            else
                            {
                                _client.ReplayPending = 0;
                                _client.ReplayFailure = 0;
                                _client.__update(true);
                            }
                        }
                    }
                }
                else
                {
                    _client.ReplayFailure = (_client.ReplayPending);
                    _client._cascadeUpdateReplayCounterPending(false);
                    if (_client != null && _client.ReplayPending == ____id)
                    {
                        _client.ReplayPending = (0);
                        _client.ReplayCounter = (YPF.Comercial.RRCC.SUP.KeyGenerator.GenerateId());
                        _client.ReplayFailure = (____id);
                        _client.__update(true);
                        if (_downloadState != null)
                        {
                            _downloadState._update_os();
                        }
                    }
                    YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.GetCallbackHandler().OnReplayFailure(_client);
                    YPF.Comercial.RRCC.SUP.Interaccion.GetCallbackHandler().OnReplayFailure(_client);
                }
                _call.Delete();
                tran.Commit();
            }
            catch (Sybase.Persistence.PersistenceException pe)
            {
                tran.Rollback();
                throw pe;
            }
            catch (System.ApplicationException e)
            {
                tran.Rollback();
                throw e;
            }
            //}
        }
Esempio n. 15
0
 /// <summary>
 /// copy the MBO attributes to current MBO
 /// </summary>
 public void CopyAll(YPF.Comercial.RRCC.SUP.RelevamientoProducto entity)
 {
     this._isNew = entity._isNew;
     this.__idInteraccion = entity.__idInteraccion;
     this.__interaccion_nroOperacionSAP = entity.__interaccion_nroOperacionSAP;
     this.__relevamientoProductoProducto_CodigoSAP = entity.__relevamientoProductoProducto_CodigoSAP;
     this.__volumen = entity.__volumen;
     this.__stock = entity.__stock;
     this.__relevamientoProductoTipo_CodigoSAP = entity.__relevamientoProductoTipo_CodigoSAP;
     this.__critico = entity.__critico;
     this.__interaccion = entity.__interaccion;
     this.__interaccionValid = entity.__interaccionValid;
     this.__pending = entity.__pending;
     this.__pendingChange = entity.__pendingChange;
     this.__replayPending = entity.__replayPending;
     this.__replayFailure = entity.__replayFailure;
     this.__interaccionFK = entity.__interaccionFK;
     this.__surrogateKey = entity.SurrogateKey;
     this.__replayCounter = entity.__replayCounter;
     this.__disableSubmit = entity.__disableSubmit;
 }
Esempio n. 16
0
 /// <summary>
 /// Find a mobile business object YPF.Comercial.RRCC.SUP.Interaccion
 /// </summary>
 /// <exception cref="PersistentException">Thrown if unable to retrieve mobile business object.</exception>
 /// <remarks> </remarks>
 public static YPF.Comercial.RRCC.SUP.Interaccion FindByPrimaryKey(string idInteraccion)
 {
     YPF.Comercial.RRCC.SUP.Interaccion result_2 = null;
     System.Data.IDataReader rs_4 = null;
     int count_5 = 0;
     Sybase.Persistence.ConnectionWrapper _conn = null;
     try
     {
         _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection();
         string _selectSQL = "SELECT x.\"a\",x.\"b\",x.\"c\",x.\"d\",x.\"e\",x.\"f\",x.\"g\",x.\"h\",x.\"i\",x.\"j\",x.\"l\",x.\"m\",x.\"n\",x.\"o\",x.\"p\",x.\"q\",x.\"r\",x.\"s\",x.\"t\",x.\"u\",x.\"v\",x.\"w\",x.\"x\",x.\"y\",x.\"z\",x.\"ba\",x.\"bb\",x.\"bc\",x.\"bd\",x.\"be\",x.\"bf\",x.\"bg\",x.\"bh\",x.\"bi\",x.\"bj\",x.\"bl\",x.\"bm\",x.\"bn\",x.\"bo\",x.\"bp\",x.\"bq\",x"
                                 + ".\"br\",x.\"pending\",x.\"_pc\",x.\"_rp\",x.\"_rf\",x.\"bs\",x.\"_rc\",x.\"_ds\" FROM \"crmmobiledesa_1_0_interaccion\" x WHERE (((x.\"pending\" = 1 or not exists (select x_os.\"bs\" from \"crmmobiledesa_1_0_interaccion_os\" x_os where x_os.\"bs\" = x.\"bs\")))) and ( x.\"a\" = ?)";
         System.Data.IDbCommand ps_3 = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, _selectSQL);
         com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps_3, "idInteraccion", idInteraccion);
         rs_4 = ps_3.ExecuteReader();
         Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile();
         while (com.sybase.afx.db.ReaderUtil.Read(profile, rs_4))
         {       
             YPF.Comercial.RRCC.SUP.Interaccion entity_6 = new YPF.Comercial.RRCC.SUP.Interaccion();
             entity_6.Bind(profile, rs_4);
             count_5++;
             result_2 = entity_6;
         }
         if (rs_4 != null) com.sybase.afx.db.ReaderUtil.Close(profile, rs_4, count_5);
         if (ps_3 != null) ps_3.Dispose();
         _selectSQL = null;
     }
     catch (System.Data.DataException ex)
     {
         throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex);
     }
     finally
     {
         YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
     } 
     return result_2; 
   
 }
Esempio n. 17
0
 /// <summary>
 /// copy the MBO attributes to current MBO
 /// </summary>
 public void CopyAll(YPF.Comercial.RRCC.SUP.RelevamientoProveedor entity)
 {
     this._isNew = entity._isNew;
     this.__idInteraccion = entity.__idInteraccion;
     this.__interaccion_nroOperacionSAP = entity.__interaccion_nroOperacionSAP;
     this.__idRelevamientoProveedor = entity.__idRelevamientoProveedor;
     this.__marca = entity.__marca;
     this.__relevamientoProveedorCanal_CodigoSAP = entity.__relevamientoProveedorCanal_CodigoSAP;
     this.__despacho = entity.__despacho;
     this.__relevamientoProveedorLogistica_CodigoSAP = entity.__relevamientoProveedorLogistica_CodigoSAP;
     this.__interaccion = entity.__interaccion;
     this.__interaccionValid = entity.__interaccionValid;
     this.__pending = entity.__pending;
     this.__pendingChange = entity.__pendingChange;
     this.__replayPending = entity.__replayPending;
     this.__replayFailure = entity.__replayFailure;
     this.__interaccionFK = entity.__interaccionFK;
     this.__surrogateKey = entity.SurrogateKey;
     this.__replayCounter = entity.__replayCounter;
     this.__disableSubmit = entity.__disableSubmit;
 }
Esempio n. 18
0
 /// <summary>
 /// Find a List of YPF.Comercial.RRCC.SUP.Interaccion
 /// </summary>
 /// <exception cref="PersistentException">Thrown if unable to retrieve mobile business object.</exception>
 /// <remarks> </remarks>
 public static Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.Interaccion> FindVisitaRRCCByDate(System.DateTime fecha, string codigoInterlocutor, int skip, int take)
 {
         skip = skip + 1;
     Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.Interaccion> result_2 = new Sybase.Collections.GenericList<YPF.Comercial.RRCC.SUP.Interaccion>();
     System.Data.IDataReader rs_4 = null;
     int count_5 = 0;
     Sybase.Persistence.ConnectionWrapper _conn = null;
     try
     {
         _conn = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBReadConnection();
         string _selectSQL = " x.\"a\",x.\"b\",x.\"c\",x.\"d\",x.\"e\",x.\"f\",x.\"g\",x.\"h\",x.\"i\",x.\"j\",x.\"l\",x.\"m\",x.\"n\",x.\"o\",x.\"p\",x.\"q\",x.\"r\",x.\"s\",x.\"t\",x.\"u\",x.\"v\",x.\"w\",x.\"x\",x.\"y\",x.\"z\",x.\"ba\",x.\"bb\",x.\"bc\",x.\"bd\",x.\"be\",x.\"bf\",x.\"bg\",x.\"bh\",x.\"bi\",x.\"bj\",x.\"bl\",x.\"bm\",x.\"bn\",x.\"bo\",x.\"bp\",x.\"bq\",x.\"br\","
                                 + "x.\"pending\",x.\"_pc\",x.\"_rp\",x.\"_rf\",x.\"bs\",x.\"_rc\",x.\"_ds\" FROM \"crmmobiledesa_1_0_interaccion\" x WHERE (((x.\"pending\" = 1 or not exists (select x_os.\"bs\" from \"crmmobiledesa_1_0_interaccion_os\" x_os where x_os.\"bs\" = x.\"bs\")))) and ( x.\"bd\" IS NOT NULL AND x.\"bd\" <> \'\' AND x.\"b\" = \'ZVRC\' AND x.\"d\" "
                                 + "= \'Z06\' AND DAY(x.\"v\") = DAY(?) AND MONTH(x.\"v\") = MONTH(?) And YEAR(x.\"v\") = YEAR(?) AND x.\"bf\" = ?)";
         _selectSQL = "select top " + take + " start at " + skip + " " + _selectSQL;
         System.Data.IDbCommand ps_3 = com.sybase.afx.db.CommandUtil.CreateCommand(_conn, _selectSQL);
         com.sybase.afx.db.CommandUtil.SetDateTime(_conn.GetConnectionProfile(), ps_3, "fecha", fecha);
         com.sybase.afx.db.CommandUtil.SetDateTime(_conn.GetConnectionProfile(), ps_3, "fecha", fecha);
         com.sybase.afx.db.CommandUtil.SetDateTime(_conn.GetConnectionProfile(), ps_3, "fecha", fecha);
         com.sybase.afx.db.CommandUtil.SetString(_conn.GetConnectionProfile(), ps_3, "codigoInterlocutor", codigoInterlocutor);
         rs_4 = ps_3.ExecuteReader();
         Sybase.Persistence.ConnectionProfile profile = _conn.GetConnectionProfile();
         while (com.sybase.afx.db.ReaderUtil.Read(profile, rs_4))
         {       
             YPF.Comercial.RRCC.SUP.Interaccion entity_6 = new YPF.Comercial.RRCC.SUP.Interaccion();
             entity_6.Bind(profile, rs_4);
             count_5++;
             result_2.Add(entity_6);
         }
         if (rs_4 != null) com.sybase.afx.db.ReaderUtil.Close(profile, rs_4, count_5);
         if (ps_3 != null) ps_3.Dispose();
         _selectSQL = null;
     }
     catch (System.Data.DataException ex)
     {
         throw new Sybase.Persistence.PersistenceException(ex.ToString(), ex);
     }
     finally
     {
         YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
     } 
     return result_2; 
   
 }
 /// <summary>
 /// copy the MBO attributes to current MBO
 /// </summary>
 public void CopyAll(YPF.Comercial.RRCC.SUP.RespuestaInteraccionFormulario entity)
 {
     this._isNew = entity._isNew;
     this.__idInteraccion = entity.__idInteraccion;
     this.__formulario_CodigoSAP = entity.__formulario_CodigoSAP;
     this.__pregunta_CodigoSAP = entity.__pregunta_CodigoSAP;
     this.__respuesta_CodigoSAP = entity.__respuesta_CodigoSAP;
     this.__observaciones = entity.__observaciones;
     this.__puntaje = entity.__puntaje;
     this.__interaccion = entity.__interaccion;
     this.__interaccionValid = entity.__interaccionValid;
     this.__pending = entity.__pending;
     this.__pendingChange = entity.__pendingChange;
     this.__replayPending = entity.__replayPending;
     this.__replayFailure = entity.__replayFailure;
     this.__interaccionFK = entity.__interaccionFK;
     this.__surrogateKey = entity.SurrogateKey;
     this.__replayCounter = entity.__replayCounter;
     this.__disableSubmit = entity.__disableSubmit;
 }
Esempio n. 20
0
 /// <summary>
 /// copy the MBO attributes to current MBO
 /// </summary>
 public void CopyAll(YPF.Comercial.RRCC.SUP.FormularioMercado entity)
 {
     this._isNew = entity._isNew;
     this.__idInteraccion = entity.__idInteraccion;
     this.__empresa = entity.__empresa;
     this.__formularioMercadoTamano_CodigoSAP = entity.__formularioMercadoTamano_CodigoSAP;
     this.__formularioMercadoSegmento_CodigoSAP = entity.__formularioMercadoSegmento_CodigoSAP;
     this.__formularioMercadoSubsegmento_CodigoSAP = entity.__formularioMercadoSubsegmento_CodigoSAP;
     this.__interaccion = entity.__interaccion;
     this.__interaccionValid = entity.__interaccionValid;
     this.__pending = entity.__pending;
     this.__pendingChange = entity.__pendingChange;
     this.__replayPending = entity.__replayPending;
     this.__replayFailure = entity.__replayFailure;
     this.__interaccionFK = entity.__interaccionFK;
     this.__surrogateKey = entity.SurrogateKey;
     this.__replayCounter = entity.__replayCounter;
     this.__disableSubmit = entity.__disableSubmit;
 }