It is currently Thu Sep 19, 2019 3:34 am

All times are UTC




 Page 1 of 1 [ 1 post ] 
Author Message
 Post subject: HOWTO. Recorrer Modelo de Datos de una Vista
PostPosted: Mon Dec 19, 2011 10:41 pm 

Joined: Thu Dec 30, 2010 8:46 pm
Posts: 92
Os dejo una manera de recorrer el modelo de datos de una vista;

  1. // La vista en este ejemplo tiene 4 columnas.
  2. function get_lineas( oTree_Lineas )
  3.  Local aLineas := {}, pPath
  4.  Local aIter := Array( 4 )
  5.  Local lValid
  6.  
  7.  lValid :=  oTree_Lineas:GetIterFirst( aIter ) // Desde el inicio
  8.  while lValid
  9.        pPath := oTree_Lineas:GetPath( aIter )
  10.  
  11.        AADD( aLineas,  { oTree_Lineas:GetValue( 1,, pPath),;
  12.                                    oTree_Lineas:GetValue( 2,, pPath),;  
  13.                                    oTree_Lineas:GetValue( 3,, pPath),;  
  14.                                   oTree_Lineas:GetValue( 4,, pPath) } )
  15.          
  16.       lvalid := oTree_Lineas:GetIterNext( aIter )
  17.  
  18.  end while
  19.  
  20. return aLineas
  21.  


Offline
 Profile Send private message  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

cron