liyuanyuan лет назад: 3
Родитель
Сommit
07c5911bb8

+ 2 - 0
CallCenterApi/CallCenterApi.BLL/CallCenterApi.BLL.csproj

@@ -40,6 +40,7 @@
40 40
     <Reference Include="System.Xml" />
41 41
   </ItemGroup>
42 42
   <ItemGroup>
43
+    <Compile Include="OldPagerBLL.cs" />
43 44
     <Compile Include="PagerBLL.cs" />
44 45
     <Compile Include="Properties\AssemblyInfo.cs" />
45 46
     <Compile Include="Rep_Dept_Assessment.cs" />
@@ -142,6 +143,7 @@
142 143
     <Compile Include="T_Sys_GroupClass.cs" />
143 144
     <Compile Include="T_Sys_History.cs" />
144 145
     <Compile Include="T_Sys_IVRWords.cs" />
146
+    <Compile Include="T_Sys_kinfoQuestions.cs" />
145 147
     <Compile Include="T_Sys_LoginLogs.cs" />
146 148
     <Compile Include="T_Sys_MobileData.cs" />
147 149
     <Compile Include="T_Sys_RoleFunction.cs" />

+ 25 - 0
CallCenterApi/CallCenterApi.BLL/OldPagerBLL.cs

@@ -0,0 +1,25 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Data;
4
+using System.Linq;
5
+using System.Text;
6
+using System.Threading.Tasks;
7
+
8
+namespace CallCenterApi.BLL
9
+{
10
+    public class OldPagerBLL
11
+    {
12
+        /// <summary>
13
+        /// 分页获取数据
14
+        /// </summary>
15
+        /// <param name="PageSize"></param>
16
+        /// <param name="PageIndex"></param>
17
+        /// <param name="strWhere"></param>
18
+        /// <returns></returns>
19
+        public static DataTable GetListPager(string TableName, string PK, string Fields, string WhereStr, string OrderStr, int PageSize, int PageIndex, bool IsCount, out int RecordCount)
20
+        {
21
+            DataTable dt = DAL.OldPagerDAL.GetListPager(TableName, PK, Fields, WhereStr, OrderStr, PageSize, PageIndex, IsCount, out RecordCount);
22
+            return dt;
23
+        }
24
+    }
25
+}

+ 2 - 0
CallCenterApi/CallCenterApi.DAL/CallCenterApi.DAL.csproj

@@ -41,6 +41,7 @@
41 41
   </ItemGroup>
42 42
   <ItemGroup>
43 43
     <Compile Include="CallRecords.cs" />
44
+    <Compile Include="OldPagerDAL.cs" />
44 45
     <Compile Include="PagerDAL.cs" />
45 46
     <Compile Include="Properties\AssemblyInfo.cs" />
46 47
     <Compile Include="Rep_Dept_Assessment.cs" />
@@ -142,6 +143,7 @@
142 143
     <Compile Include="T_Sys_GroupClass.cs" />
143 144
     <Compile Include="T_Sys_History.cs" />
144 145
     <Compile Include="T_Sys_IVRWords.cs" />
146
+    <Compile Include="T_Sys_kinfoQuestions.cs" />
145 147
     <Compile Include="T_Sys_LoginLogs.cs" />
146 148
     <Compile Include="T_Sys_MobileData.cs" />
147 149
     <Compile Include="T_Sys_RoleFunction.cs" />

+ 26 - 0
CallCenterApi/CallCenterApi.DAL/OldPagerDAL.cs

@@ -0,0 +1,26 @@
1
+using CallCenterApi.DB;
2
+using System;
3
+using System.Collections.Generic;
4
+using System.Data;
5
+using System.Linq;
6
+using System.Text;
7
+using System.Threading.Tasks;
8
+
9
+namespace CallCenterApi.DAL
10
+{
11
+    public class OldPagerDAL
12
+    {
13
+        /// <summary>
14
+        /// 分页获取数据
15
+        /// </summary>
16
+        /// <param name="PageSize"></param>
17
+        /// <param name="PageIndex"></param>
18
+        /// <param name="strWhere"></param>
19
+        /// <returns></returns>
20
+        public static DataTable GetListPager(string TableName, string PK, string Fields, string WhereStr, string OrderStr, int PageSize, int PageIndex, bool IsCount, out int RecordCount)
21
+        {
22
+            DataTable dt = DbHelperSQLOld.RunPagination(TableName, PK, Fields, WhereStr, OrderStr, PageSize, PageIndex, IsCount, out RecordCount);
23
+            return dt;
24
+        }
25
+    }
26
+}

