The serial number at the corresponding level higher number title
1 0 great-grandfather
Grandfather 2 1
3 2 father
4 3 son
5 0 great-grandfather uncle
6 5 great-uncle
7 0 was uncle
8 7 great-uncle
9 8 uncle
CodePudding user response:
PFC is good thing that is punctuated with treeviw, or layered retrievalCodePudding user response:
For consistent processing deep layer (there is no problem, the difficulty lies in the deep layer, some had no sons, some no grandson, deep layer ranged from 2 to 4 layers,CodePudding user response:
I have been using PFC, PFC is can support different levels of, as long as a premise, the level is limited.CodePudding user response:
//generated new tree list
Of_setbase (true)
Of_setlevelsource (true)
Ib_rmbmenu=false
The integer li_rc
Long ll_firstitemonlevel, ll_count
String ls_msg
//the first layer
Li_rc=this. Inv_levelsource. Of_Register (& amp;
1, "category", "', the sqlca, 'select ~' ~ 'as the category of' all classification," ")
If li_rc & lt;> 1 then
Ls_msg='first layer set wrong! '
Goto err_exit
End the if
Li_rc=this. Inv_levelsource. Of_SetPictureColumn (1, "1")
Li_rc=this. Inv_levelsource. Of_SetSelectedPictureColumn (1, "1")
//the second
Li_rc=this. Inv_levelsource. Of_Register (& amp;
2, "category", "'," ds_d_category_1 SQLCA, "")
If li_rc & lt;> 1 then
Ls_msg='second set wrong! '
Goto err_exit
End the if
Li_rc=this. Inv_levelsource. Of_SetPictureColumn (2, "2")
Li_rc=this. Inv_levelsource. Of_SetSelectedPictureColumn (2, "2")
//
//the third layer
Li_rc=this. Inv_levelsource. Of_Register (& amp;
3, "category", ": the parent. 1. Categorycode", "ds_d_category_2", the SQLCA, "")
If li_rc & lt;> 1 then
Ls_msg='the third set wrong! '
Goto err_exit
End the if
Li_rc=this. Inv_levelsource. Of_SetPictureColumn (3, "3")
Li_rc=this. Inv_levelsource. Of_SetSelectedPictureColumn (3, "3")
//layer 4
Li_rc=this. Inv_levelsource. Of_Register (& amp;
4, "category", ": the parent. 1. Categorycode", "ds_d_category_3", the SQLCA, "")
If li_rc & lt;> 1 then
Ls_msg='the third set wrong! '
Goto err_exit
End the if
Li_rc=this. Inv_levelsource. Of_SetPictureColumn (4, "4")
Li_rc=this. Inv_levelsource. Of_SetSelectedPictureColumn (4, "4")
//the fifth layer
Li_rc=this. Inv_levelsource. Of_Register (& amp;
5, "category", ": the parent. 1. Categorycode", "ds_d_category_4", the SQLCA, "")
If li_rc & lt;> 1 then
Set up error ls_msg='on the fourth floor! '
Goto err_exit
End the if
Li_rc=this. Inv_levelsource. Of_SetPictureColumn (5, "5")
Li_rc=this. Inv_levelsource. Of_SetSelectedPictureColumn (5, "5")
Li_rc=this. The event pfc_populate (0)
Ll_firstitemonlevel=this. Inv_base. Of_FindFirstItemLevel (1, 0)
Enclosing ExpandItem (ll_FirstItemOnLevel)
Enclosing SelectItem (ll_firstitemonlevel)
CodePudding user response:
Ok, go to study, thanked first!