Ejemplo n.º 1
0
 /// <summary>
 /// Sybase internal use only.
 /// <summary>
 public void RbsReplayInternal(YPF.Comercial.RRCC.SUP.Motivo entity)
 {
     
     YPF.Comercial.RRCC.SUP.intrnl.OperationReplay _replay = new YPF.Comercial.RRCC.SUP.intrnl.OperationReplay();
     _replay.RemoteId =(".");
     _replay.Component =("CRMMobileDesa.Motivo_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.Motivo.__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;
         }
     //}
 }