A table of a total of units, a Han brake table, a personnel Han brake relationship table, and a personnel table (where personnel do not specify Han brake, but do not belong to any unit or Han brake). Based on the relationship between the four tables and levels, displayed on a tree control:
1. Recursive unit;
2. When a unit node is generated, check whether there is a culvert gate based on the link.
3. When a culvert gate node is generated, check whether there are related personnel based on the personnel culvert gate relationship table:
DV. rowfilter = "v_ry_dm in (select distinct v_ry_dm from DBO. da_ry_hz_xd where I _hz_dm = @ I _hz_dm )";
4. When the unit recursion is completed, check whether there are related personnel based on the personnel Han brake relationship table. If yes, the query method is as follows:
DV. rowfilter = "v_ry_dm not in (select distinct v_ry_dm from DBO. da_ry_hz_xd )";
If you encounter such problems, you do not need to analyze them. Use this method directly.