|
|
@@ -38,9 +38,11 @@ namespace CallCenterApi.DAL
|
|
38
|
38
|
{
|
|
39
|
39
|
StringBuilder strSql = new StringBuilder();
|
|
40
|
40
|
strSql.Append("insert into T_Cus_Customer(");
|
|
41
|
|
- strSql.Append("F_Province,F_City,F_County,F_Address,F_Name,F_Phone,F_Sex,F_Remarks,F_State,F_CreateUser,F_CreateTime,F_IsDelete,F_DeleteUser,F_DeleteTime)");
|
|
|
41
|
+ strSql.Append(@"F_Province,F_City,F_County,F_Address,F_Name,F_Phone,F_Sex,F_Remarks,
|
|
|
42
|
+F_State,F_CreateUser,F_CreateTime,F_IsDelete,F_DeleteUser,F_DeleteTime,F_SpecialTag)");
|
|
42
|
43
|
strSql.Append(" values (");
|
|
43
|
|
- strSql.Append("@F_Province,@F_City,@F_County,@F_Address,@F_Name,@F_Phone,@F_Sex,@F_Remarks,@F_State,@F_CreateUser,@F_CreateTime,@F_IsDelete,@F_DeleteUser,@F_DeleteTime)");
|
|
|
44
|
+ strSql.Append(@"@F_Province,@F_City,@F_County,@F_Address,@F_Name,@F_Phone,
|
|
|
45
|
+@F_Sex,@F_Remarks,@F_State,@F_CreateUser,@F_CreateTime,@F_IsDelete,@F_DeleteUser,@F_DeleteTime,@F_SpecialTag)");
|
|
44
|
46
|
strSql.Append(";select @@IDENTITY");
|
|
45
|
47
|
SqlParameter[] parameters = {
|
|
46
|
48
|
new SqlParameter("@F_Province", SqlDbType.NVarChar,50),
|
|
|
@@ -56,7 +58,8 @@ namespace CallCenterApi.DAL
|
|
56
|
58
|
new SqlParameter("@F_CreateTime", SqlDbType.DateTime),
|
|
57
|
59
|
new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
|
|
58
|
60
|
new SqlParameter("@F_DeleteUser", SqlDbType.VarChar,50),
|
|
59
|
|
- new SqlParameter("@F_DeleteTime", SqlDbType.DateTime)};
|
|
|
61
|
+ new SqlParameter("@F_DeleteTime", SqlDbType.DateTime),
|
|
|
62
|
+ new SqlParameter("@F_SpecialTag", SqlDbType.Int,4)};
|
|
60
|
63
|
parameters[0].Value = model.F_Province;
|
|
61
|
64
|
parameters[1].Value = model.F_City;
|
|
62
|
65
|
parameters[2].Value = model.F_County;
|
|
|
@@ -71,7 +74,7 @@ namespace CallCenterApi.DAL
|
|
71
|
74
|
parameters[11].Value = model.F_IsDelete;
|
|
72
|
75
|
parameters[12].Value = model.F_DeleteUser;
|
|
73
|
76
|
parameters[13].Value = model.F_DeleteTime;
|
|
74
|
|
-
|
|
|
77
|
+ parameters[14].Value = model.F_SpecialTag;
|
|
75
|
78
|
object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
|
|
76
|
79
|
if (obj == null)
|
|
77
|
80
|
{
|
|
|
@@ -103,7 +106,9 @@ namespace CallCenterApi.DAL
|
|
103
|
106
|
strSql.Append("F_IsDelete=@F_IsDelete,");
|
|
104
|
107
|
strSql.Append("F_DeleteUser=@F_DeleteUser,");
|
|
105
|
108
|
strSql.Append("F_DeleteTime=@F_DeleteTime");
|
|
|
109
|
+
|
|
106
|
110
|
strSql.Append(" where F_Id=@F_Id");
|
|
|
111
|
+ strSql.Append("F_SpecialTag=@F_SpecialTag");
|
|
107
|
112
|
SqlParameter[] parameters = {
|
|
108
|
113
|
new SqlParameter("@F_Province", SqlDbType.NVarChar,50),
|
|
109
|
114
|
new SqlParameter("@F_City", SqlDbType.NVarChar,50),
|
|
|
@@ -119,7 +124,9 @@ namespace CallCenterApi.DAL
|
|
119
|
124
|
new SqlParameter("@F_IsDelete", SqlDbType.Int,4),
|
|
120
|
125
|
new SqlParameter("@F_DeleteUser", SqlDbType.VarChar,50),
|
|
121
|
126
|
new SqlParameter("@F_DeleteTime", SqlDbType.DateTime),
|
|
122
|
|
- new SqlParameter("@F_Id", SqlDbType.Int,4)};
|
|
|
127
|
+
|
|
|
128
|
+ new SqlParameter("@F_Id", SqlDbType.Int,4),
|
|
|
129
|
+ new SqlParameter("@F_SpecialTag", SqlDbType.Int,4)};
|
|
123
|
130
|
parameters[0].Value = model.F_Province;
|
|
124
|
131
|
parameters[1].Value = model.F_City;
|
|
125
|
132
|
parameters[2].Value = model.F_County;
|
|
|
@@ -135,6 +142,7 @@ namespace CallCenterApi.DAL
|
|
135
|
142
|
parameters[12].Value = model.F_DeleteUser;
|
|
136
|
143
|
parameters[13].Value = model.F_DeleteTime;
|
|
137
|
144
|
parameters[14].Value = model.F_Id;
|
|
|
145
|
+ parameters[15].Value = model.F_SpecialTag;
|
|
138
|
146
|
|
|
139
|
147
|
int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
|
|
140
|
148
|
if (rows > 0)
|
|
|
@@ -287,8 +295,14 @@ namespace CallCenterApi.DAL
|
|
287
|
295
|
{
|
|
288
|
296
|
model.F_DeleteTime = DateTime.Parse(row["F_DeleteTime"].ToString());
|
|
289
|
297
|
}
|
|
|
298
|
+ if (row["F_SpecialTag"] != null && row["F_SpecialTag"].ToString() != "")
|
|
|
299
|
+ {
|
|
|
300
|
+ model.F_SpecialTag = int.Parse(row["F_SpecialTag"].ToString());
|
|
|
301
|
+ }
|
|
290
|
302
|
|
|
291
|
|
-
|
|
|
303
|
+
|
|
|
304
|
+
|
|
|
305
|
+
|
|
292
|
306
|
}
|
|
293
|
307
|
return model;
|
|
294
|
308
|
}
|