Merge remote-tracking branch 'origin/develop' into ProcPipeComm
This commit is contained in:
+43
-9
@@ -48,13 +48,13 @@ Per completare
|
||||
- stato ordine
|
||||
- [x] ordinamento
|
||||
- [ ] aggiungere data promessa consegna: dato sul db, valore default (+30gg?), gestione filtro...
|
||||
- [ ] aggiungere calcolo (FAKE) dei prezzi
|
||||
- [ ] aggiungere company x ordini (x viste DCA almeno)
|
||||
- [ ] gestione modifica descrizione/codice ordini (da aprte del cliente finale)
|
||||
- [ ] aggiunta gestione DCA x conferma prezzi e tempistiche
|
||||
- [ ] aggiunta gestione DCA x approvazione ordini
|
||||
- [x] aggiungere calcolo (FAKE) dei prezzi
|
||||
- [x] aggiungere company x ordini (x viste DCA almeno)
|
||||
- [x] gestione modifica descrizione/codice ordini (da p\rte del cliente finale)
|
||||
- [x] aggiunta gestione DCA x conferma prezzi e tempistiche
|
||||
- [x] aggiunta gestione DCA x approvazione ordini
|
||||
- [ ] verifica HW con Filippo/Emmanuele da info ABH/Kit
|
||||
- [ ] verificare significato della dicitura "Model Number": cosa indica esattamente? è corretta sul db? è calcolata correttametne da interfaccia?
|
||||
- [ ] verificare significato della dicitura "Model Number": cosa indica esattamente? è corretta sul db? è calcolata correttamente da interfaccia?
|
||||
|
||||
### DCA Order Mans
|
||||
|
||||
@@ -68,7 +68,7 @@ Per completare:
|
||||
- [x] sistemare con paginatore max 3 righe x 4 porte
|
||||
- [x] fix button verde add-new
|
||||
- [x] ombreggiatura blocco
|
||||
- [ ] gestione calcolo prezzi (almeno fake)
|
||||
- [x] gestione calcolo prezzi (fake, random)
|
||||
|
||||
### DoorDefinition BaseParams
|
||||
- [x] conteggio num modifiche da salvare
|
||||
@@ -90,7 +90,41 @@ Sistemare:
|
||||
- [x] fix cancel/save: globale x Hardware oppure x ognuno con icona?
|
||||
- [x] verificare perché NON si aggiorna al salvataggio pagina dei 18 hw
|
||||
- [x] mancano il totale componenti x ogni hw attivato
|
||||
- [ ] aggiungere icone/immagini x gli HW da inserire nelle porte
|
||||
- [x] aggiungere icone/immagini x gli HW da inserire nelle porte
|
||||
|
||||
|
||||
### Import componenti DOOR
|
||||
|
||||
Procedura per import componenti, sempre GLOBALE (= TUTTI)
|
||||
|
||||
- [x] definizione cartelle di base:
|
||||
- [x] (A) R:\WebDoor\CurComp x componenti ATTUALI/cottenti/approvati
|
||||
- [x] (B) R:\WebDoor\NewComp x componenti DA valutare x import
|
||||
- [x] scansione della cartella (B)
|
||||
- [x] ciclo x ogni file della cartella B
|
||||
- [x] rilevo path (assoluto e relativo = togliendo parte (B))
|
||||
- [x] calcolo MD5
|
||||
- [x] rilevo lenght
|
||||
- [x] rilevo last mod
|
||||
- [ ] cerco sul DB record x il PATH (RELATIVO) in oggetto (opzionalmente unique sul db)
|
||||
- [ ] salvo datetime = adesso
|
||||
- [ ] in base alla verifica precedente mi tengo set in memoria dalla lista del DB con
|
||||
- [ ] NON trovo record --> registro nuovo record, con stato = new (=1)
|
||||
- [ ] trovo record
|
||||
- [ ] SE cambia MD5/lenght/(last mod?) --> registro stato MOD (=2) + lastCheck = adesso
|
||||
- [ ] se NON cambia --> registro lastCheck = adesso + stato CONFIRM ( =0)
|
||||
- [ ] verifico TUTTI i record del DB, e quelli con lastCheck < adesso --> segno come ELIMINATI (=3)
|
||||
- [ ] step di check puntuale: TUTTI quelli con stato > 0 sono mostrati x azione (1 check x ogni riga, con seleziona tutti/nessuno)
|
||||
- [ ] l'utente deve poter VEDERE la differenza tra i file (modificati) di (A) e (B) (con diff tramite modale, ...)
|
||||
- [ ] l'utente checca 0/+ righe e clicca su CONFERMA: si cicla x TUTTE le righe checked x aggiornarle sul DB
|
||||
- [ ] le righe NUOVE confermate --> sono registrate (con valid from...), stato CONFIRM ( =0), viene copiato file/cartelle da (B) ad (A)
|
||||
- [ ] le righe modificate --> si registra modifica, stato CONFIRM ( =0), viene sovrascritto/sostituito file/cartelle da (B) ad (A)
|
||||
- [ ] le righe eliminate --> si imposta cancellazione logica (validUntil), stato DELETED ( =-1), viene sovrascritto/sostituito file/cartelle da (B) ad (A)
|
||||
- [ ] le righe NON checked, ma NON aggiorno sul DB:
|
||||
- [ ] se erano nuove (=1) --> elimino dal DB (e NON copio folder)
|
||||
- [ ] se erano modificate (=2) --> riporto a stato precedente (0/-1) (e NON copio)
|
||||
- [ ] se erano eliminate (=3) --> riporto a 0 (e NON faccio nulla)
|
||||
|
||||
|
||||
#### Report
|
||||
|
||||
@@ -98,7 +132,7 @@ Sistemare:
|
||||
- [x] Esportabile in pdf, comprensivo di "check pdf fatto da tizio alle ..."
|
||||
|
||||
## Componenti
|
||||
- [ ] costruire libreria componenti (ad esmepio waiter/loader) da siti di esempio componenti in EgwCoreLib.Razor
|
||||
- [x] costruire libreria componenti (ad esempio waiter/loader) da siti di esempio componenti in EgwCoreLib.Razor --> ProgressBar e nuovi Loader
|
||||
|
||||
|
||||
### Top
|
||||
|
||||
Binary file not shown.
@@ -307,6 +307,6 @@ In particular we expect to have some data auto-calculated (ex time from CAM), wh
|
||||
|
||||
| Date | Edit | Version | Note |
|
||||
|------------|----------------|:-------:|-----------------:|
|
||||
| 2022.11.09 | S.E. Locatelli | 0.2 | Draft completion |
|
||||
| 2022.11.03 | S.E. Locatelli | 0.1 | Initial draft |
|
||||
| 2023.03.21 | Z. Majid | 0.4 | Grammar Fixes |
|
||||
| 2022.11.09 | S.E. Locatelli | 0.2 | Draft completion |
|
||||
| 2023.03.21 | Z. Majid | 0.4 | Grammar Fixes |
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,58 @@
|
||||
# Appunti fix vari
|
||||
|
||||
La sistemazione è gestita direttametne con commit git...
|
||||
## Traduzione
|
||||
|
||||
Ci sono ancora lemmi di interfaccia gestiti come numerici, NON è lo standard definito:
|
||||
- ok a lemmi "UI_"
|
||||
- lemmi devono essere "self explaining"
|
||||
- eventualmente nel naming il cosa/dove, accettabile **UI_BtnOk** o **UI_BtnKo**, ma anche **UI_OrderPage_title**
|
||||
|
||||
... da sistemare GLOBALMENTE (= Zac...) x gli esistenti, mi occupo di creare correttamente solo i nuovi...
|
||||
|
||||
## NavMenuHorizontal
|
||||
|
||||
|
||||
Ci sono alcne cose che non funzionano:
|
||||
|
||||
|
||||
- i pulsanti si disallineano (icona/testo) con size schermo sotto fhd (va gestito almeno da 1376 in orizzontale...)
|
||||
|
||||