+ 11 - 11
CallCenterApi/CallCenterApi.DAL/T_Web_Link.cs

@@ -26,7 +26,7 @@ namespace CallCenterApi.DAL
26 26
             };
27 27
             parameters[0].Value = Id;
28 28
 
29
-            return DbHelperSQL.Exists(strSql.ToString(), parameters);
29
+            return DbHelperSQLOld.Exists(strSql.ToString(), parameters);
30 30
         }
31 31
 
32 32
 
@@ -47,7 +47,7 @@ namespace CallCenterApi.DAL
47 47
             parameters[0].Value = model.LinkName;
48 48
             parameters[1].Value = model.LinkUrl;
49 49
 
50
-            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
50
+            object obj = DbHelperSQLOld.GetSingle(strSql.ToString(), parameters);
51 51
             if (obj == null)
52 52
             {
53 53
                 return 0;
@@ -75,7 +75,7 @@ namespace CallCenterApi.DAL
75 75
             parameters[1].Value = model.LinkUrl;
76 76
             parameters[2].Value = model.Id;
77 77
 
78
-            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
78
+            int rows = DbHelperSQLOld.ExecuteSql(strSql.ToString(), parameters);
79 79
             if (rows > 0)
80 80
             {
81 81
                 return true;
@@ -100,7 +100,7 @@ namespace CallCenterApi.DAL
100 100
             };
101 101
             parameters[0].Value = Id;
102 102
 
103
-            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
103
+            int rows = DbHelperSQLOld.ExecuteSql(strSql.ToString(), parameters);
104 104
             if (rows > 0)
105 105
             {
106 106
                 return true;
@@ -118,7 +118,7 @@ namespace CallCenterApi.DAL
118 118
             StringBuilder strSql = new StringBuilder();
119 119
             strSql.Append("delete from T_Web_Link ");
120 120
             strSql.Append(" where Id in (" + Idlist + ")  ");
121
-            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
121
+            int rows = DbHelperSQLOld.ExecuteSql(strSql.ToString());
122 122
             if (rows > 0)
123 123
             {
124 124
                 return true;
@@ -145,7 +145,7 @@ namespace CallCenterApi.DAL
145 145
             parameters[0].Value = Id;
146 146
 
147 147
             CallCenterApi.Model.T_Web_Link model = new CallCenterApi.Model.T_Web_Link();
148
-            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
148
+            DataSet ds = DbHelperSQLOld.Query(strSql.ToString(), parameters);
149 149
             if (ds.Tables[0].Rows.Count > 0)
150 150
             {
151 151
                 return DataRowToModel(ds.Tables[0].Rows[0]);
@@ -193,7 +193,7 @@ namespace CallCenterApi.DAL
193 193
             {
194 194
                 strSql.Append(" where " + strWhere);
195 195
             }
196
-            return DbHelperSQL.Query(strSql.ToString());
196
+            return DbHelperSQLOld.Query(strSql.ToString());
197 197
         }
198 198
 
199 199
         /// <summary>
@@ -214,7 +214,7 @@ namespace CallCenterApi.DAL
214 214
                 strSql.Append(" where " + strWhere);
215 215
             }
216 216
             strSql.Append(" order by " + filedOrder);
217
-            return DbHelperSQL.Query(strSql.ToString());
217
+            return DbHelperSQLOld.Query(strSql.ToString());
218 218
         }
219 219
 
220 220
         /// <summary>
@@ -228,7 +228,7 @@ namespace CallCenterApi.DAL
228 228
             {
229 229
                 strSql.Append(" where " + strWhere);
230 230
             }
231
-            object obj = DbHelperSQL.GetSingle(strSql.ToString());
231
+            object obj = DbHelperSQLOld.GetSingle(strSql.ToString());
232 232
             if (obj == null)
233 233
             {
234 234
                 return 0;
@@ -261,7 +261,7 @@ namespace CallCenterApi.DAL
261 261
             }
262 262
             strSql.Append(" ) TT");
263 263
             strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
264
-            return DbHelperSQL.Query(strSql.ToString());
264
+            return DbHelperSQLOld.Query(strSql.ToString());
265 265
         }
266 266
 
267 267
         /*
@@ -286,7 +286,7 @@ namespace CallCenterApi.DAL
286 286
 			parameters[4].Value = 0;
287 287
 			parameters[5].Value = 0;
288 288
 			parameters[6].Value = strWhere;	
289
-			return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
289
+			return DbHelperSQLOld.RunProcedure("UP_GetRecordByPage",parameters,"ds");
290 290
 		}*/
291 291
 
292 292
         #endregion  BasicMethod

