Asp.net C#中的数据库文件夹浏览器 [英] Database Folder browser in Asp.net C#

查看:47
本文介绍了Asp.net C#中的数据库文件夹浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我已经被问到要解决的问题,并希望就从何处开始的一些建议提供一些建议.

对不起,主题标题,我无话可总结.

当前系统
该系统当前有一个用户数据库表和一个用户已插入数据库的报告表.
当前在一个较大的下拉列表中访问报告,但是因为在您要搜索数千个报告之后,这会变得很混乱.

问题
对该系统的要求更改是添加文件夹以分隔报告,从而允许用户在查看所有报告还是选择特定文件夹之间进行选择,然后在下面的下拉列表中显示该文件夹中的所有数据库报告

摘要:
1.用户从浏览控制器中选择文件夹A
2.用户选择位于A
内的文件夹C 2.然后,数据库文件夹C中的报告显示在下拉列表中,以供选择时加载.

我认为解决方案是有2个下拉列表,第一个显示您可以选择的所有可能的文件夹,然后显示这些文件夹内的子文件夹等等.
第二个下拉列表将是在第一个下拉列表中选择的文件夹中所有报告的列表.
在Advance中致谢

Hey all
I''ve been given a question to solve and would like some advise on where to start preferably with a few links.

Sorry for the Subject title, I don''t have a word to summarise the question.

Current System
The system currently has a database table of users and a table of reports the users had inserted into the database.
Reports are currently accessed in a large drop down list, but because this would get rather messy after you have 1000s of reports to search through.

Question
The requested change to this system is to add folders to separate the reports allowing users to choose between looking at all reports or choosing a specific folder and then the drop down list below showing all database reports in that folder

Summary:
1.User selects Folder A from the Browse controller
2.The user chooses folder C that is inside A
2.Reports within database folder C are then shown in a drop down list to be loaded on selection.

The solution I thought was to have 2 drop down lists, the first shows all of the possible folders you can choose from and then sub-folders and so on inside those folders
The second drop down list would be a list of all reports in the folder chosen in the first drop down list

Thanks in Advance

推荐答案

这是一个更好的设计.
创建一个表,该表可以保存有关分层虚拟文件夹的信息.像这样的东西:
Here''s a better design.
Create a table that can hold information about hierarchical virtual folders. Something like this:
CREATE TABLE ReportFolders (
FolderID int IDENTITY(1,1),
FolderName varchar(100) NOT NULL,
ParentFolderID int NULL
)



您的报告表可以包含FolderID列,其中包含显示报告的文件夹的ID.

将树形视图添加到报告页面,并在TreeView中显示表中的文件夹.最初用顶级文件夹(其中ParentFolderID为null)填充TreeView.在节点展开事件中,添加代表子文件夹的节点(ParentFolderID =当前文件夹的ID)和该文件夹下的报告(其中Reports.FolderID =当前文件夹的ID).

与单级下拉列表相比,这将带来更好的报表管理系统.



Your reports table can contain a FolderID column that contains the ID of the folder under which the report is shown.

Add a tree view to your reports page and show the folders from the table in the TreeView. Initially fill the TreeView with the top level folders (where ParentFolderID is null). In the node expand event, add the nodes representing the child folders (ParentFolderID = Id of the current folder) and the reports under the folder (where Reports.FolderID = Id of the current folder).

This will result in a much better Reports management system than a single level dropdown list.


这篇关于Asp.net C#中的数据库文件夹浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