码迷,mamicode.com
首页 > 其他好文 > 详细

存储过程

时间:2017-03-19 11:56:05      阅读:170      评论:0      收藏:0      [点我收藏+]

标签:sch   run   work   sel   car   teacher   new   pre   birt   

 1   StringBuilder FieldShow = new StringBuilder();
 2             //排序字段
 3             StringBuilder FieldOrder = new StringBuilder();
 4             //查询条件
 5             string WhereString = GetStrWhere(SelectCondition);
 6             //添加排序的字段
 7             FieldOrder.Append("TeaId");
 8             //添加显示的字段 
 9             FieldShow.Append("TeaId,IdentityCard,Name,PartFullTime,PartFullTimeName,Sex,TeacherId,Workload,Position,WorkTitle,Degree,TeaStatus,TeaStatusName,MechanismId,birthday,nation,EntryTime,PoliticsStatus,OtherSchool,MechanismName,Remark");
10 
11             SqlParameter[] parameters = {
12                     new SqlParameter("@tbname", SqlDbType.NVarChar,100),
13                     new SqlParameter("@PageCurrent", SqlDbType.Int,4),
14                     new SqlParameter("@PageSize", SqlDbType.Int,4),
15                     new SqlParameter("@FieldShow", SqlDbType.NVarChar,2000),
16                     new SqlParameter("@FieldOrder", SqlDbType.NVarChar,100),
17                     new SqlParameter("@WhereString", SqlDbType.NVarChar,500),
18                     new SqlParameter("@RecordCount", SqlDbType.Int,4)};
19             parameters[0].Value = "VCTeacherList";
20             parameters[1].Value = PageCurrent;
21             parameters[2].Value = PageSize;
22             parameters[3].Value = FieldShow.ToString();
23             parameters[4].Value = FieldOrder.ToString();
24             parameters[5].Value = WhereString;
25             parameters[6].Value = RecordCount;
26 
27             DataSet Ds = DbHelperSQL.RunProcedure("[dbo].[PROCE_SQL2000PAGECHANGE]", parameters, "TableName");
28             return Ds;

 

存储过程

标签:sch   run   work   sel   car   teacher   new   pre   birt   

原文地址:http://www.cnblogs.com/wangsen123/p/6579466.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!