|
@@ -1,17 +1,16 @@
|
|
|
-using LJLib.TcpHandle;
|
|
|
-using JLHHJSvr;
|
|
|
+using LJLib.D;
|
|
|
+using LJLib.DAL.SQL;
|
|
|
+using LJLib.HttpServer;
|
|
|
+using LJLib.TcpHandle;
|
|
|
+using LJLib.Tools.File;
|
|
|
+using Newtonsoft.Json;
|
|
|
+using Newtonsoft.Json.Serialization;
|
|
|
using System;
|
|
|
-using System.Data.SqlClient;
|
|
|
using System.Diagnostics;
|
|
|
using System.Net;
|
|
|
using System.Net.Sockets;
|
|
|
using System.ServiceProcess;
|
|
|
using System.Threading;
|
|
|
-using LJLib.D;
|
|
|
-using LJLib.DAL.SQL;
|
|
|
-using LJLib.HttpServer;
|
|
|
-using LJLib.Tools.File;
|
|
|
-using JLHHJSvr.BLL;
|
|
|
|
|
|
namespace JLHHJSvr
|
|
|
{
|
|
@@ -32,6 +31,15 @@ namespace JLHHJSvr
|
|
|
{
|
|
|
DbSqlHelper.Add(new SqlServerEngine());
|
|
|
|
|
|
+ var newtonsettings = new JsonSerializerSettings();
|
|
|
+ newtonsettings.NullValueHandling = NullValueHandling.Ignore;
|
|
|
+ newtonsettings.ContractResolver = new DefaultContractResolver();
|
|
|
+ newtonsettings.DateFormatString = "yyyy-MM-dd HH:mm:ss";
|
|
|
+ JsonConvert.DefaultSettings = new Func<JsonSerializerSettings>(() =>
|
|
|
+ {
|
|
|
+ return newtonsettings;
|
|
|
+ });
|
|
|
+
|
|
|
GlobalVar.webapp = false;
|
|
|
GlobalVar.Init();
|
|
|
|