Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ba3aeb65d | |||
| 6ea938a91a | |||
| 92c196023d | |||
| 10d9625b6d | |||
| 5f955499e2 | |||
| 716813abe1 |
@@ -28,4 +28,16 @@
|
|||||||
<ProjectReference Include="..\MP.Data\MP.Data.csproj" />
|
<ProjectReference Include="..\MP.Data\MP.Data.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Update="wwwroot\favicon.ico">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Update="logs\.placeholder">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -44,13 +44,13 @@ namespace MP.SPEC.Pages
|
|||||||
#region Protected Properties
|
#region Protected Properties
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
protected IJSRuntime JSRuntime { get; set; }
|
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
protected MpDataService MDService { get; set; }
|
protected MpDataService MDService { get; set; } = null!;
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
protected MessageService MessageService { get; set; }
|
protected MessageService MessageService { get; set; } = null!;
|
||||||
|
|
||||||
[Inject]
|
[Inject]
|
||||||
protected NavigationManager NavManager { get; set; }
|
protected NavigationManager NavManager { get; set; }
|
||||||
@@ -78,7 +78,7 @@ namespace MP.SPEC.Pages
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected async Task addNew()
|
protected async Task addNew()
|
||||||
{
|
{
|
||||||
currRecord = new MP.Data.DatabaseModels.AnagArticoli()
|
currRecord = new AnagArticoli()
|
||||||
{
|
{
|
||||||
CodArticolo = $"_NEW_{DateTime.Now:yyyyMMdd.HHmmss}",
|
CodArticolo = $"_NEW_{DateTime.Now:yyyyMMdd.HHmmss}",
|
||||||
DescArticolo = "Nuovo articolo",
|
DescArticolo = "Nuovo articolo",
|
||||||
@@ -101,7 +101,7 @@ namespace MP.SPEC.Pages
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="selRec"></param>
|
/// <param name="selRec"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected async Task deleteRecord(MP.Data.DatabaseModels.AnagArticoli selRec)
|
protected async Task deleteRecord(AnagArticoli selRec)
|
||||||
{
|
{
|
||||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Eliminazione Articolo: sei sicuro di voler procedere?"))
|
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Eliminazione Articolo: sei sicuro di voler procedere?"))
|
||||||
return;
|
return;
|
||||||
@@ -124,7 +124,6 @@ namespace MP.SPEC.Pages
|
|||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
clearFile();
|
|
||||||
numRecord = 10;
|
numRecord = 10;
|
||||||
// mostro ricerca
|
// mostro ricerca
|
||||||
MessageService.ShowSearch = true;
|
MessageService.ShowSearch = true;
|
||||||
@@ -142,7 +141,6 @@ namespace MP.SPEC.Pages
|
|||||||
|
|
||||||
protected void ResetData()
|
protected void ResetData()
|
||||||
{
|
{
|
||||||
clearFile();
|
|
||||||
currRecord = null;
|
currRecord = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,13 +150,13 @@ namespace MP.SPEC.Pages
|
|||||||
await Task.Delay(1);
|
await Task.Delay(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async Task selRecord(MP.Data.DatabaseModels.AnagArticoli selRec)
|
protected async Task selRecord(AnagArticoli selRec)
|
||||||
{
|
{
|
||||||
currRecord = selRec;
|
currRecord = selRec;
|
||||||
await Task.Delay(1);
|
await Task.Delay(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async Task update(MP.Data.DatabaseModels.AnagArticoli selRec)
|
protected async Task update(AnagArticoli selRec)
|
||||||
{
|
{
|
||||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Confermi di voler salvare le modifiche?"))
|
if (!await JSRuntime.InvokeAsync<bool>("confirm", "Confermi di voler salvare le modifiche?"))
|
||||||
return;
|
return;
|
||||||
@@ -180,12 +178,11 @@ namespace MP.SPEC.Pages
|
|||||||
#region Private Fields
|
#region Private Fields
|
||||||
|
|
||||||
private string _selAzienda = "*";
|
private string _selAzienda = "*";
|
||||||
private MP.Data.DatabaseModels.AnagArticoli? currRecord = null;
|
private AnagArticoli? currRecord = null;
|
||||||
private string fileName = "Controlli.csv";
|
private List<AnagGruppi>? ListAziende;
|
||||||
private List<MP.Data.DatabaseModels.AnagGruppi>? ListAziende;
|
private List<AnagArticoli>? ListRecords;
|
||||||
private List<MP.Data.DatabaseModels.AnagArticoli>? ListRecords;
|
private List<ListValues>? ListTipoArt;
|
||||||
private List<MP.Data.DatabaseModels.ListValues>? ListTipoArt;
|
private List<AnagArticoli>? SearchRecords;
|
||||||
private List<MP.Data.DatabaseModels.AnagArticoli>? SearchRecords;
|
|
||||||
|
|
||||||
#endregion Private Fields
|
#endregion Private Fields
|
||||||
|
|
||||||
@@ -209,11 +206,6 @@ namespace MP.SPEC.Pages
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string fullPath
|
|
||||||
{
|
|
||||||
get => $"{Directory.GetCurrentDirectory()}\\temp\\{fileName}";
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool isLoading { get; set; } = false;
|
private bool isLoading { get; set; } = false;
|
||||||
|
|
||||||
private int numRecord
|
private int numRecord
|
||||||
@@ -274,19 +266,6 @@ namespace MP.SPEC.Pages
|
|||||||
return answ;
|
return answ;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void clearFile()
|
|
||||||
{
|
|
||||||
await Task.Run(() => File.Delete(fullPath));
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task ExportCsv()
|
|
||||||
{
|
|
||||||
isLoading = true;
|
|
||||||
// salvo davvero!
|
|
||||||
await MP.Data.Utils.SaveToCsv(SearchRecords, fullPath);
|
|
||||||
isLoading = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task reloadData()
|
private async Task reloadData()
|
||||||
{
|
{
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
|
|||||||
@@ -6,13 +6,13 @@
|
|||||||
<div class="card-header bg-dark text-light">
|
<div class="card-header bg-dark text-light">
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
<img src="/images/LogoMapo.png" class="image-fluid" height="64" />
|
<img src="images/LogoMapo.png" class="image-fluid" height="64" />
|
||||||
</div>
|
</div>
|
||||||
<div class="p-2 align-content-center fs-1">
|
<div class="p-2 align-content-center fs-1">
|
||||||
<b>MAPO SPEC</b>
|
<b>MAPO SPEC</b>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-2 bg-light">
|
<div class="p-2 bg-light">
|
||||||
<img src="/images/LogoEgw.png" class="image-fluid" height="64" />
|
<img src="images/LogoEgw.png" class="image-fluid" height="64" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<location path="." inheritInChildApplications="false">
|
||||||
|
<system.webServer>
|
||||||
|
<security>
|
||||||
|
<authentication>
|
||||||
|
<anonymousAuthentication enabled="false" />
|
||||||
|
<windowsAuthentication enabled="true" />
|
||||||
|
</authentication>
|
||||||
|
</security>
|
||||||
|
</system.webServer>
|
||||||
|
</location>
|
||||||
|
</configuration>
|
||||||
Reference in New Issue
Block a user