/// <summary> /// 保存记录 /// </summary> public void SaveRecord() { try { string updatePath = ConfigHelper.GetConfigString("ClientUpdateDir", "", false); string deviceDataPath = (string.IsNullOrWhiteSpace(updatePath) ? "" : Directory.GetParent(updatePath).Parent.FullName + "\\") + "DeviceData.txt"; TmoShare.WriteFile( string.Format(";{0} >>>{1}--{3}--[{4}]_[{5}]<<< ->{2}", DateTimeHelper.DateTimeNowStr, SerialNumber, OriginalData, Value, ValueTime, OrigValueTime), deviceDataPath, true); } catch (Exception ex) { LogHelper.Log.Error("保存设备上传记录失败", ex); } }