http://img505.imageshack.us/img505/8279 ... me2ck8.png
and I have a database with some field :
l_lun
l_mar
l_mer
l_gio
l_ven
l_sab
each field have a string of ten characters as "SSSSSSNSNS"
S := Yes
N := No
I thinked to load all string into array type adatidisp[6,10]
Code: Select all
static function CARICA_REC(aDati, aDatiDisp)
aDatiDisp[1][1]:= Left(aule->l_lun, 1)
aDatiDisp[1][2]:= SubStr(aule->l_lun, 2, 1)
aDatiDisp[1][3]:= SubStr(aule->l_lun, 3, 1)
aDatiDisp[1][4]:= SubStr(aule->l_lun, 4, 1)
aDatiDisp[1][5]:= SubStr(aule->l_lun, 5, 1)
aDatiDisp[1][6]:= SubStr(aule->l_lun, 6, 1)
aDatiDisp[1][7]:= SubStr(aule->l_lun, 7, 1)
aDatiDisp[1][8]:= SubStr(aule->l_lun, 8, 1)
aDatiDisp[1][9]:= SubStr(aule->l_lun, 9, 1)
aDatiDisp[1][10]:= right(aule->l_lun, 1)
aDatiDisp[2][1]:= Left(aule->l_mar, 1)
aDatiDisp[2][2]:= SubStr(aule->l_mar, 2, 1)
aDatiDisp[2][3]:= SubStr(aule->l_mar, 3, 1)
aDatiDisp[2][4]:= SubStr(aule->l_mar, 4, 1)
aDatiDisp[2][5]:= SubStr(aule->l_mar, 5, 1)
aDatiDisp[2][6]:= SubStr(aule->l_mar, 6, 1)
aDatiDisp[2][7]:= SubStr(aule->l_mar, 7, 1)
aDatiDisp[2][8]:= SubStr(aule->l_mar, 8, 1)
aDatiDisp[2][9]:= SubStr(aule->l_mar, 9, 1)
aDatiDisp[2][10]:= right(aule->l_mar, 1)
aDatiDisp[3][1]:= Left(aule->l_mer, 1)
aDatiDisp[3][2]:= SubStr(aule->l_mer, 2, 1)
aDatiDisp[3][3]:= SubStr(aule->l_mer, 3, 1)
aDatiDisp[3][4]:= SubStr(aule->l_mer, 4, 1)
aDatiDisp[3][5]:= SubStr(aule->l_mer, 5, 1)
aDatiDisp[3][6]:= SubStr(aule->l_mer, 6, 1)
aDatiDisp[3][7]:= SubStr(aule->l_mer, 7, 1)
aDatiDisp[3][8]:= SubStr(aule->l_mer, 8, 1)
aDatiDisp[3][9]:= SubStr(aule->l_mer, 9, 1)
aDatiDisp[3][10]:= right(aule->l_mer, 1)
aDatiDisp[4][1]:= Left(aule->l_gio, 1)
aDatiDisp[4][2]:= SubStr(aule->l_gio, 2, 1)
aDatiDisp[4][3]:= SubStr(aule->l_gio, 3, 1)
aDatiDisp[4][4]:= SubStr(aule->l_gio, 4, 1)
aDatiDisp[4][5]:= SubStr(aule->l_gio, 5, 1)
aDatiDisp[4][6]:= SubStr(aule->l_gio, 6, 1)
aDatiDisp[4][7]:= SubStr(aule->l_gio, 7, 1)
aDatiDisp[4][8]:= SubStr(aule->l_gio, 8, 1)
aDatiDisp[4][9]:= SubStr(aule->l_gio, 9, 1)
aDatiDisp[4][10]:= right(aule->l_gio, 1)
aDatiDisp[5][1]:= Left(aule->l_ven, 1)
aDatiDisp[5][2]:= SubStr(aule->l_ven, 2, 1)
aDatiDisp[5][3]:= SubStr(aule->l_ven, 3, 1)
aDatiDisp[5][4]:= SubStr(aule->l_ven, 4, 1)
aDatiDisp[5][5]:= SubStr(aule->l_ven, 5, 1)
aDatiDisp[5][6]:= SubStr(aule->l_ven, 6, 1)
aDatiDisp[5][7]:= SubStr(aule->l_ven, 7, 1)
aDatiDisp[5][8]:= SubStr(aule->l_ven, 8, 1)
aDatiDisp[5][9]:= SubStr(aule->l_ven, 9, 1)
aDatiDisp[5][10]:= right(aule->l_ven, 1)
aDatiDisp[6][1]:= Left(aule->l_sab, 1)
aDatiDisp[6][2]:= SubStr(aule->l_sab, 2, 1)
aDatiDisp[6][3]:= SubStr(aule->l_sab, 3, 1)
aDatiDisp[6][4]:= SubStr(aule->l_sab, 4, 1)
aDatiDisp[6][5]:= SubStr(aule->l_sab, 5, 1)
aDatiDisp[6][6]:= SubStr(aule->l_sab, 6, 1)
aDatiDisp[6][7]:= SubStr(aule->l_sab, 7, 1)
aDatiDisp[6][8]:= SubStr(aule->l_sab, 8, 1)
aDatiDisp[6][9]:= SubStr(aule->l_sab, 9, 1)
aDatiDisp[6][10]:= right(aule->l_sab, 1)
return Nil
Now I want insert all data into a listbox
the first column must be a column of days o a week
AADD( aMat, { "MO" } )
AADD( aMat, { "TU" } )
AADD( aMat, { "WE" } )
AADD( aMat, { "TH" } )
AADD( aMat, { "FR" } )
AADD( aMat, { "SA" } )
and each adatidisp must be insert as a bitmap
for the yes "select.bmp" and for the NO "unselect.bmp"
how I can make to put all in listbox ?