Fix gestione Log instance
Aggiunta api alive x cancellazione vecchi dati redis e mongoDB
This commit is contained in:
+15
-7
@@ -95,10 +95,10 @@
|
||||
<HintPath>..\packages\MongoDB.Libmongocrypt.1.3.0\lib\netstandard2.0\MongoDB.Libmongocrypt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.7.15\lib\net45\NLog.dll</HintPath>
|
||||
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.5.2.4\lib\net46\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PdfSharp, Version=1.50.5147.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\PDFsharp.1.50.5147\lib\net20\PdfSharp.dll</HintPath>
|
||||
@@ -119,11 +119,11 @@
|
||||
<Reference Include="StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\StackExchange.Redis.2.6.70\lib\net461\StackExchange.Redis.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SteamWare, Version=5.2.2206.1310, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SteamWare.5.2.2206.1310\lib\net462\SteamWare.dll</HintPath>
|
||||
<Reference Include="SteamWare, Version=5.3.2311.2908, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SteamWare.5.3.2311.2908\lib\net462\SteamWare.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SteamWare.Logger, Version=5.2.2206.1310, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SteamWare.Logger.5.2.2206.1310\lib\net462\SteamWare.Logger.dll</HintPath>
|
||||
<Reference Include="SteamWare.Logger, Version=5.3.2311.2908, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SteamWare.Logger.5.3.2311.2908\lib\net462\SteamWare.Logger.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System">
|
||||
<HintPath>..\..\..\..\..\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6.2\System.dll</HintPath>
|
||||
@@ -272,6 +272,10 @@
|
||||
<None Include="DS_Report.xss">
|
||||
<DependentUpon>DS_Report.xsd</DependentUpon>
|
||||
</None>
|
||||
<None Include="libsnappy64.dylib" />
|
||||
<None Include="libsnappy64.so" />
|
||||
<None Include="libzstd.dylib" />
|
||||
<None Include="libzstd.so" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
@@ -291,6 +295,10 @@
|
||||
<Content Include="Core\Compression\Snappy\lib\win\snappy32.dll" />
|
||||
<Content Include="Core\Compression\Snappy\lib\win\snappy64.dll" />
|
||||
<Content Include="Core\Compression\Zstandard\lib\win\libzstd.dll" />
|
||||
<Content Include="libzstd.dll" />
|
||||
<Content Include="mongocrypt.dll" />
|
||||
<Content Include="snappy32.dll" />
|
||||
<Content Include="snappy64.dll" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
_adminEmail samuele@steamware.net,info@steamware.net samuele@steamware.net,info@steamware.net info@steamware.net
|
||||
_allowForceUser true true abilita login forzato
|
||||
_commonPages menu menu pagina comune
|
||||
_emailPwd drmfsls16 drmfsls16 drmfsls16
|
||||
_emailUser steamwarebot@gmail.com steamwarebot@gmail.com steamwarebot@gmail.com
|
||||
_emailPwd siamoInViaNazionale93 siamoInViaNazionale93 siamoInViaNazionale93
|
||||
_emailUser steamwarebot@outlook.it steamwarebot@outlook.it steamwarebot@outlook.it
|
||||
_smtpCli smtp-mail.outlook.com smtp-mail.outlook.com smtp-mail.outlook.com
|
||||
_fromEmail steamwarebot@outlook.it steamwarebot@outlook.it steamwarebot@outlook.it
|
||||
_enableSSL true true true
|
||||
_fromEmail webmaster@admodelling.org webmaster@admodelling.org email mittente eventuali msg
|
||||
_righeDataGrid 30 30 Num righe datagrid std
|
||||
|
||||
+139
-7
@@ -684,7 +684,29 @@ namespace AppData
|
||||
{
|
||||
// contatore eliminazioni
|
||||
int numDel = 0;
|
||||
Thread.Sleep(500);
|
||||
// inizio recuperando da HashList
|
||||
var currList = getEnvList();
|
||||
// riordino x chiave x fare prima...
|
||||
var ordList = currList.OrderBy(x => x.Key).ToList();
|
||||
// ciclo!
|
||||
int zIdx = 0;
|
||||
foreach (var item in ordList)
|
||||
{
|
||||
if (int.TryParse(item.Key.Substring(1), out zIdx))
|
||||
{
|
||||
// per ogni valore controllo se sia < di quello richiesto
|
||||
if (zIdx < idx2keep)
|
||||
{
|
||||
ComLib.man.MongoDeleteEnvData(item.Key);
|
||||
// conteggio eliminati
|
||||
numDel++;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// ritorno
|
||||
return numDel;
|
||||
}
|
||||
@@ -700,22 +722,24 @@ namespace AppData
|
||||
int numDel = 0;
|
||||
// inizio recuperando da HashList
|
||||
var currList = getEnvList();
|
||||
string zMax = $"Z{idx2keep:000000000000}";
|
||||
// riordino x chiave x fare prima...
|
||||
var ordList = currList.OrderBy(x => x.Key).ToList();
|
||||
// ciclo!
|
||||
int zIdx = 0;
|
||||
string redZKey = "";
|
||||
foreach (var item in ordList)
|
||||
{
|
||||
if (int.TryParse(item.Key, out zIdx))
|
||||
if (int.TryParse(item.Key.Substring(1), out zIdx))
|
||||
{
|
||||
// per ogni valore controllo se sia < di quello richiesto
|
||||
if (zIdx < idx2keep)
|
||||
{
|
||||
|
||||
// elimino chiave
|
||||
|
||||
// elimino cache
|
||||
redZKey = $"{redOutPath}:{item.Key}";
|
||||
memLayer.ML.redDelKey(redZKey);
|
||||
// elimino chiave in hashList
|
||||
memLayer.ML.redDelHashField(redMsgList, item.Key);
|
||||
// conteggio eliminati
|
||||
numDel++;
|
||||
}
|
||||
else
|
||||
@@ -2267,7 +2291,7 @@ namespace AppData
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"Eccezione in sendOfflineOrderReq:{Environment.NewLine}{exc}");
|
||||
Log.Instance.Error($"Eccezione in sendOfflineOrderReq:{Environment.NewLine}{exc}");
|
||||
}
|
||||
// restituisco ok
|
||||
return answ;
|
||||
@@ -2783,6 +2807,114 @@ namespace AppData
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elimina da tutti archivi MongoDB i dati relativi ad un dato EnvNum
|
||||
/// </summary>
|
||||
/// <param name="EnvNum">Stringa EnvNum da eliminare</param>
|
||||
/// <returns></returns>
|
||||
public bool MongoDeleteEnvData(string EnvNum)
|
||||
{
|
||||
bool answ = false;
|
||||
bool okEstArch = MongoEstArchDeleteEnvData(EnvNum);
|
||||
bool okExtEstArch = MongoExtEstArchDeleteEnvData(EnvNum);
|
||||
bool okNestArch = MongoNestArchDeleteEnvData(EnvNum);
|
||||
bool okOfflArch = MongoOffArchDeleteEnvData(EnvNum);
|
||||
answ = okEstArch || okExtEstArch || okNestArch || okOfflArch;
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elimina da EstimationArchive MongoDB i dati relativi ad un dato EnvNum
|
||||
/// </summary>
|
||||
/// <param name="EnvNum">Stringa EnvNum da eliminare</param>
|
||||
/// <returns></returns>
|
||||
public bool MongoEstArchDeleteEnvData(string EnvNum)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
// definisco filtro
|
||||
var filtBuilder = Builders<nestReplyBatchInitial>.Filter;
|
||||
var filter = filtBuilder.Eq<string>("EnvNum", EnvNum);
|
||||
var collRawData = database.GetCollection<nestReplyBatchInitial>("EstimationArchive");
|
||||
// elimino old
|
||||
collRawData.DeleteMany(filter);
|
||||
answ = true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elimina da EstimationArchive MongoDB i dati relativi ad un dato EnvNum
|
||||
/// </summary>
|
||||
/// <param name="EnvNum">Stringa EnvNum da eliminare</param>
|
||||
/// <returns></returns>
|
||||
public bool MongoExtEstArchDeleteEnvData(string EnvNum)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
// definisco filtro
|
||||
var filtBuilder = Builders<nestReplyBatchExtEst>.Filter;
|
||||
var filter = filtBuilder.Eq<string>("EnvNum", EnvNum);
|
||||
var collRawData = database.GetCollection<nestReplyBatchExtEst>("ExtendedEstimationArchive");
|
||||
// elimino old
|
||||
collRawData.DeleteMany(filter);
|
||||
answ = true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elimina da EstimationArchive MongoDB i dati relativi ad un dato EnvNum
|
||||
/// </summary>
|
||||
/// <param name="EnvNum">Stringa EnvNum da eliminare</param>
|
||||
/// <returns></returns>
|
||||
public bool MongoNestArchDeleteEnvData(string EnvNum)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
// definisco filtro
|
||||
var filtBuilder = Builders<nestReplyBatchFinal>.Filter;
|
||||
var filter = filtBuilder.Eq<string>("EnvNum", EnvNum);
|
||||
var collRawData = database.GetCollection<nestReplyBatchFinal>("NestingArchive");
|
||||
// elimino old
|
||||
collRawData.DeleteMany(filter);
|
||||
answ = true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elimina da EstimationArchive MongoDB i dati relativi ad un dato EnvNum
|
||||
/// </summary>
|
||||
/// <param name="EnvNum">Stringa EnvNum da eliminare</param>
|
||||
/// <returns></returns>
|
||||
public bool MongoOffArchDeleteEnvData(string EnvNum)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
// definisco filtro
|
||||
var filtBuilder = Builders<nestReplyOffOrd>.Filter;
|
||||
var filter = filtBuilder.Eq<string>("EnvNum", EnvNum);
|
||||
var collRawData = database.GetCollection<nestReplyOffOrd>("OfflineArchive");
|
||||
// elimino old
|
||||
collRawData.DeleteMany(filter);
|
||||
answ = true;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fornisce il prossimo TAKT da elaborare oppure null se non ce ne fossero altri da
|
||||
/// elaborare per la data CORRENTE
|
||||
|
||||
@@ -583,7 +583,7 @@ namespace AppData
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"Eccezione in getPrinter | codPost: {codPost}{Environment.NewLine}{exc}");
|
||||
Log.Instance.Error($"Eccezione in getPrinter | codPost: {codPost}{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return printer;
|
||||
@@ -641,16 +641,16 @@ namespace AppData
|
||||
memLayer.ML.redFlushKey(ComLib.redQueueCountSet);
|
||||
if (answ)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format(" | {0} | stampato UDC {1} | stampante {2} | tipo {3}", clientIp, keyParam, printer, tipoDoc), tipoLog.INFO);
|
||||
Log.Instance.Info(string.Format(" | {0} | stampato UDC {1} | stampante {2} | tipo {3}", clientIp, keyParam, printer, tipoDoc), tipoLog.INFO);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("ERRORE | {0} | stampato UDC {1} | stampante {2} | tipo {3}", clientIp, keyParam, printer, tipoDoc), tipoLog.ERROR);
|
||||
Log.Instance.Error(string.Format("ERRORE | {0} | stampato UDC {1} | stampante {2} | tipo {3}", clientIp, keyParam, printer, tipoDoc), tipoLog.ERROR);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.lg.scriviLog(string.Format(" | {0} | Richiesta stampa per DOC tipo {1} | stampante {2} | key {3}", clientIp, tipoDoc, printer, keyParam), tipoLog.ERROR);
|
||||
Log.Instance.Info(string.Format(" | {0} | Richiesta stampa per DOC tipo {1} | stampante {2} | key {3}", clientIp, tipoDoc, printer, keyParam), tipoLog.ERROR);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
+3
-2
@@ -1,4 +1,5 @@
|
||||
using SteamWare;
|
||||
using NKC_SDK;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@@ -27,7 +28,7 @@ namespace AppData
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"{ComLib.traduci("UtilsErrorMapPath")}:{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
|
||||
Log.Instance.Error($"{ComLib.traduci("UtilsErrorMapPath")}:{Environment.NewLine}{exc}");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
+2
-2
@@ -41,7 +41,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="SharpCompress" publicKeyToken="afb0a02973931d96" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-0.31.0.0" newVersion="0.31.0.0" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-0.32.2.0" newVersion="0.32.2.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="DnsClient" publicKeyToken="4574bb5573c51424" culture="neutral" />
|
||||
@@ -61,7 +61,7 @@
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.3.3.11" newVersion="1.3.3.11" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.4.0.12" newVersion="1.4.0.12" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
|
||||
@@ -13,16 +13,16 @@
|
||||
<package id="MongoDB.Driver.Core" version="2.15.0" targetFramework="net462" />
|
||||
<package id="MongoDB.Libmongocrypt" version="1.3.0" targetFramework="net462" />
|
||||
<package id="NETStandard.Library" version="2.0.3" targetFramework="net462" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net462" />
|
||||
<package id="NLog" version="4.7.15" targetFramework="net462" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
|
||||
<package id="NLog" version="5.2.4" targetFramework="net462" />
|
||||
<package id="PDFsharp" version="1.50.5147" targetFramework="net462" />
|
||||
<package id="Pipelines.Sockets.Unofficial" version="2.2.2" targetFramework="net462" />
|
||||
<package id="SharpCompress" version="0.32.2" targetFramework="net462" />
|
||||
<package id="SharpZipLib" version="1.4.0" targetFramework="net462" />
|
||||
<package id="Snappy.NET" version="1.1.1.8" targetFramework="net462" />
|
||||
<package id="StackExchange.Redis" version="2.6.70" targetFramework="net462" />
|
||||
<package id="SteamWare" version="5.2.2206.1310" targetFramework="net462" />
|
||||
<package id="SteamWare.Logger" version="5.2.2206.1310" targetFramework="net462" />
|
||||
<package id="SteamWare" version="5.3.2311.2908" targetFramework="net462" />
|
||||
<package id="SteamWare.Logger" version="5.3.2311.2908" targetFramework="net462" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net462" />
|
||||
<package id="System.Diagnostics.PerformanceCounter" version="6.0.1" targetFramework="net462" />
|
||||
<package id="System.IO.Compression" version="4.3.0" targetFramework="net462" />
|
||||
|
||||
@@ -243,7 +243,7 @@ namespace AppData
|
||||
printDoc.PrinterSettings.PrinterName = printerName;
|
||||
if (!printDoc.PrinterSettings.IsValid)
|
||||
{
|
||||
logger.lg.scriviLog(String.Format("Impostazioni non valide per la stampante \"{0}\".", printerName), tipoLog.ERROR);
|
||||
Log.Instance.Error(String.Format("Impostazioni non valide per la stampante \"{0}\".", printerName));
|
||||
return;
|
||||
}
|
||||
printDoc.PrintPage += new PrintPageEventHandler(PrintPage);
|
||||
@@ -263,14 +263,14 @@ namespace AppData
|
||||
{
|
||||
try
|
||||
{
|
||||
if (logLevel > 5) logger.lg.scriviLog(String.Format("Sto per inviare un report alla stampante {0}", printerName), tipoLog.INFO);
|
||||
if (logLevel > 5) Log.Instance.Info(String.Format("Sto per inviare un report alla stampante {0}", printerName));
|
||||
reportPrinter.obj.printReport(report, printerName, keyParam, deviceInfo);
|
||||
if (logLevel > 5) logger.lg.scriviLog(String.Format("inviato comando print alla stampante {0}", printerName), tipoLog.INFO);
|
||||
if (logLevel > 5) Log.Instance.Info(String.Format("inviato comando print alla stampante {0}", printerName));
|
||||
answ = true;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.lg.scriviLog(String.Format("Errore in fase di creazione e stampa report: stampante {0}, errore riscontrato {1}", printerName, e), tipoLog.EXCEPTION);
|
||||
Log.Instance.Error(String.Format("Errore in fase di creazione e stampa report: stampante {0}, errore riscontrato {1}", printerName, e));
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
@@ -403,7 +403,7 @@ namespace AppData
|
||||
fatto = fileMover.obj.eliminaFile(_file);
|
||||
if (fatto)
|
||||
{
|
||||
logger.lg.scriviLog(String.Format("Eliminato file {0}", _file.Name), tipoLog.INFO);
|
||||
Log.Instance.Info(String.Format("Eliminato file {0}", _file.Name));
|
||||
eliminati++;
|
||||
}
|
||||
}
|
||||
@@ -411,7 +411,7 @@ namespace AppData
|
||||
// salvo il log degli update
|
||||
if (eliminati > 0)
|
||||
{
|
||||
logger.lg.scriviLog(String.Format("Eliminati {0} files temporanei da area temp", eliminati), tipoLog.INFO);
|
||||
Log.Instance.Info(String.Format("Eliminati {0} files temporanei da area temp", eliminati));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -512,7 +512,7 @@ namespace AppData
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"Errore in recupero IdxPrint Job:{exc}", tipoLog.EXCEPTION);
|
||||
Log.Instance.Error($"Errore in recupero IdxPrint Job:{exc}");
|
||||
}
|
||||
|
||||
// dimensioni pagina
|
||||
|
||||
@@ -44,10 +44,10 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.7.15\lib\net45\NLog.dll</HintPath>
|
||||
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.5.2.4\lib\net46\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net462" />
|
||||
<package id="NLog" version="4.7.15" targetFramework="net462" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
|
||||
<package id="NLog" version="5.2.4" targetFramework="net462" />
|
||||
</packages>
|
||||
@@ -2,8 +2,10 @@
|
||||
_adminEmail samuele@steamware.net,info@steamware.net samuele@steamware.net,info@steamware.net info@steamware.net
|
||||
_allowForceUser true true abilita login forzato
|
||||
_commonPages menu menu pagina comune
|
||||
_emailPwd drmfsls16 drmfsls16 drmfsls16
|
||||
_emailUser steamwarebot@gmail.com steamwarebot@gmail.com steamwarebot@gmail.com
|
||||
_emailPwd siamoInViaNazionale93 siamoInViaNazionale93 siamoInViaNazionale93
|
||||
_emailUser steamwarebot@outlook.it steamwarebot@outlook.it steamwarebot@outlook.it
|
||||
_smtpCli smtp-mail.outlook.com smtp-mail.outlook.com smtp-mail.outlook.com
|
||||
_fromEmail steamwarebot@outlook.it steamwarebot@outlook.it steamwarebot@outlook.it
|
||||
_enableSSL true true true
|
||||
_fromEmail webmaster@admodelling.org webmaster@admodelling.org email mittente eventuali msg
|
||||
_righeDataGrid 30 30 Num righe datagrid std
|
||||
@@ -16,7 +18,7 @@ _useAIMSmtp false false impiego client posta elettronica alternativo
|
||||
_useAuthSmtp true true true
|
||||
AuthCookieName admodellingAuth admodellingAuth Cookie applicativo
|
||||
autoConfCmd true true Conferma automatica comandi barcode
|
||||
baseUrl http://site_name http://iis01.egalware.com/site_name URL base del sito
|
||||
baseUrl http://site_name http://iis02/site_name URL base del sito
|
||||
cacheValSec 60 60 Validità cache dati in gestore Barcode
|
||||
cookieDayExp 365 365 Periodo validità cookie
|
||||
cookieUsed admodellingAuth admodellingAuth,CTrack_CodOpr,CTrack_CodPost Elenco dei cookie impiegati
|
||||
@@ -25,6 +27,6 @@ enableLogOut true false Abilita button logout COMPLETO in alto a sx
|
||||
enablePlain true true Abilitazione decode plain
|
||||
maxAuth 1000 1000 num auth minimo per NON consumare tokens
|
||||
serializeSession true true Serializzazione valori in sessione (REDIS)
|
||||
SiteName iis01/site_name iis01/site_name Nome sito
|
||||
SiteName iis02/site_name iis02/site_name Nome sito
|
||||
enableDumpDiag false false abilitazione dumb diagnostico x eccezioni di default
|
||||
doShrinkFolder true true Imposta compressione area LOGS
|
||||
@@ -1,4 +1,5 @@
|
||||
using SteamWare;
|
||||
using NKC_SDK;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -10,16 +11,16 @@ namespace NKC_WF.App_Start
|
||||
{
|
||||
public static void Init()
|
||||
{
|
||||
logger.lg.scriviLog("Start NKC_Startup.init()", tipoLog.STARTUP);
|
||||
Log.Instance.Info("Start NKC_Startup.init()", tipoLog.STARTUP);
|
||||
try
|
||||
{
|
||||
// inizializzo appConf prima di tutto il resto...
|
||||
memLayer.ML.resetAppConf();
|
||||
logger.lg.scriviLog("Completed preliminary setup AppConf execution", tipoLog.STARTUP);
|
||||
Log.Instance.Info("Completed preliminary setup AppConf execution", tipoLog.STARTUP);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"Exception during preliminary INIT app phase{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
|
||||
Log.Instance.Info($"Exception during preliminary INIT app phase{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+19
-18
@@ -1,4 +1,5 @@
|
||||
using AppData;
|
||||
using NKC_SDK;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.IO;
|
||||
@@ -8,20 +9,6 @@ namespace NKC_WF
|
||||
{
|
||||
public class BasePage : System.Web.UI.Page
|
||||
{
|
||||
#region Protected Fields
|
||||
|
||||
/// <summary>
|
||||
/// Membro gestione accessi al datalayer (istanza x ogni classe controllo)
|
||||
/// </summary>
|
||||
protected DataLayer DLMan = new DataLayer();
|
||||
|
||||
/// <summary>
|
||||
/// Codice macchina (da v2)
|
||||
/// </summary>
|
||||
protected string PlaceCod = "WRK001";
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
@@ -30,7 +17,7 @@ namespace NKC_WF
|
||||
/// <param name="message"></param>
|
||||
public void lgError(string message)
|
||||
{
|
||||
logger.lg.scriviLog(message, tipoLog.ERROR);
|
||||
Log.Instance.Error(message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -39,7 +26,7 @@ namespace NKC_WF
|
||||
/// <param name="message"></param>
|
||||
public void lgException(string message, Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"{message}{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
|
||||
Log.Instance.Error($"{message}{Environment.NewLine}{exc}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -48,7 +35,7 @@ namespace NKC_WF
|
||||
/// <param name="message"></param>
|
||||
public void lgFatal(string message, Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"{message}{Environment.NewLine}{exc}", tipoLog.FATAL);
|
||||
Log.Instance.Error($"{message}{Environment.NewLine}{exc}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -57,7 +44,7 @@ namespace NKC_WF
|
||||
/// <param name="message"></param>
|
||||
public void lgInfo(string message)
|
||||
{
|
||||
logger.lg.scriviLog(message, tipoLog.INFO);
|
||||
Log.Instance.Info(message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -71,5 +58,19 @@ namespace NKC_WF
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
/// <summary>
|
||||
/// Membro gestione accessi al datalayer (istanza x ogni classe controllo)
|
||||
/// </summary>
|
||||
protected DataLayer DLMan = new DataLayer();
|
||||
|
||||
/// <summary>
|
||||
/// Codice macchina (da v2)
|
||||
/// </summary>
|
||||
protected string PlaceCod = "WRK001";
|
||||
|
||||
#endregion Protected Fields
|
||||
}
|
||||
}
|
||||
+51
-50
@@ -1,5 +1,6 @@
|
||||
using AppData;
|
||||
using Newtonsoft.Json;
|
||||
using NKC_SDK;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -8,15 +9,6 @@ namespace NKC_WF
|
||||
{
|
||||
public class BaseUserControl : System.Web.UI.UserControl
|
||||
{
|
||||
#region Protected Fields
|
||||
|
||||
/// <summary>
|
||||
/// Membro gestione accessi al datalayer (istanza x ogni classe controllo)
|
||||
/// </summary>
|
||||
protected DataLayer DLMan = new DataLayer();
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Public Fields
|
||||
|
||||
/// <summary>
|
||||
@@ -40,42 +32,6 @@ namespace NKC_WF
|
||||
|
||||
#endregion Public Events
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected Dictionary<int, string> anagMateriali
|
||||
{
|
||||
set
|
||||
{
|
||||
string jsonData = JsonConvert.SerializeObject(value);
|
||||
memLayer.ML.setRSV("anagMateriali", jsonData, 60);
|
||||
}
|
||||
get
|
||||
{
|
||||
Dictionary<int, string> answ = new Dictionary<int, string>();
|
||||
//cerco in redis...
|
||||
string rawData = memLayer.ML.getRSV("anagMateriali");
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
answ = JsonConvert.DeserializeObject<Dictionary<int, string>>(rawData);
|
||||
}
|
||||
// sennò nel DB e salvo in redis...
|
||||
else
|
||||
{
|
||||
var tabMat = DLMan.taMat.GetData();
|
||||
foreach (var item in tabMat)
|
||||
{
|
||||
answ.Add(item.MatID, item.MatDesc);
|
||||
}
|
||||
// salvo in redis
|
||||
anagMateriali = answ;
|
||||
}
|
||||
// restituisco
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
@@ -179,7 +135,7 @@ namespace NKC_WF
|
||||
/// <param name="message"></param>
|
||||
public void lgDebug(string message)
|
||||
{
|
||||
logger.lg.scriviLog(message, tipoLog.DEBUG);
|
||||
Log.Instance.Debug(message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -188,7 +144,7 @@ namespace NKC_WF
|
||||
/// <param name="message"></param>
|
||||
public void lgError(string message)
|
||||
{
|
||||
logger.lg.scriviLog(message, tipoLog.ERROR);
|
||||
Log.Instance.Error(message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -197,7 +153,7 @@ namespace NKC_WF
|
||||
/// <param name="message"></param>
|
||||
public void lgException(string message, Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"{message}{Environment.NewLine}{exc}", tipoLog.EXCEPTION);
|
||||
Log.Instance.Error($"{message}{Environment.NewLine}{exc}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -206,7 +162,7 @@ namespace NKC_WF
|
||||
/// <param name="message"></param>
|
||||
public void lgFatal(string message, Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"{message}{Environment.NewLine}{exc}", tipoLog.FATAL);
|
||||
Log.Instance.Error($"{message}{Environment.NewLine}{exc}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -215,7 +171,7 @@ namespace NKC_WF
|
||||
/// <param name="message"></param>
|
||||
public void lgInfo(string message)
|
||||
{
|
||||
logger.lg.scriviLog(message, tipoLog.INFO);
|
||||
Log.Instance.Info(message);
|
||||
}
|
||||
|
||||
public string matByKey(object _matId)
|
||||
@@ -285,5 +241,50 @@ namespace NKC_WF
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
/// <summary>
|
||||
/// Membro gestione accessi al datalayer (istanza x ogni classe controllo)
|
||||
/// </summary>
|
||||
protected DataLayer DLMan = new DataLayer();
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected Dictionary<int, string> anagMateriali
|
||||
{
|
||||
set
|
||||
{
|
||||
string jsonData = JsonConvert.SerializeObject(value);
|
||||
memLayer.ML.setRSV("anagMateriali", jsonData, 60);
|
||||
}
|
||||
get
|
||||
{
|
||||
Dictionary<int, string> answ = new Dictionary<int, string>();
|
||||
//cerco in redis...
|
||||
string rawData = memLayer.ML.getRSV("anagMateriali");
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
answ = JsonConvert.DeserializeObject<Dictionary<int, string>>(rawData);
|
||||
}
|
||||
// sennò nel DB e salvo in redis...
|
||||
else
|
||||
{
|
||||
var tabMat = DLMan.taMat.GetData();
|
||||
foreach (var item in tabMat)
|
||||
{
|
||||
answ.Add(item.MatID, item.MatDesc);
|
||||
}
|
||||
// salvo in redis
|
||||
anagMateriali = answ;
|
||||
}
|
||||
// restituisco
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,8 @@ namespace NKC_WF.Controllers
|
||||
/// </summary>
|
||||
public class AliveController : ApiController
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
// GET: api/Alive
|
||||
[HttpGet]
|
||||
public string Get()
|
||||
@@ -27,7 +29,7 @@ namespace NKC_WF.Controllers
|
||||
public string Get(int id)
|
||||
{
|
||||
// check valore minimo ammesso parametro numero env da mantenere
|
||||
int n2k = 2500;
|
||||
int n2k = 1500;
|
||||
id = id > n2k ? id : n2k;
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
@@ -35,14 +37,15 @@ namespace NKC_WF.Controllers
|
||||
var currCount = ComLib.GetCurrMCount();
|
||||
// calcolo ultimo ID da tenere
|
||||
var idxMin = currCount - id;
|
||||
// elimino da mongo DB i record registrati...
|
||||
int numDelMongo = ComLib.CleanupMongo(idxMin);
|
||||
// inizio processando 1:1 da MList ed elimino hash + relativa cache
|
||||
int numDelRedis = ComLib.CleanupRedis(idxMin);
|
||||
// elimino anche da mongo DB il record trasmesso...
|
||||
int numDelMongo = ComLib.CleanupMongo(idxMin);
|
||||
|
||||
sw.Stop();
|
||||
return $"Effettuata pulizia memoria Redis + MongoDB | idx min: {idxMin} | Redis del: {numDelRedis} | Mongo del: {numDelMongo} | {(double)sw.ElapsedMilliseconds/1000:N2} sec";
|
||||
return $"Effettuata pulizia memoria Redis + MongoDB | idx min: {idxMin} | Redis del: {numDelRedis} | Mongo del: {numDelMongo} | {(double)sw.ElapsedMilliseconds / 1000:N2} sec";
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using SteamWare;
|
||||
using NKC_SDK;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Web;
|
||||
@@ -43,7 +44,7 @@ namespace NKC_WF.Controllers
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"Errore in get elenco reports{Environment.NewLine}{exc}");
|
||||
Log.Instance.Error($"Errore in get elenco reports{Environment.NewLine}{exc}");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
@@ -83,7 +84,7 @@ namespace NKC_WF.Controllers
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"Errore in get singolo report{Environment.NewLine}{exc}");
|
||||
Log.Instance.Error($"Errore in get singolo report{Environment.NewLine}{exc}");
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
@@ -104,10 +104,10 @@
|
||||
<HintPath>..\packages\MongoDB.Libmongocrypt.1.3.0\lib\netstandard2.0\MongoDB.Libmongocrypt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.4.7.15\lib\net45\NLog.dll</HintPath>
|
||||
<Reference Include="NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NLog.5.2.4\lib\net46\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PdfSharp, Version=1.50.5147.0, Culture=neutral, PublicKeyToken=f94615aa0424f9eb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\PDFsharp.1.50.5147\lib\net20\PdfSharp.dll</HintPath>
|
||||
@@ -128,14 +128,14 @@
|
||||
<Reference Include="StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\StackExchange.Redis.2.6.70\lib\net461\StackExchange.Redis.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SteamWare, Version=5.2.2206.1310, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SteamWare.5.2.2206.1310\lib\net462\SteamWare.dll</HintPath>
|
||||
<Reference Include="SteamWare, Version=5.3.2311.2908, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SteamWare.5.3.2311.2908\lib\net462\SteamWare.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SteamWare.Logger, Version=5.2.2206.1310, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SteamWare.Logger.5.2.2206.1310\lib\net462\SteamWare.Logger.dll</HintPath>
|
||||
<Reference Include="SteamWare.Logger, Version=5.3.2311.2908, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SteamWare.Logger.5.3.2311.2908\lib\net462\SteamWare.Logger.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SteamWare.Reports, Version=5.2.2204.2910, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SteamWare.Reports.5.2.2204.2910\lib\net462\SteamWare.Reports.dll</HintPath>
|
||||
<Reference Include="SteamWare.Reports, Version=5.3.2311.2908, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SteamWare.Reports.5.3.2311.2908\lib\net462\SteamWare.Reports.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using AppData;
|
||||
using NKC_SDK;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.IO;
|
||||
@@ -85,7 +86,7 @@ namespace NKC_WF.WebUserControls
|
||||
if (string.IsNullOrEmpty(answ))
|
||||
{
|
||||
// loggo...
|
||||
logger.lg.scriviLog($"SVG not found | filename: {filename} | baseOrig: {baseOrig} | baseCurr: {baseCurr} | used default SVG");
|
||||
Log.Instance.Info($"SVG not found | filename: {filename} | baseOrig: {baseOrig} | baseCurr: {baseCurr} | used default SVG");
|
||||
// leggo SVG DI DEFAULT che indica NON PRESENTE...
|
||||
filename = Server.MapPath("~/Images/NoData.svg");
|
||||
answ = File.ReadAllText(filename);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using SteamWare;
|
||||
using NKC_SDK;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
@@ -270,7 +271,7 @@ namespace NKC_WF.WebUserContols
|
||||
fs.CopyTo(file);
|
||||
file.Close();
|
||||
// log!
|
||||
logger.lg.scriviLog($"Effettuato salvataggio file {uploadedFilename} come {savedFilename}");
|
||||
Log.Instance.Info($"Effettuato salvataggio file {uploadedFilename} come {savedFilename}");
|
||||
}
|
||||
// segnaloc he ho CARICATO IN LOCALE il file
|
||||
reportFileUploaded(new FileUploadEventArgs(dirFrom, uplFileName, batchName));
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using AppData;
|
||||
using NKC_SDK;
|
||||
using SteamWare;
|
||||
using System;
|
||||
|
||||
@@ -153,7 +154,7 @@ namespace NKC_WF.WebUserControls
|
||||
catch (Exception exc)
|
||||
{
|
||||
string fullMessage = $"{traduci("KitDataImportException")}:{Environment.NewLine}{exc}";
|
||||
logger.lg.scriviLog(fullMessage);
|
||||
Log.Instance.Error(fullMessage);
|
||||
displayMessage(fullMessage, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using SteamWare;
|
||||
using NKC_SDK;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Web.UI;
|
||||
|
||||
@@ -6,12 +7,15 @@ namespace NKC_WF.WebUserControls
|
||||
{
|
||||
public partial class cmp_login : BaseUserControl
|
||||
{
|
||||
#region eventi pubblici esposti
|
||||
#region Public Events
|
||||
|
||||
public event EventHandler Login_ok;
|
||||
public event EventHandler Login_Error;
|
||||
|
||||
#endregion
|
||||
public event EventHandler Login_ok;
|
||||
|
||||
#endregion Public Events
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -21,6 +25,10 @@ namespace NKC_WF.WebUserControls
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void AdLogin()
|
||||
{
|
||||
lblMessage.Text = "User not authenticated...";
|
||||
@@ -31,7 +39,7 @@ namespace NKC_WF.WebUserControls
|
||||
if (string.IsNullOrEmpty(ad_name))
|
||||
{
|
||||
lblMessage.Text = user_std.UtSn.Traduci("AccessFail") + user_std.UtSn.Traduci("EmptyAdName");
|
||||
logger.lg.scriviLog(String.Format("Accesso fallito, ad_name vuoto"), SteamWare.tipoLog.ERROR);
|
||||
Log.Instance.Error(String.Format("Accesso fallito, ad_name vuoto"));
|
||||
if (Login_Error != null)
|
||||
{
|
||||
Login_Error(this, new EventArgs());
|
||||
@@ -52,7 +60,7 @@ namespace NKC_WF.WebUserControls
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"Exception in ADuserOk, ad_name: {ad_name}{Environment.NewLine}{exc}");
|
||||
Log.Instance.Error($"Exception in ADuserOk, ad_name: {ad_name}{Environment.NewLine}{exc}");
|
||||
Login_Error(this, new EventArgs());
|
||||
}
|
||||
if (adLoginOk)
|
||||
@@ -64,12 +72,12 @@ namespace NKC_WF.WebUserControls
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"Exception in startUpUtente{Environment.NewLine}{exc}");
|
||||
Log.Instance.Error($"Exception in startUpUtente{Environment.NewLine}{exc}");
|
||||
Login_Error(this, new EventArgs());
|
||||
}
|
||||
if (fattoStartup)
|
||||
{
|
||||
logger.lg.scriviLog(string.Format("L'utente {0} ({1}) ha effettuato il login correttamente", _utente.CognomeNome, _utente.userNameAD), SteamWare.tipoLog.INFO);
|
||||
Log.Instance.Info(string.Format("L'utente {0} ({1}) ha effettuato il login correttamente", _utente.CognomeNome, _utente.userNameAD));
|
||||
if (Login_ok != null)
|
||||
{
|
||||
Login_ok(this, new EventArgs());
|
||||
@@ -78,7 +86,7 @@ namespace NKC_WF.WebUserControls
|
||||
else
|
||||
{
|
||||
lblMessage.Text = String.Format("{0}<br>There are some problems instatiating user: {1}/{2}", user_std.UtSn.Traduci("AccessFail"), dom_user[0], dom_user[1]);
|
||||
logger.lg.scriviLog(String.Format("Accesso fallito, problemi ad istanziare l'utente {0}/{1}", dom_user[0], dom_user[1]), SteamWare.tipoLog.ERROR);
|
||||
Log.Instance.Error(String.Format("Accesso fallito, problemi ad istanziare l'utente {0}/{1}", dom_user[0], dom_user[1]));
|
||||
if (Login_Error != null)
|
||||
{
|
||||
Login_Error(this, new EventArgs());
|
||||
@@ -88,24 +96,25 @@ namespace NKC_WF.WebUserControls
|
||||
else
|
||||
{
|
||||
lblMessage.Text = String.Format("{0}<br>user not allowed: {1}/{2}", user_std.UtSn.Traduci("AccessFail"), dom_user[0], dom_user[1]);
|
||||
logger.lg.scriviLog(String.Format("Utente non autorizzato: {0}/{1}", dom_user[0], dom_user[1]), SteamWare.tipoLog.WARNING);
|
||||
Log.Instance.Info(String.Format("Utente non autorizzato: {0}/{1}", dom_user[0], dom_user[1]));
|
||||
if (Login_Error != null)
|
||||
{
|
||||
Login_Error(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lblMessage.Text = user_std.UtSn.Traduci("AccessFail") + user_std.UtSn.Traduci("UsrNotAuth");
|
||||
logger.lg.scriviLog(String.Format("Accesso fallito, utente non autenticato"), SteamWare.tipoLog.WARNING);
|
||||
Log.Instance.Info(String.Format("Accesso fallito, utente non autenticato"));
|
||||
if (Login_Error != null)
|
||||
{
|
||||
Login_Error(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,7 @@ namespace NKC_WF.WebUserControls
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"Eccezione in tentativo creazione file CNC da ordine offline{Environment.NewLine}{exc}");
|
||||
Log.Instance.Error($"Eccezione in tentativo creazione file CNC da ordine offline{Environment.NewLine}{exc}");
|
||||
}
|
||||
|
||||
if (allOk)
|
||||
@@ -75,7 +75,7 @@ namespace NKC_WF.WebUserControls
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"Eccezione in tentativo chiusura richiesta CNC da ordine offline{Environment.NewLine}{exc}");
|
||||
Log.Instance.Error($"Eccezione in tentativo chiusura richiesta CNC da ordine offline{Environment.NewLine}{exc}");
|
||||
}
|
||||
|
||||
if (allOk)
|
||||
|
||||
@@ -158,14 +158,14 @@ namespace NKC_WF.WebUserControls
|
||||
try
|
||||
{
|
||||
// loggo che sto x copiare
|
||||
logger.lg.scriviLog($"Requested copy from {value.Trim()} --> {Server.MapPath(nameOnly)}");
|
||||
Log.Instance.Info($"Requested copy from {value.Trim()} --> {Server.MapPath(nameOnly)}");
|
||||
// copio in locale file...
|
||||
File.Copy(value.Trim(), Server.MapPath(nameOnly));
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
string fullMessage = $"SecScreed: Exception on setPdfPath:{Environment.NewLine}{exc}";
|
||||
logger.lg.scriviLog(fullMessage);
|
||||
Log.Instance.Error(fullMessage);
|
||||
}
|
||||
// update...
|
||||
hlPdfOpener.NavigateUrl = nameOnly;
|
||||
@@ -173,7 +173,7 @@ namespace NKC_WF.WebUserControls
|
||||
else
|
||||
{
|
||||
string fullMessage = $"SecScreed: Error on pdfPath set value: [{value}]";
|
||||
logger.lg.scriviLog(fullMessage);
|
||||
Log.Instance.Info(fullMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using AppData;
|
||||
using NKC_SDK;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -88,7 +89,7 @@ namespace NKC_WF.WebUserControls
|
||||
if (string.IsNullOrEmpty(answ))
|
||||
{
|
||||
// loggo...
|
||||
logger.lg.scriviLog($"SVG not found | filename: {filename} | baseOrig: {baseOrig} | baseCurr: {baseCurr} | used default SVG");
|
||||
Log.Instance.Info($"SVG not found | filename: {filename} | baseOrig: {baseOrig} | baseCurr: {baseCurr} | used default SVG");
|
||||
// leggo SVG DI DEFAULT che indica NON PRESENTE...
|
||||
filename = Server.MapPath("~/Images/NoData.svg");
|
||||
//filename = Server.MapPath("~/Images/NoData.svg");
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
<package id="MongoDB.Driver.Core" version="2.15.0" targetFramework="net462" />
|
||||
<package id="MongoDB.Libmongocrypt" version="1.3.0" targetFramework="net462" />
|
||||
<package id="NETStandard.Library" version="2.0.3" targetFramework="net462" />
|
||||
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net462" />
|
||||
<package id="NLog" version="4.7.15" targetFramework="net462" />
|
||||
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
|
||||
<package id="NLog" version="5.2.4" targetFramework="net462" />
|
||||
<package id="PDFsharp" version="1.50.5147" targetFramework="net462" />
|
||||
<package id="Pipelines.Sockets.Unofficial" version="2.2.2" targetFramework="net462" />
|
||||
<package id="popper.js" version="1.16.1" targetFramework="net462" />
|
||||
@@ -55,9 +55,9 @@
|
||||
<package id="SharpZipLib" version="1.4.0" targetFramework="net462" />
|
||||
<package id="Snappy.NET" version="1.1.1.8" targetFramework="net462" />
|
||||
<package id="StackExchange.Redis" version="2.6.70" targetFramework="net462" />
|
||||
<package id="SteamWare" version="5.2.2206.1310" targetFramework="net462" />
|
||||
<package id="SteamWare.Logger" version="5.2.2206.1310" targetFramework="net462" />
|
||||
<package id="SteamWare.Reports" version="5.2.2204.2910" targetFramework="net462" />
|
||||
<package id="SteamWare" version="5.3.2311.2908" targetFramework="net462" />
|
||||
<package id="SteamWare.Logger" version="5.3.2311.2908" targetFramework="net462" />
|
||||
<package id="SteamWare.Reports" version="5.3.2311.2908" targetFramework="net462" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net462" />
|
||||
<package id="System.Diagnostics.PerformanceCounter" version="6.0.1" targetFramework="net462" />
|
||||
<package id="System.IO.Compression" version="4.3.0" targetFramework="net462" />
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace NKC_WF.site
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"{traduci("ErrFileTestImport01")}:{Environment.NewLine}{exc}");
|
||||
Log.Instance.Error($"{traduci("ErrFileTestImport01")}:{Environment.NewLine}{exc}");
|
||||
DLMan.taEL.insertQuery(DateTime.Now, "Copy DXF", $"{e.BatchName}", $"{e.BatchName}.{e.FileName}", $"Exception: {exc}");
|
||||
}
|
||||
// chiamo stored caricamento
|
||||
@@ -62,7 +62,7 @@ namespace NKC_WF.site
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"{traduci("ErrFileTestImport02")}:{Environment.NewLine}{exc}");
|
||||
Log.Instance.Error($"{traduci("ErrFileTestImport02")}:{Environment.NewLine}{exc}");
|
||||
// salvo log errore...
|
||||
DLMan.taEL.insertQuery(DateTime.Now, "Import KIT TEST", $"{e.BatchName}", $"{e.BatchName}.{e.FileName}", $"Exception: {exc}");
|
||||
dataValidated = false;
|
||||
@@ -80,7 +80,7 @@ namespace NKC_WF.site
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"{traduci("ErrOrderCsvImp03")}:{Environment.NewLine}{exc}");
|
||||
Log.Instance.Error($"{traduci("ErrOrderCsvImp03")}:{Environment.NewLine}{exc}");
|
||||
dataValidated = false;
|
||||
}
|
||||
if (batchID > 0)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using SteamWare;
|
||||
using NKC_SDK;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Web.UI;
|
||||
@@ -48,7 +49,7 @@ namespace NKC_WF
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"{traduci("ErrKitReqImpCopyError")}:{Environment.NewLine}{exc}");
|
||||
Log.Instance.Error($"{traduci("ErrKitReqImpCopyError")}:{Environment.NewLine}{exc}");
|
||||
}
|
||||
// salvo dati
|
||||
cmp_kitImpCheck.fileName = e.FileName;
|
||||
@@ -58,11 +59,11 @@ namespace NKC_WF
|
||||
string[] file2del = Directory.GetFiles(dirTo, "error*");
|
||||
if (file2del.Length > 0)
|
||||
{
|
||||
logger.lg.scriviLog($"Trovati {file2del.Length} file errore, li elimino");
|
||||
Log.Instance.Info($"Trovati {file2del.Length} file errore, li elimino");
|
||||
foreach (var item in file2del)
|
||||
{
|
||||
File.Delete(item);
|
||||
logger.lg.scriviLog($"Eliminato {item}");
|
||||
Log.Instance.Info($"Eliminato {item}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using AppData;
|
||||
using NKC_SDK;
|
||||
using SteamWare;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -121,7 +122,7 @@ namespace NKC_WF
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"{traduci("ErrOrderCsvImp01")}:{Environment.NewLine}{exc}");
|
||||
Log.Instance.Error($"{traduci("ErrOrderCsvImp01")}:{Environment.NewLine}{exc}");
|
||||
DLMan.taEL.insertQuery(DateTime.Now, "Copy CSV", $"{e.BatchName}", $"{e.BatchName}.{e.FileName}", $"Exception: {exc}");
|
||||
}
|
||||
// chiamo stored caricamento
|
||||
@@ -132,11 +133,11 @@ namespace NKC_WF
|
||||
string[] file2del = Directory.GetFiles(dirTo, "error*");
|
||||
if (file2del.Length > 0)
|
||||
{
|
||||
logger.lg.scriviLog($"Trovati {file2del.Length} file errore, li elimino");
|
||||
Log.Instance.Info($"Trovati {file2del.Length} file errore, li elimino");
|
||||
foreach (var item in file2del)
|
||||
{
|
||||
File.Delete(item);
|
||||
logger.lg.scriviLog($"Eliminato {item}");
|
||||
Log.Instance.Info($"Eliminato {item}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +146,7 @@ namespace NKC_WF
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"{traduci("ErrOrderCsvImp02")}:{Environment.NewLine}{exc}");
|
||||
Log.Instance.Error($"{traduci("ErrOrderCsvImp02")}:{Environment.NewLine}{exc}");
|
||||
// salvo log errore...
|
||||
DLMan.taEL.insertQuery(DateTime.Now, "Upload CSV", $"{e.BatchName}", $"{e.BatchName}.{e.FileName}", $"Exception: {exc}");
|
||||
dataValidated = false;
|
||||
@@ -166,7 +167,7 @@ namespace NKC_WF
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.lg.scriviLog($"{traduci("ErrOrderCsvImp03")}:{Environment.NewLine}{exc}");
|
||||
Log.Instance.Error($"{traduci("ErrOrderCsvImp03")}:{Environment.NewLine}{exc}");
|
||||
dataValidated = false;
|
||||
}
|
||||
if (dataValidated && batchID > 0)
|
||||
@@ -226,7 +227,7 @@ namespace NKC_WF
|
||||
DLMan.taEL.insertQuery(DateTime.Now, "I.1", $"B.{batchID}", $"{item.ItemExtCode}.dxf", errMsg);
|
||||
allOk = false;
|
||||
missingDxfList.Add(item.ItemExtCode);
|
||||
logger.lg.scriviLog(errMsg);
|
||||
Log.Instance.Error(errMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -236,7 +237,7 @@ namespace NKC_WF
|
||||
{
|
||||
allOk = false;
|
||||
string errMsg = $"Excetion on doValidations fot BatchId: {batchID}{Environment.NewLine}{exc}";
|
||||
logger.lg.scriviLog(errMsg);
|
||||
Log.Instance.Error(errMsg);
|
||||
DLMan.taEL.insertQuery(DateTime.Now, "I.2", $"B.{batchID}", "doValidations", errMsg);
|
||||
}
|
||||
// risultato
|
||||
|
||||
Reference in New Issue
Block a user