|
||||
- typo: flex warp indica che la pagina deve caricarsi a velocità warp (superluminare) come in star trek? MAGARI!!!!
|
||||
|
||||
```csharp
|
||||
<AuthorizeView Roles="SuperAdmin" Context="MenuHide">
|
||||
<Authorized>
|
||||
<div class="nav-item px-3 d-flex flex-warp align-items-center">
|
||||
<NavLink class="nav-link" href="TemplateMan">
|
||||
<span class="fa-solid fa-paint-roller pe-2" aria-hidden="true"></span> Template Management
|
||||
</NavLink>
|
||||
</div>
|
||||
</Authorized>
|
||||
</AuthorizeView>
|
||||
```
|
||||
- il navbar toggler che non funziona...
|
||||
- opzioni utente con username (email) x esteso: troppo grande, ridotto
|
||||
|
||||
## Modale Door
|
||||
|
||||
La pagina modale della porta permetteva sia la modifica imperativa delle quantità che la modifica del resto gestita tramite controllo CurrDoor / CurrDoorClone per approvare/annullare intervento complessivo
|
||||
|
||||
Questo portava ad una situazione di errore in caso di modifica (es descrizioen door) + modifica quantità
|
||||
|
||||
Eliminato metodo esplicito modifica quantità (da service + DB), gestito come modifica "locale" del dato qta (che quindi eredita il controllo qty >=0)
|
||||
|
||||
## Modale Ordini
|
||||
|
||||
- Aggiunta modale x editing ordine cliente
|
||||
- Aggiunta modale x gestione editing DCA (data consegna...)
|
||||
|
||||
## HwSingleInstance
|
||||
|
||||
La gestione del calcolo "variato" non funziona bene/sempre
|
||||
- errori in fase di calcolo
|
||||
- usare funzione come check è sub ottimale
|
||||
- i valori creati x clone NON sono veri cloni (di fatto punta ad obj originali)
|
||||
|
||||
--> riscritta logica vaori originali/correnti ed editing...
|
||||
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
Per sistemare il manuale da ilias copiare il file delos.css qui allegato in
|
||||
|
||||
C:\Users\samuele.steamw\source\WebDoorCreator\WebDoorCreator.UI\wwwroot\help\templates\default
|
||||
+20127
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>WebDoorCreator - Egalware</i>
|
||||
<h4>Version: 0.9.2306.0608</h4>
|
||||
<h4>Version: 0.9.2401.0415</h4>
|
||||
<br /> Release note:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.9.2306.0608
|
||||
0.9.2401.0415
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>0.9.2306.0608</version>
|
||||
<version>0.9.2401.0415</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/WDC/stable/WDC.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/WDC/stable/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NLog;
|
||||
using SkiaSharp;
|
||||
using Svg;
|
||||
using Svg.Skia;
|
||||
using System.Drawing;
|
||||
using WebDoorCreator.Data.Services;
|
||||
#if false
|
||||
using SkiaSharp;
|
||||
using Svg.Skia;
|
||||
#endif
|
||||
|
||||
namespace WebDoorCreator.API.Controllers
|
||||
{
|
||||
@@ -31,6 +37,7 @@ namespace WebDoorCreator.API.Controllers
|
||||
return "OK";
|
||||
}
|
||||
|
||||
|
||||
[HttpGet("GetImage.png")]
|
||||
public async Task<IActionResult> GetImagePng(int DoorId)
|
||||
{
|
||||
@@ -38,10 +45,27 @@ namespace WebDoorCreator.API.Controllers
|
||||
string svgContent = await QDataServ.DoorGetLastSvg(DoorId);
|
||||
if (!string.IsNullOrEmpty(svgContent))
|
||||
{
|
||||
var mySvg = SvgDocument.FromSvg<SvgDocument>(svgContent);
|
||||
//result = System.Text.Encoding.UTF8.GetBytes(svgContent);
|
||||
var myBmp = mySvg.Draw();
|
||||
result = ImageToByte2(myBmp);
|
||||
using (var svg = new SKSvg())
|
||||
{
|
||||
if (svg.FromSvg(svgContent) is { })
|
||||
{
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
svg.Picture?.ToImage(stream, SKColors.Empty, SKEncodedImageFormat.Png, 100, 1f, 1f, SKColorType.Rgba8888, SKAlphaType.Unpremul, SKColorSpace.CreateSrgb());
|
||||
result = stream.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
#if false
|
||||
var mySvg = SvgDocument.FromSvg<SvgDocument>(svgContent);
|
||||
//result = System.Text.Encoding.UTF8.GetBytes(svgContent);
|
||||
var myBmp = mySvg.Draw();
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
img.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
|
||||
result= stream.ToArray();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return File(result, "image/png");
|
||||
}
|
||||
@@ -72,15 +96,8 @@ namespace WebDoorCreator.API.Controllers
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private byte[] ImageToByte2(Image img)
|
||||
{
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
img.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
|
||||
return stream.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
}
|
||||
}
|
||||
@@ -79,35 +79,38 @@ namespace WebDoorCreator.API.Controllers
|
||||
// recuper elenco porte...
|
||||
List<DoorCostingDTO> dcDTO = new List<DoorCostingDTO>();
|
||||
var doorsList = await WDCService.DoorGetByOrderId(OrderId);
|
||||
foreach (var door in doorsList)
|
||||
if (doorsList != null)
|
||||
{
|
||||
// recupero i dato DoorOp
|
||||
var doorOpList = await WDCService.DoorOpGetByDoorId(door.DoorId);
|
||||
Dictionary<string, List<string>> currBOMList = new Dictionary<string, List<string>>();
|
||||
// ciclo su tutte le DoorOp
|
||||
foreach (var doorOp in doorOpList)
|
||||
foreach (var door in doorsList)
|
||||
{
|
||||
// cerco se ci sia già o meno nella BOM l'item corrente
|
||||
if (currBOMList.ContainsKey(doorOp.ObjectId))
|
||||
// recupero i dato DoorOp
|
||||
var doorOpList = await WDCService.DoorOpGetByDoorId(door.DoorId);
|
||||
Dictionary<string, List<string>> currBOMList = new Dictionary<string, List<string>>();
|
||||
// ciclo su tutte le DoorOp
|
||||
foreach (var doorOp in doorOpList)
|
||||
{
|
||||
currBOMList[doorOp.ObjectId].Add(doorOp.JsoncActVal);
|
||||
// cerco se ci sia già o meno nella BOM l'item corrente
|
||||
if (currBOMList.ContainsKey(doorOp.ObjectId))
|
||||
{
|
||||
currBOMList[doorOp.ObjectId].Add(doorOp.JsoncActVal);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<string> currOp = new List<string>();
|
||||
currOp.Add(doorOp.JsoncActVal);
|
||||
currBOMList.Add(doorOp.ObjectId, currOp);
|
||||
}
|
||||
}
|
||||
else
|
||||
// creo oggetto DTO finale della porta
|
||||
var doorDto = new DoorCostingDTO()
|
||||
{
|
||||
List<string> currOp = new List<string>();
|
||||
currOp.Add(doorOp.JsoncActVal);
|
||||
currBOMList.Add(doorOp.ObjectId, currOp);
|
||||
}
|
||||
DoorId = door.DoorId,
|
||||
Quantity = door.Quantity,
|
||||
EstimatedWorkTime = 0,
|
||||
BOMList = currBOMList
|
||||
};
|
||||
dcDTO.Add(doorDto);
|
||||
}
|
||||
// creo oggetto DTO finale della porta
|
||||
var doorDto = new DoorCostingDTO()
|
||||
{
|
||||
DoorId = door.DoorId,
|
||||
Quantity = door.Quantity,
|
||||
EstimatedWorkTime = 0,
|
||||
BOMList = currBOMList
|
||||
};
|
||||
dcDTO.Add(doorDto);
|
||||
}
|
||||
//answ. = rawOrder.OrderDescript;
|
||||
answ.DoorsList = dcDTO;
|
||||
|
||||
@@ -11,11 +11,12 @@ namespace WebDoorCreator.API.Controllers
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public QueueController(IConfiguration configuration, QueueDataService DataService)
|
||||
public QueueController(IConfiguration configuration, QueueDataService DataService, WebDoorCreatorService _WDService)
|
||||
{
|
||||
Log.Info("Starting QueueController");
|
||||
_configuration = configuration;
|
||||
QDataServ = DataService;
|
||||
WDService = _WDService;
|
||||
Log.Info("Avviato QueueController");
|
||||
}
|
||||
|
||||
@@ -89,6 +90,33 @@ namespace WebDoorCreator.API.Controllers
|
||||
public async Task<string> ResetQueueProcessing()
|
||||
{
|
||||
string answ = "NA";
|
||||
// fixme todo
|
||||
|
||||
/* --------------
|
||||
* da riscrivere
|
||||
* - server record x cancellazione logica delle porte OK
|
||||
* - il record (boolean, toDelete...) indica azione richiesta OK
|
||||
* - si prendono TUTTE le porte da DB con toDelete == true OK
|
||||
* - si eliminano su REDIS dalle 4 code (req, processing, error, done) OK
|
||||
* - check delle code processing, SE ci sono record rimasti li cerco sul DB
|
||||
* - se NON ci sono sul db --> li elimino da processing
|
||||
* - effettivo delete sul db di toDelete
|
||||
*
|
||||
* - proseguo come ora (sposto tra code processing --> request)
|
||||
*/
|
||||
|
||||
var doors2Del = await WDService.DoorGet2Del();
|
||||
|
||||
if (doors2Del != null)
|
||||
{
|
||||
foreach (var item in doors2Del)
|
||||
{
|
||||
await WDService.RedisBulkDelByDoorId(item.DoorId);
|
||||
await QDataServ.RedisBulkDelHashByKey(item.DoorId);
|
||||
await WDService.DoorDelete(item);
|
||||
}
|
||||
}
|
||||
|
||||
bool fatto = await QDataServ.ResetQueueProcessing();
|
||||
answ = fatto ? "OK" : "NO";
|
||||
return answ;
|
||||
@@ -156,6 +184,7 @@ namespace WebDoorCreator.API.Controllers
|
||||
#region Private Properties
|
||||
|
||||
private QueueDataService QDataServ { get; set; } = null!;
|
||||
private WebDoorCreatorService WDService { get; set; } = null!;
|
||||
|
||||
#endregion Private Properties
|
||||
}
|
||||
|
||||
@@ -16,8 +16,11 @@ var builder = WebApplication.CreateBuilder(args);
|
||||
ConfigurationManager configuration = builder.Configuration;
|
||||
// Redis
|
||||
var connStringRedis = configuration.GetConnectionString("Redis");
|
||||
if (string.IsNullOrEmpty(connStringRedis))
|
||||
{
|
||||
connStringRedis = "localhost:6379, DefaultDatabase=11, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false";
|
||||
}
|
||||
string redisSrvAddr = connStringRedis.Substring(0, connStringRedis.IndexOf(":"));
|
||||
|
||||
// avvio oggetto shared x redis...
|
||||
var redisMultiplexer = ConnectionMultiplexer.Connect(connStringRedis);
|
||||
|
||||
|
||||
@@ -1,23 +1,14 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:33043",
|
||||
"sslPort": 44387
|
||||
}
|
||||
},
|
||||
{
|
||||
"profiles": {
|
||||
"WebDoorCreator.API": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "https://localhost:7043;http://localhost:5240",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"dotnetRunMessages": true,
|
||||
"applicationUrl": "https://localhost:7043;http://localhost:5240"
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
@@ -26,6 +17,25 @@
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"WSL": {
|
||||
"commandName": "WSL2",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "https://localhost:7043/swagger",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
"ASPNETCORE_URLS": "https://localhost:7043;http://localhost:5240"
|
||||
},
|
||||
"distributionName": ""
|
||||
}
|
||||
},
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:33043",
|
||||
"sslPort": 44387
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>36a4225d-c8d7-4b97-b6db-6ab2af37bfde</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -18,14 +19,17 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
<PackageReference Include="NLog" Version="5.1.2" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.6.96" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="NLog" Version="5.2.2" />
|
||||
<PackageReference Include="SkiaSharp" Version="2.88.3" />
|
||||
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.3" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.6.122" />
|
||||
<PackageReference Include="StackExchange.Redis.Extensions.AspNetCore" Version="9.1.0" />
|
||||
<PackageReference Include="StackExchange.Redis.Extensions.Core" Version="9.1.0" />
|
||||
<PackageReference Include="StackExchange.Redis.Extensions.Newtonsoft" Version="9.1.0" />
|
||||
<PackageReference Include="Svg" Version="3.4.4" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
|
||||
<PackageReference Include="Svg.Skia" Version="1.0.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"Redis": "nkcredis.steamware.net:6379, DefaultDatabase=12, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false, password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
|
||||
"WDC.DB": "Server=SQL2016PROD;Database=DCA_WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.UI;"
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,8 @@ namespace WebDoorCreator.Core
|
||||
public static readonly string CALC_REQ_PROC = $"{BASE_HASH}:CalcRequests:Processing";
|
||||
public static readonly string CALC_REQ_DDF_CACHE = $"{BASE_HASH}:CalcRequests:CacheDDF";
|
||||
public static readonly string CALC_REQ_SVG_CACHE = $"{BASE_HASH}:CalcRequests:CacheSVG";
|
||||
public static readonly string DOOR_TPL_LIST = $"{BASE_HASH}:Template:DoorList";
|
||||
|
||||
|
||||
// REDIS Channels messaggi x QueueMan (verso UI/srv)
|
||||
public static readonly string CALC_REQ_QUEUE = $"CalcRequest";
|
||||
@@ -57,6 +59,7 @@ namespace WebDoorCreator.Core
|
||||
public const string rKeyVocLemma = $"{redisBaseAddr}:Cache:VocLemma";
|
||||
public const string rKeyVocLemmaTEMP = $"{redisBaseAddr}:Cache:VocLemmaTEMP";
|
||||
public const string rKeyLanguage = $"{redisBaseAddr}:Cache:Languages";
|
||||
public const string rKeyDirsScan = $"{redisBaseAddr}:Cache:Scan";
|
||||
|
||||
/// <summary>
|
||||
/// variabili accessorie ulteriori
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{
|
||||
#region Public Enums
|
||||
|
||||
|
||||
|
||||
|
||||
public enum UserLevel
|
||||
{
|
||||
@@ -32,6 +32,14 @@
|
||||
CodeDescending
|
||||
}
|
||||
|
||||
public enum fileStatus
|
||||
{
|
||||
none = 0,
|
||||
add,
|
||||
mod,
|
||||
rem
|
||||
}
|
||||
|
||||
#endregion Public Enums
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,9 @@ namespace WebDoorCreator.Core.ReportViewer
|
||||
{
|
||||
public class ReportItem
|
||||
{
|
||||
public string Description { get; set; }
|
||||
public decimal Price { get; set; }
|
||||
public int Qty { get; set; }
|
||||
public string Description { get; set; } = "";
|
||||
public decimal Price { get; set; } = 0;
|
||||
public int Qty { get; set; } = 0;
|
||||
public decimal Total => Price * Qty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,9 +15,8 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EntityFrameworkCore.SqlServer.HierarchyId" Version="3.0.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.14" />
|
||||
<PackageReference Include="NLog" Version="5.1.2" />
|
||||
<PackageReference Include="NLog" Version="5.2.2" />
|
||||
<PackageReference Include="ReportViewerCore.NETCore" Version="15.1.17" />
|
||||
<PackageReference Include="ToDataTable" Version="0.1.2" />
|
||||
<PackageReference Include="YamlDotNet" Version="13.1.0" />
|
||||
|
||||
@@ -3,6 +3,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using NLog;
|
||||
using NLog.Fluent;
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
namespace WebDoorCreator.Data
|
||||
{
|
||||
@@ -13,13 +14,16 @@ namespace WebDoorCreator.Data
|
||||
private IConfiguration _configuration { get; set; } = null!;
|
||||
public ApplicationDbContext()
|
||||
{
|
||||
Log.Info($"ApplicationDbContext Init");
|
||||
try
|
||||
{
|
||||
// se non ci fosse... crea o migra!
|
||||
Database.Migrate();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{ }
|
||||
{
|
||||
Log.Error($"Exc during ApplicationDbContext() init:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options, IConfiguration configuration) : base(options)
|
||||
{
|
||||
@@ -34,7 +38,9 @@ namespace WebDoorCreator.Data
|
||||
Database.Migrate();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{ }
|
||||
{
|
||||
Log.Error($"Exc during ApplicationDbContext(DbContextOptions<ApplicationDbContext> options, IConfiguration configuration) init:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
}
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
|
||||
@@ -21,11 +21,11 @@ namespace WebDoorCreator.Data
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
protected ConfigModel seedConfig(string chaive, string valore, string valoreStd, string note)
|
||||
protected ConfigModel seedConfig(string chiave, string valore, string valoreStd, string note)
|
||||
{
|
||||
var newRec = new ConfigModel()
|
||||
{
|
||||
chiave = chaive,
|
||||
chiave = chiave,
|
||||
valore = valore,
|
||||
valoreStd = valoreStd,
|
||||
note = note
|
||||
|
||||
@@ -195,6 +195,32 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Getting door list 2 delete
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<DoorModel>? DoorGet2Del()
|
||||
{
|
||||
List<DoorModel>? dbResult = new List<DoorModel>();
|
||||
// retrieving data from db
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// extracting entire set
|
||||
dbResult = localDbCtx.DbSetDoor
|
||||
.Where(x => x.isLogicDel)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in DoorGet2Del:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Getting door data by key
|
||||
/// </summary>
|
||||
@@ -257,52 +283,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return newId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding or removing a single door
|
||||
/// </summary>
|
||||
/// <param name="doorId">Record id to edit or add</param>
|
||||
/// <param name="isAdd">States if it has to be added or removing a door</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorModQty(int NewQty, int doorId, bool isAdd)
|
||||
{
|
||||
/* crea nuovo metodo per modifica singola quantità porta: DOORMODQTY */
|
||||
bool fatto = false;
|
||||
//List<ItemModel> dbResult = new List<ItemModel>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetDoor
|
||||
.Where(x => x.DoorId == doorId)
|
||||
.FirstOrDefault();
|
||||
if (currRec != null) //if is not null edit the record found
|
||||
{
|
||||
if (NewQty > 0)
|
||||
{
|
||||
currRec.Quantity = NewQty;
|
||||
}
|
||||
else if (isAdd)
|
||||
{
|
||||
currRec.Quantity = currRec.Quantity + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
currRec.Quantity = currRec.Quantity - 1;
|
||||
}
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorModQty: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete doorOp instance
|
||||
/// </summary>
|
||||
@@ -471,6 +451,45 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding new DoorOpType data
|
||||
/// </summary>
|
||||
/// <param name="addRec">Record to add</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorOpTypeAdd(List<DoorOpTypeTempModel> addList)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// stored di reset ListValues
|
||||
var storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_DoorOpType_Prepare");
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// import massivo dati in tab temp
|
||||
localDbCtx
|
||||
.DbSetDoorOpTypeTemp
|
||||
.AddRange(addList);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// stored di merge dati in DoorOpType
|
||||
storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_DoorOpType_Import");
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorOpTypeAdd: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new DoorOpType
|
||||
/// </summary>
|
||||
@@ -522,6 +541,31 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieving data from door operation type table filtered by path
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<DoorOpTypeModel> DoorOpTypeGetByPath(string path)
|
||||
{
|
||||
List<DoorOpTypeModel> dbResult = new List<DoorOpTypeModel>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.Where(x => x.OpCode.StartsWith(path))
|
||||
.OrderBy(x => x.DoorOpTypId)
|
||||
.ToList();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in DoorOpTypeGetByPath:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public async Task<List<DoorOpTypeModel>> DoorOpTypeGetDefault()
|
||||
{
|
||||
List<DoorOpTypeModel> dbResult = new List<DoorOpTypeModel>();
|
||||
@@ -543,6 +587,117 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieving data from door operation type table filtered by Hw Code
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<DoorOpTypeModel> DoorOpTypeGetFiltered(string hwCode, int parentId)
|
||||
{
|
||||
List<DoorOpTypeModel> dbResult = new List<DoorOpTypeModel>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
if (hwCode == "*" && parentId == -1)
|
||||
{
|
||||
// extracting entire set
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.OrderBy(x => x.DoorOpTypId)
|
||||
.ToList();
|
||||
}
|
||||
else if (hwCode != "*" && parentId == -1)
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.Where(x => x.HwCode == hwCode)
|
||||
.OrderBy(x => x.DoorOpTypId)
|
||||
.ToList();
|
||||
}
|
||||
else if (hwCode == "*" && parentId >= 0)
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.Where(x => x.ParentId == parentId)
|
||||
.OrderBy(x => x.DoorOpTypId)
|
||||
.ToList();
|
||||
}
|
||||
else if (hwCode != "*" && parentId >= 0)
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.Where(x => (x.ParentId == parentId) && x.HwCode == hwCode)
|
||||
.OrderBy(x => x.DoorOpTypId)
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in DoorOpTypeGetAll:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Modifying doorOpType
|
||||
/// </summary>
|
||||
/// <param name="addEditRec">Record to edit</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorOpTypeUpdate(DoorOpTypeModel addEditRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
//List<ItemModel> dbResult = new List<ItemModel>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.Where(x => x.DoorOpTypId == addEditRec.DoorOpTypId)
|
||||
.FirstOrDefault();
|
||||
//if is not null edit the record found
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec.ParentId = addEditRec.ParentId;
|
||||
currRec.OpCode = addEditRec.OpCode;
|
||||
currRec.Description = addEditRec.Description;
|
||||
currRec.IsDefault = addEditRec.IsDefault;
|
||||
currRec.HasHw = addEditRec.HasHw;
|
||||
currRec.IsConcrete = addEditRec.IsConcrete;
|
||||
currRec.HwCode = addEditRec.HwCode;
|
||||
currRec.HwDescription = addEditRec.HwDescription;
|
||||
currRec.DisplayUrl = addEditRec.DisplayUrl;
|
||||
currRec.FPath = addEditRec.FPath;
|
||||
currRec.UnitCost = addEditRec.UnitCost;
|
||||
currRec.ExtOpCode = addEditRec.ExtOpCode;
|
||||
currRec.ExtDescript = addEditRec.ExtDescript;
|
||||
currRec.Rev = addEditRec.Rev;
|
||||
currRec.ValidFrom = addEditRec.ValidFrom;
|
||||
currRec.ValidUntil = addEditRec.ValidUntil;
|
||||
currRec.FileMD5 = addEditRec.FileMD5;
|
||||
currRec.FileDim = addEditRec.FileDim;
|
||||
currRec.LastMod = addEditRec.LastMod;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
//if is null add the record as new in the table
|
||||
else
|
||||
{
|
||||
localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.Add(addEditRec);
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorOpTypeUpdate: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update door's OP
|
||||
/// </summary>
|
||||
@@ -693,15 +848,19 @@ namespace WebDoorCreator.Data.Controllers
|
||||
.DbSetDoor
|
||||
.Where(x => x.DoorId == addEditRec.DoorId)
|
||||
.FirstOrDefault();
|
||||
if (currRec != null) //if is not null edit the record found
|
||||
//if is not null edit the record found
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec.Quantity = addEditRec.Quantity;
|
||||
currRec.DoorExtCode = addEditRec.DoorExtCode;
|
||||
currRec.DoorDescript = addEditRec.DoorDescript;
|
||||
currRec.DoorIdParent = addEditRec.DoorIdParent;
|
||||
currRec.ParentId = addEditRec.ParentId;
|
||||
currRec.isLogicDel = addEditRec.isLogicDel;
|
||||
currRec.UnitCost = addEditRec.UnitCost;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
else //if is null add the record as new in the table
|
||||
//if is null add the record as new in the table
|
||||
else
|
||||
{
|
||||
localDbCtx
|
||||
.DbSetDoor
|
||||
@@ -781,45 +940,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding new DoorOpType data
|
||||
/// </summary>
|
||||
/// <param name="addRec">Record to add</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorOpTypeAdd(List<DoorOpTypeTempModel> addList)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// stored di reset ListValues
|
||||
var storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_DoorOpType_Prepare");
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// import massivo dati in tab temp
|
||||
localDbCtx
|
||||
.DbSetDoorOpTypeTemp
|
||||
.AddRange(addList);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// stored di merge dati in DoorOpType
|
||||
storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_DoorOpType_Import");
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorOpTypeAdd: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ListValues list (All)
|
||||
/// </summary>
|
||||
@@ -1042,13 +1162,83 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updating an order code/description
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <param name="newCode"></param>
|
||||
/// <param name="newDescript"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> OrderUpdateDescript(int orderId, string newCode, string newDescript)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => x.OrderId == orderId)
|
||||
.FirstOrDefault();
|
||||
//if is not null edit the record found
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec.OrderExtCode = newCode;
|
||||
currRec.OrderDescript = newDescript;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante OrderUpdateDescript: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updating an order promised date
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <param name="dateProm"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> OrderUpdatePromDate(int orderId, DateTime dateProm)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => x.OrderId == orderId)
|
||||
.FirstOrDefault();
|
||||
//if is not null edit the record found
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec.DateProm = dateProm;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante OrderUpdatePromDate: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updating an order status
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <param name="newStatus"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> OrderUpdate(int orderId, int newStatus)
|
||||
public async Task<bool> OrderUpdateStatus(int orderId, int newStatus)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
@@ -1063,6 +1253,19 @@ namespace WebDoorCreator.Data.Controllers
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec.Status = newStatus;
|
||||
// controllo gli stati speciali...
|
||||
if (newStatus == 10)
|
||||
{
|
||||
currRec.DateOrd = DateTime.MinValue;
|
||||
}
|
||||
else if (newStatus == 40)
|
||||
{
|
||||
currRec.DateOrd = DateTime.Now;
|
||||
}
|
||||
else if (newStatus == 70)
|
||||
{
|
||||
currRec.DateDelivery = DateTime.Now;
|
||||
}
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
@@ -1070,7 +1273,7 @@ namespace WebDoorCreator.Data.Controllers
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante OrderUpdate: {Environment.NewLine}{exc}");
|
||||
Log.Error($"Eccezione durante OrderUpdateStatus: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
@@ -1368,6 +1571,33 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public async Task<VocabularyTempModel> VocLemmaFindByKeys(string lingua, string lemma)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
VocabularyTempModel dbResult = new VocabularyTempModel();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// import massivo dati in tab temp
|
||||
var termSearch = localDbCtx
|
||||
.DbSetVocabularyTemp
|
||||
.Where(x => x.Lingua == lingua && x.Lemma == lemma)
|
||||
.FirstOrDefault();
|
||||
|
||||
if (termSearch != null)
|
||||
{
|
||||
dbResult = termSearch;
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante VocLemmaCheckConf: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public Dictionary<string, Dictionary<string, string>> VocLemmaGetAll()
|
||||
{
|
||||
Dictionary<string, Dictionary<string, string>> DTOResult = new Dictionary<string, Dictionary<string, string>>();
|
||||
@@ -1467,6 +1697,38 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return fatto;
|
||||
}
|
||||
|
||||
public async Task<bool> VocLemmaSetConf(string lingua, string lemma, bool isConf)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
bool fatto = false;
|
||||
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// import massivo dati in tab temp
|
||||
var termSearch = localDbCtx
|
||||
.DbSetVocabularyTemp
|
||||
.Where(x => x.Lingua == lingua && x.Lemma == lemma)
|
||||
.FirstOrDefault();
|
||||
|
||||
if (termSearch != null)
|
||||
{
|
||||
termSearch.IsConfSave = isConf;
|
||||
|
||||
localDbCtx.Entry(termSearch).State = EntityState.Modified;
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante VocLemmaSetConf: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
public Dictionary<string, Dictionary<string, string>> VocLemmaTEMPGetAll()
|
||||
{
|
||||
Dictionary<string, Dictionary<string, string>> DTOResult = new Dictionary<string, Dictionary<string, string>>();
|
||||
@@ -1508,7 +1770,7 @@ namespace WebDoorCreator.Data.Controllers
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration;
|
||||
private static IConfiguration _configuration = null!;
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static WebDoorCreator.Core.Enum;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// File data DTO
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class FileDTO
|
||||
{
|
||||
//public string HwCode { get; set; } = "";
|
||||
public string FileBaseDir { get; set; } = "";
|
||||
//public string FileAbsPath { get; set; } = "";
|
||||
public string FileRelPath { get; set; } = "";
|
||||
public string FileMD5 { get; set; } = "";
|
||||
public long FileDim { get; set; } = 0;
|
||||
public DateTime lastModTime { get; set; } = DateTime.Now;
|
||||
public fileStatus status { get; set; } = fileStatus.none;
|
||||
public bool action { get; set; } = false;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,11 @@ namespace WebDoorCreator.Data.DbModels
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int DoorId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Parent element ID
|
||||
/// </summary>
|
||||
public int ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Ordine cui è associata la porta
|
||||
/// </summary>
|
||||
@@ -32,11 +37,6 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public string MeasureUnit { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Door's Type
|
||||
/// </summary>
|
||||
public int DoorIdParent { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno x riferimento (es ERP)
|
||||
/// </summary>
|
||||
@@ -88,6 +88,11 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public string UserIdLock { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Valore booleano per indicare se è in stato cancellazione logica
|
||||
/// </summary>
|
||||
public bool isLogicDel { get; set; } = false;
|
||||
|
||||
[ForeignKey("OrderId")]
|
||||
public virtual OrderModel? OrderNav { get; set; }
|
||||
|
||||
@@ -102,7 +107,7 @@ namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
MeasureUnit = MeasureUnit,
|
||||
OrderId = OrderId,
|
||||
DoorIdParent = DoorIdParent,
|
||||
ParentId = ParentId,
|
||||
DoorExtCode = DoorExtCode,
|
||||
DateIns = adesso,
|
||||
UserIdIns = userId,
|
||||
@@ -135,8 +140,8 @@ namespace WebDoorCreator.Data.DbModels
|
||||
if (DoorDescript != item.DoorDescript)
|
||||
return false;
|
||||
|
||||
//if (OrderId != item.OrderId)
|
||||
// return false;
|
||||
if (UnitCost != item.UnitCost)
|
||||
return false;
|
||||
|
||||
//if (MeasureUnit != item.MeasureUnit)
|
||||
// return false;
|
||||
|
||||
@@ -131,11 +131,11 @@ namespace WebDoorCreator.Data.DbModels
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// COmparazione tra il dizionario currVal corrente e quello ricevuto
|
||||
/// Comparazione tra il dizionario currVal corrente e quello ricevuto
|
||||
/// </summary>
|
||||
/// <param name="newDict">Dizionario x comparazione</param>
|
||||
/// <returns></returns>
|
||||
public bool JsoncActValEquals(Dictionary<string, string> newDict)
|
||||
public bool JsonActValEquals(Dictionary<string, string> newDict)
|
||||
{
|
||||
string JsonNewVal = JsonConvert.SerializeObject(newDict);
|
||||
bool answ = JsoncActVal.Equals(JsonNewVal);
|
||||
|
||||
@@ -21,6 +21,11 @@ namespace WebDoorCreator.Data.DbModels
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int DoorOpTypId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indica Id del parent: se 0 sono root, altrimenti indica il type parent
|
||||
/// </summary>
|
||||
public int ParentId { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Codice univoco dell'operazione da svolgere (calcolato, idealmente 4 char da 36 val 0..Z)
|
||||
/// </summary>
|
||||
@@ -67,16 +72,6 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public string FPath { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Idx univoco dell'elemento parent (se 0 = root)
|
||||
/// </summary>
|
||||
public int ParentDoorOpId { get; set; } = 0;
|
||||
|
||||
///// <summary>
|
||||
///// Idx univoco dell'elemento parent (se 0 = root)
|
||||
///// </summary>
|
||||
//public HierarchyId? DoorOpIdPathFromPatriarch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unit cost for the door
|
||||
/// </summary>
|
||||
@@ -112,6 +107,21 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public DateTime ValidUntil { get; set; } = new DateTime(3000, 1, 1);
|
||||
|
||||
/// <summary>
|
||||
/// MD5 Calcolato per controllo uguaglianze
|
||||
/// </summary>
|
||||
public string FileMD5 { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Dimensione file corrente
|
||||
/// </summary>
|
||||
public long FileDim { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Dimensione file corrente
|
||||
/// </summary>
|
||||
public DateTime LastMod { get; set; } = DateTime.Today;
|
||||
|
||||
/// <summary>
|
||||
/// Check validità item
|
||||
/// </summary>
|
||||
@@ -120,7 +130,11 @@ namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
get => DateTime.Today >= ValidFrom && DateTime.Today <= ValidUntil;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stato della door operation {-1=DELETED, 0=UNCHANGED, 1=ADDED, 2=MODIFIED}
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public int status { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// Numero massimo associabile a singola Door
|
||||
/// </summary>
|
||||
|
||||
@@ -112,6 +112,21 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public DateTime ValidUntil { get; set; } = new DateTime(3000, 1, 1);
|
||||
|
||||
/// <summary>
|
||||
/// MD5 Calcolato per controllo uguaglianze
|
||||
/// </summary>
|
||||
public string FileMD5 { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Dimensione file corrente
|
||||
/// </summary>
|
||||
public long FileDim { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Data ultima modifica
|
||||
/// </summary>
|
||||
public DateTime LastMod { get; set; } = DateTime.Today;
|
||||
|
||||
/// <summary>
|
||||
/// Check validità item
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
[Table("TestTable")]
|
||||
public class IdentityTableSeedTest
|
||||
{
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int IdUni { get; set; } = 0;
|
||||
|
||||
[MaxLength(50)]
|
||||
public string Campo1 { get; set; } = "";
|
||||
|
||||
[MaxLength(500)]
|
||||
public string Campo2 { get; set; } = "";
|
||||
}
|
||||
}
|
||||
@@ -56,6 +56,16 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public DateTime DateDelivery { get; set; } = DateTime.Now.AddDays(60);
|
||||
|
||||
/// <summary>
|
||||
/// Expected order delivery from DCA
|
||||
/// </summary>
|
||||
public DateTime DateProm { get; set; } = DateTime.Now.AddDays(60);
|
||||
|
||||
/// <summary>
|
||||
/// Date Order confirmed by customer from Order table
|
||||
/// </summary>
|
||||
public DateTime DateOrd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Eventuale sconto globale
|
||||
/// </summary>
|
||||
@@ -71,7 +81,7 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public string OrderDescript { get; set; } = "";
|
||||
|
||||
|
||||
|
||||
|
||||
[ForeignKey("CompanyId")]
|
||||
public virtual CompanyModel? CompanyNav { get; set; }
|
||||
|
||||
@@ -14,7 +14,6 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// <summary>
|
||||
/// View to retrieve data from multiple tables
|
||||
/// </summary>
|
||||
//[Table("v_OrderStatus")]
|
||||
public class OrderStatusViewModel
|
||||
{
|
||||
/// <summary>
|
||||
@@ -71,11 +70,20 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public decimal TotCost { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Expected order delivery from DCA
|
||||
/// </summary>
|
||||
public DateTime DateProm { get; set; } = DateTime.Now.AddDays(60);
|
||||
|
||||
/// <summary>
|
||||
/// Data promessa di consegna
|
||||
/// Date Order confirmed by customer from Order table
|
||||
/// </summary>
|
||||
public DateTime DateDelivery { get; set; } = DateTime.Now.AddDays(60);
|
||||
public DateTime DateOrd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Effective order delivery date
|
||||
/// </summary>
|
||||
public DateTime DateDelivery { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Eventuale sconto globale
|
||||
|
||||
@@ -90,12 +90,15 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public string VAT { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Current Door ID
|
||||
/// </summary>
|
||||
public int DoorId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Door's Type
|
||||
/// Door's parent ID
|
||||
/// </summary>
|
||||
public int TypeId { get; set; } = 0;
|
||||
public int ParentId { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno x riferimento (es ERP)
|
||||
|
||||
@@ -35,5 +35,9 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
[MaxLength(500)]
|
||||
public string Traduzione { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Indica se è da salvare su db o no
|
||||
/// </summary>
|
||||
public bool IsConfSave { get; set; } = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace WebDoorCreator.Data
|
||||
|
||||
public MessagePipe(IConnectionMultiplexer redisConn, string channelName, bool enableLog = false)
|
||||
{
|
||||
_channel = channelName;
|
||||
_channel = new RedisChannel(channelName, RedisChannel.PatternMode.Literal); ;
|
||||
redis = redisConn;
|
||||
redisDb = redis.GetDatabase();
|
||||
this.enableLog = enableLog;
|
||||
@@ -94,7 +94,7 @@ namespace WebDoorCreator.Data
|
||||
/// <summary>
|
||||
/// Canale associato al gestore pipeline messaggi
|
||||
/// </summary>
|
||||
private string _channel { get; set; } = "";
|
||||
private RedisChannel _channel { get; set; } = new RedisChannel("Default", RedisChannel.PatternMode.Literal);
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace WebDoorCreator.Data
|
||||
{
|
||||
Log.Trace($"ch {channel} | {message}");
|
||||
// messaggio
|
||||
PubSubEventArgs mea = new PubSubEventArgs(message);
|
||||
PubSubEventArgs mea = new PubSubEventArgs($"{message}");
|
||||
// se qualcuno ascolta sollevo evento nuovo valore...
|
||||
if (EA_NewMessage != null)
|
||||
{
|
||||
|
||||
+3
-1
@@ -287,8 +287,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
@@ -25,11 +25,13 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
name: "TreeCode",
|
||||
table: "DoorOpType");
|
||||
|
||||
#if false
|
||||
migrationBuilder.AddColumn<HierarchyId>(
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType",
|
||||
type: "hierarchyid",
|
||||
nullable: true);
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType",
|
||||
type: "hierarchyid",
|
||||
nullable: true);
|
||||
#endif
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "GraphicParams",
|
||||
@@ -75,9 +77,11 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
migrationBuilder.DropTable(
|
||||
name: "Hardware");
|
||||
|
||||
#if false
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType");
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType");
|
||||
#endif
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ParentDoorOpId",
|
||||
|
||||
+3
-1
@@ -298,8 +298,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -298,8 +298,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -302,8 +302,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -302,8 +302,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -302,8 +302,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -302,8 +302,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -302,8 +302,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
Generated
+3
-1
@@ -302,8 +302,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -306,8 +306,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -301,8 +301,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -305,8 +305,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -312,8 +312,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -312,8 +312,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -312,8 +312,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -334,8 +334,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -334,8 +334,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -332,8 +332,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
Generated
+3
-1
@@ -332,8 +332,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -332,8 +332,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -332,8 +332,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
@@ -9,9 +9,11 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
#if false
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType");
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType");
|
||||
#endif
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "JsoncConfig",
|
||||
@@ -31,11 +33,13 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
name: "UnitCost",
|
||||
table: "DoorOpType");
|
||||
|
||||
#if false
|
||||
migrationBuilder.AddColumn<HierarchyId>(
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType",
|
||||
type: "hierarchyid",
|
||||
nullable: true);
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType",
|
||||
type: "hierarchyid",
|
||||
nullable: true);
|
||||
#endif
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "JsoncConfig",
|
||||
|
||||
+1055
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class repFixTypeId : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ParentDoorOpId",
|
||||
table: "DoorOpType",
|
||||
newName: "ParentId");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "DoorIdParent",
|
||||
table: "Door",
|
||||
newName: "ParentId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ParentId",
|
||||
table: "DoorOpType",
|
||||
newName: "ParentDoorOpId");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ParentId",
|
||||
table: "Door",
|
||||
newName: "DoorIdParent");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+1058
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,26 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class modVocTempModel : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsConfSave",
|
||||
table: "VocabularyTemp",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsConfSave",
|
||||
table: "VocabularyTemp");
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+1080
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class modDoorOpTypeModel2Match : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "FileDim",
|
||||
table: "DoorOpTypeTemp",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "FileMD5",
|
||||
table: "DoorOpTypeTemp",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "LastMod",
|
||||
table: "DoorOpTypeTemp",
|
||||
type: "datetime2",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "FileDim",
|
||||
table: "DoorOpType",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "FileMD5",
|
||||
table: "DoorOpType",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "LastMod",
|
||||
table: "DoorOpType",
|
||||
type: "datetime2",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FileDim",
|
||||
table: "DoorOpTypeTemp");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FileMD5",
|
||||
table: "DoorOpTypeTemp");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "LastMod",
|
||||
table: "DoorOpTypeTemp");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FileDim",
|
||||
table: "DoorOpType");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FileMD5",
|
||||
table: "DoorOpType");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "LastMod",
|
||||
table: "DoorOpType");
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+1078
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,47 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class fixDoorOpTypeModel2Match : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "FileDim",
|
||||
table: "DoorOpTypeTemp",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(max)");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "FileDim",
|
||||
table: "DoorOpType",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(max)");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "FileDim",
|
||||
table: "DoorOpTypeTemp",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "FileDim",
|
||||
table: "DoorOpType",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint");
|
||||
}
|
||||
}
|
||||
}
|
||||
+1081
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,26 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class addLogicDelColumnDoor : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "isLogicDel",
|
||||
table: "Door",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "isLogicDel",
|
||||
table: "Door");
|
||||
}
|
||||
}
|
||||
}
|
||||
+1093
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class AddOrderDatesInfo : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateOrd",
|
||||
table: "Order",
|
||||
type: "datetime2",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateProm",
|
||||
table: "Order",
|
||||
type: "datetime2",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DateOrd",
|
||||
table: "Order");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DateProm",
|
||||
table: "Order");
|
||||
}
|
||||
}
|
||||
}
|
||||
+1114
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,31 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class AddIdTestTable : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "TestTable",
|
||||
columns: table => new
|
||||
{
|
||||
IdUni = table.Column<string>(type: "nvarchar(450)", nullable: false),
|
||||
Campo1 = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
Campo2 = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_TestTable", x => x.IdUni);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "TestTable");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -224,9 +224,6 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("DoorIdParent")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("MeasureUnit")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
@@ -234,6 +231,9 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ParentId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
@@ -252,6 +252,9 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("isLogicDel")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("DoorId");
|
||||
|
||||
b.HasIndex("OrderId");
|
||||
@@ -342,6 +345,13 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<long>("FileDim")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("FileMD5")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("HasHw")
|
||||
.HasColumnType("bit");
|
||||
|
||||
@@ -359,6 +369,9 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
b.Property<bool>("IsDefault")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("LastMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("MaxAllowed")
|
||||
.HasColumnType("int");
|
||||
|
||||
@@ -366,7 +379,7 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ParentDoorOpId")
|
||||
b.Property<int>("ParentId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Rev")
|
||||
@@ -415,6 +428,13 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<long>("FileDim")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("FileMD5")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("HasHw")
|
||||
.HasColumnType("bit");
|
||||
|
||||
@@ -432,6 +452,9 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
b.Property<bool>("IsDefault")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("LastMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("MaxAllowed")
|
||||
.HasColumnType("int");
|
||||
|
||||
@@ -528,6 +551,27 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
b.ToTable("Hardware");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.IdentityTableSeedTest", b =>
|
||||
{
|
||||
b.Property<string>("IdUni")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("Campo1")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Campo2")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("IdUni");
|
||||
|
||||
b.ToTable("TestTable");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.LanguageModel", b =>
|
||||
{
|
||||
b.Property<string>("CodLingua")
|
||||
@@ -717,6 +761,12 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateOrd")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateProm")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("Discount")
|
||||
.HasColumnType("float");
|
||||
|
||||
@@ -762,6 +812,12 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateOrd")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateProm")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("Discount")
|
||||
.HasColumnType("float");
|
||||
|
||||
@@ -865,6 +921,9 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ParentId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
@@ -875,9 +934,6 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TypeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
@@ -898,7 +954,7 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
|
||||
b.HasKey("OrderId", "DoorId", "ObjectKey");
|
||||
|
||||
b.ToTable("DbSetPrtRepOrder");
|
||||
b.ToView("v_PrtReport");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.SerializedDoorsModel", b =>
|
||||
@@ -986,6 +1042,9 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<bool>("IsConfSave")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
|
||||
@@ -38,6 +38,11 @@ namespace WebDoorCreator.Data.Services
|
||||
// setup canali pub/sub
|
||||
CalcReqPipe = new MessagePipe(redisConn, Constants.CALC_REQ_QUEUE);
|
||||
CalcDonePipe = new MessagePipe(redisConn, Constants.CALC_DONE_QUEUE);
|
||||
// json serializer... FIX errore loop circolare https://www.ryadel.com/en/jsonserializationexception-self-referencing-loop-detected-error-fix-entity-framework-asp-net-core/
|
||||
JSSettings = new JsonSerializerSettings()
|
||||
{
|
||||
ReferenceLoopHandling = ReferenceLoopHandling.Ignore
|
||||
};
|
||||
// leggo conf speciali
|
||||
vetoRemoveProcSec = _configuration.GetValue<int>("RuntimeOpt:VetoRemoveProcessing");
|
||||
Log.Info("QueueDataService started!");
|
||||
@@ -135,7 +140,7 @@ namespace WebDoorCreator.Data.Services
|
||||
if (doorData.Length == 2)
|
||||
{
|
||||
RedisKey currErrKey = new RedisKey($"{Constants.CALC_REQ_ERRS}");
|
||||
int currId = await RedHashGet(currErrKey, doorData[0]);
|
||||
int currId = await RedHashGetInt(currErrKey, doorData[0]);
|
||||
hasErr = doorData[1] == $"{currId}";
|
||||
}
|
||||
return hasErr;
|
||||
@@ -233,7 +238,7 @@ namespace WebDoorCreator.Data.Services
|
||||
public async Task<long> DoorRefreshUpsert(string doorId)
|
||||
{
|
||||
DateTime adesso = DateTime.Now;
|
||||
string sAdesso = JsonConvert.SerializeObject(adesso);
|
||||
string sAdesso = JsonConvert.SerializeObject(adesso, JSSettings);
|
||||
RedisKey currKey = new RedisKey(Constants.LAST_DOOR_REFR_KEY);
|
||||
long numReq = await RedHashUpsert(currKey, doorId, sAdesso);
|
||||
return numReq;
|
||||
@@ -251,6 +256,36 @@ namespace WebDoorCreator.Data.Services
|
||||
return svgVal.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check if specified DoorId is in Template door list
|
||||
/// </summary>
|
||||
/// <param name="DoorId">Door Id to search</param>
|
||||
/// <returns>Found (true/false)</returns>
|
||||
public async Task<bool> DoorTplListContainsDoor(string DoorId)
|
||||
{
|
||||
bool found = false;
|
||||
RedisKey currKey = new RedisKey(Constants.DOOR_TPL_LIST);
|
||||
var rawVal = await RedHashGetString(currKey, DoorId);
|
||||
found = !string.IsNullOrEmpty(rawVal) && (rawVal == DoorId);
|
||||
return found;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add specified DoorIdList to Template door list
|
||||
/// </summary>
|
||||
/// <param name="DoorIdList">List to add</param>
|
||||
/// <returns>Num of items in list</returns>
|
||||
public async Task<long> DoorTplListUpsert(List<string> DoorIdList)
|
||||
{
|
||||
RedisKey currKey = new RedisKey(Constants.DOOR_TPL_LIST);
|
||||
long numReq = 0;
|
||||
foreach (var item in DoorIdList)
|
||||
{
|
||||
numReq = await RedHashUpsert(currKey, item, item);
|
||||
}
|
||||
return numReq;
|
||||
}
|
||||
|
||||
public async Task<bool> FlushRedisCache()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
@@ -336,12 +371,12 @@ namespace WebDoorCreator.Data.Services
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verify existence for single hash record
|
||||
/// Get single hash record
|
||||
/// </summary>
|
||||
/// <param name="currKey">Chiave redis della Hashlist</param>
|
||||
/// <param name="chiave">Chiave nella HashList</param>
|
||||
/// <returns>Esito rimozione</returns>
|
||||
public async Task<int> RedHashGet(RedisKey currKey, string chiave)
|
||||
/// <param name="currKey">Redis Key for Hashlist</param>
|
||||
/// <param name="chiave">Requested key on list</param>
|
||||
/// <returns>Value as Int</returns>
|
||||
public async Task<int> RedHashGetInt(RedisKey currKey, string chiave)
|
||||
{
|
||||
int result = 0;
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
@@ -357,7 +392,33 @@ namespace WebDoorCreator.Data.Services
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Trace($"RedHashGet | {currKey} | in: {ts.TotalMilliseconds} ms");
|
||||
Log.Trace($"RedHashGetInt | {currKey} | in: {ts.TotalMilliseconds} ms");
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get single hash record
|
||||
/// </summary>
|
||||
/// <param name="currKey">Redis Key for Hashlist</param>
|
||||
/// <param name="chiave">Requested key on list</param>
|
||||
/// <returns>Value as string</returns>
|
||||
public async Task<string> RedHashGetString(RedisKey currKey, string chiave)
|
||||
{
|
||||
string result = "";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
var hasVal = await redisDb.HashExistsAsync(currKey, chiave);
|
||||
if (hasVal)
|
||||
{
|
||||
var rawRes = await redisDb.HashGetAsync(currKey, chiave);
|
||||
if (rawRes.HasValue)
|
||||
{
|
||||
result = $"{rawRes}";
|
||||
}
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Trace($"RedHashGetString | {currKey} | in: {ts.TotalMilliseconds} ms");
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -379,6 +440,22 @@ namespace WebDoorCreator.Data.Services
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restitusice gli errori della porta in oggetto
|
||||
/// </summary>
|
||||
/// <param name="doorIdVers">formato DoorId:Versione</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> RedisBulkDelHashByKey(int doorId)
|
||||
{
|
||||
await DoorRefreshRemove($"{doorId}");
|
||||
await RequestDoneRemove($"{doorId}");
|
||||
await RequestErrRemove($"{doorId}");
|
||||
await RequestPendingRemove($"{doorId}");
|
||||
await RequestProcessingRemove($"{doorId}");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get Queue request done
|
||||
/// </summary>
|
||||
@@ -708,7 +785,7 @@ namespace WebDoorCreator.Data.Services
|
||||
foreach (var item in listDone)
|
||||
{
|
||||
DoorIdList.Remove(item);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
@@ -756,23 +833,33 @@ namespace WebDoorCreator.Data.Services
|
||||
public async Task<bool> SaveProcessingResult(List<CalcResultDTO> calcResults)
|
||||
{
|
||||
bool answ = true;
|
||||
await Task.Delay(1);
|
||||
if (calcResults != null && calcResults.Count > 0)
|
||||
{
|
||||
string sDoorId = "";
|
||||
string sCurrVers = "";
|
||||
bool doorIsTpl = false;
|
||||
foreach (var calcTask in calcResults)
|
||||
{
|
||||
RedisKey currSvgKey = new RedisKey("");
|
||||
var doorData = calcTask.DoorIdVers.Split(".");
|
||||
sDoorId = doorData.Length > 0 ? doorData[0] : "";
|
||||
sCurrVers = doorData.Length > 0 ? doorData[1] : "";
|
||||
// verifico se sia template --> durata indefinita...
|
||||
doorIsTpl = await DoorTplListContainsDoor(sDoorId);
|
||||
// se valido salvo SVG...
|
||||
if (calcTask.Validated)
|
||||
{
|
||||
// salvo in area REDIS
|
||||
currSvgKey = new RedisKey($"{Constants.CALC_REQ_SVG_CACHE}:{sDoorId}:{sCurrVers}");
|
||||
await redisDb.StringSetAsync(currSvgKey, calcTask.SvgGen, WeekLongCache);
|
||||
// se template --> no scadenza
|
||||
if (doorIsTpl)
|
||||
{
|
||||
await redisDb.StringSetAsync(currSvgKey, calcTask.SvgGen);
|
||||
}
|
||||
else
|
||||
{
|
||||
await redisDb.StringSetAsync(currSvgKey, calcTask.SvgGen, WeekLongCache);
|
||||
}
|
||||
// elimino dalle code proc/err
|
||||
await RequestProcessingRemove(sDoorId);
|
||||
await RequestErrRemove(sDoorId);
|
||||
@@ -784,7 +871,14 @@ namespace WebDoorCreator.Data.Services
|
||||
{
|
||||
// salvo in area REDIS
|
||||
currSvgKey = new RedisKey($"{Constants.CALC_REQ_ERRS}:{sDoorId}:{sCurrVers}");
|
||||
await redisDb.StringSetAsync(currSvgKey, calcTask.ErrorMsg, WeekLongCache);
|
||||
if (doorIsTpl)
|
||||
{
|
||||
await redisDb.StringSetAsync(currSvgKey, calcTask.ErrorMsg);
|
||||
}
|
||||
else
|
||||
{
|
||||
await redisDb.StringSetAsync(currSvgKey, calcTask.ErrorMsg, WeekLongCache);
|
||||
}
|
||||
// elimino dalle code proc/done
|
||||
await RequestProcessingRemove(sDoorId);
|
||||
await RequestDoneRemove(sDoorId);
|
||||
@@ -795,6 +889,10 @@ namespace WebDoorCreator.Data.Services
|
||||
CalcDonePipe.saveAndSendMessage(Constants.LAST_CALC_DONE_KEY, calcTask.DoorIdVers);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
await Task.Delay(1);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
@@ -1131,11 +1229,11 @@ namespace WebDoorCreator.Data.Services
|
||||
private int vetoRemoveProcSec { get; set; } = 10;
|
||||
|
||||
/// <summary>
|
||||
/// Durata cache di 24h
|
||||
/// Durata cache di 1 settimana
|
||||
/// </summary>
|
||||
private TimeSpan WeekLongCache
|
||||
{
|
||||
get => TimeSpan.FromHours(24 * 7);
|
||||
get => TimeSpan.FromHours(24 * 7 * rnd.Next(1000, 1100) / 1000);
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,13 +4,15 @@ GO
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
DROP PROCEDURE IF EXISTS [dbo].[stp_ListVal_Import]
|
||||
GO
|
||||
|
||||
-- =============================================
|
||||
-- Author: Z.M.
|
||||
-- Create date: 2023.04.03
|
||||
-- Description: Esecuzione upsert ListValues
|
||||
-- =============================================
|
||||
ALTER PROCEDURE [dbo].[stp_ListVal_Import]
|
||||
CREATE PROCEDURE [dbo].[stp_ListVal_Import]
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON;
|
||||
@@ -19,8 +21,8 @@ BEGIN
|
||||
|
||||
-- effettua merge dati listValues
|
||||
MERGE ListValues as tgt
|
||||
USING (SELECT TableName, FieldName, [Value], Label, Ordinal, InputType, DefaultVal, isSerializable FROM ListValuesTemp) as src
|
||||
ON tgt.TableName = src.TableName AND tgt.FieldName = src.FieldName AND tgt.[value] = src.[value]
|
||||
USING (SELECT TableName, FieldName, [Value], [Label], Ordinal, DefaultVal, InputType, isSerializable FROM ListValuesTemp) as src
|
||||
ON tgt.TableName = src.TableName AND tgt.FieldName = src.FieldName AND tgt.[Value] = src.[Value]
|
||||
WHEN MATCHED THEN
|
||||
UPDATE SET [Label] = src.[Label]
|
||||
, Ordinal = src.Ordinal
|
||||
@@ -33,4 +35,5 @@ BEGIN
|
||||
|
||||
COMMIT tran
|
||||
|
||||
END
|
||||
END
|
||||
GO
|
||||
|
||||
@@ -26,13 +26,13 @@ BEGIN
|
||||
SET NOCOUNT ON;
|
||||
|
||||
-- fix periodo SE non fosse specificato
|
||||
SELECT @DataFrom = ISNULL(@DataFrom, '2000-01-01')
|
||||
SELECT @DataTo = ISNULL(@DataTo, '9999-12-31')
|
||||
SET @DataFrom = ISNULL(@DataFrom, '2000-01-01')
|
||||
SET @DataTo = ISNULL(@DataTo, '9999-12-31')
|
||||
|
||||
-- Insert statements for procedure here
|
||||
SELECT *
|
||||
FROM dbo.v_OrderStatus
|
||||
WHERE ( CompanyId = @CompanyId OR @CompanyId = 0 )
|
||||
WHERE ( CompanyId = @CompanyId OR @CompanyId = 0 OR @CompanyId = 1)
|
||||
AND ( OrderStatus = @OrderStatus OR @OrderStatus = 0 )
|
||||
AND DateIns BETWEEN @DataFrom AND @DataTo
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
-- =============================================
|
||||
-- Author: S.E.L.
|
||||
-- Description: Door Order Report data exploded by OrderId
|
||||
-- Create date: 2023.05.22
|
||||
-- =============================================
|
||||
CREATE PROCEDURE [dbo].[stp_prt_OrderReportExpl]
|
||||
ALTER PROCEDURE [dbo].[stp_prt_OrderReportExpl]
|
||||
(
|
||||
@OrderId INT = 0
|
||||
)
|
||||
@@ -18,58 +18,61 @@ BEGIN
|
||||
SET NOCOUNT ON;
|
||||
-- Insert statements for procedure here
|
||||
|
||||
SELECT
|
||||
ORD.OrderId,
|
||||
ORD.CompanyId,
|
||||
ORD.OrderExtCode,
|
||||
ORD.DateIns,
|
||||
ORD.UserIdIns,
|
||||
ORD.DateMod,
|
||||
ORD.UserIdMod,
|
||||
ORD.Status,
|
||||
ORD.OrderDescript,
|
||||
COM.CompanyExtCode,
|
||||
COM.CompanyName,
|
||||
COM.Address,
|
||||
COM.ZipCode,
|
||||
COM.City,
|
||||
COM.State,
|
||||
COM.VAT,
|
||||
DOR.DoorId,
|
||||
ROW_NUMBER() OVER ( PARTITION BY DOR.DoorId ORDER BY DOR.DoorId) AS RowDoor, -- mi serve per i totoali sul report
|
||||
DOR.TypeId,
|
||||
DOR.DoorExtCode,
|
||||
DOR.DoorDescript,
|
||||
DOR.Quantity,
|
||||
DOR.UnitCost,
|
||||
DOR.MeasureUnit,
|
||||
CASE
|
||||
WHEN DOP.ObjectId IN ('Profiles','Size','Swing') THEN 'INFO'
|
||||
WHEN DOP.ObjectId IN ('Properties','Finishing') THEN 'OPTIONS'
|
||||
--WHEN CHARINDEX('template', DOP.JsoncActVal) > 0 THEN 'HARDWARE'
|
||||
ELSE 'HARDWARE' END AS ObjectType,
|
||||
DOP.ObjectId as ObjectKey,
|
||||
-- spostato in vista x poter gestire meglio creazione e indicizzazione in EFCore
|
||||
SELECT *
|
||||
FROM v_PrtReport
|
||||
WHERE OrderId = @OrderId
|
||||
|
||||
--SELECT
|
||||
-- ORD.OrderId,
|
||||
-- ORD.CompanyId,
|
||||
-- ORD.OrderExtCode,
|
||||
-- ORD.DateIns,
|
||||
-- ORD.UserIdIns,
|
||||
-- ORD.DateMod,
|
||||
-- ORD.UserIdMod,
|
||||
-- ORD.Status,
|
||||
-- ORD.OrderDescript,
|
||||
-- COM.CompanyExtCode,
|
||||
-- COM.CompanyName,
|
||||
-- COM.Address,
|
||||
-- COM.ZipCode,
|
||||
-- COM.City,
|
||||
-- COM.State,
|
||||
-- COM.VAT,
|
||||
-- DOR.DoorId,
|
||||
-- ROW_NUMBER() OVER ( PARTITION BY DOR.DoorId ORDER BY DOR.DoorId) AS RowDoor, -- mi serve per i totoali sul report
|
||||
-- DOR.DoorIdParent,
|
||||
-- DOR.DoorExtCode,
|
||||
-- DOR.DoorDescript,
|
||||
-- DOR.Quantity,
|
||||
-- DOR.UnitCost,
|
||||
-- DOR.MeasureUnit,
|
||||
-- CASE
|
||||
-- WHEN DOP.ObjectId IN ('Profiles','Size','Swing') THEN 'INFO'
|
||||
-- WHEN DOP.ObjectId IN ('Properties','Finishing') THEN 'OPTIONS'
|
||||
-- --WHEN CHARINDEX('template', DOP.JsoncActVal) > 0 THEN 'HARDWARE'
|
||||
-- ELSE 'HARDWARE' END AS ObjectType,
|
||||
-- DOP.ObjectId as ObjectKey,
|
||||
|
||||
CASE
|
||||
WHEN DOP.ObjectId = 'Properties' THEN JSON_VALUE(JsoncActVal,'$.Properties.Properties')
|
||||
WHEN DOP.ObjectId = 'Finishing' THEN JSON_VALUE(JsoncActVal,'$.Finishing.Finishing')
|
||||
WHEN DOP.ObjectId = 'Size' THEN JSON_QUERY(JsoncActVal,'$.Size')
|
||||
WHEN DOP.ObjectId = 'Swing' THEN JSON_VALUE(JsoncActVal,'$.Swing.Swing')
|
||||
--WHEN DOP.ObjectId = 'Profiles' THEN JSON_QUERY(JsoncActVal,'$.Profiles')
|
||||
--WHEN CHARINDEX('template', DOP.JsoncActVal) > 0 THEN 'HARDWARE'
|
||||
ELSE DOP.JsoncActVal END AS ObjectVal,
|
||||
--DOP.JsoncActVal as ObjectVal,
|
||||
1 as ObjectQty
|
||||
FROM
|
||||
[Order] AS ORD
|
||||
INNER JOIN Company AS COM ON ORD.CompanyId = COM.CompanyId
|
||||
INNER JOIN Door AS DOR ON ORD.OrderId = DOR.OrderId
|
||||
INNER JOIN DoorOp AS DOP ON DOR.DoorId = DOP.DoorId
|
||||
WHERE
|
||||
ORD.OrderId = @OrderId
|
||||
-- CASE
|
||||
-- WHEN DOP.ObjectId = 'Properties' THEN JSON_VALUE(JsoncActVal,'$.Properties.Properties')
|
||||
-- WHEN DOP.ObjectId = 'Finishing' THEN JSON_VALUE(JsoncActVal,'$.Finishing.Finishing')
|
||||
-- WHEN DOP.ObjectId = 'Size' THEN JSON_QUERY(JsoncActVal,'$.Size')
|
||||
-- WHEN DOP.ObjectId = 'Swing' THEN JSON_VALUE(JsoncActVal,'$.Swing.Swing')
|
||||
-- --WHEN DOP.ObjectId = 'Profiles' THEN JSON_QUERY(JsoncActVal,'$.Profiles')
|
||||
-- --WHEN CHARINDEX('template', DOP.JsoncActVal) > 0 THEN 'HARDWARE'
|
||||
-- ELSE DOP.JsoncActVal END AS ObjectVal,
|
||||
-- --DOP.JsoncActVal as ObjectVal,
|
||||
-- 1 as ObjectQty
|
||||
--FROM
|
||||
-- [Order] AS ORD
|
||||
-- INNER JOIN Company AS COM ON ORD.CompanyId = COM.CompanyId
|
||||
-- INNER JOIN Door AS DOR ON ORD.OrderId = DOR.OrderId
|
||||
-- INNER JOIN DoorOp AS DOP ON DOR.DoorId = DOP.DoorId
|
||||
--WHERE
|
||||
-- ORD.OrderId = @OrderId
|
||||
|
||||
|
||||
END
|
||||
|
||||
GO
|
||||
|
||||
|
||||
@@ -1,50 +1,37 @@
|
||||
/****** Object: View [dbo].[v_OrderStatus] Script Date: 17/03/2023 08:48:45 ******/
|
||||
SET ANSI_NULLS ON
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
|
||||
|
||||
CREATE VIEW [dbo].[v_OrderStatus]
|
||||
AS
|
||||
|
||||
WITH cteDoorGroup AS
|
||||
(
|
||||
SELECT OrderId
|
||||
,COUNT(DISTINCT DoorIdParent) AS NumType
|
||||
,SUM(Quantity) AS NumDoors
|
||||
,SUM(Quantity*UnitCost) AS TotCost
|
||||
FROM Door
|
||||
WITH cteDoorGroup
|
||||
AS (
|
||||
SELECT OrderId
|
||||
,COUNT(DISTINCT ParentId) AS NumType
|
||||
,SUM(Quantity) AS NumDoors
|
||||
,SUM(Quantity * UnitCost) AS TotCost
|
||||
FROM dbo.Door
|
||||
GROUP BY OrderId
|
||||
)
|
||||
|
||||
SELECT
|
||||
ord.OrderId
|
||||
)
|
||||
SELECT ord.OrderId
|
||||
,ord.CompanyId
|
||||
,ord.OrderExtCode
|
||||
,ord.DateIns
|
||||
,ord.UserIdIns
|
||||
,ord.DateMod
|
||||
,ord.DateMod
|
||||
,ord.DateProm
|
||||
,ord.DateOrd
|
||||
,ord.UserIdMod
|
||||
,ord.STATUS as OrderStatus
|
||||
,ord.STATUS AS OrderStatus
|
||||
,ord.OrderDescript
|
||||
,ISNULL(cte.NumType, 0) AS NumType
|
||||
,ISNULL(cte.NumDoors, 0) AS NumDoors
|
||||
,ISNULL(cte.TotCost, 0) AS TotCost
|
||||
--,dbo.Door.DoorId
|
||||
--,dbo.Door.OrderId
|
||||
--,dbo.Door.TypeId
|
||||
--,dbo.Door.DoorExtCode
|
||||
--,dbo.Door.DateIns
|
||||
--,dbo.Door.UserIdIns
|
||||
--,dbo.Door.DateMod
|
||||
--,dbo.Door.UserIdMod
|
||||
--,dbo.Door.DoorDescript
|
||||
--,dbo.Door.Quantity
|
||||
--,dbo.Door.UnitCost
|
||||
|
||||
FROM dbo.[Order] as ord
|
||||
LEFT OUTER JOIN cteDoorGroup cte ON ord.OrderId = cte.OrderId
|
||||
,ord.DateDelivery
|
||||
,ord.Discount
|
||||
FROM dbo.[Order] AS ord
|
||||
LEFT OUTER JOIN cteDoorGroup AS cte ON ord.OrderId = cte.OrderId
|
||||
GO
|
||||
@@ -0,0 +1,58 @@
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
ALTER VIEW [dbo].[v_PrtReport]
|
||||
AS
|
||||
SELECT
|
||||
ORD.OrderId,
|
||||
ORD.CompanyId,
|
||||
ORD.OrderExtCode,
|
||||
ORD.DateIns,
|
||||
ORD.UserIdIns,
|
||||
ORD.DateMod,
|
||||
ORD.UserIdMod,
|
||||
ORD.Status,
|
||||
ORD.OrderDescript,
|
||||
COM.CompanyExtCode,
|
||||
COM.CompanyName,
|
||||
COM.Address,
|
||||
COM.ZipCode,
|
||||
COM.City,
|
||||
COM.State,
|
||||
COM.VAT,
|
||||
DOR.DoorId,
|
||||
ROW_NUMBER() OVER ( PARTITION BY DOR.DoorId ORDER BY DOR.DoorId) AS RowDoor, -- mi serve per i totoali sul report
|
||||
DOR.DoorIdParent,
|
||||
DOR.DoorExtCode,
|
||||
DOR.DoorDescript,
|
||||
DOR.Quantity,
|
||||
DOR.UnitCost,
|
||||
DOR.MeasureUnit,
|
||||
CASE
|
||||
WHEN DOP.ObjectId IN ('Profiles','Size','Swing') THEN 'INFO'
|
||||
WHEN DOP.ObjectId IN ('Properties','Finishing') THEN 'OPTIONS'
|
||||
--WHEN CHARINDEX('template', DOP.JsoncActVal) > 0 THEN 'HARDWARE'
|
||||
ELSE 'HARDWARE' END AS ObjectType,
|
||||
DOP.ObjectId as ObjectKey,
|
||||
|
||||
CASE
|
||||
WHEN DOP.ObjectId = 'Properties' THEN JSON_VALUE(JsoncActVal,'$.Properties.Properties')
|
||||
WHEN DOP.ObjectId = 'Finishing' THEN JSON_VALUE(JsoncActVal,'$.Finishing.Finishing')
|
||||
WHEN DOP.ObjectId = 'Size' THEN JSON_QUERY(JsoncActVal,'$.Size')
|
||||
WHEN DOP.ObjectId = 'Swing' THEN JSON_VALUE(JsoncActVal,'$.Swing.Swing')
|
||||
--WHEN DOP.ObjectId = 'Profiles' THEN JSON_QUERY(JsoncActVal,'$.Profiles')
|
||||
--WHEN CHARINDEX('template', DOP.JsoncActVal) > 0 THEN 'HARDWARE'
|
||||
ELSE DOP.JsoncActVal END AS ObjectVal,
|
||||
--DOP.JsoncActVal as ObjectVal,
|
||||
1 as ObjectQty
|
||||
FROM
|
||||
[Order] AS ORD
|
||||
INNER JOIN Company AS COM ON ORD.CompanyId = COM.CompanyId
|
||||
INNER JOIN Door AS DOR ON ORD.OrderId = DOR.OrderId
|
||||
INNER JOIN DoorOp AS DOP ON DOR.DoorId = DOP.DoorId
|
||||
GO
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
CREATE VIEW [dbo].[v_UserRolesClaims]
|
||||
AS
|
||||
/*
|
||||
|
||||
|
||||
Mod: 2023.05.26 agg. campi Claims
|
||||
*/
|
||||
|
||||
SELECT
|
||||
NU.Id AS UserId
|
||||
,NU.UserName
|
||||
,NU.Email
|
||||
,ISNULL(UR.RoleId, '') AS RoleId
|
||||
,ISNULL(ANR.Name, '') AS RoleName
|
||||
,UC.Id AS ClaimId
|
||||
,UC.UserId AS ClaimUserId
|
||||
,UC.ClaimType
|
||||
,UC.ClaimValue
|
||||
--,ANR.Id
|
||||
--,ANR.NormalizedName
|
||||
--,ANR.ConcurrencyStamp
|
||||
--,UR.UserId
|
||||
--,NU.NormalizedUserName
|
||||
--,NU.NormalizedEmail
|
||||
--,NU.EmailConfirmed
|
||||
--,NU.PasswordHash
|
||||
--,NU.SecurityStamp
|
||||
--,NU.ConcurrencyStamp AS Expr2
|
||||
--,NU.PhoneNumber
|
||||
--,NU.PhoneNumberConfirmed
|
||||
--,NU.TwoFactorEnabled
|
||||
--,NU.LockoutEnd
|
||||
--,NU.LockoutEnabled
|
||||
--,NU.AccessFailedCount
|
||||
FROM dbo.AspNetRoles ANR
|
||||
INNER JOIN dbo.AspNetUserRoles UR ON ANR.Id = UR.RoleId
|
||||
RIGHT OUTER JOIN dbo.AspNetUsers NU ON UR.UserId = NU.Id
|
||||
LEFT OUTER JOIN dbo.AspNetUserClaims UC ON NU.Id = UC.UserId
|
||||
|
||||
GO
|
||||
@@ -1,46 +0,0 @@
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
CREATE VIEW [dbo].[v_UserRolesClaims]
|
||||
AS
|
||||
/*
|
||||
|
||||
|
||||
Mod: 2023.05.26 agg. campi Claims
|
||||
*/
|
||||
|
||||
SELECT
|
||||
NU.Id AS UserId
|
||||
,NU.UserName
|
||||
,NU.Email
|
||||
,ISNULL(UR.RoleId, '') AS RoleId
|
||||
,ISNULL(ANR.Name, '') AS RoleName
|
||||
,UC.Id AS ClaimId
|
||||
,UC.UserId AS ClaimUserId
|
||||
,UC.ClaimType
|
||||
,UC.ClaimValue
|
||||
--,ANR.Id
|
||||
--,ANR.NormalizedName
|
||||
--,ANR.ConcurrencyStamp
|
||||
--,UR.UserId
|
||||
--,NU.NormalizedUserName
|
||||
--,NU.NormalizedEmail
|
||||
--,NU.EmailConfirmed
|
||||
--,NU.PasswordHash
|
||||
--,NU.SecurityStamp
|
||||
--,NU.ConcurrencyStamp AS Expr2
|
||||
--,NU.PhoneNumber
|
||||
--,NU.PhoneNumberConfirmed
|
||||
--,NU.TwoFactorEnabled
|
||||
--,NU.LockoutEnd
|
||||
--,NU.LockoutEnabled
|
||||
--,NU.AccessFailedCount
|
||||
FROM dbo.AspNetRoles ANR
|
||||
INNER JOIN dbo.AspNetUserRoles UR ON ANR.Id = UR.RoleId
|
||||
RIGHT OUTER JOIN dbo.AspNetUsers NU ON UR.UserId = NU.Id
|
||||
LEFT OUTER JOIN dbo.AspNetUserClaims UC ON NU.Id = UC.UserId
|
||||
|
||||
GO
|
||||
@@ -0,0 +1,47 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
|
||||
namespace WebDoorCreator.Data
|
||||
{
|
||||
public class TestConfiguration : IEntityTypeConfiguration<IdentityTableSeedTest>
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
public void Configure(EntityTypeBuilder<IdentityTableSeedTest> builder)
|
||||
{
|
||||
|
||||
// Default seeded users
|
||||
builder.HasData(
|
||||
// SuperAdmins
|
||||
getNewTestRec("zaccaria.majid@egalware.com", "th1sIsTh3R1vrOfThNgt98"),
|
||||
getNewTestRec("samuele.locatelli@egalware.com", "th1sIsTh3R1vrOfThNgt96"),
|
||||
// Admin
|
||||
getNewTestRec("zaccaria.majid01@egalware.com", "th1sIsTh3R1vrOfThNgt94"),
|
||||
getNewTestRec("zaccaria.majid02@egalware.com", "th1sIsTh3R1vrOfThNgt92")
|
||||
);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected IdentityTableSeedTest getNewTestRec(string campo1, string campo2)
|
||||
{
|
||||
var newRec = new IdentityTableSeedTest
|
||||
{
|
||||
Campo1 = campo1,
|
||||
Campo2 = campo2.ToUpper()
|
||||
};
|
||||
return newRec;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
}
|
||||
}
|
||||
@@ -20,25 +20,27 @@ namespace WebDoorCreator.Data.User
|
||||
return (objectType == typeof(System.Security.Claims.Claim));
|
||||
}
|
||||
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer)
|
||||
{
|
||||
JObject jo = JObject.Load(reader);
|
||||
string type = (string)jo["Type"];
|
||||
string value = (string)jo["Value"];
|
||||
string valueType = (string)jo["ValueType"];
|
||||
string issuer = (string)jo["Issuer"];
|
||||
string originalIssuer = (string)jo["OriginalIssuer"];
|
||||
JObject jObj = JObject.Load(reader);
|
||||
string type = $"{jObj["Type"]}";
|
||||
string value = $"{jObj["Value"]}";
|
||||
string valueType = $"{jObj["ValueType"]}";
|
||||
string issuer = $"{jObj["Issuer"]}";
|
||||
string originalIssuer = $"{jObj["OriginalIssuer"]}";
|
||||
return new Claim(type, value, valueType, issuer, originalIssuer);
|
||||
}
|
||||
|
||||
|
||||
public override bool CanWrite
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
// lascio eccezione perché è un deserializzatore "in sola lettura"
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,10 +14,10 @@ namespace WebDoorCreator.Data
|
||||
|
||||
// Default seeded users
|
||||
builder.HasData(
|
||||
//SuperAdmins
|
||||
// SuperAdmins
|
||||
getNewUser("zaccaria.majid@egalware.com", "th1sIsTh3R1vrOfThNgt98"),
|
||||
getNewUser("samuele.locatelli@egalware.com", "th1sIsTh3R1vrOfThNgt96"),
|
||||
//Admin
|
||||
// Admin
|
||||
getNewUser("zaccaria.majid01@egalware.com", "th1sIsTh3R1vrOfThNgt94"),
|
||||
getNewUser("zaccaria.majid02@egalware.com", "th1sIsTh3R1vrOfThNgt92")
|
||||
);
|
||||
|
||||
@@ -15,17 +15,20 @@ namespace WebDoorCreator.Data
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
#if false
|
||||
public WDCDataContext()
|
||||
{
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
public WDCDataContext(IConfiguration configuration)
|
||||
{
|
||||
Log.Info("WDCDataContext starting 01A");
|
||||
_configuration = configuration;
|
||||
try
|
||||
{
|
||||
// se non ci fosse... crea o migra!
|
||||
//Database.Migrate();
|
||||
Database.Migrate();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
@@ -35,6 +38,7 @@ namespace WebDoorCreator.Data
|
||||
|
||||
public WDCDataContext(DbContextOptions<WDCDataContext> options, IConfiguration configuration) : base(options)
|
||||
{
|
||||
Log.Info("WDCDataContext starting 01B");
|
||||
_configuration = configuration;
|
||||
// verifico SE devo eseguire la migration del DB IDENT...
|
||||
bool disableMigrate = _configuration.GetValue<bool>("SetupOpt:DisableWDCMigrate");
|
||||
@@ -78,6 +82,7 @@ namespace WebDoorCreator.Data
|
||||
public virtual DbSet<SerializedDoorsModel> DbSetSerializedDoors { get; set; } = null!;
|
||||
public virtual DbSet<ConfigModel> DbSetConfig { get; set; } = null!;
|
||||
public virtual DbSet<PrtRepOrderModel> DbSetPrtRepOrder { get; set; } = null!;
|
||||
public virtual DbSet<IdentityTableSeedTest> DbSetIdentityTableSeedTest { get; set; } = null!;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -108,16 +113,26 @@ namespace WebDoorCreator.Data
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
Log.Info("WDCDataContext starting 02");
|
||||
if (!optionsBuilder.IsConfigured)
|
||||
{
|
||||
string connString = _configuration.GetConnectionString("WDC.DB");
|
||||
if (!string.IsNullOrEmpty(connString))
|
||||
{
|
||||
optionsBuilder.UseSqlServer(connString, e => e.UseHierarchyId());
|
||||
optionsBuilder.UseSqlServer(connString);
|
||||
|
||||
// hierarchId eliminato
|
||||
//optionsBuilder.UseSqlServer(connString, e => e.UseHierarchyId());
|
||||
}
|
||||
else
|
||||
{
|
||||
optionsBuilder.UseSqlServer("Server=SQL2016DEV;Database=WebDoorCreator;Trusted_Connection=True;", e => e.UseHierarchyId());
|
||||
#if false
|
||||
// dev
|
||||
//optionsBuilder.UseSqlServer("Server=SQL2016DEV;Database=WebDoorCreator;Trusted_Connection=True;", e => e.UseHierarchyId());
|
||||
//optionsBuilder.UseSqlServer("Server=SQL2016DEV;Database=WebDoorCreator;Trusted_Connection=True;", e => e.UseHierarchyId());
|
||||
#endif
|
||||
// hierarchId eliminato
|
||||
optionsBuilder.UseSqlServer("Server=SQL2016DEV;Database=WebDoorCreator;Trusted_Connection=True;");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -135,6 +150,7 @@ namespace WebDoorCreator.Data
|
||||
// Creazione viste migrate
|
||||
modelBuilder.Entity<UsersViewModel>().ToView("v_UserRolesClaims");
|
||||
modelBuilder.Entity<OrderStatusViewModel>().ToView("v_OrderStatus");
|
||||
modelBuilder.Entity<PrtRepOrderModel>().ToView("v_PrtReport");
|
||||
//modelBuilder.Entity<OrderStatusViewModel>().ToView(nameof(OrderStatusViewModel));
|
||||
|
||||
|
||||
@@ -165,12 +181,16 @@ namespace WebDoorCreator.Data
|
||||
modelBuilder.ApplyConfiguration(new LanguageConfiguration());
|
||||
}
|
||||
|
||||
//this.Database.ExecuteSqlRaw("SET IDENTITY_INSERT [dbo].[TestTable] ON");
|
||||
//modelBuilder.ApplyConfiguration(new TestConfiguration());
|
||||
//this.Database.ExecuteSqlRaw("SET IDENTITY_INSERT [dbo].[TestTable] OFF");
|
||||
|
||||
|
||||
// modello dati x report ordini
|
||||
modelBuilder.Entity<PrtRepOrderModel>().HasKey(c => new { c.OrderId, c.DoorId, c.ObjectKey});
|
||||
modelBuilder.Entity<PrtRepOrderModel>().HasKey(c => new { c.OrderId, c.DoorId, c.ObjectKey });
|
||||
|
||||
|
||||
|
||||
//modelBuilder.Seed();
|
||||
modelBuilder.Seed();
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
}
|
||||
|
||||
@@ -13,20 +13,19 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EgwCoreLib.Utils" Version="1.4.2305.1916" />
|
||||
<PackageReference Include="EntityFrameworkCore.SqlServer.HierarchyId" Version="3.0.1" />
|
||||
<PackageReference Include="EgwCoreLib.Utils" Version="1.4.2307.3111" />
|
||||
<PackageReference Include="MailKit" Version="3.5.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.11" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.11" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.11" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.11" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.11">
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.14" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.14" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.14" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.14" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.14">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
<PackageReference Include="NLog" Version="5.1.2" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.6.96" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="NLog" Version="5.2.2" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.6.122" />
|
||||
<PackageReference Include="YamlDotNet" Version="13.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -65,7 +64,10 @@
|
||||
<None Update="SqlScripts\View\OrderStatusView.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="SqlScripts\View\UserView.sql">
|
||||
<None Update="SqlScripts\View\UserRolesClaims.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="SqlScripts\View\PrtReport.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="col py-3 d-flex justify-content-center align-content-center flex-wrap">
|
||||
<div>
|
||||
<div class="d-flex justify-content-center">
|
||||
<img src="~/images/DCOlogo.png" style="height: 10rem; width: 15rem;" />
|
||||
<img src="~/images/DCALogo.png" style="height: 10rem; width: 15rem;" />
|
||||
</div>
|
||||
<div class="d-flex justify-content-center fw-bold fs-2 mb-5">Powered BY</div>
|
||||
<div class="d-flex justify-content-center">
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
@page
|
||||
@model LoginModel
|
||||
@inject WebDoorCreator.UI.Data.WDCVocabularyService WDCVService
|
||||
@inject WebDoorCreator.UI.Data.WDCUserService WDCUService
|
||||
|
||||
@*@{
|
||||
@{
|
||||
ViewData["Title"] = "Log in";
|
||||
}*@
|
||||
}
|
||||
|
||||
<div class="d-flex justify-content-center">
|
||||
<h1>@WDCVService.Traduci(WDCUService.currLanguage ?? "EN" , "UI_200")</h1>
|
||||
<h1>@ViewData["Title"]</h1>
|
||||
</div>
|
||||
<div style="
|
||||
display: flex;
|
||||
@@ -18,7 +16,7 @@
|
||||
<div class="col py-3 d-flex justify-content-center align-content-center flex-wrap">
|
||||
<div>
|
||||
<div class="d-flex justify-content-center">
|
||||
<img src="~/images/DCOlogo.png" style="height: 10rem; width: 15rem;" />
|
||||
<img src="~/images/DCALogo.png" style="height: 10rem; width: 15rem;" />
|
||||
</div>
|
||||
<div class="d-flex justify-content-center fw-bold fs-2 mb-5">Powered BY</div>
|
||||
<div class="d-flex justify-content-center">
|
||||
@@ -31,7 +29,7 @@
|
||||
<div class="row">
|
||||
<div class="py-3 d-flex justify-content-center align-content-center flex-wrap">
|
||||
<form id="account" method="post">
|
||||
<h2 class="text-dark">@WDCVService.Traduci(WDCUService.currLanguage ?? "EN" , "UI_207")</h2>
|
||||
<h2 class="text-dark">Login to your account</h2>
|
||||
<hr />
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<div class="form-floating mb-1">
|
||||
@@ -48,8 +46,7 @@
|
||||
<div class="checkbox text-dark text-start">
|
||||
<label asp-for="Input.RememberMe" class="form-label">
|
||||
<input class="form-check-input" asp-for="Input.RememberMe" />
|
||||
@*@Html.DisplayNameFor(m => m.Input.RememberMe)*@
|
||||
@WDCVService.Traduci(WDCUService.currLanguage ?? "EN" , "UI_203")
|
||||
@Html.DisplayNameFor(m => m.Input.RememberMe)
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -58,13 +55,13 @@
|
||||
</div>
|
||||
<div>
|
||||
<p>
|
||||
<a id="forgot-password" asp-page="./ForgotPassword" class="text-decoration-none text-dark">@WDCVService.Traduci(WDCUService.currLanguage ?? "EN" , "UI_204")</a>
|
||||
<a id="forgot-password" asp-page="./ForgotPassword" class="text-decoration-none text-dark">Forgot your password?</a>
|
||||
</p>
|
||||
<p>
|
||||
<a asp-page="./Register" asp-route-returnUrl="@Model.ReturnUrl" class="text-decoration-none text-dark">@WDCVService.Traduci(WDCUService.currLanguage ?? "EN" , "UI_205")</a>
|
||||
<a asp-page="./Register" asp-route-returnUrl="@Model.ReturnUrl" class="text-decoration-none text-dark">Register as a new user</a>
|
||||
</p>
|
||||
<p>
|
||||
<a id="resend-confirmation" asp-page="./ResendEmailConfirmation" class="text-decoration-none text-dark">@WDCVService.Traduci(WDCUService.currLanguage ?? "EN" , "UI_206")</a>
|
||||
<a id="resend-confirmation" asp-page="./ResendEmailConfirmation" class="text-decoration-none text-dark">Resend email confirmation</a>
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
@@ -76,4 +73,4 @@
|
||||
|
||||
@section Scripts {
|
||||
<partial name="_ValidationScriptsPartial" />
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,4 +12,5 @@
|
||||
}
|
||||
<li class="nav-item"><a class="nav-link @ManageNavPages.TwoFactorAuthenticationNavClass(ViewContext)" id="two-factor" asp-page="./TwoFactorAuthentication">Two-factor authentication</a></li>
|
||||
<li class="nav-item"><a class="nav-link @ManageNavPages.PersonalDataNavClass(ViewContext)" id="personal-data" asp-page="./PersonalData">Personal data</a></li>
|
||||
<li class="nav-item bg-dark rounded p-2"><a class="text-light text-decoration-none" id="personal-data" href="/WDC/UI/"><i class="fa-solid fa-arrow-left-long"></i> Back to Main page</a></li>
|
||||
</ul>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="col py-3 d-flex justify-content-center align-content-center flex-wrap">
|
||||
<div>
|
||||
<div class="d-flex justify-content-center">
|
||||
<img src="~/images/DCOlogo.png" style="height: 10rem; width: 15rem;" />
|
||||
<img src="~/images/DCALogo.png" style="height: 10rem; width: 15rem;" />
|
||||
</div>
|
||||
<div class="d-flex justify-content-center fw-bold fs-2 mb-5">Powered BY</div>
|
||||
<div class="d-flex justify-content-center">
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="col py-3 d-flex justify-content-center align-content-center flex-wrap">
|
||||
<div>
|
||||
<div class="d-flex justify-content-center">
|
||||
<img src="~/images/DCOlogo.png" style="height: 10rem; width: 15rem;" />
|
||||
<img src="~/images/DCALogo.png" style="height: 10rem; width: 15rem;" />
|
||||
</div>
|
||||
<div class="d-flex justify-content-center fw-bold fs-2 mb-5">Powered BY</div>
|
||||
<div class="d-flex justify-content-center">
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
<div>
|
||||
@if (B_doorOpUpd || true)
|
||||
{
|
||||
<button class="btn btn-success" @onclick="() => doSave()"><i class="fa-solid fa-rotate-right"></i></button>
|
||||
@*<button class="btn btn-info" @onclick="() => doRecalcAll()"><i class="fa-solid fa-window-restore"></i></button>*@
|
||||
<button class="btn btn-success" @onclick="() => refreshSVG()"><i class="fa-solid fa-rotate-right"></i></button>
|
||||
<a class="btn btn-warning" href="https://iis01.egalware.com/Test3D/Doors041122/EXB_0267100040/EXB_0267100040.html" target="_blank"><i class="fa-solid fa-cube"></i></a>
|
||||
@if (IsErr)
|
||||
{
|
||||
<button class="btn btn-danger" @onclick="() => toggleErrors(true)"><i class="fa-solid fa-triangle-exclamation"></i></button>
|
||||
@*<button class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#errListModal"><i class="fa-solid fa-triangle-exclamation"></i></button>*@
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace WebDoorCreator.UI.Components.Buttons
|
||||
{
|
||||
await Task.Delay(1);
|
||||
await QDataServ.ResetQueue();
|
||||
await doSave();
|
||||
await refreshSVG();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -92,11 +92,28 @@ namespace WebDoorCreator.UI.Components.Buttons
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
string vers = config.GetValue<string>("ConfDDF:VersNumber");
|
||||
bool remDoorOp = config.GetValue<bool>("ConfDDF:RemoveDoorOps");
|
||||
var headRows = config.GetSection("ConfDDF:Header").Get<List<string>>();
|
||||
var footRows = config.GetSection("ConfDDF:Footer").Get<List<string>>();
|
||||
currDdfConv = new WebDoorCreator.Data.DDF.Converter(vers, remDoorOp, headRows, footRows);
|
||||
WDCRService.EA_UpdDoorOp += WDCRService_EA_UpdDoorOp;
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
showModal = false;
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua salvataggio record e generazione DDF
|
||||
/// Effettua generazione DDF + refresh SVG
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task doSave()
|
||||
protected async Task refreshSVG()
|
||||
{
|
||||
List<DoorOpModel>? listOpAll = await WDCService.DoorOpGetByDoorId(idDoor);
|
||||
if (listOpAll != null)
|
||||
@@ -104,7 +121,7 @@ namespace WebDoorCreator.UI.Components.Buttons
|
||||
List<DoorOpModel> listOp = listOpAll.Where(x => x.userConfirm != "" && x.DtConfirm != null).ToList();
|
||||
if (listOp != null)
|
||||
{
|
||||
// chiamo metodo x avewre DDF serializzato
|
||||
// chiamo metodo x avere DDF serializzato
|
||||
var CurrentCompoOrder = await WDCService.ListValuesGetAll("*", "Hardware");
|
||||
if (CurrentCompoOrder != null)
|
||||
{
|
||||
@@ -134,23 +151,6 @@ namespace WebDoorCreator.UI.Components.Buttons
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
string vers = config.GetValue<string>("ConfDDF:VersNumber");
|
||||
bool remDoorOp = config.GetValue<bool>("ConfDDF:RemoveDoorOps");
|
||||
var headRows = config.GetSection("ConfDDF:Header").Get<List<string>>();
|
||||
var footRows = config.GetSection("ConfDDF:Footer").Get<List<string>>();
|
||||
currDdfConv = new WebDoorCreator.Data.DDF.Converter(vers, remDoorOp, headRows, footRows);
|
||||
WDCRService.EA_UpdDoorOp += WDCRService_EA_UpdDoorOp;
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
showModal = false;
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Properties
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<table class="table table-sm table-striped table-responsive-md border border-dark">
|
||||
|
||||
|
||||
<table class="table table-sm table-striped table-responsive-md">
|
||||
<thead>
|
||||
<tr class="bg-dark text-light">
|
||||
<th>
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
return;
|
||||
|
||||
await Task.Delay(1);
|
||||
NavManager.NavigateTo($"OrdersHomePage?idOrd={currOrderStatus.OrderId}");
|
||||
NavManager.NavigateTo($"OrdersHomePage?idOrd={currOrderStatus?.OrderId}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,14 +22,22 @@ else
|
||||
<div class="col-4 d-flex flex-wrap align-items-center">
|
||||
<span>@translate(item.Key)</span>
|
||||
</div>
|
||||
<select class="col-7" @bind="@currVal[item.Key]">
|
||||
@foreach (var param in comboSet(item.Key))
|
||||
{
|
||||
<option value="@param">
|
||||
@param
|
||||
</option>
|
||||
}
|
||||
</select>
|
||||
@if (orderStatus == 10 || orderStatus == 10000)
|
||||
{
|
||||
|
||||
<select class="col-7" @bind="@currVal[item.Key]">
|
||||
@foreach (var param in comboSet(item.Key))
|
||||
{
|
||||
<option value="@param">
|
||||
@param
|
||||
</option>
|
||||
}
|
||||
</select>
|
||||
}
|
||||
else
|
||||
{
|
||||
<input class="col-7" value="@currVal[item.Key]" disabled style="background: #BDC3C7;" />
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
@@ -38,7 +46,14 @@ else
|
||||
<div class="col-4 d-flex flex-wrap align-items-center">
|
||||
<span>@translate(item.Key)</span>
|
||||
</div>
|
||||
<input type="text" class="col-7" @bind="@currVal[item.Key]" />
|
||||
@if (orderStatus == 10 || orderStatus == 10000)
|
||||
{
|
||||
<input type="text" class="col-7" @bind="@currVal[item.Key]" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="text" class="col-7" value="@currVal[item.Key]" disabled style="background: #BDC3C7;" />
|
||||
}
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
|
||||
[CascadingParameter]
|
||||
public string userId { get; set; } = "";
|
||||
[CascadingParameter(Name = "orderStatus")]
|
||||
public int orderStatus { get; set; } = 10;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user