DataRow[] drs = dt.Select("ID_PatientExamDepart<>0"); for (int i = 0; i < drs.Length;i++ )
//执行存储过程P_Patient_Fatch Patient ExamItems
{
//存储过程
SqlConnection conn = new SqlConnection("Data Source=SERVER;........Integrated Security=false"); SqlDataAdapter da = new SqlDataAdapter(); da.SelectCommand = new SqlCommand(); DataSet ds = new DataSet(); da.SelectCommand.Connection = conn; da.SelectCommand.CommandText = "存储过程名"; da.SelectCommand.CommandType = CommandType.StoredProcedure; SqlParameter param = new SqlParameter("@ID_PatientExamDepart", SqlDbType.Int); param.Direction = ParameterDirection.Input; param.Value = drs[i][0];
da.SelectCommand.Parameters.Add(param); da.Fill(ds); this.Rpt.DataSource = ds; this.Rpt.DataBind();
}
//执行存储过程P_Patient_Fatch Patient ExamItems
{
//存储过程
SqlConnection conn = new SqlConnection("Data Source=SERVER;........Integrated Security=false"); SqlDataAdapter da = new SqlDataAdapter(); da.SelectCommand = new SqlCommand(); DataSet ds = new DataSet(); da.SelectCommand.Connection = conn; da.SelectCommand.CommandText = "存储过程名"; da.SelectCommand.CommandType = CommandType.StoredProcedure; SqlParameter param = new SqlParameter("@ID_PatientExamDepart", SqlDbType.Int); param.Direction = ParameterDirection.Input; param.Value = drs[i][0];
da.SelectCommand.Parameters.Add(param); da.Fill(ds); this.Rpt.DataSource = ds; this.Rpt.DataBind();
}
解决方案 »
- *****************调用WebService的问题*************
- 跨站引用cookies时为什么取不到值。
- 取值问题!
- 谁能给我一个优秀的项目设计文档
- 小问题请前辈指教
- 在server2003 iis上发布程序,导出Excel功能本机可下载,其他机器访问无法下载
- 请问这么一个asp网页怎么用aspx来写啊??----40分-----??????
- 一个很郁闷的问题,在线等
- 在客户端用JavaScript如何调用C#代码中定义的方法?
- 关于textbox的输入预设格式问题,求教解决的思路!
- asp.net+mysql存储分页问题
- Server.Transfer事件回发问题??
对,就是想把几次出现的数据都绑定到repeater上!