update x nuova gestione senza articolo
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
</div>
|
||||
<div class="col-4">
|
||||
</div>
|
||||
<div class="col-4 text-right">
|
||||
<span class="border border-danger table-danger px-2"><b>@numChanges</b> modifiche</span>
|
||||
<div class="col-4 text-right p-2">
|
||||
<span class="border border-danger table-danger py-1 px-2"><b>@numChanges</b> modifiche</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -36,9 +36,6 @@ namespace MP.Prog.Components
|
||||
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public List<ArticoloModel> ArtList { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public FileModel currItem
|
||||
{
|
||||
@@ -61,6 +58,9 @@ namespace MP.Prog.Components
|
||||
[Parameter]
|
||||
public List<MacchinaModel> MacList { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public List<TagModel> TagList { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
@@ -205,12 +205,6 @@ namespace MP.Prog.Data
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public Task<List<MP.FileData.DatabaseModels.ArticoloModel>> ArticoliGetFilt(string SearchVal)
|
||||
{
|
||||
return Task.FromResult(dbController.ArtGetFilt(SearchVal, 200).ToList());
|
||||
//return Task.FromResult(dbController.ArtGetFilt(SearchVal, 20).ToList());
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Clear database controller
|
||||
@@ -245,6 +239,12 @@ namespace MP.Prog.Data
|
||||
dbController.RollBackEntity(item);
|
||||
}
|
||||
|
||||
public Task<List<MP.FileData.DatabaseModels.TagModel>> TagGetFilt(string SearchVal)
|
||||
{
|
||||
return Task.FromResult(dbController.TagGetFilt(SearchVal, 200).ToList());
|
||||
//return Task.FromResult(dbController.ArtGetFilt(SearchVal, 20).ToList());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Aggiorna intero archivio scansionando dati x tutte le macchine che hanno un path valido
|
||||
/// </summary>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Remove="Components\CodArtSelector.razor" />
|
||||
<Content Remove="Components\DataPager.razor" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<div class="card-body p-1">
|
||||
@if (currRecord != null)
|
||||
{
|
||||
<MP.Prog.Components.FileEditor currItem="@currRecord" DataReset="ResetData" DataUpdated="UpdateData" ArtList="@ArtList" MacList="@MacList"></MP.Prog.Components.FileEditor>
|
||||
<MP.Prog.Components.FileEditor currItem="@currRecord" DataReset="ResetData" DataUpdated="UpdateData" ArtList="@TagList" MacList="@MacList"></MP.Prog.Components.FileEditor>
|
||||
}
|
||||
@if (ListRecords == null)
|
||||
{
|
||||
@@ -89,7 +89,7 @@
|
||||
<th>Size</th>
|
||||
<th class="text-center">State</th>
|
||||
<th>Macchina</th>
|
||||
<th>Articolo</th>
|
||||
<th>Tags</th>
|
||||
<th class="text-right">Modificato</th>
|
||||
@*<th>Controllo</th>*@
|
||||
</tr>
|
||||
@@ -136,8 +136,10 @@
|
||||
<div class="small">@record.Macchina.Descrizione</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>@record.Articolo.Disegno</div>
|
||||
<div class="small">@record.Articolo.DescArticolo</div>
|
||||
@foreach (var item in record.Tags)
|
||||
{
|
||||
<span class="badge badge-info small">@item.TagId</span>
|
||||
}
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<div>@record.LastMod.ToString("yyyy.MM.dd")</div>
|
||||
|
||||
@@ -13,20 +13,19 @@ namespace MP.Prog.Pages
|
||||
{
|
||||
#region Private Fields
|
||||
|
||||
private List<ArticoloModel> ArtList;
|
||||
|
||||
private FileModel currRecord = null;
|
||||
private List<FileModel> ListRecords;
|
||||
private List<MacchinaModel> MacList;
|
||||
private List<FileModel> SearchRecords;
|
||||
private List<TagModel> TagList;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected string _SearchArt;
|
||||
protected string _SearchTag;
|
||||
|
||||
protected string defCodArt = "";
|
||||
protected string defTag = "";
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
@@ -170,26 +169,26 @@ namespace MP.Prog.Pages
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; }
|
||||
|
||||
protected string SearchArt
|
||||
protected string SearchTag
|
||||
{
|
||||
get
|
||||
{
|
||||
return _SearchArt;
|
||||
return _SearchTag;
|
||||
}
|
||||
set
|
||||
{
|
||||
isLoading = true;
|
||||
_SearchArt = value;
|
||||
_SearchTag = value;
|
||||
// se son > 3 char... debounce...
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
_SearchArt = defCodArt;
|
||||
_SearchTag = defTag;
|
||||
}
|
||||
if (value.Length >= defCodArt.Length)
|
||||
if (value.Length >= defTag.Length)
|
||||
{
|
||||
var pUpd = Task.Run(async () =>
|
||||
{
|
||||
ArtList = await DataService.ArticoliGetFilt(SearchArt);
|
||||
TagList = await DataService.TagGetFilt(SearchTag);
|
||||
});
|
||||
pUpd.Wait();
|
||||
}
|
||||
@@ -289,7 +288,7 @@ namespace MP.Prog.Pages
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
DataService.ResetController();
|
||||
SearchArt = defCodArt;
|
||||
SearchTag = defTag;
|
||||
AppMService.ShowSearch = false;
|
||||
AppMService.PageName = "Archivio File Programmi";
|
||||
AppMService.PageIcon = "fas fa-folder pr-2";
|
||||
@@ -302,9 +301,9 @@ namespace MP.Prog.Pages
|
||||
isLoading = true;
|
||||
MacList = await DataService.MacchineGetAll();
|
||||
SelIdxMacc = "0";
|
||||
SearchArt = defCodArt;
|
||||
SearchTag = defTag;
|
||||
|
||||
ArtList = await DataService.ArticoliGetFilt(SearchArt);
|
||||
TagList = await DataService.TagGetFilt(SearchTag);
|
||||
|
||||
isLoading = false;
|
||||
await ReloadData();
|
||||
@@ -322,13 +321,13 @@ namespace MP.Prog.Pages
|
||||
SearchRecords = null;
|
||||
ListRecords = null;
|
||||
AppMService.File_Filter = SelectData.Init(5, 10);
|
||||
SearchArt = defCodArt;
|
||||
SearchTag = defTag;
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
protected void ResetSearchArt()
|
||||
{
|
||||
SearchArt = defCodArt;
|
||||
SearchTag = defTag;
|
||||
}
|
||||
|
||||
protected void searchArtUpd(string newCod)
|
||||
|
||||
@@ -8,45 +8,6 @@
|
||||
|
||||
<h3>Setup</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<textarea @bind="@oldText" cols="50" rows="30" />
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<textarea @bind="@newText" cols="50" rows="30" />
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<MP.Prog.Components.DiffView oldText="@oldText" newText="@newText"></MP.Prog.Components.DiffView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
|
||||
protected string _oldText = "Prova primo testo";
|
||||
protected string _newText = "Prova secondo testo";
|
||||
|
||||
protected string oldText
|
||||
{
|
||||
get
|
||||
{
|
||||
return _oldText;
|
||||
}
|
||||
set
|
||||
{
|
||||
_oldText = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected string newText
|
||||
{
|
||||
get
|
||||
{
|
||||
return _newText;
|
||||
}
|
||||
set
|
||||
{
|
||||
_newText = value;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user