using System; using System.Collections.Generic; using Library; using LitJson; using System.Linq; using System.Data; using System.Threading; using MySystem.PxcModels; namespace MySystem { public class TmpService { public readonly static TmpService Instance = new TmpService(); private TmpService() { } public void Start() { Thread th = new Thread(dosomething); th.IsBackground = true; th.Start(); } public void dosomething() { string content = function.ReadInstance("jk299.txt"); string[] SnNos = content.Split('\n'); int count = SnNos.Length; int index = 0; foreach(string SnNo in SnNos) { index += 1; PublicImportDataService.Instance.LkbSetDeposit(SnNo, 299); function.WritePage("/look/", "progress.txt", index + "/" + count); function.WritePage("/look/", "sn.txt", SnNo); Thread.Sleep(100); } content = function.ReadInstance("jk0.txt"); SnNos = content.Split('\n'); count = SnNos.Length; index = 0; foreach(string SnNo in SnNos) { index += 1; PublicImportDataService.Instance.LkbSetDeposit(SnNo, 0); function.WritePage("/look/", "progress.txt", index + "/" + count); function.WritePage("/look/", "sn.txt", SnNo); Thread.Sleep(100); } } } }