|
@@ -840,51 +840,51 @@ namespace Tps_LQ_Transmitter
|
|
|
|
|
|
void SaveTestTable()
|
|
|
{
|
|
|
- if(string.IsNullOrEmpty(Serial))
|
|
|
- {
|
|
|
- ShowMessage(MsgType.Info, "序列号为空,数据不保存");
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- AppLibs.Function.IReportHost report = Bundle.host.GetFirstOrDefaultService<AppLibs.Function.IReportHost>();
|
|
|
- if(report != null)
|
|
|
- {
|
|
|
- AppLibs.Models.TableInfo tableInfo = new AppLibs.Models.TableInfo();
|
|
|
- tableInfo.data = TestTable;
|
|
|
- tableInfo.table = new AppLibs.Models.Table();
|
|
|
- tableInfo.table.Result = "合格";
|
|
|
- tableInfo.table.Temperature = Temperature;
|
|
|
- tableInfo.table.Tester = Tester;
|
|
|
- tableInfo.table.Time = DateTime.Now;
|
|
|
- tableInfo.table.Place = Place;
|
|
|
- tableInfo.table.Serial = Serial;
|
|
|
- tableInfo.table.Humidity = Humidity;
|
|
|
- tableInfo.table.Type = TestProject;
|
|
|
- tableInfo.table.ProductCode = Product;
|
|
|
- tableInfo.table.ProductName = Product;
|
|
|
- tableInfo.table.Name = TestProject + "#" + Product;
|
|
|
- try
|
|
|
- {
|
|
|
- if (report.WriteAndReplaceTable(tableInfo))
|
|
|
- {
|
|
|
- ShowMessage(MsgType.Info, "自动测试记录表保存成功");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ShowMessage(MsgType.Info, "自动测试记录表保存失败");
|
|
|
- }
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
-
|
|
|
- ShowMessage(MsgType.Error, "自动测试记录表保存失败");
|
|
|
- }
|
|
|
+ //if(string.IsNullOrEmpty(Serial))
|
|
|
+ //{
|
|
|
+ // ShowMessage(MsgType.Info, "序列号为空,数据不保存");
|
|
|
+ // return;
|
|
|
+ //}
|
|
|
+
|
|
|
+ //AppLibs.Function.IReportHost report = Bundle.host.GetFirstOrDefaultService<AppLibs.Function.IReportHost>();
|
|
|
+ //if(report != null)
|
|
|
+ //{
|
|
|
+ // AppLibs.Models.TableInfo tableInfo = new AppLibs.Models.TableInfo();
|
|
|
+ // tableInfo.data = TestTable;
|
|
|
+ // tableInfo.table = new AppLibs.Models.Table();
|
|
|
+ // tableInfo.table.Result = "合格";
|
|
|
+ // tableInfo.table.Temperature = Temperature;
|
|
|
+ // tableInfo.table.Tester = Tester;
|
|
|
+ // tableInfo.table.Time = DateTime.Now;
|
|
|
+ // tableInfo.table.Place = Place;
|
|
|
+ // tableInfo.table.Serial = Serial;
|
|
|
+ // tableInfo.table.Humidity = Humidity;
|
|
|
+ // tableInfo.table.Type = TestProject;
|
|
|
+ // tableInfo.table.ProductCode = Product;
|
|
|
+ // tableInfo.table.ProductName = Product;
|
|
|
+ // tableInfo.table.Name = TestProject + "#" + Product;
|
|
|
+ // try
|
|
|
+ // {
|
|
|
+ // if (report.WriteAndReplaceTable(tableInfo))
|
|
|
+ // {
|
|
|
+ // ShowMessage(MsgType.Info, "自动测试记录表保存成功");
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // ShowMessage(MsgType.Info, "自动测试记录表保存失败");
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // catch (Exception ex)
|
|
|
+ // {
|
|
|
+
|
|
|
+ // ShowMessage(MsgType.Error, "自动测试记录表保存失败");
|
|
|
+ // }
|
|
|
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- ShowMessage(MsgType.Info, "软件未包含数据存储模块");
|
|
|
- }
|
|
|
+ //}
|
|
|
+ //else
|
|
|
+ //{
|
|
|
+ // ShowMessage(MsgType.Info, "软件未包含数据存储模块");
|
|
|
+ //}
|
|
|
|
|
|
}
|
|
|
|