示例#1
0
 /// <summary>
 /// Submit the pending change of the mobile business object (ready for sending to server).
 /// </summary>
 public void SubmitPending()
 {
     if(__disableSubmit)
     {
         return;
     }
     
     bool ok = true;
     Sybase.Persistence.LocalTransaction localTransaction = null;
     try
     {
         localTransaction = YPF.Comercial.RRCC.SUP.CRMMobileDesaDB.BeginTransaction();
         try
         {
             Refresh();
         }
         catch (Sybase.Persistence.ObjectNotFoundException ex)
         {
             if (_isDeleted)
             {
                 return;
             }
             else
             {
                 throw ex;
             }
         }
         
         if (IsPending && (ReplayCounter != ReplayPending))
         {
             ReplayFailure =(0);
             YPF.Comercial.RRCC.SUP.intrnl.DireccionEntrega_rs rs = new YPF.Comercial.RRCC.SUP.intrnl.DireccionEntrega_rs();
             rs.RbsReplayInternal(this);
             SetReplayPending(__replayCounter);
             Update(true);
             Refresh();
             _cascadeUpdateReplayCounterPending(true);
             _update_os();
         }
     }
     catch(System.SystemException e)
     {
         ok = false;
         throw e;
     }
     finally
     {
         if(localTransaction != null)
         {
             localTransaction.EndTransaction(ok);
         }
     }
 }