Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| da56ffcca8 | |||
| a5ec8f2105 | |||
| 5a8b618a68 | |||
| fcdb96834e | |||
| 6b868ee1a0 | |||
| c35afc82c6 | |||
| 45c5de32a8 | |||
| 5d49772dba | |||
| 017f3ea2b1 | |||
| 5eb53c677d | |||
| 20fc4f1793 | |||
| 1239951b72 |
+2
-2
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -6,6 +6,9 @@ namespace Core.DTO
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public string CodApp { get; set; } = "";
|
||||
public string CodInst { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Codice univoco della sub licenza (opzionale)
|
||||
/// </summary>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.2" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.14.0" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.2.88" />
|
||||
|
||||
@@ -77,6 +77,28 @@ namespace LiMan.DB.Controllers
|
||||
return fatto;
|
||||
}
|
||||
|
||||
public bool AttivazioniDelete(int idxSubLic)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (LMDbContext localDbCtx = new LMDbContext(_configuration))
|
||||
{
|
||||
// recupero record
|
||||
var currData = localDbCtx
|
||||
.DbSetSubLicenze
|
||||
.Where(x => x.IdxSubLic == idxSubLic)
|
||||
.FirstOrDefault();
|
||||
// se ho qualcosa procedo...
|
||||
if (currData != null)
|
||||
{
|
||||
localDbCtx.DbSetSubLicenze.Remove(currData);
|
||||
// salvo
|
||||
localDbCtx.SaveChanges();
|
||||
fatto = true;
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lista attivfazioni x licenza
|
||||
/// </summary>
|
||||
@@ -253,29 +275,6 @@ namespace LiMan.DB.Controllers
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
public bool AttivazioniDelete(int idxSubLic)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (LMDbContext localDbCtx = new LMDbContext(_configuration))
|
||||
{
|
||||
// recupero record
|
||||
var currData = localDbCtx
|
||||
.DbSetSubLicenze
|
||||
.Where(x => x.IdxSubLic == idxSubLic)
|
||||
.FirstOrDefault();
|
||||
// se ho qualcosa procedo...
|
||||
if (currData != null)
|
||||
{
|
||||
localDbCtx.DbSetSubLicenze.Remove(currData);
|
||||
// salvo
|
||||
localDbCtx.SaveChanges();
|
||||
fatto = true;
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
public bool DbForceMigrate()
|
||||
{
|
||||
bool answ = false;
|
||||
@@ -882,6 +881,42 @@ namespace LiMan.DB.Controllers
|
||||
return fatto;
|
||||
}
|
||||
|
||||
public List<TicketDTO> TicketGetAll(bool onlyOpen, int maxNum)
|
||||
{
|
||||
List<TicketDTO> dbResult = new List<TicketDTO>();
|
||||
using (LMDbContext localDbCtx = new LMDbContext(_configuration))
|
||||
{
|
||||
|
||||
dbResult = localDbCtx
|
||||
.DbSetTicket
|
||||
.Where(x => (x.Status <= StatoRichiesta.Valutazione || !onlyOpen))
|
||||
.OrderByDescending(x => x.IdxTicket)
|
||||
.Include(l => l.LicenzaNav)
|
||||
.Take(maxNum)
|
||||
.Select(x => new TicketDTO
|
||||
{
|
||||
CodApp = x.LicenzaNav.CodApp,
|
||||
CodInst = x.LicenzaNav.CodInst,
|
||||
IdxTicket = x.IdxTicket,
|
||||
IdxLic = x.IdxLic,
|
||||
IdxSubLic = x.IdxSubLic,
|
||||
CodImpiego = x.CodImpiego,
|
||||
ContactName = x.ContactName,
|
||||
ContactEmail = x.ContactEmail,
|
||||
ContactPhone = x.ContactPhone,
|
||||
DtReq = x.DtReq,
|
||||
ReqBody = x.ReqBody,
|
||||
Status = x.Status,
|
||||
SupplAnsw = x.SupplAnsw,
|
||||
SupplEmail = x.SupplEmail,
|
||||
SupplUserCode = x.SupplUserCode,
|
||||
Tipo = x.Tipo
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public List<TicketDTO> TicketGetFilt(bool onlyOpen, TipologiaTicket Tipo, string CodApp, string CodInst, string MasterKey, int maxNum)
|
||||
{
|
||||
List<TicketDTO> dbResult = new List<TicketDTO>();
|
||||
@@ -923,6 +958,41 @@ namespace LiMan.DB.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public List<TicketDTO> TicketGetFilt(bool onlyOpen, string CodApp, string CodInst)
|
||||
{
|
||||
List<TicketDTO> dbResult = new List<TicketDTO>();
|
||||
using (LMDbContext localDbCtx = new LMDbContext(_configuration))
|
||||
{
|
||||
|
||||
dbResult = localDbCtx
|
||||
.DbSetTicket
|
||||
.Where(x => (x.Status <= StatoRichiesta.Valutazione || !onlyOpen) && (x.LicenzaNav.CodApp == CodApp || string.IsNullOrEmpty(CodApp)) && (x.LicenzaNav.CodInst == CodInst || string.IsNullOrEmpty(CodInst)))
|
||||
.OrderByDescending(x => x.IdxTicket)
|
||||
.Include(l => l.LicenzaNav)
|
||||
.Select(x => new TicketDTO
|
||||
{
|
||||
CodApp = x.LicenzaNav.CodApp,
|
||||
CodInst = x.LicenzaNav.CodInst,
|
||||
IdxTicket = x.IdxTicket,
|
||||
IdxLic = x.IdxLic,
|
||||
IdxSubLic = x.IdxSubLic,
|
||||
CodImpiego = x.CodImpiego,
|
||||
ContactName = x.ContactName,
|
||||
ContactEmail = x.ContactEmail,
|
||||
ContactPhone = x.ContactPhone,
|
||||
DtReq = x.DtReq,
|
||||
ReqBody = x.ReqBody,
|
||||
Status = x.Status,
|
||||
SupplAnsw = x.SupplAnsw,
|
||||
SupplEmail = x.SupplEmail,
|
||||
SupplUserCode = x.SupplUserCode,
|
||||
Tipo = x.Tipo
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public List<TicketDTO> TicketGetFiltAllLic(bool onlyOpen, TipologiaTicket Tipo, string CodApp, string CodInst, int maxNum)
|
||||
{
|
||||
List<TicketDTO> dbResult = new List<TicketDTO>();
|
||||
@@ -963,42 +1033,6 @@ namespace LiMan.DB.Controllers
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
|
||||
public List<TicketDTO> TicketGetAll(bool onlyOpen, int maxNum)
|
||||
{
|
||||
List<TicketDTO> dbResult = new List<TicketDTO>();
|
||||
using (LMDbContext localDbCtx = new LMDbContext(_configuration))
|
||||
{
|
||||
|
||||
dbResult = localDbCtx
|
||||
.DbSetTicket
|
||||
.Where(x => (x.Status <= StatoRichiesta.Valutazione || !onlyOpen))
|
||||
.OrderByDescending(x => x.IdxTicket)
|
||||
.Take(maxNum)
|
||||
.Select(x => new TicketDTO
|
||||
{
|
||||
IdxTicket = x.IdxTicket,
|
||||
IdxLic = x.IdxLic,
|
||||
IdxSubLic = x.IdxSubLic,
|
||||
CodImpiego = x.CodImpiego,
|
||||
ContactName = x.ContactName,
|
||||
ContactEmail = x.ContactEmail,
|
||||
ContactPhone = x.ContactPhone,
|
||||
DtReq = x.DtReq,
|
||||
ReqBody = x.ReqBody,
|
||||
Status = x.Status,
|
||||
SupplAnsw = x.SupplAnsw,
|
||||
SupplEmail = x.SupplEmail,
|
||||
SupplUserCode = x.SupplUserCode,
|
||||
Tipo = x.Tipo
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
|
||||
public bool TicketUpdateState(int IdxTicket, StatoRichiesta NewStatus)
|
||||
{
|
||||
bool fatto = false;
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MailKit" Version="2.15.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="5.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.10">
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
|
||||
<PackageReference Include="NLog" Version="4.7.11" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.2" />
|
||||
<PackageReference Include="NLog" Version="4.7.13" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -9,15 +9,15 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.10">
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
|
||||
<PackageReference Include="NLog" Version="4.7.11" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.2" />
|
||||
<PackageReference Include="NLog" Version="4.7.13" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>License Manager</i>
|
||||
<h4>Versione: 1.1.2202.0907</h4>
|
||||
<h4>Versione: 1.1.2202.0915</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.1.2202.0907
|
||||
1.1.2202.0915
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.1.2202.0907</version>
|
||||
<version>1.1.2202.0915</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.Transfer.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
+12
-10
@@ -1,10 +1,12 @@
|
||||
<Router AppAssembly="@typeof(Program).Assembly" PreferExactMatches="@true">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
|
||||
</Found>
|
||||
<NotFound>
|
||||
<LayoutView Layout="@typeof(MainLayout)">
|
||||
<p>Sorry, there's nothing at this address.</p>
|
||||
</LayoutView>
|
||||
</NotFound>
|
||||
</Router>
|
||||
<CascadingAuthenticationState>
|
||||
<Router AppAssembly="@typeof(Program).Assembly" PreferExactMatches="@true">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
|
||||
</Found>
|
||||
<NotFound>
|
||||
<LayoutView Layout="@typeof(MainLayout)">
|
||||
<p>Sorry, there's nothing at this address.</p>
|
||||
</LayoutView>
|
||||
</NotFound>
|
||||
</Router>
|
||||
</CascadingAuthenticationState>
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
<div class="form-row pt-3">
|
||||
<div class="col-7 col-md-6 col-lg-4 col-xl-3">
|
||||
@*<LoginDisplay></LoginDisplay>*@
|
||||
<AuthorizeView>
|
||||
<LoginDisplay />
|
||||
</AuthorizeView>
|
||||
</div>
|
||||
<div class="col-12 col-lg-4 col-xl-6 d-none d-lg-block text-center h4 text-truncate">
|
||||
<span class="@PageIcon" aria-hidden="true"></span> @PageName
|
||||
|
||||
+151
-123
@@ -5,146 +5,174 @@
|
||||
@using System.IO
|
||||
@inject IJSRuntime JS
|
||||
|
||||
<div class="row">
|
||||
<div class="@mainCss">
|
||||
<div class="card">
|
||||
<div class="card-header bg-success py-1 text-light">
|
||||
<h3>Tickets</h3>
|
||||
<div class="px-2">
|
||||
<div class="row">
|
||||
<div class="@mainCss">
|
||||
<div class="card">
|
||||
<div class="card-header bg-success py-1 text-light">
|
||||
<h3>Tickets</h3>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<div class="d-flex flex-row-reverse justify-content-between">
|
||||
<div class="p-2">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
Installazione
|
||||
</span>
|
||||
</div>
|
||||
<select @bind="@SelInst" class="form-control form-control-sm">
|
||||
<option value="">--- Tutti ---</option>
|
||||
|
||||
@if (ListInstall != null)
|
||||
{
|
||||
foreach (var item in ListInstall)
|
||||
{
|
||||
<option value="@item.CodInst">@item.CodInst | @item.Descrizione</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
Applicazione
|
||||
</span>
|
||||
</div>
|
||||
<select @bind="@SelApp" class="form-control form-control-sm">
|
||||
<option value="">--- Tutti ---</option>
|
||||
@if (ListApp != null)
|
||||
{
|
||||
foreach (var item in ListApp)
|
||||
{
|
||||
<option value="@item.CodApp">@item.CodApp | @item.Descrizione</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body bg-light p-1">
|
||||
|
||||
@if (ListRecords == null)
|
||||
{
|
||||
<LoadingData></LoadingData>
|
||||
}
|
||||
else if (totalCount == 0)
|
||||
{
|
||||
<div class="alert alert-warning text-center display-4">Nessun record trovato</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
<table class="table table-sm table-striped table-responsive-lg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<button type="button" class="btn btn-sm btn-warning btn-block" @onclick="() => ReloadAllData()"><i class="fas fa-times"></i></button>
|
||||
</th>
|
||||
<th>Applicativo</th>
|
||||
<th>Installazione</th>
|
||||
<th>#</th>
|
||||
<th>Stato</th>
|
||||
<th>Richiedente</th>
|
||||
<th>Data Richiesta</th>
|
||||
<th>Email</th>
|
||||
<th>Telefono</th>
|
||||
<th>
|
||||
Descrizione
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var record in ListRecords)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-primary" @onclick="() => showDet(record)"><i class="fas fa-search"></i></button>
|
||||
</td>
|
||||
<td>
|
||||
@record.CodApp
|
||||
</td>
|
||||
<td>
|
||||
@record.CodInst
|
||||
</td>
|
||||
<td>
|
||||
@record.IdxTicket<br />
|
||||
|
||||
</td>
|
||||
<td>
|
||||
@record.Status
|
||||
</td>
|
||||
<td>
|
||||
<div><b>@record.ContactName</b></div>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<div>@record.DtReq</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>@record.ContactEmail</div>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<div>@record.ContactPhone</div>
|
||||
</td>
|
||||
<td>
|
||||
@record.ReqBody
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
}
|
||||
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="PagerReloadNum" numPageChanged="PagerReloadPage" totalCount="totalCount" showLoading="isLoading" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body bg-light p-1">
|
||||
|
||||
@if (ListRecords == null)
|
||||
{
|
||||
<LoadingData></LoadingData>
|
||||
}
|
||||
else if (totalCount == 0)
|
||||
{
|
||||
<div class="alert alert-warning text-center display-4">Nessun record trovato</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@if (idxTicketSel > 0)
|
||||
{
|
||||
<div class="col-3">
|
||||
<div>
|
||||
<table class="table table-sm table-striped table-responsive-lg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<button type="button" class="btn btn-sm btn-warning btn-block" @onclick="() => ReloadAllData()"><i class="fas fa-times"></i></button>
|
||||
</th>
|
||||
<th>#</th>
|
||||
<th>Richiedente</th>
|
||||
<th>Contatti</th>
|
||||
<th>
|
||||
Descrizione
|
||||
</th>
|
||||
<th>Nome File</th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var record in ListRecords)
|
||||
@foreach (var record in FileAttached)
|
||||
{
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-primary" @onclick="() => showDet(record)"><i class="fas fa-search"></i></button>
|
||||
</td>
|
||||
<td>
|
||||
@record.IdxTicket<br />
|
||||
@record.Status
|
||||
</td>
|
||||
<td>
|
||||
<div><b>@record.ContactName</b></div>
|
||||
<div>@record.DtReq</div>
|
||||
</td>
|
||||
<td>
|
||||
<div>@record.ContactEmail</div>
|
||||
<div>@record.ContactPhone</div>
|
||||
</td>
|
||||
<td>
|
||||
@record.ReqBody
|
||||
@*<button @onclick="() => DownloadFileFromURL(record.OriginalName, record.FullStoragePath)"> @record.OriginalName</button>*@
|
||||
<a href="@(Configuration["ApiUrl"]+"/ELM.API/api/filesave/"+@record.FullStoragePath+"/"+@record.OriginalName)" target="_blank">@record.OriginalName</a>
|
||||
@*<a @onclick="() => DownloadFileFromURL(record.OriginalName, record.FullStoragePath)"> @record.OriginalName</a>*@
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
}
|
||||
|
||||
@* <button @onclick="DownloadFileFromURL">
|
||||
Download File From URL
|
||||
</button>*@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@if (idxTicketSel > 0)
|
||||
{
|
||||
<div class="col-3">
|
||||
<div>
|
||||
<table class="table table-sm table-striped table-responsive-lg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nome File</th>
|
||||
<th>FullStoragePath</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var record in FileAttached)
|
||||
{
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
@*<button @onclick="() => DownloadFileFromURL(record.OriginalName, record.FullStoragePath)"> @record.OriginalName</button>*@
|
||||
<a href="@(Configuration["ApiUrl"]+"/ELM.API/api/filesave/"+@record.FullStoragePath+"/"+@record.OriginalName)" target="_blank">@record.OriginalName</a>
|
||||
@*<a @onclick="() => DownloadFileFromURL(record.OriginalName, record.FullStoragePath)"> @record.OriginalName</a>*@
|
||||
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<div>@record.FullStoragePath</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@* <button @onclick="DownloadFileFromURL">
|
||||
Download File From URL
|
||||
</button>*@
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@*<div class="card-body bg-light p-2">
|
||||
@if (idxTicketSel > 0)
|
||||
{
|
||||
<div>
|
||||
<table class="table table-sm table-striped table-responsive-lg">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>OriginalName</th>
|
||||
@*<th>FullStoragePath</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var record in FileAttached)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@record.OriginalName<br />
|
||||
|
||||
</td>
|
||||
@*<td>
|
||||
<div>@record.FullStoragePath</div>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
*@
|
||||
@@ -18,6 +18,9 @@ namespace LiMan.UI.Components
|
||||
|
||||
private List<SubLicenzaModel> ListActivations;
|
||||
private List<TicketDTO> ListRecords;
|
||||
private List<TicketDTO> SearchRecords;
|
||||
private List<InstallazioneModel> ListInstall;
|
||||
private List<ApplicativoModel> ListApp;
|
||||
protected int totalCount = 0;
|
||||
|
||||
private List<FileAttachModel> FileAttached;
|
||||
@@ -98,6 +101,9 @@ namespace LiMan.UI.Components
|
||||
|
||||
#region Private Methods
|
||||
|
||||
[Inject]
|
||||
protected MessageService AppMService { get; set; }
|
||||
|
||||
private async Task fullReload()
|
||||
{
|
||||
await DataService.InvalidateAllCache();
|
||||
@@ -115,14 +121,103 @@ namespace LiMan.UI.Components
|
||||
ListActivations = null;
|
||||
idxTicketSel = 0;
|
||||
await Task.Delay(1);
|
||||
ListApp = await DataService.ApplicazioniNextGetAll();
|
||||
ListInstall = await DataService.InstallazioniNextGetAll();
|
||||
//bool StatoRichiesta = true;
|
||||
ListRecords = await DataService.TicketsGetAll();
|
||||
|
||||
totalCount = ListRecords.Count();
|
||||
//SearchRecords = await DataService.LicenzeNextGetFilt(AppMService.DetailDBFilter);
|
||||
SearchRecords = await DataService.TicketsGetFilt(true, SelApp, SelInst);
|
||||
//totalCount = SearchRecords.Count();
|
||||
//ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
|
||||
|
||||
//ListRecords = await DataService.TicketsGetAll();
|
||||
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
|
||||
|
||||
totalCount = SearchRecords.Count();
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
private string SelInst
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (AppMService.DetailDBFilter != null)
|
||||
{
|
||||
answ = AppMService.DetailDBFilter.InstallazioneSel;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!AppMService.DetailDBFilter.InstallazioneSel.Equals(value))
|
||||
{
|
||||
AppMService.DetailDBFilter.InstallazioneSel = value;
|
||||
var pUpd = Task.Run(async () => await ReloadAllData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string SelApp
|
||||
{
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
if (AppMService.DetailDBFilter != null)
|
||||
{
|
||||
answ = AppMService.DetailDBFilter.ApplicazioneSel;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!AppMService.DetailDBFilter.ApplicazioneSel.Equals(value))
|
||||
{
|
||||
AppMService.DetailDBFilter.ApplicazioneSel = value;
|
||||
var pUpd = Task.Run(async () => await ReloadAllData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int numRecord
|
||||
{
|
||||
get
|
||||
{
|
||||
return AppMService.PageSize;
|
||||
}
|
||||
set
|
||||
{
|
||||
AppMService.PageSize = value;
|
||||
}
|
||||
}
|
||||
|
||||
private int currPage
|
||||
{
|
||||
get
|
||||
{
|
||||
return AppMService.PageNum;
|
||||
}
|
||||
set
|
||||
{
|
||||
AppMService.PageNum = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task PagerReloadNum(int newNum)
|
||||
{
|
||||
numRecord = newNum;
|
||||
await ReloadAllData();
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
protected async Task PagerReloadPage(int newNum)
|
||||
{
|
||||
currPage = newNum;
|
||||
await ReloadAllData();
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
|
||||
//private async void DownloadFileFromURL(string fileName, string rawUrl)
|
||||
//{
|
||||
// rawUrl = rawUrl.Replace("\\", "/");
|
||||
|
||||
@@ -650,6 +650,25 @@ namespace LiMan.UI.Data
|
||||
return await Task.FromResult(dbResult);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ricerca ticket filtrati
|
||||
/// </summary>
|
||||
/// <param name="onlyOpen"></param>
|
||||
/// <param name="CodApp"></param>
|
||||
/// <param name="CodInst"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<TicketDTO>> TicketsGetFilt(bool onlyOpen,string CodApp, string CodInst)
|
||||
{
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
List<TicketDTO> dbResult = new List<TicketDTO>();
|
||||
stopWatch.Start();
|
||||
dbResult = dbControllerNext.TicketGetFilt(onlyOpen,CodApp,CodInst);
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Trace($"Effettuata lettura da DB per TicketsGetFilt: {ts.TotalMilliseconds} ms");
|
||||
return await Task.FromResult(dbResult);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<Version>1.1.2202.0907</Version>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Version>1.1.2202.1113</Version>
|
||||
<RootNamespace>LiMan.UI</RootNamespace>
|
||||
<AssemblyName>LiMan.UI</AssemblyName>
|
||||
</PropertyGroup>
|
||||
@@ -37,7 +37,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.10">
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.Negotiate" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@page "/Applicazioni"
|
||||
@attribute [Authorize]
|
||||
|
||||
@using LiMan.UI.Components
|
||||
@using LiMan.UI.Data
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@page "/Installazioni"
|
||||
@attribute [Authorize]
|
||||
|
||||
@using LiMan.UI.Components
|
||||
@using LiMan.UI.Data
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@page "/LiManDB"
|
||||
@attribute [Authorize]
|
||||
|
||||
@using LiMan.UI.Components
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@page "/LiManGLS"
|
||||
@attribute [Authorize]
|
||||
|
||||
@using LiMan.UI.Components
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@page "/LicenseManager"
|
||||
@attribute [Authorize]
|
||||
|
||||
@using LiMan.UI.Components
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@page "/ListaTicket"
|
||||
@attribute [Authorize]
|
||||
|
||||
@using LiMan.UI.Components
|
||||
@using LiMan.UI.Data
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"windowsAuthentication": true,
|
||||
"anonymousAuthentication": false,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:61247",
|
||||
"sslPort": 44392
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>License Manager</i>
|
||||
<h4>Versione: 1.1.2202.0907</h4>
|
||||
<h4>Versione: 1.1.2202.1113</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.1.2202.0907
|
||||
1.1.2202.1113
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.1.2202.0907</version>
|
||||
<version>1.1.2202.1113</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -16,6 +16,7 @@ using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Identity.UI.Services;
|
||||
using Microsoft.Extensions.FileProviders;
|
||||
using Microsoft.AspNetCore.Authentication.Negotiate;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace LiMan.UI
|
||||
@@ -85,6 +86,9 @@ namespace LiMan.UI
|
||||
|
||||
app.UseRouting();
|
||||
|
||||
app.UseAuthentication();
|
||||
app.UseAuthorization();
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapBlazorHub();
|
||||
@@ -96,6 +100,14 @@ namespace LiMan.UI
|
||||
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddAuthentication(NegotiateDefaults.AuthenticationScheme)
|
||||
.AddNegotiate();
|
||||
services.AddAuthorization(options =>
|
||||
{
|
||||
// By default, all incoming requests will be authorized according to the default policy.
|
||||
options.FallbackPolicy = options.DefaultPolicy;
|
||||
});
|
||||
|
||||
// cookie applicazione da 14 gg (defaul) a 30
|
||||
services.ConfigureApplicationCookie(o =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user