Beispiel #1
0
 /// <summary>
 /// Sybase internal use only.
 /// <summary>
 public static void FillAndCheckPendingObjects(System.Collections.IList _reverseObjects, System.Collections.IList _mboList)
 {
     Sybase.Collections.ObjectList tmpPendingObjects = new Sybase.Collections.ObjectList();
     foreach(object __o in _mboList)
     {
         Sybase.Persistence.AbstractEntity _mbo = (Sybase.Persistence.AbstractEntity)__o;
         if (_mbo.ReplayCounter != _mbo.ReplayPending)
         {
             switch(_mbo.PendingChange)
             {
                 case 'C':
                 case 'U':
                     tmpPendingObjects.Add(_mbo);
                     break;
                 default:
                     _reverseObjects.Add(_mbo);
                     break;
             }
         }
     }
     com.sybase.afx.DatabaseBase.SubmitPendingOperationsList(tmpPendingObjects);
 }
 /// <summary>
 /// Submit pending operations of the mobile business object (ready for sending to server)
 /// </summary>
 public static void SubmitPendingOperations()
 {
     YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.AcquireDBWriteConnection();
     try
     {
         Sybase.Collections.ObjectList _pendingObjects = new Sybase.Collections.ObjectList();
         Sybase.Collections.ObjectList _reverseObjects = new Sybase.Collections.ObjectList();
     
         YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.RespuestaInteraccionFormulario.GetPendingObjects());       
         for(int _index = _reverseObjects.Count - 1; _index >= 0; _index--)
         {
             _pendingObjects.Add(_reverseObjects[_index]);
         }
         com.sybase.afx.DatabaseBase.SubmitPendingOperationsList(_pendingObjects);       
     }
     finally
     {
         YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
     }
 }
Beispiel #3
0
 /// <summary>
 /// Submit all the pending operations regarding to the synchronizationGroup (ready for sending to server).
 /// </summary>
 /// <param name="synchronizationGroup">The synchronization group name.</param>
 /// <remarks> </remarks>
 public static void SubmitPendingOperations(string synchronizationGroup)
 {
     AcquireDBWriteConnection();
     try
     {
         Sybase.Collections.ObjectList _pendingObjects = new Sybase.Collections.ObjectList();
         Sybase.Collections.ObjectList _reverseObjects = new Sybase.Collections.ObjectList();
         if(synchronizationGroup == null || synchronizationGroup.Equals("Facturacion"))
         {
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.ClienteFacturacion.GetPendingObjects());
         }
         if(synchronizationGroup == null || synchronizationGroup.Equals("DetallePedido"))
         {
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.ClienteDetallePedido.GetPendingObjects());
         }
         if(synchronizationGroup == null || synchronizationGroup.Equals("CabeceraPedido"))
         {
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.ClienteCabeceraPedido.GetPendingObjects());
         }
         if(synchronizationGroup == null || synchronizationGroup.Equals("Parametro"))
         {
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.Parametro.GetPendingObjects());
         }
         if(synchronizationGroup == null || synchronizationGroup.Equals("TablasMaestras"))
         {
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.RelevamientoTransporteCompetidor.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.FormularioMercadoTamano.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.RelevamientoProveedorCanal.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.FormularioPreciosRed.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.FormularioPreciosZonaInspeccion.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.RelevamientoProductoTipo.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.TipoInteraccion.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.Provincia.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.RelevamientoProveedorLogistica.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.RelevamientoTransporteProducto.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.FormularioPreciosMercado.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.Motivo.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.Negocio.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.FormularioMercadoSubsegmento.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.FormularioMercadoSegmento.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.RelevamientoPreciosProducto.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.Segmento.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.CategoriaPregunta.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.Pregunta.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.RelevamientoProductoProducto.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.Formulario.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.SeleccionFormulario.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.PreguntaFormulario.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.TablaRelevamiento.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.SeleccionTablaRelevamiento.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.Respuesta.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.OpcionRespuesta.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.EstadoInteraccion.GetPendingObjects());
         }
         if(synchronizationGroup == null || synchronizationGroup.Equals("Interaccion"))
         {
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.Interaccion.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.RespuestaInteraccionFormulario.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.RelevamientoProveedor.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.RelevamientoProducto.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.FormularioTransporte.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.RelevamientoTransporte.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.FormularioMercado.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.FormularioPrecios.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.RelevamientoPrecios.GetPendingObjects());
         }
         if(synchronizationGroup == null || synchronizationGroup.Equals("RepresentanteComercial"))
         {
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.RepresentanteComercial.GetPendingObjects());
         }
         if(synchronizationGroup == null || synchronizationGroup.Equals("Cliente"))
         {
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.Mail.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.Telefono.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.Direccion.GetPendingObjects());
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.DireccionEntrega.GetPendingObjects());
         }
         if(synchronizationGroup == null || synchronizationGroup.Equals("Deuda"))
         {
             FillAndCheckPendingObjects(_reverseObjects, YPF.Comercial.RRCC.SUP.ClienteDeuda.GetPendingObjects());
         }
         for(int _index = _reverseObjects.Count - 1; _index >= 0; _index--)
         {
             _pendingObjects.Add(_reverseObjects[_index]);
         }
         com.sybase.afx.DatabaseBase.SubmitPendingOperationsList(_pendingObjects);
         
     }
     finally
     {
         YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.ReleaseDBConnection();
     }
 }