+ 28 - 27
CallCenterApi/CallCenterApi.DAL/T_Web_News.cs

@@ -27,7 +27,7 @@ namespace CallCenterApi.DAL
27 27
             };
28 28
             parameters[0].Value = id;
29 29
 
30
-            return DbHelperSQL.Exists(strSql.ToString(), parameters);
30
+            return DbHelperSQLOld.Exists(strSql.ToString(), parameters);
31 31
         }
32 32
 
33 33
 
@@ -38,9 +38,9 @@ namespace CallCenterApi.DAL
38 38
         {
39 39
             StringBuilder strSql = new StringBuilder();
40 40
             strSql.Append("insert into T_Web_News(");
41
-            strSql.Append("ClassId,bt,nr,sj,img,ordernum,urlname,zxbh,iszd,source)");
41
+            strSql.Append("ClassId,bt,nr,sj,img,ordernum,urlname,zxbh,iszd)");
42 42
             strSql.Append(" values (");
43
-            strSql.Append("@ClassId,@bt,@nr,@sj,@img,@ordernum,@urlname,@zxbh,@iszd,@source)");
43
+            strSql.Append("@ClassId,@bt,@nr,@sj,@img,@ordernum,@urlname,@zxbh,@iszd)");
44 44
             strSql.Append(";select @@IDENTITY");
45 45
             SqlParameter[] parameters = {
46 46
                     new SqlParameter("@ClassId", SqlDbType.Int,4),
@@ -51,8 +51,9 @@ namespace CallCenterApi.DAL
51 51
                     new SqlParameter("@ordernum", SqlDbType.Int,4),
52 52
                     new SqlParameter("@urlname", SqlDbType.VarChar,100),
53 53
                     new SqlParameter("@zxbh", SqlDbType.Int,4),
54
-                    new SqlParameter("@iszd", SqlDbType.Int,4),
55
-                    new SqlParameter("@source", SqlDbType.NVarChar,500)
54
+                     new SqlParameter("@iszd", SqlDbType.Int,4)
55
+                     //,
56
+                    //new SqlParameter("@source", SqlDbType.NVarChar,500)
56 57
             };
57 58
             parameters[0].Value = model.ClassId;
58 59
             parameters[1].Value = model.bt;
@@ -63,9 +64,9 @@ namespace CallCenterApi.DAL
63 64
             parameters[6].Value = model.urlname;
64 65
             parameters[7].Value = model.zxbh;
65 66
             parameters[8].Value = model.iszd;
66
-            parameters[9].Value = model.source; 
67
+            //parameters[9].Value = model.source; 
67 68
 
68
-            object obj = DbHelperSQL.GetSingle(strSql.ToString(), parameters);
69
+            object obj = DbHelperSQLOld.GetSingle(strSql.ToString(), parameters);
69 70
             if (obj == null)
70 71
             {
71 72
                 return 0;
@@ -90,8 +91,8 @@ namespace CallCenterApi.DAL
90 91
             strSql.Append("ordernum=@ordernum,");
91 92
             strSql.Append("urlname=@urlname,");
92 93
             strSql.Append("zxbh=@zxbh,");
93
-            strSql.Append("iszd=@iszd,");
94
-            strSql.Append("source=@source "); 
94
+            strSql.Append("iszd=@iszd ");
95
+            //strSql.Append("source=@source "); 
95 96
             strSql.Append(" where id=@id");
96 97
             SqlParameter[] parameters = {
97 98
                     new SqlParameter("@ClassId", SqlDbType.Int,4),
@@ -103,7 +104,7 @@ namespace CallCenterApi.DAL
103 104
                     new SqlParameter("@urlname", SqlDbType.VarChar,100),
104 105
                     new SqlParameter("@zxbh", SqlDbType.Int,4),
105 106
                     new SqlParameter("@iszd", SqlDbType.Int,4),
106
-                    new SqlParameter("@source", SqlDbType.NVarChar,500),
107
+                    //new SqlParameter("@source", SqlDbType.NVarChar,500),
107 108
                     new SqlParameter("@id", SqlDbType.Int,4)};
108 109
             parameters[0].Value = model.ClassId;
109 110
             parameters[1].Value = model.bt;
@@ -114,10 +115,10 @@ namespace CallCenterApi.DAL
114 115
             parameters[6].Value = model.urlname;
115 116
             parameters[7].Value = model.zxbh;
116 117
             parameters[8].Value = model.iszd;
117
-            parameters[9].Value = model.source;
118
-            parameters[10].Value = model.id;
118
+            //parameters[9].Value = model.source;
119
+            parameters[9].Value = model.id;
119 120
 
120
-            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
121
+            int rows = DbHelperSQLOld.ExecuteSql(strSql.ToString(), parameters);
121 122
             if (rows > 0)
122 123
             {
123 124
                 return true;
@@ -142,7 +143,7 @@ namespace CallCenterApi.DAL
142 143
             };
143 144
             parameters[0].Value = id;
144 145
 
145
-            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);
146
+            int rows = DbHelperSQLOld.ExecuteSql(strSql.ToString(), parameters);
146 147
             if (rows > 0)
147 148
             {
148 149
                 return true;
@@ -160,7 +161,7 @@ namespace CallCenterApi.DAL
160 161
             StringBuilder strSql = new StringBuilder();
161 162
             strSql.Append("delete from T_Web_News ");
162 163
             strSql.Append(" where id in (" + idlist + ")  ");
163
-            int rows = DbHelperSQL.ExecuteSql(strSql.ToString());
164
+            int rows = DbHelperSQLOld.ExecuteSql(strSql.ToString());
164 165
             if (rows > 0)
165 166
             {
166 167
                 return true;
@@ -179,7 +180,7 @@ namespace CallCenterApi.DAL
179 180
         {
180 181
 
181 182
             StringBuilder strSql = new StringBuilder();
182
-            strSql.Append("select  top 1 id,ClassId,bt,nr,sj,img,ordernum,urlname,zxbh,iszd,source from T_Web_News ");
183
+            strSql.Append("select  top 1 id,ClassId,bt,nr,sj,img,ordernum,urlname,zxbh,iszd from T_Web_News ");
183 184
             strSql.Append(" where id=@id");
184 185
             SqlParameter[] parameters = {
185 186
                     new SqlParameter("@id", SqlDbType.Int,4)
@@ -187,7 +188,7 @@ namespace CallCenterApi.DAL
187 188
             parameters[0].Value = id;
188 189
 
189 190
             CallCenterApi.Model.T_Web_News model = new CallCenterApi.Model.T_Web_News();
190
-            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);
191
+            DataSet ds = DbHelperSQLOld.Query(strSql.ToString(), parameters);
191 192
             if (ds.Tables[0].Rows.Count > 0)
192 193
             {
193 194
                 return DataRowToModel(ds.Tables[0].Rows[0]);
@@ -247,10 +248,10 @@ namespace CallCenterApi.DAL
247 248
                 {
248 249
                     model.iszd = int.Parse(row["iszd"].ToString());
249 250
                 }
250
-                if (row["source"] != null)
251
-                {
252
-                    model.source = row["source"].ToString();
253
-                }
251
+                //if (row["source"] != null)
252
+                //{
253
+                //    model.source = row["source"].ToString();
254
+                //}
254 255
                 
255 256
             }
256 257
             return model;
@@ -268,7 +269,7 @@ namespace CallCenterApi.DAL
268 269
             {
269 270
                 strSql.Append(" where " + strWhere);
270 271
             }
271
-            return DbHelperSQL.Query(strSql.ToString());
272
+            return DbHelperSQLOld.Query(strSql.ToString());
272 273
         }
273 274
 
274 275
         /// <summary>
@@ -282,14 +283,14 @@ namespace CallCenterApi.DAL
282 283
             {
283 284
                 strSql.Append(" top " + Top.ToString());
284 285
             }
285
-            strSql.Append(" id,ClassId,bt,nr,sj,img,ordernum,urlname,zxbh,iszd,source ");
286
+            strSql.Append(" id,ClassId,bt,nr,sj,img,ordernum,urlname,zxbh,iszd ");
286 287
             strSql.Append(" FROM T_Web_News ");
287 288
             if (strWhere.Trim() != "")
288 289
             {
289 290
                 strSql.Append(" where " + strWhere);
290 291
             }
291 292
             strSql.Append(" order by " + filedOrder);
292
-            return DbHelperSQL.Query(strSql.ToString());
293
+            return DbHelperSQLOld.Query(strSql.ToString());
293 294
         }
294 295
 
295 296
         /// <summary>
@@ -303,7 +304,7 @@ namespace CallCenterApi.DAL
303 304
             {
304 305
                 strSql.Append(" where " + strWhere);
305 306
             }
306
-            object obj = DbHelperSQL.GetSingle(strSql.ToString());
307
+            object obj = DbHelperSQLOld.GetSingle(strSql.ToString());
307 308
             if (obj == null)
308 309
             {
309 310
                 return 0;
@@ -336,7 +337,7 @@ namespace CallCenterApi.DAL
336 337
             }
337 338
             strSql.Append(" ) TT");
338 339
             strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
339
-            return DbHelperSQL.Query(strSql.ToString());
340
+            return DbHelperSQLOld.Query(strSql.ToString());
340 341
         }
341 342
 
342 343
         /*
@@ -361,7 +362,7 @@ namespace CallCenterApi.DAL
361 362
 			parameters[4].Value = 0;
362 363
 			parameters[5].Value = 0;
363 364
 			parameters[6].Value = strWhere;	
364
-			return DbHelperSQL.RunProcedure("UP_GetRecordByPage",parameters,"ds");
365
+			return DbHelperSQLOld.RunProcedure("UP_GetRecordByPage",parameters,"ds");
365 366
 		}*/
366 367
 
367 368
         #endregion  BasicMethod

+ 1 - 0
CallCenterApi/CallCenterApi.DB/CallCenterApi.DB.csproj

@@ -43,6 +43,7 @@
43 43
   <ItemGroup>
44 44
     <Compile Include="CommandInfo.cs" />
45 45
     <Compile Include="DbHelperSQL.cs" />
46
+    <Compile Include="DbHelperSQLold.cs" />
46 47
     <Compile Include="Properties\AssemblyInfo.cs" />
47 48
   </ItemGroup>
48 49
   <ItemGroup>

Разница между файлами не показана из-за своего большого размера
+ 1453 - 0
CallCenterApi/CallCenterApi.DB/DbHelperSQLold.cs


+ 5 - 2
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/WebController.cs

@@ -52,7 +52,7 @@ namespace CallCenterApi.Interface.Controllers
52 52
             }
