|
|
@@ -54,12 +54,13 @@ namespace CallCenterApi.DAL
|
|
54
|
54
|
strSql.Append("insert into T_RepositoryInformation(");
|
|
55
|
55
|
strSql.Append(@"F_CategoryId,F_CustomerId,F_CustomerName,F_ManId,F_ManName,
|
|
56
|
56
|
F_Title,F_Content,F_Description,F_Comments,F_Url,F_KeyWords,F_Expand1,F_Expand2,F_IntExpand1,
|
|
57
|
|
-F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFlag,F_visibleDeptId )");
|
|
|
57
|
+F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFlag,
|
|
|
58
|
+F_visibleDeptId,F_isorPerson )");
|
|
58
|
59
|
strSql.Append(" values (");
|
|
59
|
60
|
strSql.Append(@"@F_CategoryId,@F_CustomerId,@F_CustomerName,@F_ManId,
|
|
60
|
61
|
@F_ManName,@F_Title,@F_Content,@F_Description,@F_Comments,@F_Url,@F_KeyWords,@F_Expand1,
|
|
61
|
62
|
@F_Expand2,@F_IntExpand1,@F_CreateOn,@F_CreateBy,@F_CreateName,@F_ModifyOn,@F_ModifyBy,
|
|
62
|
|
-@F_ModifyName,@F_DeleteFlag,@F_visibleDeptId )");
|
|
|
63
|
+@F_ModifyName,@F_DeleteFlag,@F_visibleDeptId,@F_isorPerson )");
|
|
63
|
64
|
strSql.Append(";select @@IDENTITY");
|
|
64
|
65
|
SqlParameter[] parameters = {
|
|
65
|
66
|
new SqlParameter("@F_CategoryId", SqlDbType.Int,4),
|
|
|
@@ -83,7 +84,8 @@ F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFl
|
|
83
|
84
|
new SqlParameter("@F_ModifyBy", SqlDbType.Int,4),
|
|
84
|
85
|
new SqlParameter("@F_ModifyName", SqlDbType.NVarChar,200),
|
|
85
|
86
|
new SqlParameter("@F_DeleteFlag", SqlDbType.SmallInt,2),
|
|
86
|
|
- new SqlParameter("@F_visibleDeptId", SqlDbType.Int,2)};
|
|
|
87
|
+ new SqlParameter("@F_visibleDeptId", SqlDbType.Int,2),
|
|
|
88
|
+ new SqlParameter("@F_isorPerson", SqlDbType.Int,2)};
|
|
87
|
89
|
parameters[0].Value = model.F_CategoryId;
|
|
88
|
90
|
parameters[1].Value = model.F_CustomerId;
|
|
89
|
91
|
parameters[2].Value = model.F_CustomerName;
|
|
|
@@ -105,7 +107,8 @@ F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFl
|
|
105
|
107
|
parameters[18].Value = model.F_ModifyBy;
|
|
106
|
108
|
parameters[19].Value = model.F_ModifyName;
|
|
107
|
109
|
parameters[20].Value = model.F_DeleteFlag;
|
|
108
|
|
- parameters[21].Value = model.F_visibleDeptId;
|
|
|
110
|
+ parameters[21].Value = model.F_visibleDeptId;
|
|
|
111
|
+ parameters[22].Value = model.F_isorPerson;
|
|
109
|
112
|
object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
|
|
110
|
113
|
if (obj == null)
|
|
111
|
114
|
{
|
|
|
@@ -148,7 +151,9 @@ F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFl
|
|
148
|
151
|
strSql.Append("F_ModifyBy=@F_ModifyBy,");
|
|
149
|
152
|
strSql.Append("F_ModifyName=@F_ModifyName,");
|
|
150
|
153
|
strSql.Append("F_DeleteFlag=@F_DeleteFlag");
|
|
151
|
|
- strSql.Append("F_visibleDeptId=@F_visibleDeptId");
|
|
|
154
|
+ strSql.Append("F_DeleteFlag=@F_DeleteFlag");
|
|
|
155
|
+ strSql.Append("F_RepositoryId=@F_RepositoryId");
|
|
|
156
|
+ strSql.Append("F_isorPerson=@F_isorPerson");
|
|
152
|
157
|
strSql.Append(" where F_RepositoryId=@F_RepositoryId");
|
|
153
|
158
|
SqlParameter[] parameters = {
|
|
154
|
159
|
new SqlParameter("@F_CategoryId", SqlDbType.Int,4),
|
|
|
@@ -173,8 +178,9 @@ F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFl
|
|
173
|
178
|
new SqlParameter("@F_ModifyName", SqlDbType.NVarChar,200),
|
|
174
|
179
|
new SqlParameter("@F_DeleteFlag", SqlDbType.SmallInt,2),
|
|
175
|
180
|
new SqlParameter("@F_RepositoryId", SqlDbType.Int,4),
|
|
176
|
|
- new SqlParameter("@F_visibleDeptId", SqlDbType.Int,4)};
|
|
177
|
|
- parameters[0].Value = model.F_CategoryId;
|
|
|
181
|
+ new SqlParameter("@F_visibleDeptId", SqlDbType.Int,4),
|
|
|
182
|
+ new SqlParameter("@F_isorPerson", SqlDbType.Int,4)};
|
|
|
183
|
+ parameters[0].Value = model.F_CategoryId;
|
|
178
|
184
|
parameters[1].Value = model.F_CustomerId;
|
|
179
|
185
|
parameters[2].Value = model.F_CustomerName;
|
|
180
|
186
|
parameters[3].Value = model.F_ManId;
|
|
|
@@ -195,8 +201,9 @@ F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFl
|
|
195
|
201
|
parameters[18].Value = model.F_ModifyBy;
|
|
196
|
202
|
parameters[19].Value = model.F_ModifyName;
|
|
197
|
203
|
parameters[20].Value = model.F_DeleteFlag;
|
|
198
|
|
- parameters[21].Value = model.F_RepositoryId;
|
|
199
|
|
- parameters[22].Value = model.F_visibleDeptId;
|
|
|
204
|
+ parameters[21].Value = model.F_RepositoryId;
|
|
|
205
|
+ parameters[22].Value = model.F_visibleDeptId;
|
|
|
206
|
+ parameters[23].Value = model.F_isorPerson;
|
|
200
|
207
|
int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
|
|
201
|
208
|
if (rows > 0)
|
|
202
|
209
|
{
|
|
|
@@ -266,7 +273,7 @@ F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFl
|
|
266
|
273
|
strSql.Append(@"select top 1 F_RepositoryId,F_CategoryId,F_CustomerId,F_CustomerName,
|
|
267
|
274
|
F_ManId,F_ManName,F_Title,F_Content,F_Description,F_Comments,F_Url,F_KeyWords,F_Expand1,
|
|
268
|
275
|
F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,
|
|
269
|
|
-F_DeleteFlag,F_visibleDeptId from T_RepositoryInformation WITH(NOLOCK) ");
|
|
|
276
|
+F_DeleteFlag,F_visibleDeptId ,F_isorPerson from T_RepositoryInformation WITH(NOLOCK) ");
|
|
270
|
277
|
strSql.Append(" where F_RepositoryId=@F_RepositoryId");
|
|
271
|
278
|
SqlParameter[] parameters = {
|
|
272
|
279
|
new SqlParameter("@F_RepositoryId", SqlDbType.Int,4)
|
|
|
@@ -387,6 +394,11 @@ F_DeleteFlag,F_visibleDeptId from T_RepositoryInformation WITH(NOLOCK) ");
|
|
387
|
394
|
{
|
|
388
|
395
|
model.F_visibleDeptId = int.Parse(row["F_visibleDeptId"].ToString());
|
|
389
|
396
|
}
|
|
|
397
|
+ if (row["F_isorPerson"] != null && row["F_isorPerson"].ToString() != "")
|
|
|
398
|
+ {
|
|
|
399
|
+ model.F_isorPerson = int.Parse(row["F_isorPerson"].ToString());
|
|
|
400
|
+ }
|
|
|
401
|
+
|
|
390
|
402
|
}
|
|
391
|
403
|
return model;
|
|
392
|
404
|
}
|
|
|
@@ -399,7 +411,8 @@ F_DeleteFlag,F_visibleDeptId from T_RepositoryInformation WITH(NOLOCK) ");
|
|
399
|
411
|
StringBuilder strSql = new StringBuilder();
|
|
400
|
412
|
strSql.Append(@"select F_RepositoryId,F_CategoryId,F_CustomerId,F_CustomerName,
|
|
401
|
413
|
F_ManId,F_ManName,F_Title,F_Content,F_Description,F_Comments,F_Url,F_KeyWords,F_Expand1
|
|
402
|
|
-,F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFlag,F_visibleDeptId ");
|
|
|
414
|
+,F_Expand2,F_IntExpand1,F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,
|
|
|
415
|
+F_DeleteFlag,F_visibleDeptId,F_isorPerson ");
|
|
403
|
416
|
strSql.Append(" FROM T_RepositoryInformation WITH(NOLOCK)");
|
|
404
|
417
|
if (strWhere.Trim() != "")
|
|
405
|
418
|
{
|
|
|
@@ -421,7 +434,8 @@ F_ManId,F_ManName,F_Title,F_Content,F_Description,F_Comments,F_Url,F_KeyWords,F_
|
|
421
|
434
|
}
|
|
422
|
435
|
strSql.Append(@" F_RepositoryId,F_CategoryId,F_CustomerId,F_CustomerName,F_ManId,
|
|
423
|
436
|
F_ManName,F_Title,F_Content,F_Description,F_Comments,F_Url,F_KeyWords,F_Expand1,F_Expand2,
|
|
424
|
|
-F_IntExpand1,F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFlag,F_visibleDeptId ");
|
|
|
437
|
+F_IntExpand1,F_CreateOn,F_CreateBy,F_CreateName,F_ModifyOn,F_ModifyBy,F_ModifyName,F_DeleteFlag,
|
|
|
438
|
+F_visibleDeptId,F_isorPerson ");
|
|
425
|
439
|
strSql.Append(" FROM T_RepositoryInformation WITH(NOLOCK)");
|
|
426
|
440
|
if (strWhere.Trim() != "")
|
|
427
|
441
|
{
|