public void ToJsonTest() { DateTime dt = DateTime.Now; long mills = KK.ToMills(dt); DateTime dt2 = KK.ToDateTime(mills); Console.Out.WriteLine("mills is " + mills); PriceActionRequest req = new PriceActionRequest(); req.MachineCode = "123456"; req.OccurTime = DateTime.Now; req.ScreenTime = DateTime.Now; req.UsedDelayMills = 23; string json = Jsons.ToJson(req); string reqText = req.ToLine(); Console.Out.WriteLine("json is " + json); }
public string ToLine() { return(MachineCode + ";" + KK.ToMills(OccurTime) + ";" + KK.ToMills(ScreenTime) + ";" + Action + ";" + ScreenPrice + ";" + TargetPrice + ";" + UsedDelayMills + ";" + Memo); }