MP-PROG:
- correzione update tags da lettura dati
This commit is contained in:
@@ -153,6 +153,11 @@ namespace MP.FileData.Controllers
|
||||
}
|
||||
|
||||
Log.Info($"Effettuati {checkDone} controlli");
|
||||
// svuoto
|
||||
fileNew = new List<FileInfo>();
|
||||
fileChecked = new List<FileModel>();
|
||||
fileMod = new List<FileModel>();
|
||||
// chiudo
|
||||
return checkDone;
|
||||
}
|
||||
|
||||
@@ -267,6 +272,7 @@ namespace MP.FileData.Controllers
|
||||
dbResult = localDbCtx
|
||||
.DbSetProgFile
|
||||
.Where(x => x.Path.StartsWith(path) && ((onlyActive == x.Active) || !onlyActive))
|
||||
.Include(x => x.Tags)
|
||||
.OrderBy(x => x.Name)
|
||||
.ToList();
|
||||
}
|
||||
@@ -500,12 +506,21 @@ namespace MP.FileData.Controllers
|
||||
List<TagModel> currTags = localDbCtx.DbSetTags.ToList();
|
||||
foreach (var item in updFiles)
|
||||
{
|
||||
// recupero record da DB...
|
||||
var currItem = localDbCtx
|
||||
.DbSetProgFile
|
||||
.Where(x => x.FileId == item.FileId)
|
||||
.Include(x => x.Tags)
|
||||
.FirstOrDefault();
|
||||
#if false
|
||||
// rimuovo tags vecchi
|
||||
if (item.Tags != null)
|
||||
if (currItem.Tags != null)
|
||||
{
|
||||
item.Tags.Clear();
|
||||
localDbCtx.SaveChanges();
|
||||
}
|
||||
currItem.Tags.Clear();
|
||||
//localDbCtx.Entry(item).State = EntityState.Modified;
|
||||
//localDbCtx.SaveChanges();
|
||||
}
|
||||
#endif
|
||||
|
||||
List<string> Tags = new List<string>();
|
||||
List<TagModel> Tag4File = new List<TagModel>();
|
||||
@@ -552,8 +567,11 @@ namespace MP.FileData.Controllers
|
||||
if (Tag4File.Count > 0)
|
||||
{
|
||||
// salvo i tags relativi ai files
|
||||
item.Tags = Tag4File;
|
||||
currItem.Tags.Clear();
|
||||
currItem.Tags = Tag4File;
|
||||
//localDbCtx.Entry(currItem).State = EntityState.Modified;
|
||||
}
|
||||
//localDbCtx.SaveChanges();
|
||||
}
|
||||
try
|
||||
{
|
||||
|
||||
@@ -18,17 +18,13 @@
|
||||
"<": " ",
|
||||
">": " "
|
||||
},
|
||||
"RegExPattern": "\\b{{fileName}}.{0,2}\\([\\<\\w\\d\\s./\\-=\\+\\>]+\\)",
|
||||
"RegExRepFileName": true,
|
||||
"ReplaceCR": true,
|
||||
"RegExPattern": "",
|
||||
"RegExRepFileName": false,
|
||||
"ReplaceCR": false,
|
||||
"Tag2Collect": [
|
||||
"CNCTYPE",
|
||||
"VENDOR",
|
||||
"MODEL",
|
||||
"MPIP",
|
||||
"Customer",
|
||||
"HostOS",
|
||||
"HostName",
|
||||
"HostAddr"
|
||||
"MPIP"
|
||||
]
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RootNamespace>MP.Prog</RootNamespace>
|
||||
<Version>6.16.2212.2818</Version>
|
||||
<Version>6.16.2212.2916</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
<div class="@(cssActive(record.Active))">
|
||||
<div>@record.Name</div>
|
||||
<button class="btn btn-sm btn-outline-secondary px-1 py-0" @onclick="() => FilterPath(record.Path)" title="Filtra per FilePath">
|
||||
<div class="small">@record.Path</div>
|
||||
<div class="small text-truncate">@record.Path</div>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo gestione Programmi MAPO</i>
|
||||
<h4>Versione: 6.16.2212.2818</h4>
|
||||
<h4>Versione: 6.16.2212.2916</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2212.2818
|
||||
6.16.2212.2916
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2212.2818</version>
|
||||
<version>6.16.2212.2916</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/MP.Prog.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user