53 53
 
54 54
             var recordCount = 0;
55
-            var dt = BLL.PagerBLL.GetListPager(
55
+            var dt = BLL.OldPagerBLL.GetListPager(
56 56
               "T_Web_Link",
57 57
               "Id",
58 58
               "*",
@@ -263,7 +263,7 @@ namespace CallCenterApi.Interface.Controllers
263 263
             }
264 264
 
265 265
             var recordCount = 0;
266
-            var dt = BLL.PagerBLL.GetListPager(
266
+            var dt = BLL.OldPagerBLL.GetListPager(
267 267
               "T_Web_News",
268 268
               "id",
269 269
               "*",
@@ -372,6 +372,8 @@ namespace CallCenterApi.Interface.Controllers
372 372
             string img = RequestString.GetFormString("img");
373 373
             string smallimg = RequestString.GetFormString("smallimg");
374 374
             string source = RequestString.GetFormString("source");
375
+            string sj = RequestString.GetFormString("sj");
376
+
375 377
             Model.T_Web_News orderModel = new Model.T_Web_News();
376 378
             if (id == 0)
377 379
             {
@@ -411,6 +413,7 @@ namespace CallCenterApi.Interface.Controllers
411 413
                     orderModel.ordernum = sort;
412 414
                     orderModel.iszd = iszd;
413 415
                     orderModel.source = source;
416
+                    orderModel.sj = DateTime.Parse(sj);
414 417
                     if (newsBLL.Update(orderModel))
415 418
                     {
416 419
                         if (iszd > 0)

+ 4 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Web.config

@@ -28,7 +28,10 @@
28 28
     <!--<add name="ConnectionString" connectionString="Data Source=192.168.8.3;User ID=sa;pwd=800100;Initial Catalog=anyang;"/>-->
29 29
 
30 30
     <add name="ConnectionString" connectionString="Data Source=192.168.1.36;User ID=sa;pwd=hykj800100;Initial Catalog=HB12345;" />
31
-    
31
+
32
+    <add name="ConnectionStringOld" connectionString="Data Source=192.168.1.36;User ID=sa;pwd=hykj800100;Initial Catalog=HBSZRX;" />
33
+
34
+
32 35
   </connectionStrings>
33 36
   <system.web>
34 37
     <compilation debug="true" targetFramework="4.5"/>

+ 1 - 0
CallCenterApi/CallCenterApi.Model/CallCenterApi.Model.csproj

@@ -104,6 +104,7 @@
104 104
     <Compile Include="T_Sys_GroupClass.cs" />
105 105
     <Compile Include="T_Sys_History.cs" />
106 106
     <Compile Include="T_Sys_IVRWords.cs" />
107
+    <Compile Include="T_Sys_kinfoQuestions.cs" />
107 108
     <Compile Include="T_Sys_SeatPermissionConfig.cs" />
108 109
     <Compile Include="T_Sys_UserClass.cs" />
109 110
     <Compile Include="T_Sys_Users.cs" />