asp.net中如何用表格读出数据(table) 20
stringconnString=ConfigurationManager.ConnectionStrings["DepotConnectionString"].ToSt...
string connString = ConfigurationManager.ConnectionStrings["DepotConnectionString"].ToString();
SqlConnection conn = new SqlConnection(connString);
string selectSql = "select PO,ITEM,长,宽,高,总体积=sum(总体积),总重量=sum(总重量/1000),数量=sum(数量) from "
+ " ck_进仓主表 zb inner join ck_进仓明细 mx on zb.进仓主键=mx.进仓主键 "
+ " and 进仓编号=" + "'" + username + "'"
+ " group by PO,ITEM,长,宽,高"
+ " order by PO,ITEM";
SqlDataAdapter da = new SqlDataAdapter(selectSql, conn);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
conn.Close();
我现在是用gridview显示出来的,如何用表格显示出来
用<tr><td> 显示出来 展开
SqlConnection conn = new SqlConnection(connString);
string selectSql = "select PO,ITEM,长,宽,高,总体积=sum(总体积),总重量=sum(总重量/1000),数量=sum(数量) from "
+ " ck_进仓主表 zb inner join ck_进仓明细 mx on zb.进仓主键=mx.进仓主键 "
+ " and 进仓编号=" + "'" + username + "'"
+ " group by PO,ITEM,长,宽,高"
+ " order by PO,ITEM";
SqlDataAdapter da = new SqlDataAdapter(selectSql, conn);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
conn.Close();
我现在是用gridview显示出来的,如何用表格显示出来
用<tr><td> 显示出来 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询