|
-
+
|
diff --git a/MP-TAB-SERV/Components/DeclarMan.razor.cs b/MP-TAB-SERV/Components/DeclarMan.razor.cs
index 1d71c8d7..8e927b92 100644
--- a/MP-TAB-SERV/Components/DeclarMan.razor.cs
+++ b/MP-TAB-SERV/Components/DeclarMan.razor.cs
@@ -2,6 +2,7 @@ using global::Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.Data.Services;
using NLog;
+using Org.BouncyCastle.Asn1.IsisMtt.X509;
using static EgwCoreLib.Utils.DtUtils;
namespace MP_TAB_SERV.Components
@@ -43,6 +44,11 @@ namespace MP_TAB_SERV.Components
protected List ListComplete { get; set; } = new List();
protected List ListPaged { get; set; } = new List();
+ protected void SetEdit(RegistroDichiarazioniModel selRec)
+ {
+ CurrRec = selRec;
+ }
+
[Inject]
protected MessageService MServ { get; set; } = null!;
@@ -121,6 +127,8 @@ namespace MP_TAB_SERV.Components
#region Private Fields
+ private RegistroDichiarazioniModel? CurrRec { get; set; } = null;
+
private static Logger Log = LogManager.GetCurrentClassLogger();
private bool isProcessing = false;
private int NumRecPage = 10;
diff --git a/MP-TAB-SERV/MP-TAB-SERV.csproj b/MP-TAB-SERV/MP-TAB-SERV.csproj
index ab309546..591dfdee 100644
--- a/MP-TAB-SERV/MP-TAB-SERV.csproj
+++ b/MP-TAB-SERV/MP-TAB-SERV.csproj
@@ -3,7 +3,7 @@
net6.0
enable
- 6.16.2310.1618
+ 6.16.2310.1619
enable
MP_TAB_SERV
diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html
index dcd6c500..26516930 100644
--- a/MP-TAB-SERV/Resources/ChangeLog.html
+++ b/MP-TAB-SERV/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOSPEC
- Versione: 6.16.2310.1618
+ Versione: 6.16.2310.1619
Note di rilascio:
-
diff --git a/MP-TAB-SERV/Resources/VersNum.txt b/MP-TAB-SERV/Resources/VersNum.txt
index c876022e..fc590c92 100644
--- a/MP-TAB-SERV/Resources/VersNum.txt
+++ b/MP-TAB-SERV/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2310.1618
+6.16.2310.1619
diff --git a/MP-TAB-SERV/Resources/manifest.xml b/MP-TAB-SERV/Resources/manifest.xml
index 4ebe2f54..838932b5 100644
--- a/MP-TAB-SERV/Resources/manifest.xml
+++ b/MP-TAB-SERV/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2310.1618
+ 6.16.2310.1619
https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/MP-TAB-SERV.zip
https://nexus.steamware.net/repository/SWS/MP-TAB-SERV/stable/LAST/ChangeLog.html
false
diff --git a/MP.Data/Controllers/MpTabController.cs b/MP.Data/Controllers/MpTabController.cs
index 5d7f5d5a..4a4ebfe1 100644
--- a/MP.Data/Controllers/MpTabController.cs
+++ b/MP.Data/Controllers/MpTabController.cs
@@ -774,6 +774,86 @@ namespace MP.Data.Controllers
return fatto;
}
+ ///
+ /// Aggiunta record RegistroScarti
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public List RegDichiarGetFilt(string idxMacchina, string tagCode, int matrOpr, int idxODL, DateTime dataFrom, DateTime dataTo)
+ {
+ List dbResult = new List();
+ using (var dbCtx = new MoonProContext(_configuration))
+ {
+ var TagCode = new SqlParameter("@TagCode", tagCode);
+ var IdxMacchina = new SqlParameter("@IdxMacchina", idxMacchina);
+ var MatrOpr = new SqlParameter("@MatrOpr", matrOpr);
+ var IdxODL = new SqlParameter("@IdxODL", idxODL);
+ var DtFrom = new SqlParameter("@DataFrom", dataFrom);
+ var DtTo = new SqlParameter("@DataTo", dataTo);
+
+ dbResult = dbCtx
+ .DbSetRegDich
+ .FromSqlRaw("EXEC stp_DD_getFilt @TagCode, @IdxMacchina, @MatrOpr, @IdxODL, @DataFrom, @DataTo", TagCode, IdxMacchina, MatrOpr, IdxODL, DtFrom, DtTo)
+ .AsNoTracking()
+ .ToList();
+ }
+ return dbResult;
+ }
+
+ ///
+ /// Aggiunta record Registro Dichiarazioni
+ ///
+ ///
+ ///
+ public async Task RegDichiarInsert(RegistroDichiarazioniModel newRec)
+ {
+ bool fatto = false;
+ using (var dbCtx = new MoonProContext(_configuration))
+ {
+ var TagCode = new SqlParameter("@TagCode", newRec.TagCode);
+ var IdxMacchina = new SqlParameter("@IdxMacchina", newRec.IdxMacchina);
+ var DtRec = new SqlParameter("@DtRec", newRec.DtRec);
+ var MatrOpr = new SqlParameter("@MatrOpr", newRec.MatrOpr);
+ var ValString = new SqlParameter("@ValString", newRec.ValString);
+
+ var result = await dbCtx
+ .Database
+ .ExecuteSqlRawAsync("exec dbo.stp_DD_insertQuery @TagCode, @IdxMacchina, @DtRec, @MatrOpr, @ValString", TagCode, IdxMacchina, DtRec, MatrOpr, ValString);
+ // indico eseguito!
+ fatto = result > 0;
+ }
+ return fatto;
+ }
+
+ ///
+ /// Update record Registro Dichiarazioni
+ ///
+ ///
+ ///
+ public async Task RegDichiarUpdate(RegistroDichiarazioniModel newRec)
+ {
+ bool fatto = false;
+ using (var dbCtx = new MoonProContext(_configuration))
+ {
+ var Original_IdxDich = new SqlParameter("@Original_IdxDich", newRec.IdxDich);
+ var DtRec = new SqlParameter("@DtRec", newRec.DtRec);
+ var TagCode = new SqlParameter("@TagCode", newRec.TagCode);
+ var ValString = new SqlParameter("@ValString", newRec.ValString);
+ var MatrOpr = new SqlParameter("@MatrOpr", newRec.MatrOpr);
+
+ var result = await dbCtx
+ .Database
+ .ExecuteSqlRawAsync("exec dbo.stp_DD_updateQuery @Original_IdxDich, @DtRec, @TagCode, @ValString, @MatrOpr", Original_IdxDich, DtRec, TagCode, ValString, MatrOpr);
+ // indico eseguito!
+ fatto = result > 0;
+ }
+ return fatto;
+ }
+
///
/// Aggiunta record RegistroScarti
///
@@ -829,60 +909,6 @@ namespace MP.Data.Controllers
return fatto;
}
- ///
- /// Aggiunta record Registro Dichiarazioni
- ///
- ///
- ///
- public async Task RegDichiarInsert(RegistroDichiarazioniModel newRec)
- {
- bool fatto = false;
- using (var dbCtx = new MoonProContext(_configuration))
- {
- var TagCode = new SqlParameter("@TagCode", newRec.TagCode);
- var IdxMacchina = new SqlParameter("@IdxMacchina", newRec.IdxMacchina);
- var DtRec = new SqlParameter("@DtRec", newRec.DtRec);
- var MatrOpr = new SqlParameter("@MatrOpr", newRec.MatrOpr);
- var ValString = new SqlParameter("@ValString", newRec.ValString);
-
- var result = await dbCtx
- .Database
- .ExecuteSqlRawAsync("exec dbo.stp_DD_insertQuery @TagCode, @IdxMacchina, @DtRec, @MatrOpr, @ValString", TagCode, IdxMacchina, DtRec, MatrOpr, ValString);
- // indico eseguito!
- fatto = result > 0;
- }
- return fatto;
- }
-
- ///
- /// Aggiunta record RegistroScarti
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- public List RegDichiarGetFilt(string idxMacchina, string tagCode, int matrOpr, int idxODL, DateTime dataFrom, DateTime dataTo)
- {
- List dbResult = new List();
- using (var dbCtx = new MoonProContext(_configuration))
- {
- var TagCode = new SqlParameter("@TagCode", tagCode);
- var IdxMacchina = new SqlParameter("@IdxMacchina", idxMacchina);
- var MatrOpr = new SqlParameter("@MatrOpr", matrOpr);
- var IdxODL = new SqlParameter("@IdxODL", idxODL);
- var DtFrom = new SqlParameter("@DataFrom", dataFrom);
- var DtTo = new SqlParameter("@DataTo", dataTo);
-
- dbResult = dbCtx
- .DbSetRegDich
- .FromSqlRaw("EXEC stp_DD_getFilt @TagCode, @IdxMacchina, @MatrOpr, @IdxODL, @DataFrom, @DataTo", TagCode, IdxMacchina, MatrOpr, IdxODL, DtFrom, DtTo)
- .AsNoTracking()
- .ToList();
- }
- return dbResult;
- }
///
/// Effettua ricalcolo MSE x macchina indicata
///
diff --git a/MP.Data/Services/TabDataService.cs b/MP.Data/Services/TabDataService.cs
index 202f3243..07b6dedc 100644
--- a/MP.Data/Services/TabDataService.cs
+++ b/MP.Data/Services/TabDataService.cs
@@ -794,6 +794,29 @@ namespace MP.Data.Services
return answ;
}
+ ///
+ /// Aggiunta record Registro Dichiarazioni
+ ///
+ ///
+ ///
+ public async Task RegDichiarUpdate(RegistroDichiarazioniModel newRec)
+ {
+ bool answ = false;
+ try
+ {
+ // inserisco evento
+ answ = await dbTabController.RegDichiarUpdate(newRec);
+ // reset cache eventi/commenti
+ await FlushCache("RegDichiar");
+ }
+ catch (Exception exc)
+ {
+ string logMsg = $"Eccezione in RegDichiarUpdate | macchina: {newRec.IdxMacchina} | DtRec: {newRec.DtRec} | TagCode: {newRec.TagCode} | MatrOpr: {newRec.MatrOpr} | ValString {newRec.ValString}{Environment.NewLine}{exc}";
+ Log.Error(logMsg);
+ }
+ return answ;
+ }
+
///
/// Restituisce elenco RS filtrato
///
|