后台按照常规的李天平的代码生成器来生成的后台(如果是平台开发,可用其他形式,有时间再论)
先看数据访问层(DAL)
项目名:DAL
DLHTHuiFu.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using Maticsoft.DBUtility;
6
using System.Data;
7
using IClass;
8
using System.Data.SqlClient;
9![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
10
namespace DAL
11![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
12
public class DLHTHuiFu
13![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
14![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
成员方法#region 成员方法
15![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
16
/// 是否存在该记录
17
/// </summary> 18
public bool Exists(int HfId)
19![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
20
StringBuilder strSql = new StringBuilder();
21
strSql.Append("select count(1) from HTHuiFu");
22
strSql.Append(" where HfId=@HfId ");
23![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
SqlParameter[] parameters =
{
24
new SqlParameter("@HfId", SqlDbType.Int,4)};
25
parameters[0].Value = HfId;
26![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
27
return DbHelperSQL.Exists(strSql.ToString(), parameters);
28
}
29![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
30![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
31![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
32
/// 增加一条数据
33
/// </summary> 34
public int Add(HTHuiFu model)
35![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
36
StringBuilder strSql = new StringBuilder();
37
strSql.Append("insert into HTHuiFu(");
38
strSql.Append("FBRenName,FanKuiNeiRong,HTId)");
39
strSql.Append(" values (");
40
strSql.Append("@FBRenName,@FanKuiNeiRong,@HTId)");
41
strSql.Append(";select @@IDENTITY");
42![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
SqlParameter[] parameters =
{
43
new SqlParameter("@FBRenName", SqlDbType.VarChar,500),
44
new SqlParameter("@FanKuiNeiRong", SqlDbType.VarChar,5003),
45
new SqlParameter("@HTId",SqlDbType.Int) };
46
parameters[0].Value = model.FBRenName1;
47
parameters[1].Value = model.FanKuiNeiRong1;
48
parameters[2].Value = model.HTId1;
49![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
50
object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
51
if (obj == null)
52![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
53
return 1;
54
}
55
else
56![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
57
return Convert.ToInt32(obj);
58
}
59
}
60![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
61
/// 更新一条数据
62
/// </summary> 63
public void Update(HTHuiFu model)
64![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
65
StringBuilder strSql = new StringBuilder();
66
strSql.Append("update HTHuiFu set ");
67
strSql.Append("FBRenName=@FBRenName,");
68
strSql.Append("FanKuiNeiRong=@FanKuiNeiRong");
69
strSql.Append(" where HfId=@HfId ");
70![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
SqlParameter[] parameters =
{
71
new SqlParameter("@HfId", SqlDbType.Int,4),
72
new SqlParameter("@FBRenName", SqlDbType.VarChar,500),
73
new SqlParameter("@FanKuiNeiRong", SqlDbType.VarChar,5003)};
74
parameters[0].Value = model.HfId1;
75
parameters[1].Value = model.FBRenName1;
76
parameters[2].Value = model.FanKuiNeiRong1;
77![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
78
DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
79
}
80![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
81![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
82
/// 删除一条数据
83
/// </summary> 84
public void Delete(int HfId)
85![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
86![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
87
StringBuilder strSql = new StringBuilder();
88
strSql.Append("delete HTHuiFu ");
89
strSql.Append(" where HfId=@HfId ");
90![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
SqlParameter[] parameters =
{
91
new SqlParameter("@HfId", SqlDbType.Int,4)};
92
parameters[0].Value = HfId;
93![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
94
DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
95
}
96![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
97![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
98![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
99
/// 得到一个对象实体
100
/// </summary>101
public HTHuiFu GetModel(int HfId)
102![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
103![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
104
StringBuilder strSql = new StringBuilder();
105
strSql.Append("select top 1 HfId,FBRenName,FanKuiNeiRong,HTId from HTHuiFu ");
106
strSql.Append(" where HfId=@HfId ");
107![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
SqlParameter[] parameters =
{
108
new SqlParameter("@HfId", SqlDbType.Int,4)};
109
parameters[0].Value = HfId;
110![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
111
HTHuiFu model = new HTHuiFu();
112
DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
113
if (ds.Tables[0].Rows.Count > 0)
114![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
115
if (ds.Tables[0].Rows[0]["HfId"].ToString() != "")
116![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
117
model.HfId1 = int.Parse(ds.Tables[0].Rows[0]["HfId"].ToString());
118
}
119
model.FBRenName1 = ds.Tables[0].Rows[0]["FBRenName"].ToString();
120
model.FanKuiNeiRong1 = ds.Tables[0].Rows[0]["FanKuiNeiRong"].ToString();
121
model.HTId1 = Convert.ToInt32(ds.Tables[0].Rows[0]["HTId"].ToString());
122
return model;
123
}
124
else
125![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
126
return null;
127
}
128
}
129![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
130![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
131
/// 获得数据列表
132
/// </summary>133
public DataSet GetList(string strWhere)
134![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
135
StringBuilder strSql = new StringBuilder();
136
strSql.Append("select HfId,FBRenName,FanKuiNeiRong,HTId ");
137
strSql.Append(" FROM HTHuiFu ");
138
if (strWhere.Trim() != "")
139![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
140
strSql.Append(" where " + strWhere);
141
}
142
return DbHelperSQL.Query(strSql.ToString());
143
}
144![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
145
#endregion 成员方法
146![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
147
}
148
}
149
DLMaster.cs
1
using System;
2
using System.Data;
3
using System.Text;
4
using System.Data.SqlClient;
5
using Maticsoft.DBUtility;
6
using IClass;
7![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
8
namespace DAL
9![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
10![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
11
/// 数据访问类Master。
12
/// </summary> 13
public class DLMaster
14![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
15
public DLMaster()
16![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{ }
17![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
成员方法#region 成员方法
18![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
19![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
20
/// 增加一条数据
21
/// </summary> 22
public void Add(IClass.Master model)
23![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
24
StringBuilder strSql = new StringBuilder();
25
strSql.Append("insert into Master(");
26
strSql.Append("id,bl,flage)");
27
strSql.Append(" values (");
28
strSql.Append("@id,@bl,@flage)");
29![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
SqlParameter[] parameters =
{
30
new SqlParameter("@id", SqlDbType.VarChar,500),
31
new SqlParameter("@bl", SqlDbType.VarChar,500),
32
new SqlParameter("@flage", SqlDbType.VarChar,500)};
33
parameters[0].Value = model.Id;
34
parameters[1].Value = model.Bl;
35
parameters[2].Value = model.Flage;
36![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
37
DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
38
}
39![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
40
/// 删除一条数据
41
/// </summary> 42
public void Delete(string id)
43![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
44![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
45
StringBuilder strSql = new StringBuilder();
46
strSql.Append("delete Master ");
47
strSql.Append(" where id=@id ");
48![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
SqlParameter[] parameters =
{
49
new SqlParameter("@id", SqlDbType.VarChar,50)};
50
parameters[0].Value = id;
51![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
52
DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
53
}
54![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
55![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
56![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
57
/// 得到一个对象实体
58
/// </summary> 59
public Master GetModel(string id)
60![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
61![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
62
StringBuilder strSql = new StringBuilder();
63
strSql.Append("select top 1 id,bl,flage from Master ");
64
strSql.Append(" where id=@id ");
65![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
SqlParameter[] parameters =
{
66
new SqlParameter("@id", SqlDbType.VarChar,50)};
67
parameters[0].Value = id;
68![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
69
Master model = new Master();
70
DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
71
if (ds.Tables[0].Rows.Count > 0)
72![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
73
model.Id = ds.Tables[0].Rows[0]["id"].ToString();
74
model.Bl = Convert.ToBoolean(ds.Tables[0].Rows[0]["bl"].ToString());
75
model.Flage = ds.Tables[0].Rows[0]["flage"].ToString();
76
return model;
77
}
78
else
79![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
80
return null;
81
}
82
}
83![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
84![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
85
/// 获得数据列表
86
/// </summary> 87
public DataSet GetList(string strWhere)
88![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
89
StringBuilder strSql = new StringBuilder();
90
strSql.Append("select id,bl,flage ");
91
strSql.Append(" FROM Master ");
92
if (strWhere.Trim() != "")
93![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
94
strSql.Append(" where " + strWhere);
95
}
96
return DbHelperSQL.Query(strSql.ToString());
97
}
98![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
99![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//*
100
/// <summary>
101
/// 分页获取数据列表
102
/// </summary>
103
public DataSet GetList(int PageSize,int PageIndex,string strWhere)
104
{
105
SqlParameter[] parameters = {
106
new SqlParameter("@tblName", SqlDbType.VarChar, 255),
107
new SqlParameter("@fldName", SqlDbType.VarChar, 255),
108
new SqlParameter("@PageSize", SqlDbType.Int),
109
new SqlParameter("@PageIndex", SqlDbType.Int),
110
new SqlParameter("@IsReCount", SqlDbType.Bit),
111
new SqlParameter("@OrderType", SqlDbType.Bit),
112
new SqlParameter("@strWhere", SqlDbType.VarChar,1000),
113
};
114
parameters[0].Value = "Master";
115
parameters[1].Value = "ID";
116
parameters[2].Value = PageSize;
117
parameters[3].Value = PageIndex;
118
parameters[4].Value = 0;
119
parameters[5].Value = 0;
120
parameters[6].Value = strWhere;
121
return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
122
}*/
123![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
124
#endregion 成员方法
125
}
126
}
127
DLHuaTi.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using IClass;
6
using Maticsoft.DBUtility;
7
using System.Data;
8
using System.Data.SqlClient;
9![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
10
namespace DAL
11![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
12
public class DLHuaTi
13![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
14![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
成员方法#region 成员方法
15![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
16
/// 是否存在该记录
17
/// </summary> 18
public bool Exists(int HTID)
19![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
20
StringBuilder strSql = new StringBuilder();
21
strSql.Append("select count(1) from HuaTi");
22
strSql.Append(" where HTID=@HTID ");
23![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
SqlParameter[] parameters =
{
24
new SqlParameter("@HTID", SqlDbType.Int,4)};
25
parameters[0].Value = HTID;
26![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
27
return DbHelperSQL.Exists(strSql.ToString(), parameters);
28
}
29![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
30![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
31![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
32
/// 增加一条数据
33
/// </summary> 34
public int Add(HuaTi model)
35![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
36
StringBuilder strSql = new StringBuilder();
37
strSql.Append("insert into HuaTi(");
38
strSql.Append("HTName,HTNeiRong,State,dt)");
39
strSql.Append(" values (");
40
strSql.Append("@HTName,@HTNeiRong,@State,@dt)");
41
strSql.Append(";select @@IDENTITY");
42![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
SqlParameter[] parameters =
{
43
new SqlParameter("@HTName", SqlDbType.VarChar,500),
44
new SqlParameter("@HTNeiRong", SqlDbType.VarChar,5000),
45
new SqlParameter("@State", SqlDbType.Int,4),
46
new SqlParameter("@dt", SqlDbType.DateTime)};
47
parameters[0].Value = model.HTName1;
48
parameters[1].Value = model.HTNeiRong1;
49
parameters[2].Value = model.State1;
50
parameters[3].Value = model.Dt;
51![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
52
object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
53
if (obj == null)
54![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
55
return 1;
56
}
57
else
58![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
59
return Convert.ToInt32(obj);
60
}
61
}
62![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
63
/// 更新一条数据
64
/// </summary> 65
public void Update(HuaTi model)
66![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
67
StringBuilder strSql = new StringBuilder();
68
strSql.Append("update HuaTi set ");
69
strSql.Append("HTName=@HTName,");
70
strSql.Append("HTNeiRong=@HTNeiRong,");
71
strSql.Append("State=@State,");
72
strSql.Append("dt=@dt");
73
strSql.Append(" where HTID=@HTID ");
74![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
SqlParameter[] parameters =
{
75
new SqlParameter("@HTID", SqlDbType.Int,4),
76
new SqlParameter("@HTName", SqlDbType.VarChar,500),
77
new SqlParameter("@HTNeiRong", SqlDbType.VarChar,500),
78
new SqlParameter("@State", SqlDbType.Int,4),
79
new SqlParameter("@dt", SqlDbType.DateTime)};
80
parameters[0].Value = model.HTID1;
81
parameters[1].Value = model.HTName1;
82
parameters[2].Value = model.HTNeiRong1;
83
parameters[3].Value = model.State1;
84
parameters[4].Value = model.Dt;
85![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
86
DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
87
}
88![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
89![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
90
/// 删除一条数据
91
/// </summary> 92
public void Delete(int HTID)
93![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
94![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
95
StringBuilder strSql = new StringBuilder();
96
strSql.Append("delete HuaTi ");
97
strSql.Append(" where HTID=@HTID ");
98![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
SqlParameter[] parameters =
{
99
new SqlParameter("@HTID", SqlDbType.Int,4)};
100
parameters[0].Value = HTID;
101![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
102
DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
103
}
104![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
105![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
106![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
107
/// 得到一个对象实体
108
/// </summary>109
public HuaTi GetModel(int HTID)
110![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
111![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
112
StringBuilder strSql = new StringBuilder();
113
strSql.Append("select top 1 HTID,HTName,HTNeiRong,State,dt from HuaTi ");
114
strSql.Append(" where HTID=@HTID ");
115![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
SqlParameter[] parameters =
{
116
new SqlParameter("@HTID", SqlDbType.Int,4)};
117
parameters[0].Value = HTID;
118![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
119
HuaTi model = new HuaTi();
120
DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
121
if (ds.Tables[0].Rows.Count > 0)
122![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
123
if (ds.Tables[0].Rows[0]["HTID"].ToString() != "")
124![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
125
model.HTID1 = int.Parse(ds.Tables[0].Rows[0]["HTID"].ToString());
126
}
127
model.HTName1 = ds.Tables[0].Rows[0]["HTName"].ToString();
128
model.HTNeiRong1 = ds.Tables[0].Rows[0]["HTNeiRong"].ToString();
129
if (ds.Tables[0].Rows[0]["State"].ToString() != "")
130![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
131
model.State1 = int.Parse(ds.Tables[0].Rows[0]["State"].ToString());
132
}
133
if (ds.Tables[0].Rows[0]["dt"].ToString() != "")
134![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
135
model.Dt = DateTime.Parse(ds.Tables[0].Rows[0]["dt"].ToString());
136
}
137
return model;
138
}
139
else
140![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
141
return null;
142
}
143
}
144![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
145![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
/**//// <summary>
146
/// 获得数据列表
147
/// </summary>148
public DataSet GetList(string strWhere)
149![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
150
StringBuilder strSql = new StringBuilder();
151
strSql.Append("select HTID,HTName,HTNeiRong,State,dt ");
152
strSql.Append(" FROM HuaTi ");
153
if (strWhere.Trim() != "")
154![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
155
strSql.Append(" where " + strWhere);
156
}
157
return DbHelperSQL.Query(strSql.ToString());
158
}
159![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
160
#endregion 成员方法
161
}
162
}
163
基于WF的意见征集1(浅析)
基于WF的意见征集3(浅析)
基于WF的意见征集4(浅析)
基于WF的意见征集5(浅析)
基于WF的意见征集6(浅析)
基于WF的意见征集7(浅析)