using System; using System.Collections.Generic; using System.Linq; using MySystem.Models; using Library; using LitJson; using System.Threading; namespace MySystem { public class CashSignHelper { public readonly static CashSignHelper Instance = new CashSignHelper(); private CashSignHelper() { } public void Start() { Thread th = new Thread(StartDo); th.IsBackground = true; th.Start(); } public void StartDo() { while (true) { try { WebCMSEntities db = new WebCMSEntities(); db.SaveChanges(); db.Dispose(); } catch (Exception ex) { function.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString(), "代付签约异常"); } Thread.Sleep(1000); } } } }