|
|
@@ -50,9 +50,9 @@ namespace CallCenterApi.DAL
|
|
50
|
50
|
{
|
|
51
|
51
|
StringBuilder strSql = new StringBuilder();
|
|
52
|
52
|
strSql.Append("insert into T_RepositoryInformation(");
|
|
53
|
|
- strSql.Append("F_CategoryId,F_CustomerId,F_CustomerName,F_ManId,F_ManName,F_Title,F_Content,F_Description,F_Comments,F_Url,F_KeyWords,F_Expand1,F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFlag)");
|
|
|
53
|
+ strSql.Append("F_CategoryId,F_CustomerId,F_CustomerName,F_ManId,F_ManName,F_Title,F_Content,F_Description,F_Comments,F_Url,F_KeyWords,F_Expand1,F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFlag,F_CanLastLong,F_StartTime,F_EndTime)");
|
|
54
|
54
|
strSql.Append(" values (");
|
|
55
|
|
- strSql.Append("@F_CategoryId,@F_CustomerId,@F_CustomerName,@F_ManId,@F_ManName,@F_Title,@F_Content,@F_Description,@F_Comments,@F_Url,@F_KeyWords,@F_Expand1,@F_Expand2,@F_IntExpand1,@F_CreateOn,@F_CreateBy,@F_CreateName,@F_ModifyOn,@F_ModifyBy,@F_ModifyName,@F_DeleteFlag)");
|
|
|
55
|
+ strSql.Append("@F_CategoryId,@F_CustomerId,@F_CustomerName,@F_ManId,@F_ManName,@F_Title,@F_Content,@F_Description,@F_Comments,@F_Url,@F_KeyWords,@F_Expand1,@F_Expand2,@F_IntExpand1,@F_CreateOn,@F_CreateBy,@F_CreateName,@F_ModifyOn,@F_ModifyBy,@F_ModifyName,@F_DeleteFlag,@F_CanLastLong,@F_StartTime,@F_EndTime)");
|
|
56
|
56
|
strSql.Append(";select @@IDENTITY");
|
|
57
|
57
|
SqlParameter[] parameters = {
|
|
58
|
58
|
new SqlParameter("@F_CategoryId", SqlDbType.Int,4),
|
|
|
@@ -75,7 +75,13 @@ namespace CallCenterApi.DAL
|
|
75
|
75
|
new SqlParameter("@F_ModifyOn", SqlDbType.DateTime),
|
|
76
|
76
|
new SqlParameter("@F_ModifyBy", SqlDbType.Int,4),
|
|
77
|
77
|
new SqlParameter("@F_ModifyName", SqlDbType.NVarChar,200),
|
|
78
|
|
- new SqlParameter("@F_DeleteFlag", SqlDbType.SmallInt,2)};
|
|
|
78
|
+ new SqlParameter("@F_DeleteFlag", SqlDbType.SmallInt,2),
|
|
|
79
|
+ new SqlParameter("@F_CanLastLong", SqlDbType.Int),
|
|
|
80
|
+ new SqlParameter("@F_StartTime", SqlDbType.DateTime),
|
|
|
81
|
+ new SqlParameter("@F_EndTime", SqlDbType.DateTime)
|
|
|
82
|
+
|
|
|
83
|
+
|
|
|
84
|
+ };
|
|
79
|
85
|
parameters[0].Value = model.F_CategoryId;
|
|
80
|
86
|
parameters[1].Value = model.F_CustomerId;
|
|
81
|
87
|
parameters[2].Value = model.F_CustomerName;
|
|
|
@@ -97,6 +103,10 @@ namespace CallCenterApi.DAL
|
|
97
|
103
|
parameters[18].Value = model.F_ModifyBy;
|
|
98
|
104
|
parameters[19].Value = model.F_ModifyName;
|
|
99
|
105
|
parameters[20].Value = model.F_DeleteFlag;
|
|
|
106
|
+ parameters[21].Value = model.F_CanLastLong;
|
|
|
107
|
+ parameters[22].Value = model.F_StartTime;
|
|
|
108
|
+ parameters[23].Value = model.F_EndTime;
|
|
|
109
|
+
|
|
100
|
110
|
|
|
101
|
111
|
object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
|
|
102
|
112
|
if (obj == null)
|
|
|
@@ -159,6 +169,9 @@ namespace CallCenterApi.DAL
|
|
159
|
169
|
new SqlParameter("@F_ModifyBy", SqlDbType.Int,4),
|
|
160
|
170
|
new SqlParameter("@F_ModifyName", SqlDbType.NVarChar,200),
|
|
161
|
171
|
new SqlParameter("@F_DeleteFlag", SqlDbType.SmallInt,2),
|
|
|
172
|
+ new SqlParameter("@F_CanLastLong", SqlDbType.Int),
|
|
|
173
|
+ new SqlParameter("@F_StartTime", SqlDbType.DateTime),
|
|
|
174
|
+ new SqlParameter("@F_EndTime", SqlDbType.DateTime),
|
|
162
|
175
|
new SqlParameter("@F_RepositoryId", SqlDbType.Int,4)};
|
|
163
|
176
|
parameters[0].Value = model.F_CategoryId;
|
|
164
|
177
|
parameters[1].Value = model.F_CustomerId;
|
|
|
@@ -181,7 +194,10 @@ namespace CallCenterApi.DAL
|
|
181
|
194
|
parameters[18].Value = model.F_ModifyBy;
|
|
182
|
195
|
parameters[19].Value = model.F_ModifyName;
|
|
183
|
196
|
parameters[20].Value = model.F_DeleteFlag;
|
|
184
|
|
- parameters[21].Value = model.F_RepositoryId;
|
|
|
197
|
+ parameters[21].Value = model.F_CanLastLong;
|
|
|
198
|
+ parameters[22].Value = model.F_StartTime;
|
|
|
199
|
+ parameters[23].Value = model.F_EndTime;
|
|
|
200
|
+ parameters[24].Value = model.F_RepositoryId;
|
|
185
|
201
|
|
|
186
|
202
|
int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
|
|
187
|
203
|
if (rows > 0)
|
|
|
@@ -247,7 +263,7 @@ namespace CallCenterApi.DAL
|
|
247
|
263
|
{
|
|
248
|
264
|
|
|
249
|
265
|
StringBuilder strSql = new StringBuilder();
|
|
250
|
|
- strSql.Append("select top 1 F_RepositoryId,F_CategoryId,F_CustomerId,F_CustomerName,F_ManId,F_ManName,F_Title,F_Content,F_Description,F_Comments,F_Url,F_KeyWords,F_Expand1,F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFlag from T_RepositoryInformation ");
|
|
|
266
|
+ strSql.Append("select top 1 F_RepositoryId,F_CategoryId,F_CustomerId,F_CustomerName,F_ManId,F_ManName,F_Title,F_Content,F_Description,F_Comments,F_Url,F_KeyWords,F_Expand1,F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFlag,F_CanLastLong,F_StartTime,F_EndTime from T_RepositoryInformation ");
|
|
251
|
267
|
strSql.Append(" where F_RepositoryId=@F_RepositoryId");
|
|
252
|
268
|
SqlParameter[] parameters = {
|
|
253
|
269
|
new SqlParameter("@F_RepositoryId", SqlDbType.Int,4)
|
|
|
@@ -363,6 +379,19 @@ namespace CallCenterApi.DAL
|
|
363
|
379
|
{
|
|
364
|
380
|
model.F_DeleteFlag = int.Parse(row["F_DeleteFlag"].ToString());
|
|
365
|
381
|
}
|
|
|
382
|
+ if (row["F_CanLastLong"] != null && row["F_CanLastLong"].ToString() != "")
|
|
|
383
|
+ {
|
|
|
384
|
+ model.F_CanLastLong = row["F_CanLastLong"] == DBNull.Value ? 0 : int.Parse(row["F_CanLastLong"].ToString());
|
|
|
385
|
+ }
|
|
|
386
|
+ if (row["F_StartTime"] != null && row["F_StartTime"].ToString() != "")
|
|
|
387
|
+ {
|
|
|
388
|
+ model.F_StartTime = row["F_StartTime"] == DBNull.Value ? (DateTime?)null : Convert.ToDateTime(row["F_StartTime"]);
|
|
|
389
|
+ }
|
|
|
390
|
+ if (row["F_EndTime"] != null && row["F_EndTime"].ToString() != "")
|
|
|
391
|
+ {
|
|
|
392
|
+ model.F_EndTime = row["F_EndTime"] == DBNull.Value ? (DateTime?)null : Convert.ToDateTime(row["F_EndTime"]);
|
|
|
393
|
+ }
|
|
|
394
|
+
|
|
366
|
395
|
}
|
|
367
|
396
|
return model;
|
|
368
|
397
|
}
|
|
|
@@ -373,7 +402,7 @@ namespace CallCenterApi.DAL
|
|
373
|
402
|
public DataSet GetList(string strWhere)
|
|
374
|
403
|
{
|
|
375
|
404
|
StringBuilder strSql = new StringBuilder();
|
|
376
|
|
- strSql.Append("select F_RepositoryId,F_CategoryId,F_CustomerId,F_CustomerName,F_ManId,F_ManName,F_Title,F_Content,F_Description,F_Comments,F_Url,F_KeyWords,F_Expand1,F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFlag ");
|
|
|
405
|
+ strSql.Append("select F_RepositoryId,F_CategoryId,F_CustomerId,F_CustomerName,F_ManId,F_ManName,F_Title,F_Content,F_Description,F_Comments,F_Url,F_KeyWords,F_Expand1,F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFlag,F_CanLastLong,F_StartTime,F_EndTime ");
|
|
377
|
406
|
strSql.Append(" FROM T_RepositoryInformation ");
|
|
378
|
407
|
if (strWhere.Trim() != "")
|
|
379
|
408
|
{
|
|
|
@@ -393,7 +422,7 @@ namespace CallCenterApi.DAL
|
|
393
|
422
|
{
|
|
394
|
423
|
strSql.Append(" top " + Top.ToString());
|
|
395
|
424
|
}
|
|
396
|
|
- strSql.Append(" F_RepositoryId,F_CategoryId,F_CustomerId,F_CustomerName,F_ManId,F_ManName,F_Title,F_Content,F_Description,F_Comments,F_Url,F_KeyWords,F_Expand1,F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFlag ");
|
|
|
425
|
+ strSql.Append(" F_RepositoryId,F_CategoryId,F_CustomerId,F_CustomerName,F_ManId,F_ManName,F_Title,F_Content,F_Description,F_Comments,F_Url,F_KeyWords,F_Expand1,F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFlag,F_CanLastLong,F_StartTime,F_EndTime ");
|
|
397
|
426
|
strSql.Append(" FROM T_RepositoryInformation ");
|
|
398
|
427
|
if (strWhere.Trim() != "")
|
|
399
|
428
|
{
|