Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ba3aeb65d | |||
| 6ea938a91a | |||
| 92c196023d | |||
| 10d9625b6d | |||
| 5f955499e2 | |||
| 716813abe1 |
@@ -28,4 +28,16 @@
|
||||
<ProjectReference Include="..\MP.Data\MP.Data.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="wwwroot\favicon.ico">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="logs\.placeholder">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -44,13 +44,13 @@ namespace MP.SPEC.Pages
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; }
|
||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected MpDataService MDService { get; set; }
|
||||
protected MpDataService MDService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected MessageService MessageService { get; set; }
|
||||
protected MessageService MessageService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; }
|
||||
@@ -78,7 +78,7 @@ namespace MP.SPEC.Pages
|
||||
/// <returns></returns>
|
||||
protected async Task addNew()
|
||||
{
|
||||
currRecord = new MP.Data.DatabaseModels.AnagArticoli()
|
||||
currRecord = new AnagArticoli()
|
||||
{
|
||||
CodArticolo = $"_NEW_{DateTime.Now:yyyyMMdd.HHmmss}",
|
||||
DescArticolo = "Nuovo articolo",
|
||||
@@ -101,7 +101,7 @@ namespace MP.SPEC.Pages
|
||||
/// </summary>
|
||||
/// <param name="selRec"></param>
|
||||
/// <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?"))
|
||||
return;
|
||||
@@ -124,7 +124,6 @@ namespace MP.SPEC.Pages
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
clearFile();
|
||||
numRecord = 10;
|
||||
// mostro ricerca
|
||||
MessageService.ShowSearch = true;
|
||||
@@ -142,7 +141,6 @@ namespace MP.SPEC.Pages
|
||||
|
||||
protected void ResetData()
|
||||
{
|
||||
clearFile();
|
||||
currRecord = null;
|
||||
}
|
||||
|
||||
@@ -152,13 +150,13 @@ namespace MP.SPEC.Pages
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
protected async Task selRecord(MP.Data.DatabaseModels.AnagArticoli selRec)
|
||||
protected async Task selRecord(AnagArticoli selRec)
|
||||
{
|
||||
currRecord = selRec;
|
||||
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?"))
|
||||
return;
|
||||
@@ -180,12 +178,11 @@ namespace MP.SPEC.Pages
|
||||
#region Private Fields
|
||||
|
||||
private string _selAzienda = "*";
|
||||
private MP.Data.DatabaseModels.AnagArticoli? currRecord = null;
|
||||
private string fileName = "Controlli.csv";
|
||||
private List<MP.Data.DatabaseModels.AnagGruppi>? ListAziende;
|
||||
private List<MP.Data.DatabaseModels.AnagArticoli>? ListRecords;
|
||||
private List<MP.Data.DatabaseModels.ListValues>? ListTipoArt;
|
||||
private List<MP.Data.DatabaseModels.AnagArticoli>? SearchRecords;
|
||||
private AnagArticoli? currRecord = null;
|
||||
private List<AnagGruppi>? ListAziende;
|
||||
private List<AnagArticoli>? ListRecords;
|
||||
private List<ListValues>? ListTipoArt;
|
||||
private List<AnagArticoli>? SearchRecords;
|
||||
|
||||
#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 int numRecord
|
||||
@@ -274,19 +266,6 @@ namespace MP.SPEC.Pages
|
||||
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()
|
||||
{
|
||||
isLoading = true;
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
<div class="card-header bg-dark text-light">
|
||||
<div class="d-flex justify-content-between">
|
||||
<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 class="p-2 align-content-center fs-1">
|
||||
<b>MAPO SPEC</b>
|
||||
</div>
|
||||
<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>
|
||||
|
||||
|
||||
@@ -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