如何以矩阵格式显示数据库内容 [英] how to display the database content in matrix format

查看:168
本文介绍了如何以矩阵格式显示数据库内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们,

我有疑问要以矩阵格式显示表的内容.

我有三个不同的表
(1)订单(在此我有订单的详细信息)
DayOrder ID
订单名称
(2)小时(在这里,我有小时的详细信息)
小时ID
小时名称
(3)时间表(在此我有时间表的详细信息)
ID
订单ID
小时编号
员工编号

我的怀疑是我如何显示这样的内容

Day Hour1 Hour2 Hour3
Dayorder1 staff1 staff2 staff3
Dayorder2 staff2 staff3 staff1



我想以这种格式显示.请帮我.我使用c#使用asp .net 2.0.如果有人对此有解决方案,请告诉我.

谢谢朋友,

Hi friends,

I have a doubt to display the content of the tables in matrix format.

I have three different tables
(1)Day Order (In this i have the day order details)
DayOrder Id
Dayorder Name
(2)Hour (In this i have the Hour details)
Hour Id
Hour Name
(3)Time Table (In this i have the time table details)
Id
Dayorder id
hour id
staff id

My Doubt is how i display the contents like this

DayHour1Hour2Hour3
Dayorder1staff1staff2staff3
Dayorder2staff2staff3staff1



I want to display in this format. please help me. i m using asp .net 2.0 using with c#. if any one have the solution about this please tell to me.

Thanks Friends,

推荐答案

如果尝试,很简单.首先设计查询以获取所有值.然后使用模板自定义Gridview并显示数据.
It is simple if you try. First design a query to fetch all values. Then customize the Gridview using template and display the data.


这篇关于如何以矩阵格式显示数据库内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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