Home > Software engineering >  VB how to realize the listbox and combination treeview.
VB how to realize the listbox and combination treeview.

Time:09-19

To achieve a permissions distribution function,
Users on the left, on the right is the menu, how to connect the SQL library table, elected in user, display the current permissions, confirm the treeview node, back to the user,

Bosses, please grant instruction, small white one,

CodePudding user response:

A database query first, access to all users, to fill in the list, when a list is selected to a database query, query the customer id for conditions such as customers to access list, fill tree,

CodePudding user response:

reference 1st floor chewinggum response:
a database query first, access to all users, to fill in the list, when a list is selected to a database query, query the customer id for conditions such as customers to access list, populate the tree,


Has access to a list of all users, fill the treeview code of can't write, [/img]

CodePudding user response:

Each user "authority", not "level relations"?
Why want to use the "tree" control?
Various authorities, is divided the category of yao...

CodePudding user response:

reference Chen8013 reply: 3/f
each user's "rights", not "level relations"?
Why want to use the "tree" control?
Various authorities, is divided the category of yao...


Classified according to the menu bar, probably effect is like that, the tree is my hand, not connect to the database automatically generated,

CodePudding user response:

refer to the second floor shendayehao response:
Quote: refer to 1st floor chewinggum response:

A database query first, access to all users, to fill in the list, when a list is selected to a database query, query the customer id for conditions such as customers to access list, fill tree,


Has access to a list of all users, fill the treeview code of can't write, [/img]


Two kinds of practice
1, when the user clicks, empty on the right side of the tree and get all the permissions of the user data, and then organize, fill the
2, to organize all permissions in the system into populated, when the user clicks, get all the permissions of the user data, and then each node to determine whether the check,

CodePudding user response:

reference 5 floor chewinggum reply:
Quote: refer to the second floor shendayehao response:

Quote: refer to 1st floor chewinggum response:

A database query first, access to all users, to fill in the list, when a list is selected to a database query, query the customer id for conditions such as customers to access list, fill tree,


Has access to a list of all users, fill the treeview code of can't write, [/img]


Two kinds of practice
1, when the user clicks, empty on the right side of the tree and get all the permissions of the user data, and then organize, fill the
2, to organize all permissions in the system into populated, when the user clicks, get all the permissions of the user data, and then each node, to determine whether the checked

I think it's better with method 2,
Tree display content should be the same, choose different users, is only part of the "hook to choose and not hook" distinction,

CodePudding user response:

refer to 6th floor Chen8013 response:
Quote: refer to fifth floor chewinggum response:

Quote: refer to the second floor shendayehao response:

Quote: refer to 1st floor chewinggum response:

A database query first, access to all users, to fill in the list, when a list is selected to a database query, query the customer id for conditions such as customers to access list, fill tree,


Has access to a list of all users, fill the treeview code of can't write, [/img]


Two kinds of practice
1, when the user clicks, empty on the right side of the tree and get all the permissions of the user data, and then organize, fill the
2, to organize all permissions in the system into populated, when the user clicks, get all the permissions of the user data, and then each node, to determine whether the checked

I think it's better with method 2,
Tree display content should be the same, choose different users, is only part of the "hook to choose and not hook" distinction,

See the specific situation, if the system total permissions on dozens, in 2,
, like the hundreds of menu and refinement to the data show the permissions, it is with 1 less pest

CodePudding user response:

refer to the second floor shendayehao response:
Quote: refer to 1st floor chewinggum response:

A database query first, access to all users, to fill in the list, when a list is selected to a database query, query the customer id for conditions such as customers to access list, fill tree,


Has access to a list of all users, fill the treeview code of can't write, [/img]

Ask the baidu, the tree view demo code and the land is

CodePudding user response:

reference 5 floor chewinggum reply:
Quote: refer to the second floor shendayehao response:

Quote: refer to 1st floor chewinggum response:

A database query first, access to all users, to fill in the list, when a list is selected to a database query, query the customer id for conditions such as customers to access list, fill tree,


Has access to a list of all users, fill the treeview code of can't write, [/img]


Two kinds of practice
1, when the user clicks, empty on the right side of the tree and get all the permissions of the user data, and then organize, fill the
2, to organize all permissions in the system into populated, when the user clicks, get all the permissions of the user data, and then each node, to determine whether the checked


According to the method 2, can be directly add node spanning tree? Or to connect library table automatically fill?
I now design three tables, the user table, permissions list, user rights corresponding to the table,

CodePudding user response:

references 9 f shendayehao response:
Quote: refer to fifth floor chewinggum response:

Quote: refer to the second floor shendayehao response:

Quote: refer to 1st floor chewinggum response:

A database query first, access to all users, to fill in the list, when a list is selected to a database query, query the customer id for conditions such as customers to access list, fill tree,


nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related