|
|
@@ -41,9 +41,9 @@ namespace CallCenterApi.DAL
|
|
41
|
41
|
{
|
|
42
|
42
|
StringBuilder strSql = new StringBuilder();
|
|
43
|
43
|
strSql.Append("insert into T_Rec_RegRecords(");
|
|
44
|
|
- strSql.Append("F_RecCode,F_CusID,F_Type,F_Direction,F_Complained,F_Content,F_Remark,F_CreateBy,F_CreateOn,F_IsDelete,F_DeleteOn,F_DeleteBy)");
|
|
|
44
|
+ strSql.Append("F_RecCode,F_CusID,F_Type,F_Direction,F_Complained,F_Content,F_Remark,F_CreateBy,F_CreateOn,F_IsDelete,F_DeleteOn,F_DeleteBy,F_Tel,F_CallId)");
|
|
45
|
45
|
strSql.Append(" values (");
|
|
46
|
|
- strSql.Append("@F_RecCode,@F_CusID,@F_Type,@F_Direction,@F_Complained,@F_Content,@F_Remark,@F_CreateBy,@F_CreateOn,@F_IsDelete,@F_DeleteOn,@F_DeleteBy)");
|
|
|
46
|
+ strSql.Append("@F_RecCode,@F_CusID,@F_Type,@F_Direction,@F_Complained,@F_Content,@F_Remark,@F_CreateBy,@F_CreateOn,@F_IsDelete,@F_DeleteOn,@F_DeleteBy,@F_Tel,@F_CallId)");
|
|
47
|
47
|
strSql.Append(";select @@IDENTITY");
|
|
48
|
48
|
SqlParameter[] parameters = {
|
|
49
|
49
|
new SqlParameter("@F_RecCode", SqlDbType.NVarChar,50),
|
|
|
@@ -57,7 +57,11 @@ namespace CallCenterApi.DAL
|
|
57
|
57
|
new SqlParameter("@F_CreateOn", SqlDbType.DateTime),
|
|
58
|
58
|
new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
|
|
59
|
59
|
new SqlParameter("@F_DeleteOn", SqlDbType.VarChar,50),
|
|
60
|
|
- new SqlParameter("@F_DeleteBy", SqlDbType.DateTime)};
|
|
|
60
|
+ new SqlParameter("@F_DeleteBy", SqlDbType.DateTime),
|
|
|
61
|
+ new SqlParameter("@F_Tel", SqlDbType.VarChar,200),
|
|
|
62
|
+ new SqlParameter("@F_CallId", SqlDbType.VarChar,50)
|
|
|
63
|
+
|
|
|
64
|
+ };
|
|
61
|
65
|
parameters[0].Value = model.F_RecCode;
|
|
62
|
66
|
parameters[1].Value = model.F_CusID;
|
|
63
|
67
|
parameters[2].Value = model.F_Type;
|
|
|
@@ -70,7 +74,8 @@ namespace CallCenterApi.DAL
|
|
70
|
74
|
parameters[9].Value = model.F_IsDelete;
|
|
71
|
75
|
parameters[10].Value = model.F_DeleteOn;
|
|
72
|
76
|
parameters[11].Value = model.F_DeleteBy;
|
|
73
|
|
-
|
|
|
77
|
+ parameters[12].Value = model.F_Tel;
|
|
|
78
|
+ parameters[13].Value = model.F_CallId;
|
|
74
|
79
|
object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
|
|
75
|
80
|
if (obj == null)
|
|
76
|
81
|
{
|
|
|
@@ -99,7 +104,9 @@ namespace CallCenterApi.DAL
|
|
99
|
104
|
strSql.Append("F_CreateOn=@F_CreateOn,");
|
|
100
|
105
|
strSql.Append("F_IsDelete=@F_IsDelete,");
|
|
101
|
106
|
strSql.Append("F_DeleteOn=@F_DeleteOn,");
|
|
102
|
|
- strSql.Append("F_DeleteBy=@F_DeleteBy");
|
|
|
107
|
+ strSql.Append("F_DeleteBy=@F_DeleteBy,");
|
|
|
108
|
+ strSql.Append("F_Tel=@F_Tel,");
|
|
|
109
|
+ strSql.Append("F_CallId=@F_CallId");
|
|
103
|
110
|
strSql.Append(" where F_ID=@F_ID");
|
|
104
|
111
|
SqlParameter[] parameters = {
|
|
105
|
112
|
new SqlParameter("@F_RecCode", SqlDbType.NVarChar,50),
|
|
|
@@ -114,6 +121,9 @@ namespace CallCenterApi.DAL
|
|
114
|
121
|
new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
|
|
115
|
122
|
new SqlParameter("@F_DeleteOn", SqlDbType.VarChar,50),
|
|
116
|
123
|
new SqlParameter("@F_DeleteBy", SqlDbType.DateTime),
|
|
|
124
|
+ new SqlParameter("@F_Tel", SqlDbType.VarChar,200),
|
|
|
125
|
+ new SqlParameter("@F_CallId", SqlDbType.VarChar,50),
|
|
|
126
|
+
|
|
117
|
127
|
new SqlParameter("@F_ID", SqlDbType.Int,4)};
|
|
118
|
128
|
parameters[0].Value = model.F_RecCode;
|
|
119
|
129
|
parameters[1].Value = model.F_CusID;
|
|
|
@@ -127,8 +137,10 @@ namespace CallCenterApi.DAL
|
|
127
|
137
|
parameters[9].Value = model.F_IsDelete;
|
|
128
|
138
|
parameters[10].Value = model.F_DeleteOn;
|
|
129
|
139
|
parameters[11].Value = model.F_DeleteBy;
|
|
130
|
|
- parameters[12].Value = model.F_ID;
|
|
131
|
|
-
|
|
|
140
|
+ parameters[12].Value = model.F_Tel;
|
|
|
141
|
+ parameters[13].Value = model.F_CallId;
|
|
|
142
|
+ parameters[14].Value = model.F_ID;
|
|
|
143
|
+
|
|
132
|
144
|
int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
|
|
133
|
145
|
if (rows > 0)
|
|
134
|
146
|
{
|
|
|
@@ -270,6 +282,15 @@ namespace CallCenterApi.DAL
|
|
270
|
282
|
{
|
|
271
|
283
|
model.F_DeleteBy = DateTime.Parse(row["F_DeleteBy"].ToString());
|
|
272
|
284
|
}
|
|
|
285
|
+ if (row["F_Tel"] != null && row["F_Tel"].ToString() != "")
|
|
|
286
|
+ {
|
|
|
287
|
+ model.F_Tel = row["F_Tel"].ToString();
|
|
|
288
|
+ }
|
|
|
289
|
+ if (row["F_CallId"] != null && row["F_CallId"].ToString() != "")
|
|
|
290
|
+ {
|
|
|
291
|
+ model.F_CallId = row["F_CallId"].ToString();
|
|
|
292
|
+ }
|
|
|
293
|
+
|
|
273
|
294
|
|
|
274
|
295
|
}
|
|
275
|
296
|
return model;
|