通过使用存储过程和业务层来显示html表 [英] by using store procedure and bussiness layer to show the html table
问题描述
aspx页面代码..>>>>>
aspx page code..>>>>>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NI_AD_USER_MST_REPORT1.aspx.cs" Inherits="NIPL.NIPL.htmlreport.NI_AD_USER_MST_REPORT11" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title> user master</title>
<style type="text/css">
.devanagriBi
{
font-family:Suchi-Dev-0708W;
font-size: 25pt;
height:50;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html
>
businesslayer代码...>>>>>
使用系统;
使用System.Collections.Generic;
使用System.Linq;
使用System.Web;
使用System.Xml.Linq;
使用System.Data.SqlClient;
使用System。数据;
使用System.Configuration;
名称空间NIPL.AppCode
{
公共类cBLayerusermst
{
DBFunctions cdbLayer;
SqlConnection con;
// string NI_AD_QUERY = ;
public cBLayerusermst()
{
cdbLayer = new DBFunctions();
}
// SqlDataAdapter da;
public Boolean NI_AD_USER_MST(int intuserid,out DataSet dsUserMst)
{
con = cdbLayer.GetDatasetConnection();
SqlDataAdapter da = new SqlDataAdapter([dbo]。[USER_MST_SP] ,con);
da.SelectCommand.CommandType = CommandType.StoredProcedure;
da.SelectCommand .Parameters.AddWithValue(@ NI_ADUM_USER_ID,intuserid).Value = 2;
DataSet dsout = new DataSet();
da.SelectCommand.CommandTimeout = 3600;
da.Fill(dsout,[dbo]。[USER_MST_SP]);
dsUserMst = dsout;
con = cdbLayer.CloseConnection();
返回true;
}
}
}
商店程序代码...>>>>>
USE EMPLOYEE1
GO
更改程序dbo.USER_MST_SP(
@NI_ADUM_USER_ID INT)
AS
BEGIN
SELECT * FROM nipl.NI_AD_USER_MST WHERE NI_ADUM_USER_ID = @ NI_ADUM_USER_ID
结束
ASPX.CS PAGE CODE .....>>>>>
>
businesslayer code...>>>>>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
namespace NIPL.AppCode
{
public class cBLayerusermst
{
DBFunctions cdbLayer;
SqlConnection con;
//string NI_AD_QUERY = "";
public cBLayerusermst()
{
cdbLayer=new DBFunctions();
}
//SqlDataAdapter da;
public Boolean NI_AD_USER_MST(int intuserid, out DataSet dsUserMst)
{
con = cdbLayer.GetDatasetConnection();
SqlDataAdapter da = new SqlDataAdapter("[dbo].[USER_MST_SP]", con);
da.SelectCommand.CommandType = CommandType.StoredProcedure;
da.SelectCommand.Parameters.AddWithValue("@NI_ADUM_USER_ID", intuserid).Value=2;
DataSet dsout = new DataSet();
da.SelectCommand.CommandTimeout = 3600;
da.Fill(dsout, "[dbo].[USER_MST_SP]");
dsUserMst = dsout;
con = cdbLayer.CloseConnection();
return true;
}
}
}
STORE PROCEDURE CODE...>>>>>
USE EMPLOYEE1
GO
ALTER PROCEDURE dbo.USER_MST_SP(
@NI_ADUM_USER_ID INT)
AS
BEGIN
SELECT *FROM nipl.NI_AD_USER_MST WHERE NI_ADUM_USER_ID=@NI_ADUM_USER_ID
END
ASPX.CS PAGE CODE.....>>>>>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Security;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Net;
using NIPL.AppCode;
using System.Data.OleDb;
using System.Text;
namespace NIPL.NIPL.htmlreport
{
public partial class NI_AD_USER_MST_REPORT11 : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["EMPLOYEE1ConnectionString"].ToString());
// public string NI_AD_USER_MST = "";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
try
{
con.Open();
int intuserid = 2;
//string NI_AD_QUERY = "";
cBLayerusermst UM = new cBLayerusermst();
// HEADER
//string NI_ADUM_ENTITY_ID = Request.QueryString["Entity Id"];
//string NI_ADUM_USER_ID = Request.QueryString["User Id"];
////string NI_Entity_ID = Session[NI_SessionClass.NI_SS_ENTITYID].ToString();
//string NI_ADUM_USER_NAME = Request.QueryString["User Name"];
//string NI_ADUM_USER_EMAIL = Request.QueryString["Email Id"];
//string NI_ADUM_USER_PAN = Request.QueryString["Pan"];
//string NI_ADUM_USER_DEPT_NAME = Request.QueryString["Dept. Name"];
//string NI_ADUM_REGISTER_DATE = Request.QueryString["Register Date"];
SqlCommand cmd;
//SqlDataReader ad;
//Response.Write("/br");
//Response.Write("</br>");
//Response.Write("</br>");
//Response.Write("</br>");
//Response.Write("</br>");
//Response.Write("</br>");
Response.Write("<TABLE border=1 cellspacing='0' cellpadding='0' width='100%'> ");
Response.Write("<tr>");
Response.Write("<th class=\"title1\" width=\"12%\" align='center'>Entity Id</th>");
Response.Write("<th class=\"title1\" width=\"12%\" align='center'>User Id</th>");
Response.Write("<th class=\"title1\" width=\"15%\" align='center'>USER NAME</th>");
Response.Write("<th class=\"title1\" width=\"17%\" align='center'>USER EMAIL ID</th>");
Response.Write("<th class=\"title1\" width=\"15%\" align='center'>USER PAN NO.</th>");
Response.Write("<th class=\"title1\" width=\"15%\" align='right'>USER DEPT. NAME</th>");
Response.Write("<th class=\"title1\" width=\"20%\" align='center'>REGISTER DATE</th>");
Response.Write("</tr>");
//NI_AD_QUERY = "SELECT NI_ADUM_ENTITY_ID,NI_ADUM_USER_ID,NI_ADUM_USER_NAME,NI_ADUM_USER_EMAIL,NI_ADUM_USER_PAN,NI_ADUM_USER_DEPT_NAME, NI_ADUM_USER_REGISTER_DATE FROM nipl.NI_AD_USER_MST ";
// NI_AD_QUERY = "[dbo].[USER_MST_SP] ";
//cmd = new SqlCommand(NI_AD_QUERY, con);
DataSet ds = new DataSet();
UM.NI_AD_USER_MST(intuserid, out ds);
//ad = cmd.ExecuteReader();
int i = 0;
while (i < ds.Tables[0].Rows.Count)
{
Response.Write("<tr>");
Response.Write("<td width=\"15%\" align='left'>" + ds.Tables[0].Rows[i][0].ToString() + "</td>");
Response.Write("<td width=\"10%\" align='left'>" + ds.Tables[0].Rows[i][1].ToString() + "</td>");
Response.Write("<td width=\"10%\" align='left'>" + ds.Tables[0].Rows[i][2].ToString() + "</td>");
Response.Write("<td width=\"10%\" align='left'>" + ds.Tables[0].Rows[i][3].ToString() + "</td>");
Response.Write("<td width=\"10%\" align='left'>" + ds.Tables[0].Rows[i][4].ToString() + "</td>");
Response.Write("<td width=\"10%\" align='left'>" + ds.Tables[0].Rows[i][5].ToString() + "</td>");
Response.Write("</tr>");
//intuserid = intuserid + int.Parse(ds.Tables[0].Rows[i][0].ToString());
//i++;
}
Response.Write("</Table>");
// Response.Write("</tr>");
//Response.Write("/Table");
//while (ad.Read())
//{
// Response.Write("<tr>");
// Response.Write("<td width=\"12%\" align=\"left\" > " + ad.GetValue(0).ToString() + "</td>");
// Response.Write("<td width=\"12%\" align=\"left\" > " + ad.GetValue(1).ToString() + "</td>");
// //Response.Write("<td width=\"25%\" align=\"left\" > </td>");
// //Response.Write("</tr>");
// //Response.Write("<tr>");
// Response.Write("<td width=\"15%\" align=\"left\" > " + ad.GetValue(2).ToString() + "</td>");
// Response.Write("<td width=\"17%\" align=\"left\" > " + ad.GetValue(3).ToString() + "</td>");
// //Response.Write("<td width=\"25%\" align=\"left\" > </td>");
// //Response.Write("</tr>");
// //Response.Write("<tr>");
// //Response.Write("<strong><font face='Suchi-Dev-0708W' size='4'>");
// ////Response.Write("®â³âå®âû - 5/Form - 5");
// //Response.Write("<td width=\"25%\" align=\"left\" colspan='2' ><strong><font face='Suchi-Dev-0708W' size='4'> " + ad.GetValue(2).ToString() + "</td>");
// //Response.Write("</font></strong>");
// //Response.Write("</tr>");
// //Response.Write("<tr>");
// Response.Write("<td width=\"15%\" align=\"left\" > " + ad.GetValue(4).ToString() + "</td>");
// //Response.Write("</tr>");
// //Response.Write("<tr>");
// Response.Write("<td width=\"15%\" align=\"left\" > " + ad.GetValue(5).ToString() + "</td>");
// //Response.Write("</tr>");
// //Response.Write("<tr>");
// Response.Write("<td width=\"20%\" align=\"left\" > " + ad.GetValue(6).ToString() + "</td>");
// Response.Write("</tr>");
//}
//ad.Close();
}
catch (Exception eNI)
{
Response.Write(eNI.Message);
}
finally
{
con.Close();
}
}
}
}
}
I m not getting the output in html of selected userid .
推荐答案
STORE PROCEDURE CODE...>>>>>
USE EMPLOYEE1
GO
ALTER PROCEDURE dbo.USER_MST_SP(
\t
\t
\t@NI_ADUM_USER_ID INT)
\t
AS
BEGIN
SELECT *FROM nipl.NI_AD_USER_MST WHERE NI_ADUM_USER_ID=@NI_ADUM_USER_ID
END
BLAYER CODE..>>>>
STORE PROCEDURE CODE...>>>>>
USE EMPLOYEE1
GO
ALTER PROCEDURE dbo.USER_MST_SP(
@NI_ADUM_USER_ID INT)
AS
BEGIN
SELECT *FROM nipl.NI_AD_USER_MST WHERE NI_ADUM_USER_ID=@NI_ADUM_USER_ID
END
BLAYER CODE..>>>>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
//namespace NIPL.AppCode
public class cBLayerusermst
{
DBFunctions BLAYER1;
SqlConnection con;
//string NI_AD_QUERY = \"\";
public cBLayerusermst()
{
BLAYER1 = new DBFunctions();
}
//SqlDataAdapter da;
public bool NI_AD_GET_HTML_OP(int intUserId, out DataSet ds)
{
try
{
con = BLAYER1.GetConnection();
SqlDataAdapter da = new SqlDataAdapter(\"[dbo].[USER_MST_SP]\", con);
da.SelectCommand.CommandType = CommandType.StoredProcedure;
da.SelectCommand.Parameters. AddWithValue(\"@NI_ADUM_USER_ID\", intUserId);
DataSet ds1 = new DataSet();
da.Fill(ds1, \"[dbo].[USER_MST_SP]\");
ds = ds1;
return true;
}
catch (Exception ex)
{
throw ex;
}
finally
{
con = BLAYER1.CloseConnection();
}
}
//public bool NI_AD_USER_MST(int intuserid,out DataSet dsUserMst)
// {
// try
// {
// // con.Open();
// BLAYER1.GetConnection();
// bool blnCheck;
// SqlDataAdapter da = new SqlDataAdapter(\"[dbo].[USER_MST_SP]\", con);
// da.SelectCommand.CommandType = CommandType.StoredProcedure;
// da.SelectCommand.Parameters.AddWithValue(\"@NI_ADUM_USER_ID\", intuserid);
// // da.SelectCommand.CommandTimeout = 3600;
// DataSet dsout = new DataSet();
// da.Fill(dsout, \"[dbo].[USER_MST_SP]\");
// dsUserMst = dsout;
// if (dsout.Tables[0].Rows.Count > 0)
// {
// blnCheck = true;
// }
// else
// {
// blnCheck = false;
// }
// return blnCheck;
// }
// catch (Exception ex)
// {
// throw ex;
// }
// finally
// {
// con.Close();
// }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
//namespace NIPL.AppCode
public class cBLayerusermst
{
DBFunctions BLAYER1;
SqlConnection con;
//string NI_AD_QUERY = "";
public cBLayerusermst()
{
BLAYER1 = new DBFunctions();
}
//SqlDataAdapter da;
public bool NI_AD_GET_HTML_OP(int intUserId, out DataSet ds)
{
try
{
con = BLAYER1.GetConnection();
SqlDataAdapter da = new SqlDataAdapter("[dbo].[USER_MST_SP]", con);
da.SelectCommand.CommandType = CommandType.StoredProcedure;
da.SelectCommand.Parameters.AddWithValue("@NI_ADUM_USER_ID", intUserId);
DataSet ds1 = new DataSet();
da.Fill(ds1, "[dbo].[USER_MST_SP]");
ds = ds1;
return true;
}
catch (Exception ex)
{
throw ex;
}
finally
{
con = BLAYER1.CloseConnection();
}
}
//public bool NI_AD_USER_MST(int intuserid,out DataSet dsUserMst)
// {
// try
// {
// // con.Open();
// BLAYER1.GetConnection();
// bool blnCheck;
// SqlDataAdapter da = new SqlDataAdapter("[dbo].[USER_MST_SP]", con);
// da.SelectCommand.CommandType = CommandType.StoredProcedure;
// da.SelectCommand.Parameters.AddWithValue("@NI_ADUM_USER_ID", intuserid);
// // da.SelectCommand.CommandTimeout = 3600;
// DataSet dsout = new DataSet();
// da.Fill(dsout, "[dbo].[USER_MST_SP]");
// dsUserMst = dsout;
// if (dsout.Tables[0].Rows.Count > 0)
// {
// blnCheck = true;
// }
// else
// {
// blnCheck = false;
// }
// return blnCheck;
// }
// catch (Exception ex)
// {
// throw ex;
// }
// finally
// {
// con.Close();
// }
}
ASPX.CS CODE ....>>>>>>>
ASPX.CS CODE ....>>>>>>>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Security;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Net;
using NIPL.AppCode;
using System.Data.OleDb;
using System.Text;
namespace NIPL.NIPL.htmlreport
{
public partial class NI_AD_USER_MST_REPORT11 : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings[\"EMPLOYEE1ConnectionString\"].ToString());
cBLayerusermst UM = new cBLayerusermst();
int intuserid = 2;
// public string NI_AD_USER_MST = \"\";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
try
{
con.Open();
//string NI_AD_QUERY = \"\";
// HEADER
//string NI_ADUM_ENTITY_ID = Request.QueryString[\"Entity Id\"];
//string NI_ADUM_USER_ID = Request.QueryString[\"User Id\"];
////string NI_Entity_ID = Session[NI_SessionClass.NI_SS_ENTITYID].ToString();
//string NI_ADUM_USER_NAME = Request.QueryString[\"User Nam e\"];
//string NI_ADUM_USER_EMAIL = Request.QueryString[\"Email Id\"];
//string NI_ADUM_USER_PAN = Request.QueryString[\"Pan\"];
//string NI_ADUM_USER_DEPT_NAME = Request.QueryString[\"Dept. Name\"];
//string NI_ADUM_REGISTER_DATE = Request.QueryString[\"Register Date\"];
// SqlCommand cmd;
//SqlDataReader ad;
//Response.Write(\"/br\");
//Response.Write(\"\");
//Response.Write(\"\");
//Response.Write(\"\");
//Response.Write(\"\");
//Response.Write(\"\");
Response.Write(\" \");
Response.Write(\"\");
Response.Write(\"\");
Response.Write(\"\");
Response.Write(\"\");
Response.Write(\"\");
Response.Write(\"\");
Response.Write(\"\");
Respo nse.Write(\"\");
Response.Write(\"\");
//NI_AD_QUERY = \"SELECT NI_ADUM_ENTITY_ID,NI_ADUM_USER_ID,NI_ADUM_USER_NAME,NI_ADUM_USER_EMAIL,NI_ADUM_USER_PAN,NI_ADUM_USER_DEPT_NAME, NI_ADUM_USER_REGISTER_DATE FROM nipl.NI_AD_USER_MST \";
// NI_AD_QUERY = \"[dbo].[USER_MST_SP] \";
//cmd = new SqlCommand(NI_AD_QUERY, con);
// SqlDataAdapter da = new SqlDataAdapter(\"[dbo].[USER_MST_SP]\", con);
DataSet ds = new DataSet();
UM.NI_AD_GET_HTML_OP(2, out ds);
// da.Fill(ds);
//ad = cmd.ExecuteReader();
int i = 0;
for (i = 0;我< ds.Tables[0].Rows.Count;i++ )
{
Response.Write(\"\");
Response.Write(\"\");
Response.Write(\"\");
Response.Write(\"\");
Response.Write(\"\");
Response.Write(\"\");
Response.Write(\"\");
Response.Write(\"\");
Response.Write(\"\");
//intuserid = intuserid + int.Parse(ds.Tables[0].Rows[i][0].ToString());
//i++;
}
Response.Write(\"\");
Response.Write(\"
Enti ty Id | User Id | USER NAME | USER EMAIL ID | USER PAN NO. | USER DEPT. NAME | REGISTER DATE |
---|---|---|---|---|---|---|
\" + ds.Tables[0].Rows[i][0].ToString() + \" | \" + ds.Tables[0].Rows[i][1].ToString() + \" | \" + ds.Tables[0].Rows[i][2].ToString() + \" | \" + ds.Tables[0].Rows[i][3].ToString() + \" | \" + ds.Tables[0].Rows[i][4].ToString() + \" | \" + ds.Tables[0].Rows[i][5].ToString() + \" | \" + ds.Tables[0].Rows[i][6].ToString() + \" |
// Response.Write(\"\");
//Response.Write(\"/Table\");
//while (ad.Read())
//{
// Response.Write(\"\");
// Response.Write(\" \" + ad.GetValue(0).ToString() + \"\");
// Response.Write(\" \" + ad.GetValue(1).ToString() + \"\");
// //Response.Write(\" \");
// //Response.Write(\"\");
// //Response.Write(\"\");
// Response.Write(\" \" + ad.GetValue(2).ToString() + \"\");
// Response.Write(\" \" + ad.GetValue(3).ToString() + \"\");
// //Response.Write(\" \");
// //Response.Write(\"\");
// //Response.Write(\"\");
// //Response.Write(\"\");
// ////Response.Write(\"®â³âå®âû - 5/Form - 5\");
// //Response.Write(\" \" + ad.GetValue(2).ToString() + \"\");
// //Response.Write(\"\");
// //Response.Write(\"\");
// //Response.Write(\"\");
// Response.Write(\" \" + ad.GetValue(4).ToString() + \"\");
// //Response.Write(\"\");
// //Response.Write(\"\");
// Response.Write(\" \" + ad.GetValue(5).ToString() + \"\");
// //Response.Write(\"\");
// //Response.Write(\"\");
// Response.Write(\" \" + ad.GetValue(6).ToString() + \"\");
// Response.Write(\"\");
//}
//ad.Close();
}
catch (Exception eNI)
{
Response.Write(eNI.Message);
}
finally
{
con.Close();
}
}
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Security;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Net;
using NIPL.AppCode;
using System.Data.OleDb;
using System.Text;
namespace NIPL.NIPL.htmlreport
{
public partial class NI_AD_USER_MST_REPORT11 : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["EMPLOYEE1ConnectionString"].ToString());
cBLayerusermst UM = new cBLayerusermst();
int intuserid = 2;
// public string NI_AD_USER_MST = "";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
try
{
con.Open();
//string NI_AD_QUERY = "";
// HEADER
//string NI_ADUM_ENTITY_ID = Request.QueryString["Entity Id"];
//string NI_ADUM_USER_ID = Request.QueryString["User Id"];
////string NI_Entity_ID = Session[NI_SessionClass.NI_SS_ENTITYID].ToString();
//string NI_ADUM_USER_NAME = Request.QueryString["User Name"];
//string NI_ADUM_USER_EMAIL = Request.QueryString["Email Id"];
//string NI_ADUM_USER_PAN = Request.QueryString["Pan"];
//string NI_ADUM_USER_DEPT_NAME = Request.QueryString["Dept. Name"];
//string NI_ADUM_REGISTER_DATE = Request.QueryString["Register Date"];
// SqlCommand cmd;
//SqlDataReader ad;
//Response.Write("/br");
//Response.Write("");
//Response.Write("");
//Response.Write("");
//Response.Write("");
//Response.Write("");
Response.Write(" ");
Response.Write("");
Response.Write("");
Response.Write("");
Response.Write("");
Response.Write("");
Response.Write("");
Response.Write("");
Response.Write("");
Response.Write("");
//NI_AD_QUERY = "SELECT NI_ADUM_ENTITY_ID,NI_ADUM_USER_ID,NI_ADUM_USER_NAME,NI_ADUM_USER_EMAIL,NI_ADUM_USER_PAN,NI_ADUM_USER_DEPT_NAME, NI_ADUM_USER_REGISTER_DATE FROM nipl.NI_AD_USER_MST ";
// NI_AD_QUERY = "[dbo].[USER_MST_SP] ";
//cmd = new SqlCommand(NI_AD_QUERY, con);
// SqlDataAdapter da = new SqlDataAdapter("[dbo].[USER_MST_SP]", con);
DataSet ds = new DataSet();
UM.NI_AD_GET_HTML_OP(2, out ds);
// da.Fill(ds);
//ad = cmd.ExecuteReader();
int i = 0;
for (i = 0; i < ds.Tables[0].Rows.Count;i++ )
{
Response.Write("");
Response.Write("");
Response.Write("");
Response.Write("");
Response.Write("");
Response.Write("");
Response.Write("");
Response.Write("");
Response.Write("");
//intuserid = intuserid + int.Parse(ds.Tables[0].Rows[i][0].ToString());
//i++;
}
Response.Write("");
Response.Write("
Entity Id | User Id | USER NAME | USER EMAIL ID | USER PAN NO. | USER DEPT. NAME | REGISTER DATE |
---|---|---|---|---|---|---|
" + ds.Tables[0].Rows[i][0].ToString() + " | " + ds.Tables[0].Rows[i][1].ToString() + " | " + ds.Tables[0].Rows[i][2].ToString() + " | " + ds.Tables[0].Rows[i][3].ToString() + " | " + ds.Tables[0].Rows[i][4].ToString() + " | " + ds.Tables[0].Rows[i][5].ToString() + " | " + ds.Tables[0].Rows[i][6].ToString() + " |
// Response.Write("");
//Response.Write("/Table");
//while (ad.Read())
//{
// Response.Write("");
// Response.Write(" " + ad.GetValue(0).ToString() + "");
// Response.Write(" " + ad.GetValue(1).ToString() + "");
// //Response.Write(" ");
// //Response.Write("");
// //Response.Write("");
// Response.Write(" " + ad.GetValue(2).ToString() + "");
// Response.Write(" " + ad.GetValue(3).ToString() + "");
// //Response.Write(" ");
// //Response.Write("");
// //Response.Write("");
// //Response.Write("");
// ////Response.Write("®â³âå®âû - 5/Form - 5");
// //Response.Write(" " + ad.GetValue(2).ToString() + "");
// //Response.Write("");
// //Response.Write("");
// //Response.Write("");
// Response.Write(" " + ad.GetValue(4).ToString() + "");
// //Response.Write("");
// //Response.Write("");
// Response.Write(" " + ad.GetValue(5).ToString() + "");
// //Response.Write("");
// //Response.Write("");
// Response.Write(" " + ad.GetValue(6).ToString() + "");
// Response.Write("");
//}
//ad.Close();
}
catch (Exception eNI)
{
Response.Write(eNI.Message);
}
finally
{
con.Close();
}
}
}
}
}
这篇关于通过使用存储过程和业务层来显示html表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!