From 12dc55ef8cb7afee06536b7857a64bb1a87b4df3 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 17 Jun 2020 14:48:53 +0200 Subject: [PATCH] Completed prodInfo initial integration, beta test --- .../Thermo.Active.Database.csproj | 7 ++++ Thermo.Active.NC/NcAdapter.cs | 36 +++++++++++++++++++ Thermo.Active/Properties/AssemblyInfo.cs | 2 +- 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/Thermo.Active.Database/Thermo.Active.Database.csproj b/Thermo.Active.Database/Thermo.Active.Database.csproj index b1ce8ba8..d10b5d81 100644 --- a/Thermo.Active.Database/Thermo.Active.Database.csproj +++ b/Thermo.Active.Database/Thermo.Active.Database.csproj @@ -127,6 +127,10 @@ 202004241109233_Thermo-Start.cs + + + 202006170558519_AddedProdInfoModel.cs + @@ -166,6 +170,9 @@ 202004241109233_Thermo-Start.cs + + 202006170558519_AddedProdInfoModel.cs + \ No newline at end of file diff --git a/Thermo.Active.NC/NcAdapter.cs b/Thermo.Active.NC/NcAdapter.cs index c427be01..72d510e8 100644 --- a/Thermo.Active.NC/NcAdapter.cs +++ b/Thermo.Active.NC/NcAdapter.cs @@ -1267,6 +1267,42 @@ namespace Thermo.Active.NC return cmsError; } + /// + /// Get historical prodinfo data from DB + /// + /// + /// + /// + /// + public CmsError GetHistProdInfoData(out List prodInfoDataList, int numStart, int numRec) + { + CmsError cmsError = NO_ERROR; + prodInfoDataList = new List(); + + using (ProdInfoController prodInfoController = new ProdInfoController()) + { + List results = prodInfoController.GetPaginated(numStart, numRec); + // converto! + prodInfoDataList = results.Select(x => new ThermoModels.ProdInfoModel() + { + NumTarget = x.NumTarget, + NumDone= x.NumDone, + TimeWarm = x.TimeWarm, + TimeVent = x.TimeVent, + TimeVacuum = x.TimeVacuum, + TimeCycleGross = x.TimeCycleGross, + TimeCycleNet = x.TimeCycleNet, + MaterialTempEndWarm = x.MaterialTempEndWarm, + MaterialTempEndVent = x.MaterialTempEndVent, + MoldTemp = x.MoldTemp, + VacuumReadVal = x.VacuumReadVal, + MouldEnergyOUT = x.MouldEnergyOUT, + MouldEnergyIN = x.MouldEnergyIN + }).ToList(); + } + + return cmsError; + } public CmsError ReadProdCycleData(out ThermoModels.ProdCycleModel prodCycleData) { prodCycleData = new ThermoModels.ProdCycleModel(); diff --git a/Thermo.Active/Properties/AssemblyInfo.cs b/Thermo.Active/Properties/AssemblyInfo.cs index 45467190..571c3a75 100644 --- a/Thermo.Active/Properties/AssemblyInfo.cs +++ b/Thermo.Active/Properties/AssemblyInfo.cs @@ -31,4 +31,4 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.8.2")] +[assembly: AssemblyVersion("0.8.9")]