问题描述
我将尝试解释我要真正快速地做些什么,然后继续讨论男性主题.我有403个潜在复选框,用户可以选择这些复选框来请求访问潜在的软件功能.因此,为了解决这个问题,我创建了多个具有所有可能性的树视图.如下所示的示例之一:
I am going to attempt to explain what I am trying to do real quick and then go on to the man subject. I have 403 potential checkboxes that a user can select to request access for a potential software function. So to solve this I created multiple treeviews that have all the possibilities. Example of one of many shown below:
<asp:TreeNode Text="ABC" Value="ABC">
<asp:TreeNode ShowCheckBox="True" Text="ARL" Value="ARL" />
<asp:TreeNode ShowCheckBox="True" Text="ARL_R" Value="ARL_R" />
<asp:TreeNode ShowCheckBox="True" Text="ARL_F" Value="ARL_F" />
<asp:TreeNode ShowCheckBox="True" Text="CLE" Value="CLE" />
<asp:TreeNode ShowCheckBox="True" Text="FWE" Value="FWE" />
<asp:TreeNode ShowCheckBox="True" Text="FWE_R" Value="FWE_R" />
<asp:TreeNode ShowCheckBox="True" Text="FWE_F" Value="FWE_F" />
</asp:TreeNode>
然后,用户从一系列树视图中选择他选择的每个节点.从技术上讲,我遇到的问题更多是存储问题.然后,我将检查用户选择的所有节点,并将它们推向sql数据库中的表.该数据库存储简单的字段,例如:姓,名,身份证号,主管电子邮件等.我尝试使用的字段之一是访问"字段,该字段存储用户选择的所有复选框,但如果用户选择您可以想象到403个选项,将诸如arl,arl_r等值折叠成另一个字符串时,看起来会很可怕.有没有更简单的方法来存储树视图中的值并知道它们来自何处?例如,如果他选择ARL,我是否可以做某种类型的二进制数学运算,说他是否切换了8位数字的第一位即arl?首先使用Treeviews可能会走得很远.
The user then selects each node he choices from the series of treeviews. The problem I''m having is technically more of a storage issue. I will then check all the nodes the user has selected and push them towards a table in an sql database. The database stores simple fields such as: last name, first name, id number, supervisor email, etc. One of the fields I am trying to utilize is the "access" field which stores all the checkboxes that the user selected but if he selects 403 options you can imagine that would look horrible with values such as arl, arl_r, and etc collapsed into another string. Is there an easier way to store values from a treeview and know where they came from? For example if he selects ARL, could I not do some type of binary math saying that if he toggled arl that is the first bit of an 8-bit number? I may be even far off the path by using Treeviews to begin with.
推荐答案
这篇关于从树视图中检索值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!