Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ad019b6fd | |||
| 4f862b2c8d |
+25
-35
@@ -1,10 +1,8 @@
|
||||
# Elenco ToDo
|
||||
|
||||
Di seguito l'elenco dei todo da completare
|
||||
|
||||
## Framework
|
||||
|
||||
Traduzione OVUNQUE x ogni termine/etichetta/button..
|
||||
Traduzione OVUNQUE x ogni termine/etichetta/button
|
||||
|
||||
## Pagine
|
||||
|
||||
@@ -19,60 +17,52 @@ Traduzione OVUNQUE x ogni termine/etichetta/button..
|
||||
### Orders Home page
|
||||
|
||||
Per completare
|
||||
- [x] aggiunta paginatore
|
||||
- [x] aggiunta stato ordine
|
||||
- [x] aggiunta filtri ricerca
|
||||
- <del>aggiunta paginatore</del>
|
||||
- <del>aggiunta stato ordine</del>
|
||||
- <del>aggiunta filtri ricerca
|
||||
- periodo da-a
|
||||
- search generico
|
||||
- stato ordine
|
||||
- [x] ordinamento
|
||||
- stato ordine</del>
|
||||
- <del>ordinamento</del>
|
||||
|
||||
### DCA Order Mans
|
||||
### DCA Order Man
|
||||
|
||||
FORSE la Orders home Page NON VA bene x gli utenti backoffice, oppure va estesa, perché x confermare quotazione, indicare avanzamento ordini gli operatori ABH/DCA devono avere una pagina operativa...
|
||||
|
||||
### OrderDetails
|
||||
|
||||
Per completare:
|
||||
|
||||
- [x] aggiunta button x il cambio stato da end-user
|
||||
- [x] sistemare con paginatore max 3 righe x 4 porte
|
||||
- [x] fix button verde add-new
|
||||
- [x] ombreggiatura blocco
|
||||
- <del>aggiunta button x il cambio stato da end-user</del>
|
||||
- <del>sistemare con paginatore max 3 righe x 4 porte</del>
|
||||
- <del>fix button verde add-new</del>
|
||||
|
||||
### DoorDefinition BaseParams
|
||||
- [x] conteggio num modifiche da salvare
|
||||
- [x] armonizzare il cancel/save nella pagina
|
||||
- [x] revisione testata fino al btn del salva generale
|
||||
- [x] sostituire il salva generale con 2 buttons:
|
||||
- <del>conteggio num modifiche da salvare</del>
|
||||
- <del>armonizzare il cancel/save nella pagina</del>
|
||||
- <del>revisione testata fino al btn del salva generale</del>
|
||||
- <del>sostituire il salva generale con 2 buttons:
|
||||
- salva, o meglio RECALC PNG = update PNG, potrebbe andare in automatico DOPO i vari SALVA nella pagina (opzione x auto-recalc?!?)
|
||||
- get 3D obj (in new window/tab)
|
||||
|
||||
- [x] delete singola porta da ordine
|
||||
- [x] navigazione in ritorno come da FIGMA in HwNewInst
|
||||
- [x] refresh conteggi su approvazione
|
||||
- [x] conteggio istanze in aggiunta HW
|
||||
- get 3D obj (in new window/tab)</del>
|
||||
|
||||
### DoorDefinition Hardware
|
||||
|
||||
Sistemare:
|
||||
- [x] da implementare davvero lettura pdf (da cartella pdf di esempi)
|
||||
- [x] fix cancel/save: globale x Hardware oppure x ognuno con icona?
|
||||
- [ ] verificare perché NON si aggiorna al salvataggio pagina dei 18 hw
|
||||
- [x] mancano il totale componenti x ogni hw attivato
|
||||
- <del>da implementare davvero lettura pdf (da cartella pdf di esempi)</del>
|
||||
- <del>fix cancel/save: globale x Hardware oppure x ognuno con icona?</del>
|
||||
- verificare perché NON si aggiorna al salvataggio pagina dei 18 hw
|
||||
- <del>mancano il totale componenti x ogni hw attivato</del>
|
||||
|
||||
#### Report
|
||||
|
||||
- [x] Va inserita una lista dei componenti + elenco quote.
|
||||
- [ ] Va pensato esportabile in pdf, comprensivo di "check pdf fatto da tizio alle ..."
|
||||
<del>Va inserita una lista dei componenti + elenco quote.</del>
|
||||
Va pensato esportabile in pdf, comprensivo di "check pdf fatto da tizio alle ..."
|
||||
|
||||
|
||||
## Componenti
|
||||
|
||||
|
||||
### Top
|
||||
|
||||
Da sistemare
|
||||
|
||||
- [x] btn effettivi
|
||||
- [x] dinamico da user-role?
|
||||
- [x] fix responsive
|
||||
- <del>btn effettivi</del>
|
||||
- <del>dinamico da user-role?</del>
|
||||
- <del>fix responsive</del>
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -1,29 +0,0 @@
|
||||
<body>
|
||||
<i>WebDoorCreator - Egalware</i>
|
||||
<h4>Version: {{CURRENT-REL}}</h4>
|
||||
<br /> Release note:
|
||||
<ul>
|
||||
<li>
|
||||
<b>Last Changes:</b>
|
||||
<ul>{{LAST-CHANGES}}</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.0.* →</b>
|
||||
<ul>
|
||||
<li>First CORE UI</li>
|
||||
<li>First CORE API rest services</li>
|
||||
<li>integration with EgtEngine server</li>
|
||||
<li>Release dotnet6</li>
|
||||
<li>EFCore Engine</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div>
|
||||
<div style="float: left;">
|
||||
<img src="LogoEgw.png" />
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<a href="https://www.egalware.net/" target="_blank">© Egalware 2022+</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
@@ -1,29 +0,0 @@
|
||||
<body>
|
||||
<i>WebDoorCreator - Egalware</i>
|
||||
<h4>Version: 0.9.2305.2619</h4>
|
||||
<br /> Release note:
|
||||
<ul>
|
||||
<li>
|
||||
<b>Last Changes:</b>
|
||||
<ul>{{LAST-CHANGES}}</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.0.* →</b>
|
||||
<ul>
|
||||
<li>First CORE UI</li>
|
||||
<li>First CORE API rest services</li>
|
||||
<li>integration with EgtEngine server</li>
|
||||
<li>Release dotnet6</li>
|
||||
<li>EFCore Engine</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div>
|
||||
<div style="float: left;">
|
||||
<img src="LogoEgw.png" />
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<a href="https://www.egalware.net/" target="_blank">© Egalware 2022+</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.0 KiB |
@@ -1 +0,0 @@
|
||||
0.9.
|
||||
@@ -1 +0,0 @@
|
||||
0.9.2305.2619
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.0.0.0</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/{{DIRNAME}}/{{BRANCHNAME}}/{{PACKNAME}}.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/{{DIRNAME}}/{{BRANCHNAME}}/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
</item>
|
||||
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>0.9.2305.2619</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>
|
||||
</item>
|
||||
@@ -1,75 +0,0 @@
|
||||
// See https://aka.ms/new-console-template for more information
|
||||
using System.Diagnostics;
|
||||
|
||||
int lineCount = 0;
|
||||
|
||||
|
||||
void OutputHandler(object sender, DataReceivedEventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(e.Data))
|
||||
{
|
||||
Console.WriteLine($"RIPOSTA PROCESSO [{lineCount}] - {e.Data}");
|
||||
if (e.Data == "SUCCESS")
|
||||
{
|
||||
lineCount += 1;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var domanda = "Sai chi ti saluta tantissimo?";
|
||||
|
||||
Console.WriteLine(domanda);
|
||||
|
||||
// Create a new process object
|
||||
Process p = new Process();
|
||||
|
||||
// Specify the file name of the external exe
|
||||
p.StartInfo.FileName = @"C:\Temp\TestEcho.bat";
|
||||
p.StartInfo.UseShellExecute = false;
|
||||
p.StartInfo.RedirectStandardOutput = true;
|
||||
p.StartInfo.RedirectStandardInput = true;
|
||||
//var stdIn = p.StandardInput;
|
||||
p.OutputDataReceived += (s, e) => OutputHandler(s, e);
|
||||
|
||||
// Optionally, specify any arguments for the exe
|
||||
//p.StartInfo.Arguments = domanda;
|
||||
|
||||
// Start the process
|
||||
p.Start();
|
||||
|
||||
p.StandardInput.WriteLine(domanda);
|
||||
|
||||
p.BeginOutputReadLine();
|
||||
|
||||
while (!p.HasExited)
|
||||
{
|
||||
//Console.WriteLine(output.ToString());
|
||||
Thread.Sleep(500);
|
||||
//var inVar = Console.ReadLine();
|
||||
//// mando nuovo input...
|
||||
//p.StandardInput.WriteLine(domanda);
|
||||
Thread.Sleep(500);
|
||||
// mando nuovo input...
|
||||
p.StandardInput.WriteLine(domanda);
|
||||
Thread.Sleep(500);
|
||||
// mando nuovo input...
|
||||
p.StandardInput.WriteLine(domanda);
|
||||
Thread.Sleep(500);
|
||||
// mando nuovo input...
|
||||
p.StandardInput.WriteLine(domanda);
|
||||
Thread.Sleep(500);
|
||||
// mando nuovo input...
|
||||
p.StandardInput.WriteLine("escape");
|
||||
}
|
||||
|
||||
|
||||
// Optionally, wait for the process to exit
|
||||
p.WaitForExit();
|
||||
|
||||
|
||||
p.Close();
|
||||
|
||||
Console.WriteLine("Ho finito...");
|
||||
Console.WriteLine("...press return to close");
|
||||
|
||||
Console.ReadLine();
|
||||
@@ -1,10 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,86 +0,0 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NLog;
|
||||
using Svg;
|
||||
using System.Drawing;
|
||||
using WebDoorCreator.Data.Services;
|
||||
|
||||
namespace WebDoorCreator.API.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class DoorImageController : ControllerBase
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public DoorImageController(IConfiguration configuration, QueueDataService DataService)
|
||||
{
|
||||
Log.Info("Starting DoorImageController");
|
||||
_configuration = configuration;
|
||||
QDataServ = DataService;
|
||||
Log.Info("Avviato DoorImageController");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
// GET: api/Alive
|
||||
[HttpGet]
|
||||
public string Get()
|
||||
{
|
||||
return "OK";
|
||||
}
|
||||
|
||||
[HttpGet("GetImage.png")]
|
||||
public async Task<IActionResult> GetImagePng(int DoorId)
|
||||
{
|
||||
byte[] result = new byte[0];
|
||||
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);
|
||||
}
|
||||
return File(result, "image/png");
|
||||
}
|
||||
|
||||
[HttpGet("GetImage.svg")]
|
||||
public async Task<IActionResult> GetImageSvg(int DoorId)
|
||||
{
|
||||
string svgContent = await QDataServ.DoorGetLastSvg(DoorId);
|
||||
var result = System.Text.Encoding.UTF8.GetBytes(svgContent);
|
||||
return File(result, "image/svg+xml");
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration = null!;
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private QueueDataService QDataServ { get; set; } = null!;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#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
|
||||
}
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NLog;
|
||||
using WebDoorCreator.Data.DTO;
|
||||
using WebDoorCreator.Data.Services;
|
||||
|
||||
namespace WebDoorCreator.API.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class OrderController : ControllerBase
|
||||
{
|
||||
public OrderController(IConfiguration configuration, WebDoorCreatorService DataService)
|
||||
{
|
||||
Log.Info("Starting OrderController");
|
||||
_configuration = configuration;
|
||||
WDCService = DataService;
|
||||
Log.Info("Avviato OrderController");
|
||||
}
|
||||
/// <summary>
|
||||
/// GET: api/Order
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public string Get()
|
||||
{
|
||||
return "OK";
|
||||
}
|
||||
/// <summary>
|
||||
/// GET: api/Order/GetCurrent
|
||||
/// Recupera ordini degli ultimi 6 mesi dato cliente e stato
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("GetCurrent")]
|
||||
public async Task<List<int>> GetCurrent(int id, int ordStatus)
|
||||
{
|
||||
List<int> answ = new List<int>();
|
||||
DateTime dtEnd = DateTime.Now;
|
||||
DateTime dtStart = dtEnd.AddMonths(-1);
|
||||
var rawData = await WDCService.OrderStatusGetFilt(id, ordStatus, dtStart, dtEnd);
|
||||
if (rawData != null)
|
||||
{
|
||||
answ = rawData.Select(x => x.OrderId).ToList();
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Order detail for cost evaluation
|
||||
/// </summary>
|
||||
/// <param name="OrderId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("OrderDetail")]
|
||||
public async Task<OrderDetailsDTO> OrderDetail(int OrderId)
|
||||
{
|
||||
OrderDetailsDTO answ = new OrderDetailsDTO()
|
||||
{
|
||||
OrderId = OrderId
|
||||
};
|
||||
// recupero info ordine
|
||||
var rawOrder = await WDCService.OrderGetByKey(OrderId);
|
||||
if (rawOrder != null)
|
||||
{
|
||||
answ.OrderDescript = rawOrder.OrderDescript;
|
||||
answ.OrderExtCode = rawOrder.OrderExtCode;
|
||||
// recupero info customer
|
||||
|
||||
// recuper elenco porte...
|
||||
//answ. = rawOrder.OrderDescript;
|
||||
}
|
||||
// popolo con dati specifica...
|
||||
return answ;
|
||||
}
|
||||
|
||||
private static IConfiguration _configuration = null!;
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private WebDoorCreatorService WDCService { get; set; } = null!;
|
||||
}
|
||||
}
|
||||
@@ -81,19 +81,6 @@ namespace WebDoorCreator.API.Controllers
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset della coda di processing x evitare condizioni di "stuck in calc"
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("ResetQueueProcessing")]
|
||||
public async Task<string> ResetQueueProcessing()
|
||||
{
|
||||
string answ = "NA";
|
||||
bool fatto = await QDataServ.ResetQueueProcessing();
|
||||
answ = fatto ? "OK" : "NO";
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invio elenco risultati elaborazioni (modalità boolean di esecuzione corretta)
|
||||
/// </summary>
|
||||
|
||||
@@ -1,155 +0,0 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||
using Microsoft.Reporting.NETCore;
|
||||
using NLog;
|
||||
using System.Data;
|
||||
using ToDataTable;
|
||||
using WebDoorCreator.Core.ReportViewer;
|
||||
using WebDoorCreator.Data.Services;
|
||||
|
||||
namespace WebDoorCreator.API.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class ReportController : ControllerBase
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public ReportController(IConfiguration configuration, WebDoorCreatorService DataService)
|
||||
{
|
||||
Log.Info("Starting ReportController");
|
||||
_configuration = configuration;
|
||||
WDCService = DataService;
|
||||
Log.Info("Avviato ReportController");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
// GET: api/Alive
|
||||
[HttpGet]
|
||||
public string Get()
|
||||
{
|
||||
return "OK";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce report dato ordine e formato
|
||||
/// </summary>
|
||||
/// <param name="OrderId">ID univoco ordine</param>
|
||||
/// <param name="Format">Formato: PDF/HTML/DOCX/XLSX</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("GetOrderReport")]
|
||||
public async Task<IActionResult> GetOrderReport(int OrderId, string Format)
|
||||
{
|
||||
// dato il servizio è impostato il file rdlc e la struttura data DS da passare
|
||||
await Task.Delay(1);
|
||||
// inizializzo parametri report di default
|
||||
Core.ReportViewer.Report.RenderParams currParams = new Core.ReportViewer.Report.RenderParams(Format);
|
||||
currParams.FileName= $"DCA-Order-{OrderId:00000000}";
|
||||
|
||||
// restituisco oggetto ReportOrder specifico
|
||||
return await OrderReportGet(OrderId, currParams);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration = null!;
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private WebDoorCreatorService WDCService { get; set; } = null!;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Restituisce filestream del report DEMO
|
||||
/// </summary>
|
||||
/// <param name="FileName">Nome file desiderato x download</param>
|
||||
/// <param name="RenderFormat"></param>
|
||||
/// <param name="FileExt"></param>
|
||||
/// <param name="MimeType"></param>
|
||||
/// <returns></returns>
|
||||
private IActionResult ReportDemoGet(int OrderId, Core.ReportViewer.Report.RenderParams CurrParams)
|
||||
{
|
||||
using (var report = new LocalReport())
|
||||
{
|
||||
// setup parametri
|
||||
List<ReportParameter> RepParams = new List<ReportParameter>();
|
||||
RepParams.Add(new ReportParameter("Title", "Invoice 4/2020"));
|
||||
// setup DsReport
|
||||
Dictionary<string, DataTable> DsDict = new Dictionary<string, DataTable>();
|
||||
Random rnd = new Random();
|
||||
decimal WidgetPrice = 204.99m;
|
||||
decimal GizmoPrice = 2.41m;
|
||||
var items = new[] {
|
||||
new ReportItem { Description = "Widget 6000", Price = WidgetPrice, Qty = rnd.Next(1,5) },
|
||||
new ReportItem { Description = "Gizmo MAX", Price = GizmoPrice, Qty = rnd.Next(10,50) },
|
||||
new ReportItem { Description = "Pippo", Price = 1.2m, Qty = rnd.Next(3,9) },
|
||||
new ReportItem { Description = "Paperino", Price = 1.74m, Qty = rnd.Next(5,15) }
|
||||
}.ToList();
|
||||
var totaQty = items.Sum(x => x.Qty);
|
||||
var avgPrice = items.Sum(x => x.Qty * x.Price) / totaQty;
|
||||
items.Add(new ReportItem() { Description = "Total", Qty = totaQty, Price = Math.Round(avgPrice, 2) });
|
||||
|
||||
DataTable tabDati = items.ToDataTable();
|
||||
tabDati.TableName = "Items";
|
||||
// aggiungo dizionario
|
||||
DsDict.Add("Items", tabDati);
|
||||
|
||||
// carico dati nel report...
|
||||
Core.ReportViewer.Report.Load(report, "Report.rdlc", RepParams, DsDict);
|
||||
var rawData = report.Render(CurrParams.RenderFormat);
|
||||
return File(rawData, CurrParams.MimeType, $"{CurrParams.FileName}.{CurrParams.Extension}");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/// <summary>
|
||||
/// Restituisce filestream del report richiesto
|
||||
/// </summary>
|
||||
/// <param name="OrderId">ID Ordine</param>
|
||||
/// <param name="CurrParams">Parametri rendering report</param>
|
||||
/// <returns></returns>
|
||||
private async Task<IActionResult> OrderReportGet(int OrderId, Core.ReportViewer.Report.RenderParams CurrParams)
|
||||
{
|
||||
using (var report = new LocalReport())
|
||||
{
|
||||
// setup parametri
|
||||
List<ReportParameter> RepParams = new List<ReportParameter>();
|
||||
RepParams.Add(new ReportParameter("OrderID", $"{OrderId}"));
|
||||
// setup DsReport
|
||||
Dictionary<string, DataTable> DsDict = new Dictionary<string, DataTable>();
|
||||
// recupero tab dati config...
|
||||
var confList = await WDCService.ConfigGetAll();
|
||||
DataTable tabDatiConf = confList.ToDataTable();
|
||||
tabDatiConf.TableName = "DataSetConfig";
|
||||
// aggiungo a dizionario
|
||||
DsDict.Add("DataSetConfig", tabDatiConf);
|
||||
|
||||
// recupero dati veri del report...
|
||||
var repDetailData = await WDCService.PreRepOrderGetByKey(OrderId);
|
||||
DataTable tabDati = repDetailData.ToDataTable();
|
||||
tabDati.TableName = "DataSetOrderReportExpl";
|
||||
// aggiungo dizionario
|
||||
DsDict.Add("DataSetOrderReportExpl", tabDati);
|
||||
|
||||
// carico dati nel report...
|
||||
Core.ReportViewer.Report.Load(report, "ReportOrder.rdlc", RepParams, DsDict);
|
||||
var rawData = report.Render(CurrParams.RenderFormat);
|
||||
return File(rawData, CurrParams.MimeType, $"{CurrParams.FileName}.{CurrParams.Extension}");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -57,7 +57,6 @@ builder.Services.AddStackExchangeRedisExtensions<NewtonsoftSerializer>((options)
|
||||
});
|
||||
|
||||
builder.Services.AddSingleton<QueueDataService>();
|
||||
builder.Services.AddSingleton<WebDoorCreatorService>();
|
||||
builder.Services.AddSingleton<IConnectionMultiplexer>(redisMultiplexer);
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
@@ -8,12 +8,12 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish>https://seriate.egalware.com/WDC/SRV/swagger/index.html</SiteUrlToLaunchAfterPublish>
|
||||
<SiteUrlToLaunchAfterPublish>https://iis04.egalware.com/WDC/SRV/swagger/index.html</SiteUrlToLaunchAfterPublish>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<ProjectGuid>c2109e71-4eae-4167-9052-175123ccc2bc</ProjectGuid>
|
||||
<SelfContained>false</SelfContained>
|
||||
<MSDeployServiceURL>https://iis04.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
|
||||
<DeployIisAppPath>seriate.egalware.com/WDC/SRV</DeployIisAppPath>
|
||||
<DeployIisAppPath>Default Web Site/WDC/SRV</DeployIisAppPath>
|
||||
<RemoteSitePhysicalPath />
|
||||
<SkipExtraFilesOnServer>false</SkipExtraFilesOnServer>
|
||||
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
|
||||
|
||||
@@ -7,7 +7,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
|
||||
<PropertyGroup>
|
||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAk75miMJLMkCTEelQutKpbwAAAAACAAAAAAADZgAAwAAAABAAAAB43BVhUmznhAu3pUfV1IfOAAAAAASAAACgAAAAEAAAAEV8hgbujDFfsMjS77NS2oYYAAAAUHPGFaVWgRqQPDU4wk5KGABmVHKko4/9FAAAANtaROBOcPHljx4RnmQHj5aHdtYk</EncryptedPassword>
|
||||
<History>True|2023-05-22T13:37:00.8611764Z;True|2023-05-11T17:35:09.5858697+02:00;True|2022-01-27T10:34:09.2346456+01:00;True|2022-01-27T10:13:36.3080675+01:00;True|2022-01-27T10:05:45.6649507+01:00;True|2022-01-26T14:34:16.5263189+01:00;True|2022-01-26T13:04:22.2336648+01:00;False|2022-01-26T13:04:06.0677616+01:00;True|2021-11-08T09:03:37.7855257+01:00;True|2021-11-08T09:03:34.8263479+01:00;True|2021-11-08T09:03:31.8889390+01:00;True|2021-10-29T16:19:33.6539408+02:00;True|2021-10-29T16:19:28.2082360+02:00;True|2021-10-26T16:12:11.7740950+02:00;True|2021-10-26T16:11:56.2014641+02:00;True|2021-10-26T16:11:22.2897842+02:00;False|2021-10-26T16:10:58.3733037+02:00;False|2021-10-26T16:10:29.4793991+02:00;True|2021-10-21T17:35:11.9761128+02:00;True|2021-10-18T20:22:00.9305399+02:00;True|2021-10-18T18:32:29.4558070+02:00;True|2021-10-18T18:32:22.8950294+02:00;True|2021-10-18T18:16:13.7563877+02:00;True|2021-10-18T18:15:48.5678387+02:00;True|2021-10-18T12:45:45.7228681+02:00;True|2021-10-18T12:14:22.3221605+02:00;True|2021-10-18T12:14:15.7373530+02:00;True|2021-10-18T12:10:43.8607301+02:00;</History>
|
||||
<History>True|2023-05-11T15:35:09.5858697Z;True|2022-01-27T10:34:09.2346456+01:00;True|2022-01-27T10:13:36.3080675+01:00;True|2022-01-27T10:05:45.6649507+01:00;True|2022-01-26T14:34:16.5263189+01:00;True|2022-01-26T13:04:22.2336648+01:00;False|2022-01-26T13:04:06.0677616+01:00;True|2021-11-08T09:03:37.7855257+01:00;True|2021-11-08T09:03:34.8263479+01:00;True|2021-11-08T09:03:31.8889390+01:00;True|2021-10-29T16:19:33.6539408+02:00;True|2021-10-29T16:19:28.2082360+02:00;True|2021-10-26T16:12:11.7740950+02:00;True|2021-10-26T16:11:56.2014641+02:00;True|2021-10-26T16:11:22.2897842+02:00;False|2021-10-26T16:10:58.3733037+02:00;False|2021-10-26T16:10:29.4793991+02:00;True|2021-10-21T17:35:11.9761128+02:00;True|2021-10-18T20:22:00.9305399+02:00;True|2021-10-18T18:32:29.4558070+02:00;True|2021-10-18T18:32:22.8950294+02:00;True|2021-10-18T18:16:13.7563877+02:00;True|2021-10-18T18:15:48.5678387+02:00;True|2021-10-18T12:45:45.7228681+02:00;True|2021-10-18T12:14:22.3221605+02:00;True|2021-10-18T12:14:15.7373530+02:00;True|2021-10-18T12:10:43.8607301+02:00;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,447 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||
<AutoRefresh>0</AutoRefresh>
|
||||
<DataSources>
|
||||
<DataSource Name="LocalSource">
|
||||
<ConnectionProperties>
|
||||
<DataProvider>System.Data.DataSet</DataProvider>
|
||||
<ConnectString>/* Local Connection */</ConnectString>
|
||||
</ConnectionProperties>
|
||||
<rd:DataSourceID>bd60bef3-b3d9-477e-9052-ab58c6f1ec86</rd:DataSourceID>
|
||||
</DataSource>
|
||||
</DataSources>
|
||||
<DataSets>
|
||||
<DataSet Name="Items">
|
||||
<Query>
|
||||
<DataSourceName>LocalSource</DataSourceName>
|
||||
<CommandText>/* Local Query */</CommandText>
|
||||
</Query>
|
||||
<Fields>
|
||||
<Field Name="Description">
|
||||
<DataField>Description</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Price">
|
||||
<DataField>Price</DataField>
|
||||
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Qty">
|
||||
<DataField>Qty</DataField>
|
||||
<rd:TypeName>System.Int32</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Total">
|
||||
<DataField>Total</DataField>
|
||||
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>LocalSource</rd:DataSetName>
|
||||
<rd:TableName>Items</rd:TableName>
|
||||
<rd:ObjectDataSourceType>ReportViewerCore.ReportItem</rd:ObjectDataSourceType>
|
||||
</rd:DataSetInfo>
|
||||
</DataSet>
|
||||
</DataSets>
|
||||
<ReportSections>
|
||||
<ReportSection>
|
||||
<Body>
|
||||
<ReportItems>
|
||||
<Tablix Name="Tablix1">
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>8.31785cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.51905cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.51905cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.51905cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
<TablixRow>
|
||||
<Height>0.67938cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Description</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox3">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Price</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox5">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Qty</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox2">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Total</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.67938cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Description">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Description.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Description</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Price">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Price.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Price</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Qty">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Qty.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Qty</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Total">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Total.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Total</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
</TablixRows>
|
||||
</TablixBody>
|
||||
<TablixColumnHierarchy>
|
||||
<TablixMembers>
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
<TablixMembers>
|
||||
<TablixMember>
|
||||
<KeepWithGroup>After</KeepWithGroup>
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<Group Name="Details" />
|
||||
</TablixMember>
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>Items</DataSetName>
|
||||
<Top>2.85433cm</Top>
|
||||
<Left>0.3175cm</Left>
|
||||
<Height>1.35875cm</Height>
|
||||
<Width>15.875cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Tablix>
|
||||
<Textbox Name="Textbox6">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Title.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontSize>26pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox6</rd:DefaultName>
|
||||
<Top>0.26141cm</Top>
|
||||
<Left>0.3175cm</Left>
|
||||
<Height>1.79062cm</Height>
|
||||
<Width>15.875cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>2in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>6.5in</Width>
|
||||
<Page>
|
||||
<PageHeight>29.7cm</PageHeight>
|
||||
<PageWidth>21cm</PageWidth>
|
||||
<LeftMargin>2cm</LeftMargin>
|
||||
<RightMargin>2cm</RightMargin>
|
||||
<TopMargin>2cm</TopMargin>
|
||||
<BottomMargin>2cm</BottomMargin>
|
||||
<ColumnSpacing>0.13cm</ColumnSpacing>
|
||||
<Style />
|
||||
</Page>
|
||||
</ReportSection>
|
||||
</ReportSections>
|
||||
<ReportParameters>
|
||||
<ReportParameter Name="Title">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<ReportParametersLayout>
|
||||
<GridLayoutDefinition>
|
||||
<NumberOfColumns>4</NumberOfColumns>
|
||||
<NumberOfRows>2</NumberOfRows>
|
||||
<CellDefinitions>
|
||||
<CellDefinition>
|
||||
<ColumnIndex>0</ColumnIndex>
|
||||
<RowIndex>0</RowIndex>
|
||||
<ParameterName>Title</ParameterName>
|
||||
</CellDefinition>
|
||||
</CellDefinitions>
|
||||
</GridLayoutDefinition>
|
||||
</ReportParametersLayout>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
<rd:ReportID>156b21d2-9542-4902-99ef-7ec823774bb2</rd:ReportID>
|
||||
</Report>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,7 +24,6 @@
|
||||
<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" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -33,15 +32,4 @@
|
||||
<ProjectReference Include="..\WebDoorCreator.Data\WebDoorCreator.Data.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Reports\Report.rdlc">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Reports\ReportOrder.rdlc">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\post-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
@@ -26,8 +26,5 @@
|
||||
"Admin": "samuele@steamware.net",
|
||||
"ProjCheck": "samuele.locatelli@egalware.com,mara.baroni@egalware.com",
|
||||
"TimbCheck": "samuele.locatelli@egalware.com,mara.baroni@egalware.com"
|
||||
},
|
||||
"RumtimeOpt": {
|
||||
"VetoRemoveProcessing": 5
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
param([string]$ProjectDir, [string]$ProjectPath);
|
||||
|
||||
$MainVers="..\Resources\MainVers.txt"
|
||||
$FileVers="..\Resources\VersNum.txt"
|
||||
$FileManIn="..\Resources\manifest-original.xml"
|
||||
$FileManOut="..\Resources\manifest.xml"
|
||||
$FileCLogIn="..\Resources\ChangeLog-original.html"
|
||||
$FileCLogOut="..\Resources\ChangeLog.html"
|
||||
$MajMin=Get-Content $MainVers #"0.9."
|
||||
$currentDate = get-date -format yyMM;
|
||||
$currentTime = get-date -format ddHH;
|
||||
$find = "<Version>(.|\n)*?</Version>";
|
||||
$currRelNum=$MajMin + $currentDate +"." + $currentTime
|
||||
$replace = "<Version>" + $MajMin + $currentDate +"." + $currentTime + "</Version>";
|
||||
$csproj = Get-Content $ProjectPath
|
||||
$csprojUpdated = $csproj -replace $find, $replace
|
||||
|
||||
Set-Content -Path $ProjectPath -Value $csprojUpdated
|
||||
Set-Content -Path $FileVers -Value $currRelNum
|
||||
|
||||
# replace x manifest
|
||||
$manData = Get-Content $FileManIn
|
||||
$manData = $manData -replace "1.0.0.0", $currRelNum
|
||||
$manData = $manData -replace "{{DIRNAME}}", "WDC"
|
||||
$manData = $manData -replace "{{BRANCHNAME}}", "stable"
|
||||
$manData = $manData -replace "{{PACKNAME}}", "WDC.API"
|
||||
Set-Content -Path $FileManOut -Value $manData
|
||||
|
||||
# replace x ChangeLog
|
||||
$clogData = Get-Content $FileCLogIn
|
||||
$clogData = $clogData -replace "{{CURRENT-REL}}", $currRelNum
|
||||
Set-Content -Path $FileCLogOut -Value $clogData
|
||||
@@ -1,23 +0,0 @@
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="0 0 210 297"
|
||||
version="1.1"
|
||||
id="svg41"
|
||||
inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"
|
||||
sodipodi:docname="Missing.svg">
|
||||
<g
|
||||
inkscape:label="Livello 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<path
|
||||
style="fill:#454c55;stroke:none;stroke-width:0.460184"
|
||||
d="M 67.284871,27.840094 C 54.209292,29.845169 46.354698,40.041553 37.483749,49.537223 30.786635,56.705844 22.139596,63.788212 18.364192,73.342671 13.425835,85.840068 15.688899,101.95827 15.688899,115.24029 v 83.31911 42.37372 c 0,7.58822 -0.702068,15.87777 3.692177,22.37522 8.317054,12.29838 27.557626,8.09577 39.897523,8.09577 h 79.617931 c 12.51202,0 26.8348,2.07774 39.14178,-0.29328 20.95597,-4.03694 15.56774,-34.14276 15.56774,-50.65042 V 90.482618 57.154964 c 0,-6.779801 0.48839,-13.912333 -2.82399,-19.996591 C 184.24273,25.145859 170.34873,27.636197 159.357,27.636197 H 97.975587 c -9.965149,0 -20.828764,-1.308344 -30.690716,0.203897 M 65.950496,40.491145 V 68.58159 c 0,3.334243 0.635156,8.230973 -1.880591,10.762918 -2.011793,2.023943 -4.923857,1.615918 -7.460068,1.615918 -5.485632,0 -10.971706,-0.02807 -16.457327,3.51e-4 -3.463614,0.01808 -8.012815,1.523078 -7.777343,6.188941 0.285906,5.66571 6.133826,5.71331 10.001297,5.71331 9.131159,0 21.653851,2.511 28.904873,-4.80536 C 76.981364,82.306261 76.62552,75.34031 76.62552,67.629244 V 39.538921 h 78.72834 c 6.51178,0 22.20629,-3.148174 26.00571,3.816212 2.13101,3.906515 1.12667,9.914114 1.12667,14.275944 v 32.375431 120.931732 37.1365 c 0,5.08581 -0.86957,10.76627 -6.6719,11.37664 -12.057,1.26788 -24.7972,0.0499 -36.91781,0.0499 H 64.616109 38.818123 c -3.881264,0 -8.102032,0.52467 -10.615648,-3.37704 -2.606754,-4.04646 -1.39376,-10.98766 -1.39376,-15.66733 V 202.84434 121.42967 94.767548 c 0,-5.82043 -0.394349,-11.702756 1.918165,-17.139934 2.59243,-6.095472 7.972696,-10.587133 12.315209,-15.235482 6.361872,-6.809749 15.302659,-20.997658 24.908407,-21.901027 M 82.852622,149.04404 v -0.47611 c 2.228416,-1.68019 4.853137,-4.06073 6.164829,-6.66553 2.329384,-4.62682 -1.57368,-9.44601 -6.164829,-8.43713 -3.058838,0.67179 -5.856141,4.41734 -7.561479,7.00881 -2.09231,-2.23963 -4.330057,-5.57095 -7.116681,-6.80503 -4.373656,-1.9373 -8.256257,2.08393 -7.460067,6.80503 0.576892,3.41988 5.655983,5.35289 5.655983,8.56996 0,4.59303 -10.127493,8.24193 -4.321609,14.09569 5.910848,5.95899 8.604069,-4.54684 13.241932,-4.54684 3.099767,0 4.747268,5.79806 8.451512,6.10419 3.582359,0.29567 6.831128,-3.17374 5.852131,-7.08307 -0.79484,-3.17279 -4.32427,-6.70886 -6.741722,-8.56997 M 122.88576,133.6857 c -9.48787,3.93362 2.64207,11.32569 2.64207,15.35834 0,2.57527 -4.14146,4.93963 -5.25034,7.14164 -1.98378,3.9398 0.69032,8.54283 4.83046,8.52854 2.37029,-0.008 4.14858,-1.65495 5.7823,-3.31039 0.99056,-1.00411 2.41256,-3.18612 4.00314,-2.73905 3.99602,1.12314 5.45272,7.87723 10.67459,5.7376 5.41757,-2.22011 3.38931,-8.28002 0.43857,-11.54947 -0.94741,-1.04934 -2.98768,-2.58336 -2.57001,-4.28498 0.66941,-2.72953 4.0823,-4.4221 5.14402,-7.14163 1.96465,-5.03392 -2.79463,-10.02972 -7.46007,-7.53253 -2.13189,1.14124 -4.21841,5.60143 -6.6719,5.60143 -4.45949,0 -5.69601,-8.24194 -11.56283,-5.8095 m -24.46539,56.98172 c -11.577511,1.64734 -22.445577,5.80805 -31.580295,13.80716 -3.447589,3.019 -10.885415,12.52215 -1.77917,14.39182 5.186728,1.06506 11.254602,-7.31684 15.567751,-9.8983 9.005719,-5.39003 19.519294,-7.81533 29.801124,-6.46365 7.65399,1.00649 15.44988,3.90551 21.79485,8.6428 3.52988,2.63526 7.64111,8.85895 12.45376,7.69677 3.41067,-0.82366 5.02037,-5.08246 3.47917,-8.3819 -1.80408,-3.86172 -6.4366,-7.01927 -9.70583,-9.35316 -11.39247,-8.13337 -26.34952,-12.38788 -40.03136,-10.44154 z"
|
||||
id="path22" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 4.0 KiB |
@@ -1,20 +0,0 @@
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="0 0 210 297"
|
||||
version="1.1"
|
||||
id="svg41"
|
||||
inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"
|
||||
sodipodi:docname="MissingOrange.svg">
|
||||
<g id="layer1">
|
||||
<path
|
||||
style="fill:#FD8C00;stroke:none;stroke-width:0.460184"
|
||||
d="M 67.284871,27.840094 C 54.209292,29.845169 46.354698,40.041553 37.483749,49.537223 30.786635,56.705844 22.139596,63.788212 18.364192,73.342671 13.425835,85.840068 15.688899,101.95827 15.688899,115.24029 v 83.31911 42.37372 c 0,7.58822 -0.702068,15.87777 3.692177,22.37522 8.317054,12.29838 27.557626,8.09577 39.897523,8.09577 h 79.617931 c 12.51202,0 26.8348,2.07774 39.14178,-0.29328 20.95597,-4.03694 15.56774,-34.14276 15.56774,-50.65042 V 90.482618 57.154964 c 0,-6.779801 0.48839,-13.912333 -2.82399,-19.996591 C 184.24273,25.145859 170.34873,27.636197 159.357,27.636197 H 97.975587 c -9.965149,0 -20.828764,-1.308344 -30.690716,0.203897 M 65.950496,40.491145 V 68.58159 c 0,3.334243 0.635156,8.230973 -1.880591,10.762918 -2.011793,2.023943 -4.923857,1.615918 -7.460068,1.615918 -5.485632,0 -10.971706,-0.02807 -16.457327,3.51e-4 -3.463614,0.01808 -8.012815,1.523078 -7.777343,6.188941 0.285906,5.66571 6.133826,5.71331 10.001297,5.71331 9.131159,0 21.653851,2.511 28.904873,-4.80536 C 76.981364,82.306261 76.62552,75.34031 76.62552,67.629244 V 39.538921 h 78.72834 c 6.51178,0 22.20629,-3.148174 26.00571,3.816212 2.13101,3.906515 1.12667,9.914114 1.12667,14.275944 v 32.375431 120.931732 37.1365 c 0,5.08581 -0.86957,10.76627 -6.6719,11.37664 -12.057,1.26788 -24.7972,0.0499 -36.91781,0.0499 H 64.616109 38.818123 c -3.881264,0 -8.102032,0.52467 -10.615648,-3.37704 -2.606754,-4.04646 -1.39376,-10.98766 -1.39376,-15.66733 V 202.84434 121.42967 94.767548 c 0,-5.82043 -0.394349,-11.702756 1.918165,-17.139934 2.59243,-6.095472 7.972696,-10.587133 12.315209,-15.235482 6.361872,-6.809749 15.302659,-20.997658 24.908407,-21.901027 M 82.852622,149.04404 v -0.47611 c 2.228416,-1.68019 4.853137,-4.06073 6.164829,-6.66553 2.329384,-4.62682 -1.57368,-9.44601 -6.164829,-8.43713 -3.058838,0.67179 -5.856141,4.41734 -7.561479,7.00881 -2.09231,-2.23963 -4.330057,-5.57095 -7.116681,-6.80503 -4.373656,-1.9373 -8.256257,2.08393 -7.460067,6.80503 0.576892,3.41988 5.655983,5.35289 5.655983,8.56996 0,4.59303 -10.127493,8.24193 -4.321609,14.09569 5.910848,5.95899 8.604069,-4.54684 13.241932,-4.54684 3.099767,0 4.747268,5.79806 8.451512,6.10419 3.582359,0.29567 6.831128,-3.17374 5.852131,-7.08307 -0.79484,-3.17279 -4.32427,-6.70886 -6.741722,-8.56997 M 122.88576,133.6857 c -9.48787,3.93362 2.64207,11.32569 2.64207,15.35834 0,2.57527 -4.14146,4.93963 -5.25034,7.14164 -1.98378,3.9398 0.69032,8.54283 4.83046,8.52854 2.37029,-0.008 4.14858,-1.65495 5.7823,-3.31039 0.99056,-1.00411 2.41256,-3.18612 4.00314,-2.73905 3.99602,1.12314 5.45272,7.87723 10.67459,5.7376 5.41757,-2.22011 3.38931,-8.28002 0.43857,-11.54947 -0.94741,-1.04934 -2.98768,-2.58336 -2.57001,-4.28498 0.66941,-2.72953 4.0823,-4.4221 5.14402,-7.14163 1.96465,-5.03392 -2.79463,-10.02972 -7.46007,-7.53253 -2.13189,1.14124 -4.21841,5.60143 -6.6719,5.60143 -4.45949,0 -5.69601,-8.24194 -11.56283,-5.8095 m -24.46539,56.98172 c -11.577511,1.64734 -22.445577,5.80805 -31.580295,13.80716 -3.447589,3.019 -10.885415,12.52215 -1.77917,14.39182 5.186728,1.06506 11.254602,-7.31684 15.567751,-9.8983 9.005719,-5.39003 19.519294,-7.81533 29.801124,-6.46365 7.65399,1.00649 15.44988,3.90551 21.79485,8.6428 3.52988,2.63526 7.64111,8.85895 12.45376,7.69677 3.41067,-0.82366 5.02037,-5.08246 3.47917,-8.3819 -1.80408,-3.86172 -6.4366,-7.01927 -9.70583,-9.35316 -11.39247,-8.13337 -26.34952,-12.38788 -40.03136,-10.44154 z"
|
||||
id="path22" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.9 KiB |
+522
-572
File diff suppressed because it is too large
Load Diff
@@ -36,22 +36,16 @@ namespace WebDoorCreator.Core
|
||||
|
||||
// classi utilità x cache REDIS dati DB
|
||||
public const string redisBaseAddr = "WDC";
|
||||
public const string rKeyConfig = $"{redisBaseAddr}:Cache:Config";
|
||||
public const string rKeyCompany = $"{redisBaseAddr}:Cache:Company";
|
||||
public const string rKeyDoor = $"{redisBaseAddr}:Cache:Door";
|
||||
public const string rKeyDoorOp = $"{redisBaseAddr}:Cache:DoorOp";
|
||||
public const string rKeyDoorOpType = $"{redisBaseAddr}:Cache:DoorOpType";
|
||||
public const string rKeyGraphicParameters = $"{redisBaseAddr}:Cache:GraphicParameters";
|
||||
public const string rKeyListValues = $"{redisBaseAddr}:Cache:ListValues";
|
||||
public const string rKeyDoorLast = $"{redisBaseAddr}:Cache:DoorList";
|
||||
public const string rKeyDoorsByOrder = $"{redisBaseAddr}:Cache:DoorsByOrder";
|
||||
public const string rKeyOrderDetail = $"{redisBaseAddr}:Cache:OrderDetail";
|
||||
public const string rKeyOrderStatus = $"{redisBaseAddr}:Cache:OrderStatus";
|
||||
public const string rKeyRoles = $"{redisBaseAddr}:Cache:Roles";
|
||||
public const string rKeyUsers = $"{redisBaseAddr}:Cache:Users";
|
||||
public const string rKeyUsersAll = $"{redisBaseAddr}:Cache:UsersAll";
|
||||
public const string rKeyUsersDataId = $"{redisBaseAddr}:Cache:UsersData:Id";
|
||||
public const string rKeyUsersDataSearch = $"{redisBaseAddr}:Cache:UsersData:Search";
|
||||
public const string rKeyUsersView = $"{redisBaseAddr}:Cache:UsersView";
|
||||
public const string rKeyVocLemma = $"{redisBaseAddr}:Cache:VocLemma";
|
||||
public const string rKeyLanguage = $"{redisBaseAddr}:Cache:Languages";
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
using Microsoft.Reporting.NETCore;
|
||||
using Microsoft.ReportingServices.ReportProcessing.ReportObjectModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace WebDoorCreator.Core.ReportViewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Gestione report dotNet core
|
||||
///
|
||||
/// https://github.com/lkosson/reportviewercore/
|
||||
/// </summary>
|
||||
public class Report
|
||||
{
|
||||
/// <summary>
|
||||
/// Effettua setup del Report corrente
|
||||
/// </summary>
|
||||
/// <param name="ReportObj">Oggetto LocalReport da impiegare</param>
|
||||
/// <param name="FileNameRdlc">Nome del Report (file rdlc) da usare</param>
|
||||
/// <param name="RepParams">Parametri opzionali report</param>
|
||||
/// <param name="ReportDatasets">Dizionario dei dataset del report (DsName + DataTable relativa)</param>
|
||||
public static void Load(LocalReport ReportObj, string FileNameRdlc, List<ReportParameter> RepParams, Dictionary<string, DataTable> ReportDatasets)
|
||||
{
|
||||
|
||||
// setup preliminari
|
||||
ReportObj.EnableExternalImages = true;
|
||||
// calcolo path complessivo
|
||||
string reportPath = Path.Combine(AppContext.BaseDirectory, "Reports", FileNameRdlc);
|
||||
/*------------------------------------------------------------------------------------------
|
||||
* NB: SE volessi includere i ReportObj come EMBEDDED potrei usare una versione alternativa,
|
||||
* ad esempio (x ReportObj inclusi in area WebDoorCreator.Core\ReportViewer\Report.rdlc
|
||||
*
|
||||
* using var rs = Assembly.GetExecutingAssembly().GetManifestResourceStream("WebDoorCreator.Core.ReportViewer.Report.rdlc");
|
||||
* ReportObj.LoadReportDefinition(rs);
|
||||
*
|
||||
* oppure con filestream
|
||||
* using (FileStream fs = File.OpenRead(reportPath))
|
||||
* {
|
||||
* ReportObj.LoadReportDefinition(fs);
|
||||
* ....
|
||||
* }
|
||||
*
|
||||
* ------------------------------------------------------------------------------------------*/
|
||||
ReportObj.ReportPath = reportPath;
|
||||
foreach (var item in ReportDatasets)
|
||||
{
|
||||
ReportObj.DataSources.Add(new ReportDataSource(item.Key, item.Value));
|
||||
}
|
||||
ReportObj.SetParameters(RepParams);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parametri associati al report
|
||||
/// </summary>
|
||||
public class RenderParams
|
||||
{
|
||||
public string FileName { get; set; } = "";
|
||||
public string Extension { get; set; } = "";
|
||||
public string MimeType { get; set; } = "";
|
||||
public string RenderFormat { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Crea setup parametri report dato formato desiderato
|
||||
/// </summary>
|
||||
/// <param name="OutFormat"></param>
|
||||
public RenderParams(string OutFormat)
|
||||
{
|
||||
this.FileName = $"{DateTime.Now:yyyyMMdd_HHmmss}";
|
||||
switch (OutFormat.ToUpper())
|
||||
{
|
||||
case "HTML":
|
||||
this.Extension = "html";
|
||||
this.RenderFormat = "HTML5";
|
||||
this.MimeType = "text/html";
|
||||
break;
|
||||
|
||||
case "DOCX":
|
||||
this.Extension = "docx";
|
||||
this.RenderFormat = "WORDOPENXML";
|
||||
this.MimeType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
||||
break;
|
||||
|
||||
case "XLSX":
|
||||
this.Extension = "xlsx";
|
||||
this.RenderFormat = "EXCELOPENXML";
|
||||
this.MimeType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
||||
break;
|
||||
|
||||
case "PDF":
|
||||
default:
|
||||
this.Extension = "pdf";
|
||||
this.RenderFormat = "PDF";
|
||||
this.MimeType = "application/pdf";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,447 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||
<AutoRefresh>0</AutoRefresh>
|
||||
<DataSources>
|
||||
<DataSource Name="LocalSource">
|
||||
<ConnectionProperties>
|
||||
<DataProvider>System.Data.DataSet</DataProvider>
|
||||
<ConnectString>/* Local Connection */</ConnectString>
|
||||
</ConnectionProperties>
|
||||
<rd:DataSourceID>bd60bef3-b3d9-477e-9052-ab58c6f1ec86</rd:DataSourceID>
|
||||
</DataSource>
|
||||
</DataSources>
|
||||
<DataSets>
|
||||
<DataSet Name="Items">
|
||||
<Query>
|
||||
<DataSourceName>LocalSource</DataSourceName>
|
||||
<CommandText>/* Local Query */</CommandText>
|
||||
</Query>
|
||||
<Fields>
|
||||
<Field Name="Description">
|
||||
<DataField>Description</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Price">
|
||||
<DataField>Price</DataField>
|
||||
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Qty">
|
||||
<DataField>Qty</DataField>
|
||||
<rd:TypeName>System.Int32</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Total">
|
||||
<DataField>Total</DataField>
|
||||
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>LocalSource</rd:DataSetName>
|
||||
<rd:TableName>Items</rd:TableName>
|
||||
<rd:ObjectDataSourceType>ReportViewerCore.ReportItem</rd:ObjectDataSourceType>
|
||||
</rd:DataSetInfo>
|
||||
</DataSet>
|
||||
</DataSets>
|
||||
<ReportSections>
|
||||
<ReportSection>
|
||||
<Body>
|
||||
<ReportItems>
|
||||
<Tablix Name="Tablix1">
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>8.31785cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.51905cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.51905cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.51905cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
<TablixRow>
|
||||
<Height>0.67938cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Description</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox3">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Price</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox5">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Qty</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox2">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Total</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.67938cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Description">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Description.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Description</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Price">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Price.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Price</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Qty">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Qty.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Qty</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Total">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Total.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Total</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
</TablixRows>
|
||||
</TablixBody>
|
||||
<TablixColumnHierarchy>
|
||||
<TablixMembers>
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
<TablixMembers>
|
||||
<TablixMember>
|
||||
<KeepWithGroup>After</KeepWithGroup>
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<Group Name="Details" />
|
||||
</TablixMember>
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>Items</DataSetName>
|
||||
<Top>2.85433cm</Top>
|
||||
<Left>0.3175cm</Left>
|
||||
<Height>1.35875cm</Height>
|
||||
<Width>15.875cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Tablix>
|
||||
<Textbox Name="Textbox6">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Title.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontSize>26pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox6</rd:DefaultName>
|
||||
<Top>0.26141cm</Top>
|
||||
<Left>0.3175cm</Left>
|
||||
<Height>1.79062cm</Height>
|
||||
<Width>15.875cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>2in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>6.5in</Width>
|
||||
<Page>
|
||||
<PageHeight>29.7cm</PageHeight>
|
||||
<PageWidth>21cm</PageWidth>
|
||||
<LeftMargin>2cm</LeftMargin>
|
||||
<RightMargin>2cm</RightMargin>
|
||||
<TopMargin>2cm</TopMargin>
|
||||
<BottomMargin>2cm</BottomMargin>
|
||||
<ColumnSpacing>0.13cm</ColumnSpacing>
|
||||
<Style />
|
||||
</Page>
|
||||
</ReportSection>
|
||||
</ReportSections>
|
||||
<ReportParameters>
|
||||
<ReportParameter Name="Title">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<ReportParametersLayout>
|
||||
<GridLayoutDefinition>
|
||||
<NumberOfColumns>4</NumberOfColumns>
|
||||
<NumberOfRows>2</NumberOfRows>
|
||||
<CellDefinitions>
|
||||
<CellDefinition>
|
||||
<ColumnIndex>0</ColumnIndex>
|
||||
<RowIndex>0</RowIndex>
|
||||
<ParameterName>Title</ParameterName>
|
||||
</CellDefinition>
|
||||
</CellDefinitions>
|
||||
</GridLayoutDefinition>
|
||||
</ReportParametersLayout>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
<rd:ReportID>156b21d2-9542-4902-99ef-7ec823774bb2</rd:ReportID>
|
||||
</Report>
|
||||
@@ -1,14 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WebDoorCreator.Core.ReportViewer
|
||||
{
|
||||
public class ReportItem
|
||||
{
|
||||
public string Description { get; set; }
|
||||
public decimal Price { get; set; }
|
||||
public int Qty { get; set; }
|
||||
public decimal Total => Price * Qty;
|
||||
}
|
||||
}
|
||||
@@ -6,27 +6,11 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="ReportViewer\ReportExtUtils.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="ReportViewer\Report.rdlc" />
|
||||
</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="ReportViewerCore.NETCore" Version="15.1.17" />
|
||||
<PackageReference Include="ToDataTable" Version="0.1.2" />
|
||||
<PackageReference Include="YamlDotNet" Version="13.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="ReportViewer\Report.rdlc">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using System.Reflection.Emit;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
|
||||
namespace WebDoorCreator.Data
|
||||
{
|
||||
public class ConfigConfiguration : IEntityTypeConfiguration<ConfigModel>
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
public void Configure(EntityTypeBuilder<ConfigModel> builder)
|
||||
{
|
||||
// aggiungo config URL x generazione immagini report
|
||||
builder.HasData(
|
||||
seedConfig("prt_ImageCodeBaseUrl", "https://iis01.egalware.com/WDC/SRV/api/", "https://seriate.egalware.com/WDC/SRV/api/", "URL di base per recupero immagini png"),
|
||||
seedConfig("prt_ReportServerUrl", "http://w2019-sql-steam/reportserver?/Test/WebDoor/", "http://w2019-sql-steam/reportserver?/Test/WebDoor/", "URL di base del Report Server")
|
||||
);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
protected ConfigModel seedConfig(string chaive, string valore, string valoreStd, string note)
|
||||
{
|
||||
var newRec = new ConfigModel()
|
||||
{
|
||||
chiave = chaive,
|
||||
valore = valore,
|
||||
valoreStd = valoreStd,
|
||||
note = note
|
||||
};
|
||||
return newRec;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using NLog;
|
||||
using System.Data;
|
||||
@@ -21,59 +23,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new User
|
||||
/// </summary>
|
||||
/// <param name="addEditRec">Record to edit or add</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> UserAddMod(AspNetUsers addEditRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
//List<ItemModel> dbResult = new List<ItemModel>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetUsers
|
||||
.Where(x => x.Id == addEditRec.Id)
|
||||
.FirstOrDefault();
|
||||
//if is not null edit the record found
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec.Id = addEditRec.Id;
|
||||
currRec.UserName = addEditRec.UserName;
|
||||
currRec.NormalizedUserName = addEditRec.NormalizedUserName;
|
||||
currRec.Email = addEditRec.Email;
|
||||
currRec.EmailConfirmed = addEditRec.EmailConfirmed;
|
||||
currRec.LockoutEnabled = addEditRec.LockoutEnabled;
|
||||
currRec.LockoutEnd = addEditRec.LockoutEnd;
|
||||
currRec.ConcurrencyStamp = addEditRec.ConcurrencyStamp;
|
||||
currRec.SecurityStamp = addEditRec.SecurityStamp;
|
||||
currRec.AccessFailedCount = addEditRec.AccessFailedCount;
|
||||
currRec.PhoneNumberConfirmed = addEditRec.PhoneNumberConfirmed;
|
||||
currRec.PhoneNumber = addEditRec.PhoneNumber;
|
||||
currRec.TwoFactorEnabled = addEditRec.TwoFactorEnabled;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
//if is null add the record as new in the table
|
||||
else
|
||||
{
|
||||
localDbCtx
|
||||
.DbSetUsers
|
||||
.Add(addEditRec);
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante CompanyAddMod: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new company
|
||||
/// </summary>
|
||||
@@ -189,25 +138,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lista configurazione
|
||||
/// </summary>
|
||||
/// <param name="dtStart"></param>
|
||||
/// <param name="dtEnd"></param>
|
||||
/// <returns></returns>
|
||||
public List<ConfigModel> ConfigGetAll()
|
||||
{
|
||||
List<ConfigModel> dbResult = new List<ConfigModel>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetConfig
|
||||
.OrderBy(x => x.chiave)
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Clear database context
|
||||
@@ -288,7 +218,7 @@ namespace WebDoorCreator.Data.Controllers
|
||||
/// <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)
|
||||
public async Task<bool> DoorModQty(int doorId, bool isAdd)
|
||||
{
|
||||
/* crea nuovo metodo per modifica singola quantità porta: DOORMODQTY */
|
||||
bool fatto = false;
|
||||
@@ -303,11 +233,7 @@ namespace WebDoorCreator.Data.Controllers
|
||||
.FirstOrDefault();
|
||||
if (currRec != null) //if is not null edit the record found
|
||||
{
|
||||
if (NewQty > 0)
|
||||
{
|
||||
currRec.Quantity = NewQty;
|
||||
}
|
||||
else if (isAdd)
|
||||
if (isAdd)
|
||||
{
|
||||
currRec.Quantity = currRec.Quantity + 1;
|
||||
}
|
||||
@@ -328,66 +254,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete doorOp instance
|
||||
/// </summary>
|
||||
/// <param name="modOpRec">Record to delete</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorOpDelete(DoorOpModel modOpRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetDoorOp
|
||||
.Where(x => x.DoorId == modOpRec.DoorId && x.DoorOpId == modOpRec.DoorOpId)
|
||||
.FirstOrDefault();
|
||||
//if is not null edit the record found
|
||||
if (currRec != null)
|
||||
{
|
||||
var recToRem = localDbCtx
|
||||
.DbSetDoorOp
|
||||
.Remove(currRec);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorOpDelete: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete doorOp list
|
||||
/// </summary>
|
||||
/// <param name="modOpRec">Record to delete</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorOpDeleteRange(List<DoorOpModel> listOpRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
localDbCtx
|
||||
.DbSetDoorOp
|
||||
.RemoveRange(listOpRec);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorOpDeleteRange: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieving current data from door
|
||||
/// </summary>
|
||||
@@ -412,7 +278,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieving current door operations by id
|
||||
/// </summary>
|
||||
@@ -430,7 +295,7 @@ namespace WebDoorCreator.Data.Controllers
|
||||
.Where(x => x.DoorOpId == doorOpId)
|
||||
.FirstOrDefault();
|
||||
|
||||
if (temp != null)
|
||||
if(temp != null)
|
||||
{
|
||||
dbResult = temp;
|
||||
}
|
||||
@@ -468,6 +333,106 @@ namespace WebDoorCreator.Data.Controllers
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
/// <summary>
|
||||
/// Update door's OP
|
||||
/// </summary>
|
||||
/// <param name="modOpRec">Records to add</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorOpUpdate(List<DoorOpModel> modOpRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (var item in modOpRec)
|
||||
{
|
||||
|
||||
var currRec = localDbCtx
|
||||
.DbSetDoorOp
|
||||
.Where(x => x.DoorId == item.DoorId && x.DoorOpId == item.DoorOpId)
|
||||
.FirstOrDefault();
|
||||
if (currRec != null) //if is not null edit the record found
|
||||
{
|
||||
currRec.JsoncActVal = item.JsoncActVal;
|
||||
currRec.JsoncConfigVal = item.JsoncConfigVal;
|
||||
currRec.userConfirm = item.userConfirm;
|
||||
currRec.DtConfirm = item.DtConfirm;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorOpUpdate: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete doorOp instance
|
||||
/// </summary>
|
||||
/// <param name="modOpRec">Record to delete</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorOpDelete(DoorOpModel modOpRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetDoorOp
|
||||
.Where(x => x.DoorId == modOpRec.DoorId && x.DoorOpId == modOpRec.DoorOpId)
|
||||
.FirstOrDefault();
|
||||
//if is not null edit the record found
|
||||
if (currRec != null)
|
||||
{
|
||||
var recToRem = localDbCtx
|
||||
.DbSetDoorOp
|
||||
.Remove(currRec);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorOpDelete: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete doorOp list
|
||||
/// </summary>
|
||||
/// <param name="modOpRec">Record to delete</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorOpDeleteRange(List<DoorOpModel> listOpRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
localDbCtx
|
||||
.DbSetDoorOp
|
||||
.RemoveRange(listOpRec);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorOpDeleteRange: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new DoorOpType
|
||||
@@ -569,45 +534,7 @@ namespace WebDoorCreator.Data.Controllers
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update door's OP
|
||||
/// </summary>
|
||||
/// <param name="modOpRec">Records to add</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorOpUpdate(List<DoorOpModel> modOpRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (var item in modOpRec)
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetDoorOp
|
||||
.Where(x => x.DoorId == item.DoorId && x.DoorOpId == item.DoorOpId)
|
||||
.FirstOrDefault();
|
||||
if (currRec != null) //if is not null edit the record found
|
||||
{
|
||||
currRec.JsoncActVal = item.JsoncActVal;
|
||||
currRec.JsoncConfigVal = item.JsoncConfigVal;
|
||||
currRec.userConfirm = item.userConfirm;
|
||||
currRec.DtConfirm = item.DtConfirm;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorOpUpdate: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Getting door data by numRec
|
||||
/// Getting door data by orderId
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<DoorModel> DoorsGetByOrderId(int orderId)
|
||||
@@ -636,36 +563,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Getting door list (last numRec)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<DoorModel> DoorsGetLast(int numRec)
|
||||
{
|
||||
List<DoorModel> dbResult = new List<DoorModel>();
|
||||
// retrieving data from db
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// extracting entire set
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoor
|
||||
.Include(o => o.OrderNav)
|
||||
.Include(t => t.TypeNav)
|
||||
.OrderByDescending(x => x.DoorId)
|
||||
.Take(numRec)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in DoorsGetLast:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Modifying or adding a new door
|
||||
/// </summary>
|
||||
@@ -729,47 +626,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new list value
|
||||
/// </summary>
|
||||
/// <param name="addRec">Record to add</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> ListValuesAdd(List<ListValuesTempModel> addList)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// stored di reset ListValues
|
||||
var storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_ListVal_Prepare");
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// import massivo dati in tab temp
|
||||
localDbCtx
|
||||
.DbSetValuesTemp
|
||||
.AddRange(addList);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// stored di merge dati in vocabolario
|
||||
storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_ListVal_Import");
|
||||
|
||||
fatto = true;
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante ListValuesAdd: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ListValues list (All)
|
||||
/// </summary>
|
||||
@@ -784,6 +640,7 @@ namespace WebDoorCreator.Data.Controllers
|
||||
{
|
||||
if (tableName != "*" && fieldName != "*")
|
||||
{
|
||||
|
||||
// extracting entire set
|
||||
dbResult = localDbCtx
|
||||
.DbSetValues
|
||||
@@ -816,6 +673,49 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new list value
|
||||
/// </summary>
|
||||
/// <param name="addRec">Record to add</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> ListValuesAdd(List<ListValuesTempModel> addList)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
// stored di reset ListValues
|
||||
var storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_ListVal_Prepare");
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// import massivo dati in tab temp
|
||||
localDbCtx
|
||||
.DbSetValuesTemp
|
||||
.AddRange(addList);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// stored di merge dati in vocabolario
|
||||
storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_ListVal_Import");
|
||||
|
||||
fatto = true;
|
||||
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante ListValuesAdd: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new order
|
||||
/// </summary>
|
||||
@@ -842,29 +742,38 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return fatto;
|
||||
}
|
||||
|
||||
public OrderModel OrderGetByKey(int orderId)
|
||||
/// <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)
|
||||
{
|
||||
OrderModel dbResult = new OrderModel();
|
||||
using (var dbCtx = new WDCDataContext(_configuration))
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var rawData = dbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => x.OrderId == orderId)
|
||||
.AsNoTracking()
|
||||
.FirstOrDefault();
|
||||
if (rawData != null)
|
||||
var currRec = localDbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => x.OrderId == orderId)
|
||||
.FirstOrDefault();
|
||||
//if is not null edit the record found
|
||||
if (currRec != null)
|
||||
{
|
||||
dbResult = rawData;
|
||||
currRec.Status = newStatus;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in OrderGetByKey:{Environment.NewLine}{exc}");
|
||||
Log.Error($"Eccezione durante OrderUpdate: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -932,40 +841,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <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)
|
||||
{
|
||||
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.Status = newStatus;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante OrderUpdate: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new graphic param
|
||||
/// </summary>
|
||||
@@ -1017,34 +892,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Order Data for report printing
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <returns></returns>
|
||||
public List<PrtRepOrderModel> PreRepOrderGetByKey(int orderId)
|
||||
{
|
||||
List<PrtRepOrderModel> dbResult = new List<PrtRepOrderModel>();
|
||||
using (var dbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var OrderId = new SqlParameter("@OrderId", orderId);
|
||||
|
||||
dbResult = dbCtx
|
||||
.DbSetPrtRepOrder
|
||||
.FromSqlRaw("exec dbo.stp_prt_OrderReportExpl @OrderId", OrderId)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in PreRepOrderGetByKey:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieving data from roles table
|
||||
/// </summary>
|
||||
@@ -1204,7 +1051,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public Dictionary<string, Dictionary<string, string>> VocLemmaGetAll()
|
||||
{
|
||||
Dictionary<string, Dictionary<string, string>> DTOResult = new Dictionary<string, Dictionary<string, string>>();
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
public class CostingDTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Order's UID
|
||||
/// </summary>
|
||||
public int OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Dictionary of evaluated unit cost for each Door in Order
|
||||
/// </summary>
|
||||
public Dictionary<int, double> DoorUnitCost { get; set; } = new Dictionary<int, double>();
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// COmpany data DTO
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class CustomerDTO
|
||||
{
|
||||
public int CompanyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno x riferimento (es ERP)
|
||||
/// </summary>
|
||||
[MaxLength(250)]
|
||||
public string CompanyExtCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome / ragione Sociale
|
||||
/// </summary>
|
||||
[MaxLength(500)]
|
||||
public string CompanyName { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// indirizzo
|
||||
/// </summary>
|
||||
[MaxLength(250)]
|
||||
public string Address { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// CAP
|
||||
/// </summary>
|
||||
public int ZipCode { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Citta
|
||||
/// </summary>
|
||||
[MaxLength(50)]
|
||||
public string City { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Stato
|
||||
/// </summary>
|
||||
[MaxLength(50)]
|
||||
public string State { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// VAT / P.Iva
|
||||
/// </summary>
|
||||
[MaxLength(50)]
|
||||
public string VAT { get; set; } = "";
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Serialized door data for cost evaluation
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class DoorCostingDTO
|
||||
{
|
||||
public int DoorId { get; set; } = 0;
|
||||
|
||||
public double SizeX { get; set; } = 0;
|
||||
public double SizeY { get; set; } = 0;
|
||||
public double SizeZ { get; set; } = 0;
|
||||
|
||||
public double EstimatedWorkTime { get; set; } = 0;
|
||||
|
||||
public Dictionary<string, double> BOMList { get; set; }= new Dictionary<string, double>();
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Serialized order data
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class OrderDetailsDTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Order UID (DB)
|
||||
/// </summary>
|
||||
public int OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Customer Info
|
||||
/// </summary>
|
||||
public CustomerDTO CustomerInfo { get; set; } = new CustomerDTO();
|
||||
|
||||
/// <summary>
|
||||
/// Order reference / Ext code
|
||||
/// </summary>
|
||||
public string OrderExtCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Order description
|
||||
/// </summary>
|
||||
public string OrderDescript { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Door list for current order
|
||||
/// </summary>
|
||||
public List<DoorCostingDTO> DoorsList { get; set; } = new List<DoorCostingDTO>();
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
[Table("Config")]
|
||||
public partial class ConfigModel
|
||||
{
|
||||
[Key]
|
||||
public string chiave { get; set; } = null!;
|
||||
public string valore { get; set; } = "";
|
||||
public string valoreStd { get; set; } = "";
|
||||
public string note { get; set; } = "";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,143 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static WebDoorCreator.Core.Enum;
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
public class PrtRepOrderModel
|
||||
{
|
||||
public int OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Company cui è associato l'ordine
|
||||
/// </summary>
|
||||
public int CompanyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno x riferimento (es ERP)
|
||||
/// </summary>
|
||||
public string OrderExtCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Data inserimento ordine
|
||||
/// </summary>
|
||||
public DateTime DateIns { get; set; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// Codice utente che ha creato
|
||||
/// </summary>
|
||||
public string UserIdIns { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Data (ultima) modifica ordine
|
||||
/// </summary>
|
||||
public DateTime DateMod { get; set; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// Codice utente che ha creato
|
||||
/// </summary>
|
||||
public string UserIdMod { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Stato globale dell'ordine
|
||||
/// </summary>
|
||||
public int Status { get; set; } = 10;
|
||||
|
||||
/// <summary>
|
||||
/// Descrizione
|
||||
/// </summary>
|
||||
public string OrderDescript { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno x riferimento (es ERP)
|
||||
/// </summary>
|
||||
public string CompanyExtCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome / ragione Sociale
|
||||
/// </summary>
|
||||
public string CompanyName { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// indirizzo
|
||||
/// </summary>
|
||||
public string Address { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// CAP
|
||||
/// </summary>
|
||||
public int ZipCode { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Citta
|
||||
/// </summary>
|
||||
public string City { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Stato
|
||||
/// </summary>
|
||||
public string State { get; set; } = "";
|
||||
/// <summary>
|
||||
/// VAT / P.Iva
|
||||
/// </summary>
|
||||
public string VAT { get; set; } = "";
|
||||
|
||||
public int DoorId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Door's Type
|
||||
/// </summary>
|
||||
public int TypeId { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno x riferimento (es ERP)
|
||||
/// </summary>
|
||||
public string DoorExtCode { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Descrizione
|
||||
/// </summary>
|
||||
public string DoorDescript { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Quantity Ordered
|
||||
/// </summary>
|
||||
public int Quantity { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Unit cost for the door
|
||||
/// </summary>
|
||||
public decimal UnitCost { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Unità di misura
|
||||
/// </summary>
|
||||
public string MeasureUnit { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Tipo DoorOP
|
||||
/// </summary>
|
||||
public string ObjectType { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Chiave DoorOP
|
||||
/// </summary>
|
||||
public string ObjectKey { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Valore DoorOp
|
||||
/// </summary>
|
||||
public string ObjectVal { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Quantità DoorOp
|
||||
/// </summary>
|
||||
public int ObjectQty { get; set; } = 1;
|
||||
}
|
||||
}
|
||||
@@ -34,22 +34,10 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// RoleId from AspNetUserRoles table
|
||||
/// </summary>
|
||||
public string RoleId { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Name from AspNetRole table
|
||||
/// </summary>
|
||||
public string RoleName { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// ClaimId from AspNetUserRoles table
|
||||
/// </summary>
|
||||
public int ClaimId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// ClaimType from AspNetRole table
|
||||
/// </summary>
|
||||
public string ClaimType { get; set; } = "";
|
||||
/// <summary>
|
||||
/// ClaimValue from AspNetRole table
|
||||
/// </summary>
|
||||
public string ClaimValue { get; set; } = "";
|
||||
}
|
||||
}
|
||||
|
||||
-891
@@ -1,891 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using WebDoorCreator.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
[DbContext(typeof(WDCDataContext))]
|
||||
[Migration("20230523081025_ConfigTable")]
|
||||
partial class ConfigTable
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("Latin1_General_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.14")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetRoles", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUsers", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("AccessFailedCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("EmailConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("LockoutEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PasswordHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PhoneNumber")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("SecurityStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetUsers", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.CompanyModel", b =>
|
||||
{
|
||||
b.Property<int>("CompanyId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("CompanyId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CompanyExtCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("CompanyName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("CompanyToken")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("nvarchar(150)");
|
||||
|
||||
b.Property<string>("PrivateNote")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("VAT")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("CompanyId");
|
||||
|
||||
b.ToTable("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ConfigModel", b =>
|
||||
{
|
||||
b.Property<string>("chiave")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("note")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valore")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valoreStd")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("chiave");
|
||||
|
||||
b.ToTable("Config");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateLockExpiry")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DoorDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DoorExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MeasureUnit")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TypeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdLock")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorId");
|
||||
|
||||
b.HasIndex("OrderId");
|
||||
|
||||
b.HasIndex("TypeId");
|
||||
|
||||
b.ToTable("Door");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("DoorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("DtConfirm")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("JsoncActVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("JsoncConfigVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ObjectId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("userConfirm")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorOpId");
|
||||
|
||||
b.HasIndex("DoorId");
|
||||
|
||||
b.ToTable("DoorOp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpTypId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpTypId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DisplayUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ExtOpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FPath")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("HasHw")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("HwCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("HwDescription")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsConcrete")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDefault")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("JsoncConfig")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("MaxAllowed")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ParentDoorOpId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Rev")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("ValidFrom")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("ValidUntil")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("DoorOpTypId");
|
||||
|
||||
b.ToTable("DoorOpType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("TypeId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TypeId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("TypeCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("TypeId");
|
||||
|
||||
b.ToTable("DoorType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.GraphicParamsModel", b =>
|
||||
{
|
||||
b.Property<int>("GraphicParamId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("GraphicParamId"), 1L, 1);
|
||||
|
||||
b.Property<int>("compoId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("graphicParamAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamDefaultVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamKey")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamsN")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("GraphicParamId");
|
||||
|
||||
b.ToTable("GraphicParams");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.HardwareModel", b =>
|
||||
{
|
||||
b.Property<int>("HardwareId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("HardwareId"), 1L, 1);
|
||||
|
||||
b.Property<string>("compoAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoLayerName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("compoTemplateIsActive")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("HardwareId");
|
||||
|
||||
b.ToTable("Hardware");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.LanguageModel", b =>
|
||||
{
|
||||
b.Property<string>("CodLingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("DescrizioneLingua")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("CodLingua");
|
||||
|
||||
b.ToTable("Languages");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
CodLingua = "EN",
|
||||
DescrizioneLingua = "English"
|
||||
},
|
||||
new
|
||||
{
|
||||
CodLingua = "IT",
|
||||
DescrizioneLingua = "Italiano"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValues");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LH",
|
||||
Label = "Left Handed",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RH",
|
||||
Label = "Right Handed",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LHR",
|
||||
Label = "Left Handed Reverse",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RHR",
|
||||
Label = "Right Handed Reverse",
|
||||
Ordinal = 4,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "BV",
|
||||
Label = "Bevel",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "SQ",
|
||||
Label = "Squared",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "1B",
|
||||
Label = "Bull Nose 1",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesTempModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValuesTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.HasIndex("CompanyId");
|
||||
|
||||
b.ToTable("Order");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderStatusViewModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("NumDoors")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderStatus")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("TotCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.ToView("OrderStatusViewModel");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.SerializedDoorsModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorTmpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorTmpId"), 1L, 1);
|
||||
|
||||
b.Property<string>("DoorSerVal")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Lock")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("DoorTmpId");
|
||||
|
||||
b.ToTable("SerializedDoors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.UsersViewModel", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("RoleName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.ToView("UsersViewModel");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("Vocabulary");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyTempModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("VocabularyTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetRoles", "RolesNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetUsers", "UsersNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RolesNav");
|
||||
|
||||
b.Navigation("UsersNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.OrderModel", "OrderNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorTypeModel", "TypeNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("TypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("OrderNav");
|
||||
|
||||
b.Navigation("TypeNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorModel", "DoorNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("DoorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DoorNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.CompanyModel", "CompanyNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CompanyId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CompanyNav");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class ConfigTable : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Config",
|
||||
columns: table => new
|
||||
{
|
||||
chiave = table.Column<string>(type: "nvarchar(450)", nullable: false),
|
||||
valore = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
valoreStd = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
note = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Config", x => x.chiave);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Config");
|
||||
}
|
||||
}
|
||||
}
|
||||
-890
@@ -1,890 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using WebDoorCreator.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
[DbContext(typeof(WDCDataContext))]
|
||||
[Migration("20230526063309_tryFixSqlErr")]
|
||||
partial class tryFixSqlErr
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("Latin1_General_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.14")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetRoles", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUsers", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("AccessFailedCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("EmailConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("LockoutEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PasswordHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PhoneNumber")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("SecurityStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetUsers", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.CompanyModel", b =>
|
||||
{
|
||||
b.Property<int>("CompanyId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("CompanyId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CompanyExtCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("CompanyName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("CompanyToken")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("nvarchar(150)");
|
||||
|
||||
b.Property<string>("PrivateNote")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("VAT")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("CompanyId");
|
||||
|
||||
b.ToTable("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ConfigModel", b =>
|
||||
{
|
||||
b.Property<string>("chiave")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("note")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valore")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valoreStd")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("chiave");
|
||||
|
||||
b.ToTable("Config");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateLockExpiry")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DoorDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DoorExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MeasureUnit")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TypeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdLock")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorId");
|
||||
|
||||
b.HasIndex("OrderId");
|
||||
|
||||
b.HasIndex("TypeId");
|
||||
|
||||
b.ToTable("Door");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("DoorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("DtConfirm")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("JsoncActVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("JsoncConfigVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ObjectId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("userConfirm")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorOpId");
|
||||
|
||||
b.HasIndex("DoorId");
|
||||
|
||||
b.ToTable("DoorOp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpTypId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpTypId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DisplayUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ExtOpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FPath")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("HasHw")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("HwCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("HwDescription")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsConcrete")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDefault")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("JsoncConfig")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("MaxAllowed")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ParentDoorOpId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Rev")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("ValidFrom")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("ValidUntil")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("DoorOpTypId");
|
||||
|
||||
b.ToTable("DoorOpType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("TypeId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TypeId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("TypeCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("TypeId");
|
||||
|
||||
b.ToTable("DoorType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.GraphicParamsModel", b =>
|
||||
{
|
||||
b.Property<int>("GraphicParamId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("GraphicParamId"), 1L, 1);
|
||||
|
||||
b.Property<int>("compoId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("graphicParamAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamDefaultVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamKey")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamsN")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("GraphicParamId");
|
||||
|
||||
b.ToTable("GraphicParams");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.HardwareModel", b =>
|
||||
{
|
||||
b.Property<int>("HardwareId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("HardwareId"), 1L, 1);
|
||||
|
||||
b.Property<string>("compoAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoLayerName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("compoTemplateIsActive")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("HardwareId");
|
||||
|
||||
b.ToTable("Hardware");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.LanguageModel", b =>
|
||||
{
|
||||
b.Property<string>("CodLingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("DescrizioneLingua")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("CodLingua");
|
||||
|
||||
b.ToTable("Languages");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
CodLingua = "EN",
|
||||
DescrizioneLingua = "English"
|
||||
},
|
||||
new
|
||||
{
|
||||
CodLingua = "IT",
|
||||
DescrizioneLingua = "Italiano"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValues");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LH",
|
||||
Label = "Left Handed",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RH",
|
||||
Label = "Right Handed",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LHR",
|
||||
Label = "Left Handed Reverse",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RHR",
|
||||
Label = "Right Handed Reverse",
|
||||
Ordinal = 4,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "BV",
|
||||
Label = "Bevel",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "SQ",
|
||||
Label = "Squared",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "1B",
|
||||
Label = "Bull Nose 1",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesTempModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValuesTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.HasIndex("CompanyId");
|
||||
|
||||
b.ToTable("Order");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderStatusViewModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("NumDoors")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderStatus")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("TotCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.ToView("OrderStatusViewModel");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.SerializedDoorsModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorTmpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorTmpId"), 1L, 1);
|
||||
|
||||
b.Property<string>("DoorSerVal")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Lock")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("DoorTmpId");
|
||||
|
||||
b.ToTable("SerializedDoors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.UsersViewModel", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("RoleName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.ToView("UsersViewModel");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("Vocabulary");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyTempModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("VocabularyTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetRoles", "RolesNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetUsers", "UsersNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RolesNav");
|
||||
|
||||
b.Navigation("UsersNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.OrderModel", "OrderNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorTypeModel", "TypeNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("TypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("OrderNav");
|
||||
|
||||
b.Navigation("TypeNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorModel", "DoorNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("DoorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DoorNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.CompanyModel", "CompanyNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CompanyId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CompanyNav");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class tryFixSqlErr : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -177,28 +177,6 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
b.ToTable("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ConfigModel", b =>
|
||||
{
|
||||
b.Property<string>("chiave")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("note")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valore")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valoreStd")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("chiave");
|
||||
|
||||
b.ToTable("Config");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorId")
|
||||
@@ -776,6 +754,7 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
@@ -13,7 +13,6 @@ namespace WebDoorCreator.Data.Services
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
private int vetoRemoveProcSec { get; set; } = 10;
|
||||
/// <summary>
|
||||
/// Init classe
|
||||
/// </summary>
|
||||
@@ -39,8 +38,6 @@ namespace WebDoorCreator.Data.Services
|
||||
// setup canali pub/sub
|
||||
CalcReqPipe = new MessagePipe(redisConn, Constants.CALC_REQ_QUEUE);
|
||||
CalcDonePipe = new MessagePipe(redisConn, Constants.CALC_DONE_QUEUE);
|
||||
// leggo conf speciali
|
||||
vetoRemoveProcSec = _configuration.GetValue<int>("RumtimeOpt:VetoRemoveProcessing");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
@@ -174,16 +171,6 @@ namespace WebDoorCreator.Data.Services
|
||||
answ = $"{rawData}";
|
||||
}
|
||||
}
|
||||
// se non trovata --> missing!
|
||||
if (string.IsNullOrEmpty(answ))
|
||||
{
|
||||
// leggo missing standard...
|
||||
string missingFilePath = Path.Combine(System.IO.Directory.GetCurrentDirectory(), "wwwroot/images", "MissingOrange.svg");
|
||||
if (File.Exists(missingFilePath))
|
||||
{
|
||||
answ = File.ReadAllText(missingFilePath);
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
@@ -598,78 +585,16 @@ namespace WebDoorCreator.Data.Services
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Upsert for single hash record in processing
|
||||
/// Upsert for single hash record
|
||||
/// </summary>
|
||||
/// <returns>Dictionary of DoorId, saveVersNumb</returns>
|
||||
public async Task<long> RequestProcessingUpsert(string doorId, string vers)
|
||||
{
|
||||
RedisKey currKey = new RedisKey(Constants.CALC_REQ_PROC);
|
||||
long numReq = await RedHashUpsert(currKey, doorId, vers);
|
||||
// aggiungo cache veto rimozione da coda processing
|
||||
RedisKey currVetoKey = new RedisKey($"{Constants.CALC_REQ_PROC}:{doorId}");
|
||||
await redisDb.StringSetAsync(currVetoKey, vers, TimeSpan.FromSeconds(vetoRemoveProcSec));
|
||||
return numReq;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset to queue request for specified DoorIdList
|
||||
/// </summary>
|
||||
/// <returns>Dictionary of DoorId, saveVersNumb</returns>
|
||||
public async Task<List<string>> ResetQueueByDoorList(List<string> DoorIdList)
|
||||
{
|
||||
int num2proc = DoorIdList.Count;
|
||||
List<string> listDone = new List<string>();
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
// cerco le richieste processing
|
||||
RedisKey currKey = new RedisKey(Constants.CALC_REQ_PROC);
|
||||
var rawData = await redisDb.HashGetAllAsync(currKey);
|
||||
foreach (var item in rawData)
|
||||
{
|
||||
// se è nell'elenco...
|
||||
if (DoorIdList.Contains($"{item.Name}"))
|
||||
{
|
||||
await RequestPendingUpsert(item.Name!, item.Value!);
|
||||
await RequestProcessingRemove(item.Name!);
|
||||
listDone.Add($"{item.Name}");
|
||||
}
|
||||
}
|
||||
// cerco le richieste con errori
|
||||
currKey = new RedisKey(Constants.CALC_REQ_ERRS);
|
||||
rawData = await redisDb.HashGetAllAsync(currKey);
|
||||
foreach (var item in rawData)
|
||||
{
|
||||
// se è nell'elenco...
|
||||
if (DoorIdList.Contains($"{item.Name}"))
|
||||
{
|
||||
await RequestPendingUpsert(item.Name!, item.Value!);
|
||||
await RequestErrRemove(item.Name!);
|
||||
listDone.Add($"{item.Name}");
|
||||
}
|
||||
}
|
||||
// cerco le richieste processed
|
||||
currKey = new RedisKey(Constants.CALC_REQ_DONE);
|
||||
rawData = await redisDb.HashGetAllAsync(currKey);
|
||||
foreach (var item in rawData)
|
||||
{
|
||||
// se è nell'elenco...
|
||||
if (DoorIdList.Contains($"{item.Name}"))
|
||||
{
|
||||
await RequestPendingUpsert(item.Name!, item.Value!);
|
||||
await RequestDoneRemove(item.Name!);
|
||||
listDone.Add($"{item.Name}");
|
||||
}
|
||||
}
|
||||
// calcolo eventuali porte NON ancora richieste...
|
||||
foreach (var item in listDone)
|
||||
{
|
||||
DoorIdList.Remove(item);
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"ResetQueueByDoorList | doors #: {num2proc} --> {DoorIdList.Count} | EXEC in: {ts.TotalMilliseconds} ms");
|
||||
return DoorIdList;
|
||||
}
|
||||
/// <summary>
|
||||
/// Reset to queue request all processing/processed data
|
||||
/// </summary>
|
||||
@@ -709,38 +634,7 @@ namespace WebDoorCreator.Data.Services
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"ResetQueue | REDIS EXEC in: {ts.TotalMilliseconds} ms");
|
||||
return fatto;
|
||||
}
|
||||
/// <summary>
|
||||
/// Reset to queue request all processing stuck data (veto check)
|
||||
/// </summary>
|
||||
/// <returns>Boolean, executed</returns>
|
||||
public async Task<bool> ResetQueueProcessing()
|
||||
{
|
||||
bool fatto = false;
|
||||
await Task.Delay(1);
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
// cerco le richieste processing
|
||||
RedisKey currKey = new RedisKey(Constants.CALC_REQ_PROC);
|
||||
RedisKey currVetoKey = new RedisKey($"{Constants.CALC_REQ_PROC}:0");
|
||||
var rawData = await redisDb.HashGetAllAsync(currKey);
|
||||
foreach (var item in rawData)
|
||||
{
|
||||
// verifico SE siano senza veto rimozione...
|
||||
currVetoKey = new RedisKey($"{Constants.CALC_REQ_PROC}:{item.Name}");
|
||||
var redisVal = await redisDb.StringGetAsync(currVetoKey);
|
||||
if (!redisVal.HasValue)
|
||||
{
|
||||
await RequestPendingUpsert(item.Name!, item.Value!);
|
||||
await RequestProcessingRemove(item.Name!);
|
||||
fatto = true;
|
||||
}
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"ResetQueueProcessing | REDIS EXEC in: {ts.TotalMilliseconds} ms");
|
||||
Log.Debug($"ResetQueue | REDIS in: {ts.TotalMilliseconds} ms");
|
||||
return fatto;
|
||||
}
|
||||
|
||||
@@ -813,7 +707,7 @@ namespace WebDoorCreator.Data.Services
|
||||
// salvo nell'archivio REDIS delle porte il DDF corrente (key=doorId.versNumb), potrebbe
|
||||
// venire buono anche x eventuale UNDO...
|
||||
RedisKey currDdfKey = new RedisKey($"{Constants.CALC_REQ_DDF_CACHE}:{sDoorId}:{sCurrVers}");
|
||||
await redisDb.StringSetAsync(currDdfKey, FullDDF, WeekLongCache);
|
||||
await redisDb.StringSetAsync(currDdfKey, FullDDF, DayLongCache);
|
||||
|
||||
// invio sul canale dei messaggi il numero di items in coda attuali x chiedere esecuzione...
|
||||
long numPending = await NumRequestPending();
|
||||
@@ -1129,13 +1023,6 @@ namespace WebDoorCreator.Data.Services
|
||||
{
|
||||
get => TimeSpan.FromHours(24 * 7);
|
||||
}
|
||||
/// <summary>
|
||||
/// Durata cache di 24h
|
||||
/// </summary>
|
||||
private TimeSpan MonthLongCache
|
||||
{
|
||||
get => TimeSpan.FromDays(30);
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
|
||||
@@ -1,46 +1,41 @@
|
||||
SET ANSI_NULLS ON
|
||||
/****** Object: View [dbo].[v_UserRolesClaims] Script Date: 17/03/2023 08:48:50 ******/
|
||||
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
|
||||
|
||||
dbo.AspNetUsers.Id AS UserId
|
||||
,dbo.AspNetUsers.UserName
|
||||
,dbo.AspNetUsers.Email
|
||||
,ISNULL(dbo.AspNetUserRoles.RoleId, '') as RoleId
|
||||
,ISNULL(dbo.AspNetRoles.Name, '') as RoleName
|
||||
--,dbo.AspNetRoles.Id
|
||||
--,dbo.AspNetRoles.NormalizedName
|
||||
--,dbo.AspNetRoles.ConcurrencyStamp
|
||||
--,dbo.AspNetUserRoles.UserId
|
||||
--,dbo.AspNetUsers.NormalizedUserName
|
||||
--,dbo.AspNetUsers.NormalizedEmail
|
||||
--,dbo.AspNetUsers.EmailConfirmed
|
||||
--,dbo.AspNetUsers.PasswordHash
|
||||
--,dbo.AspNetUsers.SecurityStamp
|
||||
--,dbo.AspNetUsers.ConcurrencyStamp AS Expr2
|
||||
--,dbo.AspNetUsers.PhoneNumber
|
||||
--,dbo.AspNetUsers.PhoneNumberConfirmed
|
||||
--,dbo.AspNetUsers.TwoFactorEnabled
|
||||
--,dbo.AspNetUsers.LockoutEnd
|
||||
--,dbo.AspNetUsers.LockoutEnabled
|
||||
--,dbo.AspNetUsers.AccessFailedCount
|
||||
--,dbo.AspNetUserClaims.Id AS Expr3
|
||||
--,dbo.AspNetUserClaims.UserId AS Expr4
|
||||
--,dbo.AspNetUserClaims.ClaimType
|
||||
--,dbo.AspNetUserClaims.ClaimValue
|
||||
FROM dbo.AspNetRoles
|
||||
INNER JOIN dbo.AspNetUserRoles ON dbo.AspNetRoles.Id = dbo.AspNetUserRoles.RoleId
|
||||
RIGHT OUTER JOIN dbo.AspNetUsers ON dbo.AspNetUserRoles.UserId = dbo.AspNetUsers.Id
|
||||
--LEFT OUTER JOIN dbo.AspNetUserClaims ON dbo.AspNetUsers.Id = dbo.AspNetUserClaims.UserId
|
||||
GO
|
||||
@@ -1,25 +0,0 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.User
|
||||
{
|
||||
/// <summary>
|
||||
/// Classe generalizzaizone identity (user + roles + claims) x gestione semplificata in editing
|
||||
/// </summary>
|
||||
public class UserData
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public List<System.Security.Claims.Claim> Claims { get; set; } = new List<System.Security.Claims.Claim>();
|
||||
|
||||
public IdentityUser Identity { get; set; } = null!;
|
||||
|
||||
public List<string> Roles { get; set; } = new List<string>();
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -76,8 +76,6 @@ namespace WebDoorCreator.Data
|
||||
public virtual DbSet<VocabularyTempModel> DbSetVocabularyTemp { get; set; } = null!;
|
||||
public virtual DbSet<LanguageModel> DbSetLanguages { get; set; } = null!;
|
||||
public virtual DbSet<SerializedDoorsModel> DbSetSerializedDoors { get; set; } = null!;
|
||||
public virtual DbSet<ConfigModel> DbSetConfig { get; set; } = null!;
|
||||
public virtual DbSet<PrtRepOrderModel> DbSetPrtRepOrder { get; set; } = null!;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -132,14 +130,13 @@ namespace WebDoorCreator.Data
|
||||
modelBuilder.Entity<AspNetUserRoles>().ToTable(nameof(AspNetUserRoles), t => t.ExcludeFromMigrations());
|
||||
|
||||
|
||||
// Creazione viste migrate
|
||||
modelBuilder.Entity<UsersViewModel>().ToView("v_UserRolesClaims");
|
||||
modelBuilder.Entity<OrderStatusViewModel>().ToView("v_OrderStatus");
|
||||
//modelBuilder.Entity<OrderStatusViewModel>().ToView(nameof(OrderStatusViewModel));
|
||||
//Creazione viste migrate
|
||||
modelBuilder.Entity<UsersViewModel>().ToView(nameof(UsersViewModel));
|
||||
modelBuilder.Entity<OrderStatusViewModel>().ToView(nameof(OrderStatusViewModel));
|
||||
|
||||
|
||||
modelBuilder.Entity<AspNetUserRoles>().HasKey(c => new { c.UserId, c.RoleId });
|
||||
modelBuilder.Entity<UsersViewModel>().HasKey(c => new { c.UserId, c.RoleId, c.ClaimId });
|
||||
modelBuilder.Entity<UsersViewModel>().HasKey(c => new { c.UserId, c.RoleId });
|
||||
modelBuilder.Entity<ListValuesModel>().HasKey(c => new { c.TableName, c.FieldName, c.Value });
|
||||
modelBuilder.Entity<ListValuesTempModel>().HasKey(c => new { c.TableName, c.FieldName, c.Value });
|
||||
modelBuilder.Entity<VocabularyModel>().HasKey(c => new { c.Lingua, c.Lemma });
|
||||
@@ -163,13 +160,8 @@ namespace WebDoorCreator.Data
|
||||
{
|
||||
modelBuilder.ApplyConfiguration(new ListValuesConfiguration());
|
||||
modelBuilder.ApplyConfiguration(new LanguageConfiguration());
|
||||
|
||||
}
|
||||
|
||||
// modello dati x report ordini
|
||||
modelBuilder.Entity<PrtRepOrderModel>().HasKey(c => new { c.OrderId, c.DoorId, c.ObjectKey});
|
||||
|
||||
|
||||
|
||||
//modelBuilder.Seed();
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EgwCoreLib.Utils" Version="1.4.2305.1916" />
|
||||
<PackageReference Include="EntityFrameworkCore.SqlServer.HierarchyId" Version="3.0.1" />
|
||||
<PackageReference Include="MailKit" Version="3.5.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="6.0.11" />
|
||||
|
||||
@@ -87,27 +87,6 @@ namespace WebDoorCreator.SDK
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Effettua test ping all'indirizzo del server
|
||||
/// </summary>
|
||||
public bool testPingOk
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
Ping myPing = new Ping();
|
||||
// timeout a 1 sec!
|
||||
var testPing= myPing.Send(_baseIp, 1000);
|
||||
answ = testPing.Status == IPStatus.Success;
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// rendo!
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -155,7 +134,7 @@ namespace WebDoorCreator.SDK
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset di tutte le code a REQUEST
|
||||
/// Reset delel code di processing
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ResetQueue()
|
||||
@@ -167,15 +146,6 @@ namespace WebDoorCreator.SDK
|
||||
var rawData = callUrlPost(urlResetQueue, "", parList);
|
||||
return rawData;
|
||||
}
|
||||
/// <summary>
|
||||
/// Reset delle code di processing a REQUEST
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ResetQueueProcessing()
|
||||
{
|
||||
var rawData = callUrlPost(urlResetQueueProc, "");
|
||||
return rawData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restitusice l'elenco degli esiti di processing
|
||||
@@ -197,7 +167,6 @@ namespace WebDoorCreator.SDK
|
||||
protected const string urlActLenght = "api/Queue/ActLenght";
|
||||
protected const string urlAlive = "/api/Alive";
|
||||
protected const string urlResetQueue = "api/Queue/ResetQueue";
|
||||
protected const string urlResetQueueProc = "api/Queue/ResetQueueProcessing";
|
||||
protected const string urlSaveProcRes = "api/Queue/SaveProcResult";
|
||||
protected const string urlStatusList = "api/Queue/StatusList";
|
||||
protected const string urlTakeNextItems = "api/Queue/TakeNextItems";
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
<div class="d-flex justify-content-center fw-bold fs-2 mb-5">Powered BY</div>
|
||||
<div class="d-flex justify-content-center">
|
||||
<img src="~/images/LogoEgw.png" style="height: 10rem; width: 10rem;" />
|
||||
<img src="~/images/LOGO_EGALWARE_jpg-01.jpg" style="height: 10rem; width: 10rem;" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
<div class="d-flex justify-content-center fw-bold fs-2 mb-5">Powered BY</div>
|
||||
<div class="d-flex justify-content-center">
|
||||
<img src="~/images/LogoEgw.png" style="height: 10rem; width: 10rem;" />
|
||||
<img src="~/images/LOGO_EGALWARE_jpg-01.jpg" style="height: 10rem; width: 10rem;" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace WebDoorCreator.UI.Areas.Identity.Pages.Account
|
||||
private async Task CheckSuperAdmin()
|
||||
{
|
||||
//se non ci fosse --> creo samuele come superadmin
|
||||
string superUser = "zaccaria.majid01@egalware.com";
|
||||
string superUser = "samuele@steamware.net";
|
||||
string superPwd = "viaDante16!";
|
||||
string ADMIN_ROLE = "SuperAdmin";
|
||||
var user = await _userManager.FindByEmailAsync(superUser);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
<div class="d-flex justify-content-center fw-bold fs-2 mb-5">Powered BY</div>
|
||||
<div class="d-flex justify-content-center">
|
||||
<img src="~/images/LogoEgw.png" style="height: 10rem; width: 10rem;" />
|
||||
<img src="~/images/LOGO_EGALWARE_jpg-01.jpg" style="height: 10rem; width: 10rem;" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
<div class="d-flex justify-content-center fw-bold fs-2 mb-5">Powered BY</div>
|
||||
<div class="d-flex justify-content-center">
|
||||
<img src="~/images/LogoEgw.png" style="height: 10rem; width: 10rem;" />
|
||||
<img src="~/images/LOGO_EGALWARE_jpg-01.jpg" style="height: 10rem; width: 10rem;" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
@if (isAdd)
|
||||
{
|
||||
<button class="btn btn-sm btn-success" @onclick="()=>addOrRemoveOneDoorNumber()"><i class="fa-solid fa-plus"></i> <i class="fa-solid fa-1"></i></button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-sm btn-danger" @onclick="()=>addOrRemoveOneDoorNumber()"><i class="fa-solid fa-minus"></i> <i class="fa-solid fa-1"></i></button>
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.JSInterop;
|
||||
using WebDoorCreator.UI.Data;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.Buttons
|
||||
{
|
||||
public partial class ButtonAddRemDoor
|
||||
{
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public int DoorId { get; set; } = 0;
|
||||
[Parameter]
|
||||
public int OrderId { get; set; } = 0;
|
||||
|
||||
[Parameter]
|
||||
public bool isAdd { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> E_isChange { get; set; }
|
||||
|
||||
protected bool doorChange { get; set; } = false;
|
||||
|
||||
protected async Task addOrRemoveOneDoorNumber()
|
||||
{
|
||||
//var door = new DoorModel();
|
||||
doorChange = false;
|
||||
var done = await WDService.DoorModQty(OrderId, DoorId, isAdd);
|
||||
if (done)
|
||||
{
|
||||
doorChange = true;
|
||||
await E_isChange.InvokeAsync(doorChange);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
<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="() => doSave()"><i class="fa-solid fa-floppy-disk"></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)
|
||||
{
|
||||
@@ -11,34 +10,15 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-secondary"><i class="fa-solid fa-rotate-right"></i></button>
|
||||
<button class="btn btn-secondary"><i class="fa-solid fa-floppy-disk"></i></button>
|
||||
<button class="btn btn-secondary"><i class="fa-solid fa-cube"></i></button>
|
||||
}
|
||||
@*<button class="btn btn-success" @onclick="() => toOrderPage()">Return to Order <b>@idOrd</b></button>*@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal" id="errListModal" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h1 class="modal-title fs-5" id="errListModalLabel">Current error</h1>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body" style="max-height: 80vh">
|
||||
<div class="w-100 text-start">
|
||||
@ErrCode
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal Order -->
|
||||
@*<div class="modal" id="errListModal" tabindex="-1" aria-hidden="true">
|
||||
<div class="modal fade" id="errListModal" tabindex="-1" aria-labelledby="errListModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" style=" overflow-y: initial ">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header d-flex justify-content-between">
|
||||
@@ -55,4 +35,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
</div>
|
||||
|
||||
<!-- Modal Order -->
|
||||
<div class="modal fade" id="errListModal" tabindex="-1" aria-labelledby="errListModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" style=" overflow-y: initial ">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header d-flex justify-content-between">
|
||||
<h1 class="modal-title fs-5" id="errListModalLabel">Current error</h1>
|
||||
<i class="fa-solid fa-triangle-exclamation text-danger fs-5"></i>
|
||||
</div>
|
||||
<div class="modal-body" style="max-height: 80vh; overflow-y: auto;">
|
||||
<div class="w-100 text-start">
|
||||
@ErrCode
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,5 +1,7 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using Newtonsoft.Json;
|
||||
using System.Configuration;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.DTO;
|
||||
using WebDoorCreator.Data.Services;
|
||||
@@ -9,14 +11,11 @@ namespace WebDoorCreator.UI.Components.Buttons
|
||||
{
|
||||
public partial class ButtonsDoorDef
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[CascadingParameter]
|
||||
public bool B_doorOpUpd { get; set; }
|
||||
|
||||
[CascadingParameter]
|
||||
public string ErrCode { get; set; } = "ERROREEEEE";
|
||||
|
||||
[CascadingParameter]
|
||||
public int idDoor { get; set; } = 0;
|
||||
|
||||
@@ -25,11 +24,6 @@ namespace WebDoorCreator.UI.Components.Buttons
|
||||
|
||||
[CascadingParameter]
|
||||
public bool IsErr { get; set; } = false;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected Dictionary<string, string> a { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
protected bool change
|
||||
@@ -68,13 +62,20 @@ namespace WebDoorCreator.UI.Components.Buttons
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDCService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WDCUserService WDCUService { get; set; } = null!;
|
||||
public async Task SaveYaml(string ddfContent)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
string fileName = Path.Combine("temp", $"Conf.yaml");
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
if (File.Exists(fileName))
|
||||
{
|
||||
File.Delete(fileName);
|
||||
}
|
||||
// scrivo!
|
||||
File.WriteAllText(fileName, ddfContent);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua Richiesta visione porta 3D
|
||||
@@ -98,6 +99,7 @@ namespace WebDoorCreator.UI.Components.Buttons
|
||||
if (listOp != null)
|
||||
{
|
||||
// chiamo metodo x avewre DDF serializzato
|
||||
//var list2Ord = ;
|
||||
var CurrentCompoOrder = await WDCService.ListValuesGetAll("*", "Hardware");
|
||||
if (CurrentCompoOrder != null)
|
||||
{
|
||||
@@ -110,10 +112,12 @@ namespace WebDoorCreator.UI.Components.Buttons
|
||||
listOp = listOp.OrderBy(d => ordListVal.IndexOf(d.ObjectId)).ToList();
|
||||
|
||||
string currDdf = currDdfConv.GetSerialized(listOp);
|
||||
// FIXME TODO: si potrebbe eliminare in futuro che va su REDIS
|
||||
//await SaveYaml(currDdf);
|
||||
// versione corrente del DDF generato
|
||||
int currVers = await QDataServ.SendCalcReq(idDoor, currDdf);
|
||||
|
||||
if (currVers > 0)
|
||||
if(currVers > 0)
|
||||
{
|
||||
IsErr = false;
|
||||
}
|
||||
@@ -121,14 +125,6 @@ namespace WebDoorCreator.UI.Components.Buttons
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected async Task doRecalcAll()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
await QDataServ.ResetQueue();
|
||||
await doSave();
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
@@ -146,10 +142,14 @@ namespace WebDoorCreator.UI.Components.Buttons
|
||||
//change = paramsChanged;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Methods
|
||||
protected async Task toOrderPage()
|
||||
{
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Do you really want to return to the order page without saving current work?"))
|
||||
return;
|
||||
|
||||
await Task.Delay(1);
|
||||
NavManager.NavigateTo($"OrderDetails?idOrd={idOrd}");
|
||||
}
|
||||
private async void WDCRService_EA_UpdDoorOp()
|
||||
{
|
||||
await InvokeAsync(() =>
|
||||
@@ -157,7 +157,5 @@ namespace WebDoorCreator.UI.Components.Buttons
|
||||
StateHasChanged();
|
||||
});
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ else
|
||||
<thead>
|
||||
<tr class="bg-dark text-light">
|
||||
<th>
|
||||
@*<button class="btn btn-success btn-sm" @onclick="() => toggleAddNew()"><i class="fas fa-plus"></i></button>*@
|
||||
</th>
|
||||
<th>Company</th>
|
||||
<th>VAT</th>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Data;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.CompMan
|
||||
{
|
||||
@@ -8,12 +8,12 @@ namespace WebDoorCreator.UI.Components.CompMan
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<CompanyModel> E_currCompany { get; set; }
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<CompanyModel> E_currCompany { get; set; }
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
@@ -33,11 +33,6 @@ namespace WebDoorCreator.UI.Components.CompMan
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task editRec(CompanyModel currComp)
|
||||
{
|
||||
await E_currCompany.InvokeAsync(currComp);
|
||||
}
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
ListRecords = null;
|
||||
@@ -47,6 +42,11 @@ namespace WebDoorCreator.UI.Components.CompMan
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
private async Task editRec(CompanyModel currComp)
|
||||
{
|
||||
await E_currCompany.InvokeAsync(currComp);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
<div class="row me-2">
|
||||
<div class="row">
|
||||
<div class="row mb-1">
|
||||
<div class="col-4">
|
||||
@if (DoorOp2Save != null)
|
||||
@@ -13,9 +12,7 @@ else
|
||||
<div>Pending changes: <b>@DoorOp2Save.Count()</b></div>
|
||||
}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
@*<ButtonsDoorDef></ButtonsDoorDef>*@
|
||||
</div>
|
||||
<div class="col-4"></div>
|
||||
|
||||
@if (paramsChanged)
|
||||
{
|
||||
@@ -44,22 +41,20 @@ else
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="d-flex justify-content-between flex-wrap">
|
||||
@foreach (var item in CurrBaseDoorOp)
|
||||
@foreach (var item in CurrBaseDoorOp)
|
||||
{
|
||||
@if (item.ObjectId == "Size" || item.ObjectId == "Swing" || item.ObjectId == "Finishing" || item.ObjectId == "Properties")
|
||||
{
|
||||
@if (item.ObjectId == "Size" || item.ObjectId == "Swing" || item.ObjectId == "Finishing" || item.ObjectId == "Properties")
|
||||
{
|
||||
<div class="col-2 m-2 small p-2 mt-2" style="border: 2px solid black; border-radius: 15px;">
|
||||
<DoorDataBlock paramsChanged=@paramsChanged E_doorOp2Save="doSetDoorOp2Save" BlockDoorOp="@item"></DoorDataBlock>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="col-12 small p-2 mt-2 text-start" style="border: 2px solid black; border-radius: 15px;">
|
||||
<DoorDataBlock paramsChanged=@paramsChanged E_doorOp2Save="doSetDoorOp2Save" BlockDoorOp="@item"></DoorDataBlock>
|
||||
</div>
|
||||
}
|
||||
<div class="col-6 border">
|
||||
<DoorDataBlock E_doorOp2Save="doSetDoorOp2Save" BlockDoorOp="@item"></DoorDataBlock>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
else
|
||||
{
|
||||
<div class="col-12 border">
|
||||
<DoorDataBlock E_doorOp2Save="doSetDoorOp2Save" BlockDoorOp="@item"></DoorDataBlock>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Data;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.DoorDef
|
||||
{
|
||||
@@ -17,9 +17,6 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
[Parameter]
|
||||
public EventCallback<bool> E_DoorOpReqRel { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public int doorId { get; set; } = 0;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
@@ -35,14 +32,11 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
[Inject]
|
||||
protected QueueDataService QDataServ { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
|
||||
protected async Task doSaveDoorOp()
|
||||
{
|
||||
if (DoorOp2Save != null)
|
||||
@@ -50,9 +44,6 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
var done = await WDService.DoorOpUpdate(DoorOp2Save);
|
||||
if (done)
|
||||
{
|
||||
string currDdf = await WDService.DoorOpGetDDF(doorId) ?? "";
|
||||
|
||||
int currVers = await QDataServ.SendCalcReq(doorId, currDdf);
|
||||
DoorOp2Save = new List<DoorOpModel>();
|
||||
paramsChanged = false;
|
||||
await Task.Delay(50);
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
}
|
||||
}
|
||||
</div>
|
||||
@*<hr />*@
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -51,9 +51,6 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Parameter]
|
||||
public bool paramsChanged { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Lista delle conf assocaite alle BlockDoorOp
|
||||
/// </summary>
|
||||
@@ -63,17 +60,19 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
/// Lista delle BlockDoorOp da passare
|
||||
/// </summary>
|
||||
protected Dictionary<string, Dictionary<string, string>> bdoList { get; set; } = new Dictionary<string, Dictionary<string, string>>();
|
||||
|
||||
[Parameter]
|
||||
public bool paramsChanged { get; set; } = false;
|
||||
protected string userLang { get; set; } = "EN";
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected bool showCirc { get; set; } = false;
|
||||
|
||||
[Inject]
|
||||
protected WDCRefreshService WDCRService { get; set; } = null!;
|
||||
|
||||
|
||||
protected async Task doSaveBlock(Dictionary<string, Dictionary<string, string>> updSet)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
@@ -102,6 +101,9 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected bool showCirc { get; set; } = false;
|
||||
|
||||
protected Dictionary<string, List<string>> getParamsConfig(string paramName)
|
||||
{
|
||||
Dictionary<string, List<string>> answ = new Dictionary<string, List<string>>();
|
||||
|
||||
@@ -2,26 +2,23 @@
|
||||
{
|
||||
<div class="d-flex justify-content-between px-2 py-2" style="background-color: @bgColor">
|
||||
<div class="d-flex justify-content-between">
|
||||
|
||||
<button class="btn btn-success" @onclick="() => toOrderPage()">Return to Order <b>@currOrderStatus.OrderId</b></button>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
<button class="btn btn-danger" @onclick="() => deleteRecord()">Delete Door <i class="fa-solid fa-trash"></i></button>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
@*<div class="badge rounded-pilll bg-dark text-light">Insert Date</div>*@
|
||||
<div>Insert Date: <b>@currOrderStatus.DateIns</b></div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
@*<div class="badge rounded-pilll bg-dark text-light">Order External Code</div>*@
|
||||
<div>Order External Code: <b>@currOrderStatus.OrderExtCode</b></div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
@*<div class="badge rounded-pilll bg-dark text-light">Models Number</div>*@
|
||||
<div class="text-center">Models Number: <b>@currOrderStatus.NumType</b></div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
@*<div class="badge rounded-pilll bg-dark text-light">Doors Number</div>*@
|
||||
<div class="text-center">Doors Number: <b>@currOrderStatus.NumDoors</b></div>
|
||||
</div>
|
||||
<div style="background: #AFCFD1; text-align: end">
|
||||
<ButtonsDoorDef idOrd="@currOrderStatus.OrderId"></ButtonsDoorDef>
|
||||
<ButtonsDoorDef></ButtonsDoorDef>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -1,74 +1,15 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.DoorDef
|
||||
{
|
||||
public partial class DoorDefOrderTopRow
|
||||
{
|
||||
#region Public Properties
|
||||
[Parameter]
|
||||
public OrderStatusViewModel? currOrderStatus { get; set; } = null;
|
||||
|
||||
[Parameter]
|
||||
public string bgColor { get; set; } = "";
|
||||
|
||||
[Parameter]
|
||||
public OrderStatusViewModel? currOrderStatus { get; set; } = null;
|
||||
|
||||
[CascadingParameter]
|
||||
public int idDoor { get; set; } = 0;
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDCService { get; set; } = null!;
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// Elimina porta se richiesto
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task deleteRecord()
|
||||
{
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Do you really want to delete this door?"))
|
||||
return;
|
||||
await Task.Delay(1);
|
||||
if (idDoor > 0 && currOrderStatus != null)
|
||||
{
|
||||
var ordDoors = await WDCService.DoorGetByOrderId(currOrderStatus.OrderId);
|
||||
if (ordDoors != null)
|
||||
{
|
||||
var CurrDoor = ordDoors.Where(x => x.DoorId == idDoor).FirstOrDefault();
|
||||
if (CurrDoor != null)
|
||||
{
|
||||
await WDCService.DoorDelete(CurrDoor);
|
||||
if (currOrderStatus != null)
|
||||
{
|
||||
NavManager.NavigateTo($"OrderDetails?idOrd={currOrderStatus.OrderId}&orderStat={currOrderStatus.OrderStatus}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
protected async Task toOrderPage()
|
||||
{
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Do you really want to return to the order page without saving current work?"))
|
||||
return;
|
||||
|
||||
await Task.Delay(1);
|
||||
NavManager.NavigateTo($"OrdersHomePage?idOrd={currOrderStatus.OrderId}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,12 +7,10 @@ else
|
||||
<div class="d-flex justify-content-between small">
|
||||
<div style="width: 90%">
|
||||
<div style="width: 90%;">
|
||||
<div class="row my-1 @doCheckVal()">
|
||||
@if (HwCode == "lockedge" || HwCode == "hingeedge" || HwCode == "top" || HwCode == "bottom")
|
||||
{
|
||||
<b>@HwCode</b>
|
||||
}
|
||||
<div class="row my-1">
|
||||
<b>@HwCode</b>
|
||||
</div>
|
||||
@doCheckVal()
|
||||
@foreach (var item in currVal)
|
||||
{
|
||||
@if (isCombo(item.Key))
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
private Dictionary<string, string> _currVal = new Dictionary<string, string>();
|
||||
Dictionary<string, string> _currVal = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// Array dati effettivo x gestione modifiche
|
||||
@@ -109,6 +109,8 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected async Task doSave()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
|
||||
@@ -1,29 +1,25 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Data;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.DoorDef
|
||||
{
|
||||
public partial class DoorDefStepList
|
||||
{
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public int CurrDoorDefStatus { get; set; } = 10;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> E_CurrStep { get; set; }
|
||||
|
||||
protected string currColor { get; set; } = "";
|
||||
|
||||
protected List<ListValuesModel>? currListDoorDefStatus { get; set; } = null;
|
||||
|
||||
protected List<string> listBord01 { get; set; } = new();
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
protected async Task changeStep(int step)
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
await E_CurrStep.InvokeAsync(step);
|
||||
StateHasChanged();
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
protected async Task doChangeStep(string actDoorDefStep)
|
||||
@@ -33,6 +29,9 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
//await E_StepChanged.InvokeAsync(actDoorDefStep);
|
||||
}
|
||||
|
||||
protected List<ListValuesModel>? currListDoorDefStatus { get; set; } = null;
|
||||
protected string currColor { get; set; } = "";
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
@@ -44,6 +43,7 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
if (stat2Display != null)
|
||||
{
|
||||
currColor = stat2Display.DefaultVal;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,9 +54,13 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
listBord01.Add("White");
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
protected List<string> listBord01 { get; set; } = new();
|
||||
|
||||
protected async Task changeStep(int step)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
await E_CurrStep.InvokeAsync(step);
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 px-0">
|
||||
</div>
|
||||
<div class="col-8 pe-0">
|
||||
<div class="mb-3 ps-1 pe-0">
|
||||
<DoorDefStepList CurrDoorDefStatus="currDefStep" E_CurrStep="setStep"></DoorDefStepList>
|
||||
</div>
|
||||
<div class="px-2">
|
||||
<CascadingValue Value="@WDCUService.userId">
|
||||
<CascadingValue Value="@idDoor">
|
||||
<CascadingValue Value="B_doorOpUpd">
|
||||
@if (orderStatus != null)
|
||||
{
|
||||
}
|
||||
@if (currDefStep == 10)
|
||||
{
|
||||
@if (ListBaseDoorOp != null)
|
||||
{
|
||||
|
||||
<BaseParamList doorId=@idDoor CurrBaseDoorOp="@ListBaseDoorOp" E_DoorOpReqRel="doReload"></BaseParamList>
|
||||
}
|
||||
}
|
||||
else if (currDefStep == 20)
|
||||
{
|
||||
<HardwareList isHwStep="@setHwToNull" DoorId="@idDoor" Lingua="@userLang"></HardwareList>
|
||||
}
|
||||
else if (currDefStep == 30)
|
||||
{
|
||||
<ReportList doorId="@idDoor" Lingua="@userLang"></ReportList>
|
||||
}
|
||||
</CascadingValue>
|
||||
</CascadingValue>
|
||||
</CascadingValue>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 p-0">
|
||||
<CascadingValue Value="@idDoor">
|
||||
<CascadingValue Value="IsErr">
|
||||
<CascadingValue Value="ErrCode">
|
||||
<DoorPreview doorW="50%" SvgContent="@DoorSvgContent"></DoorPreview>
|
||||
</CascadingValue>
|
||||
</CascadingValue>
|
||||
</CascadingValue>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,11 +1,12 @@
|
||||
<div class="" style="height:100%; width:100%; background: linear-gradient(#AFCFD1, #92B2C4);min-height: 50rem;">
|
||||
<ButtonsDoorDef></ButtonsDoorDef>
|
||||
<div class="" style="height:100%; width:100%; position:sticky; background: linear-gradient(#AFCFD1, #92B2C4);min-height: 55rem;max-height: 55rem;">
|
||||
@*@if (IsErr)
|
||||
{
|
||||
@*<div class="alert alert-warning text-center fs-2">@ErrCode</div>
|
||||
}*@
|
||||
@if (!string.IsNullOrEmpty(@SvgContent))
|
||||
{
|
||||
<div style="align-items: center;display: flex;flex-wrap: wrap;justify-content: center;">
|
||||
<div style="width: @doorW; max-height: 30rem;">
|
||||
@svgPreview
|
||||
</div>
|
||||
<div style="height: 0;width: 15rem;align-items: center;display: flex;flex-wrap: wrap;justify-content: center;">
|
||||
@svgPreview
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -7,11 +7,6 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
[Parameter]
|
||||
public string doorW { get; set; } = "";
|
||||
|
||||
[Parameter]
|
||||
public string SvgContent
|
||||
{
|
||||
@@ -20,9 +15,11 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
{
|
||||
_svgContent = value;
|
||||
}
|
||||
}
|
||||
protected string _svgContent { get; set; } = "";
|
||||
}
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
protected string _svgContent { get; set; } = "";
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
@*<div class="row bg-secondary text-light">
|
||||
<div class="col-4 p-0 fs-3 d-flex justify-content-between" @onclick="()=>doChangeStep(Core.Enum.DoorDefStep.Door)">
|
||||
@if (DoorDefStep == Core.Enum.DoorDefStep.Door)
|
||||
{
|
||||
<div class="tail-left"></div>
|
||||
<div class="@doorCSS flex-fill text-center">Door</div>
|
||||
<div class="arrow-right"></div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="@doorCSS flex-fill text-center">Door</div>
|
||||
}
|
||||
</div>
|
||||
<div class="col-4 p-0 fs-3 d-flex justify-content-between" @onclick="()=>doChangeStep(Core.Enum.DoorDefStep.Hardware)">
|
||||
@if (DoorDefStep == Core.Enum.DoorDefStep.Hardware)
|
||||
{
|
||||
<div class="tail-left"></div>
|
||||
<div class="@hwCSS flex-fill text-center">Hardware</div>
|
||||
<div class="arrow-right"></div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="@hwCSS flex-fill text-center">Hardware</div>
|
||||
}
|
||||
</div>
|
||||
<div class="col-4 p-0 fs-3 d-flex justify-content-between" @onclick="()=>doChangeStep(Core.Enum.DoorDefStep.Report)">
|
||||
@if (DoorDefStep == Core.Enum.DoorDefStep.Report)
|
||||
{
|
||||
<div class="tail-left"></div>
|
||||
<div class=" @reportCSS flex-fill text-center">Report</div>
|
||||
<div class="arrow-right"></div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class=" @reportCSS flex-fill text-center">Report</div>
|
||||
}
|
||||
</div>
|
||||
</div>*@
|
||||
@@ -0,0 +1,41 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.DoorDef
|
||||
{
|
||||
public partial class StepsList
|
||||
{
|
||||
[Parameter]
|
||||
public Core.Enum.DoorDefStep DoorDefStep { get; set; } = Core.Enum.DoorDefStep.Door;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<Core.Enum.DoorDefStep> E_StepChanged { get; set; }
|
||||
|
||||
//protected string doorCSS
|
||||
//{
|
||||
// get => DoorDefStep == Core.Enum.DoorDefStep.Door ? "bg-success" : "bg-secondary";
|
||||
//}
|
||||
//protected string hwCSS
|
||||
//{
|
||||
// get => DoorDefStep == Core.Enum.DoorDefStep.Hardware ? "bg-success" : "bg-secondary";
|
||||
//}
|
||||
//protected string reportCSS
|
||||
//{
|
||||
// get => DoorDefStep == Core.Enum.DoorDefStep.Report ? "bg-success" : "bg-secondary";
|
||||
//}
|
||||
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
protected async Task doChangeStep(Core.Enum.DoorDefStep actDoorDefStep)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
|
||||
await E_StepChanged.InvokeAsync(actDoorDefStep);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
/*.arrowItem {
|
||||
transform: skewX(20deg);
|
||||
}*/
|
||||
.arrow-right {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-top: 25px solid transparent;
|
||||
border-left: 30px solid #198754;
|
||||
border-bottom: 25px solid transparent;
|
||||
}
|
||||
.tail-left {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-top: 25px solid #198754;
|
||||
border-left: 30px solid transparent;
|
||||
border-bottom: 25px solid #198754;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
@bordL: 25px;
|
||||
@bordH: 30px;
|
||||
@itemColor: #198754;
|
||||
|
||||
/*.arrowItem {
|
||||
transform: skewX(20deg);
|
||||
}*/
|
||||
.arrow-right {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-top: @bordL solid transparent;
|
||||
border-left: @bordH solid @itemColor;
|
||||
border-bottom: @bordL solid transparent;
|
||||
}
|
||||
.tail-left {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-top: @bordL solid @itemColor;
|
||||
border-left: @bordH solid transparent;
|
||||
border-bottom: @bordL solid @itemColor;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
.arrow-right{width:0;height:0;border-top:25px solid transparent;border-left:30px solid #198754;border-bottom:25px solid transparent;}.tail-left{width:0;height:0;border-top:25px solid #198754;border-left:30px solid transparent;border-bottom:25px solid #198754;}
|
||||
@@ -2,36 +2,23 @@
|
||||
{
|
||||
@if (orderStatus == 10)
|
||||
{
|
||||
@if (isRecalc)
|
||||
{
|
||||
<div class="modalOrd">
|
||||
<div class="modalOrd-content text-center">
|
||||
<div class="loader">
|
||||
<span class="loader-text">Loading...</span>
|
||||
<span class="load"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4 py-1">
|
||||
<DoorSvgObj LineColor="rgb(39, 174, 96)" LineWidth="8" ObjH="200" ObjW="900" LeftTextClass="col-10 fs-1 fw-bold" RightTextClass="col-2" EC_ExeFunct="@(()=> createDoor(""))" ObjId="-1" TextData="@AddDoorDict" ImagePath="images/LogoEgwBlack.png"></DoorSvgObj>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class=" py-1">
|
||||
<HwSvgObj LineColor="#CFD8DC" LineWidth="8" ObjH="200" ObjW="700" EC_ExeFunct="@(()=> createDoor(""))" ObjId="-1" ItemName="Add new door" ItemCount="0" ShowPlus="true" ImagePath="images/icons/PlusWhite.svg"></HwSvgObj>
|
||||
<div class="col-4 py-1">
|
||||
<DoorSvgObj LineColor="rgb(39, 174, 96)" LineWidth="8" ObjH="200" ObjW="900" LeftTextClass="col-10 fs-1 fw-bold" RightTextClass="col-2" EC_ExeFunct="@(()=> setCloneDoorMode(""))" ObjId="-2" TextData="@AddFromTemplDict" ImagePath="images/LogoEgwBlue.png"></DoorSvgObj>
|
||||
</div>
|
||||
<div class=" py-1">
|
||||
<HwSvgObj LineColor="#CFD8DC" LineWidth="8" ObjH="200" ObjW="700" EC_ExeFunct="@(()=> recalcSVGs(""))" ObjId="-2" ItemName="Recalc all the SVGs" ItemCount="0" ShowPlus="true" ImagePath="images/icons/arrows-rotate-solid.svg"></HwSvgObj>
|
||||
</div>
|
||||
<div class=" py-1">
|
||||
<HwSvgObj LineColor="#CFD8DC" LineWidth="8" ObjH="200" ObjW="700" EC_ExeFunct="@(()=> reportUrl(currOrderId))" ObjId="-3" ItemName="Get the order estimate" ItemCount="0" ShowPlus="true" ImagePath="images/icons/file-pdf-regular.svg"></HwSvgObj>
|
||||
</div>
|
||||
<div class=" py-1">
|
||||
<HwSvgObj LineColor="#CFD8DC" LineWidth="8" ObjH="200" ObjW="700" ObjId="-4" ItemName="Calculate total cost" ItemCount="0" ShowPlus="true" ImagePath="images/icons/calculator-solid.svg"></HwSvgObj>
|
||||
</div>
|
||||
<div class=" py-1">
|
||||
<HwSvgObj LineColor="#CFD8DC" LineWidth="8" ObjH="200" ObjW="700" EC_ExeFunct="@(()=> sendToCompany(currOrderId, orderStatus))" ObjId="-5" ItemName="Send to DCA" ItemCount="0" ShowPlus="true" ImagePath="images/icons/angles-right-solid.svg"></HwSvgObj>
|
||||
<div class="col-4 py-1">
|
||||
<DoorSvgObj LineColor="#8E44AD" LineWidth="8" ObjH="200" ObjW="900" LeftTextClass="col-10 fs-1 fw-bold" RightTextClass="col-2" EC_ExeFunct="@(()=> sendToAbh(currOrderId, orderStatus))" ObjId="-3" TextData="@SendOrderDict" Message1="@currOrderId.ToString()" Message2="@orderStatus.ToString()" ImagePath="images/LogoEgwWhite.png"></DoorSvgObj>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<button @onclick="()=>setAddRemDoor()">ADD REM MODE</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@if (DoorsList == null || DoorsList.Count == 0)
|
||||
{
|
||||
@@ -40,11 +27,26 @@
|
||||
else
|
||||
{
|
||||
int idxCount = 0;
|
||||
string imgPath = "";
|
||||
@foreach (var door in DoorsList)
|
||||
{
|
||||
imgPath = $"images/LogoEgw{idxCount % 5:00}.png";
|
||||
idxCount++;
|
||||
<div class="col-3 py-1">
|
||||
<DoorSvgObj ColorLine="#4c0969" LineWidth="8" ObjH="200" ObjW="650" ClassLeftText="col-4" ClassRightText="col-8" EC_ExeFunct="@ExecDoorReq" DoorId="@door.DoorId" ImagePath="@DoorSvgUrl(door.DoorId)" ObjId="idxCount" TextData="@textDictSetup(door)" ShowOptions="true"></DoorSvgObj>
|
||||
@if (isCloneMode)
|
||||
{
|
||||
|
||||
<DoorSvgObj LineColor="#2D3047" LineWidth="8" ObjH="200" ObjW="650" LeftTextClass="col-4" RightTextClass="col-8" EC_ExeClone="@(()=>doClone(@door.DoorId.ToString()))" Message1="@door.DoorId.ToString()" ShowClone="true" ImagePath="@imgPath" ObjId="idxCount" TextData="@textDictSetup(door)"></DoorSvgObj>
|
||||
}
|
||||
else if (isAddRemMode)
|
||||
{
|
||||
<DoorSvgObj LineColor="#2D3047" LineWidth="8" ObjH="200" ObjW="650" LeftTextClass="col-4" RightTextClass="col-8" ShowPlusMinus="true" Message1="@door.DoorId.ToString()" Message2="@door.OrderId.ToString()" EC_ExePlus="@(()=>addOneDoorNumber("", ""))" EC_ExeMinus="@(()=>removeOneDoorNumber("", ""))" ImagePath="@DoorSvgUrl(door.DoorId)" ObjId="idxCount" TextData="@textDictSetup(door)"></DoorSvgObj>
|
||||
}
|
||||
else
|
||||
{
|
||||
<DoorSvgObj LineColor="#2D3047" LineWidth="8" ObjH="200" ObjW="650" LeftTextClass="col-4" RightTextClass="col-8" EC_ExeFunct="@(()=> editRec(@door.DoorId.ToString()))" Message1="@door.DoorId.ToString()" ImagePath="@DoorSvgUrl(door.DoorId)" ObjId="idxCount" TextData="@textDictSetup(door)"></DoorSvgObj>
|
||||
|
||||
}
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Components.SvgComp;
|
||||
using WebDoorCreator.UI.Data;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.DoorMan
|
||||
@@ -11,50 +9,27 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public DoorsSelectFilter actFilter { get; set; } = new DoorsSelectFilter();
|
||||
|
||||
[Parameter]
|
||||
public int currOrderId { get; set; } = 0;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<DoorModel> E_CurrDoor { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<DoorModel> E_CurrDoorModal { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> E_DoorChanged { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> updateRecordCount { get; set; }
|
||||
public string userId
|
||||
{
|
||||
get
|
||||
{
|
||||
return WDCUService.userId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Parameter]
|
||||
public DoorsSelectFilter actFilter { get; set; } = new DoorsSelectFilter();
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected List<DoorOpModel> doorOps2Add = new List<DoorOpModel>();
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected Dictionary<string, string> AddDoorDict { get; set; } = new Dictionary<string, string>();
|
||||
protected Dictionary<string, string> AddFromTemplDict { get; set; } = new Dictionary<string, string>();
|
||||
protected List<DoorOpModel>? DoorOpsList { get; set; } = null;
|
||||
protected List<DoorModel>? DoorsList { get; set; } = null;
|
||||
protected bool isAddRemMode { get; set; }
|
||||
protected List<DoorOpModel>? DoorOpsList { get; set; } = null;
|
||||
protected bool IsChanged { get; set; } = false;
|
||||
|
||||
protected bool isCloneMode { get; set; }
|
||||
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||
|
||||
@@ -62,14 +37,11 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
protected NavigationManager NavManager { get; set; } = null!;
|
||||
|
||||
protected int orderStatus { get; set; } = 10;
|
||||
|
||||
protected Dictionary<string, string> AddDoorDict { get; set; } = new Dictionary<string, string>();
|
||||
protected Dictionary<string, string> AddFromTemplDict { get; set; } = new Dictionary<string, string>();
|
||||
protected Dictionary<string, string> SendOrderDict { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
[Inject]
|
||||
protected WDCUserService WDCUService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected QueueDataService QDService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
|
||||
@@ -77,8 +49,6 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected DoorModel? currDoor { get; set; } = null;
|
||||
|
||||
protected async Task catchDoorChange(bool isChanged)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
@@ -90,50 +60,6 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
await E_DoorChanged.InvokeAsync(isChanged);
|
||||
}
|
||||
|
||||
protected async void createDoor(string message)
|
||||
{
|
||||
int doorId = await WDService.createDoor(currOrderId, userId, "mm");
|
||||
if (doorId > 0)
|
||||
{
|
||||
var door = DoorsList?.Where(x => x.DoorId == doorId).FirstOrDefault();
|
||||
await InvokeAsync(StateHasChanged);
|
||||
await E_CurrDoor.InvokeAsync(door);
|
||||
}
|
||||
}
|
||||
|
||||
protected bool isRecalc { get; set; } = false;
|
||||
protected async void recalcSVGs(string message)
|
||||
{
|
||||
isRecalc = true;
|
||||
// recupero elenco porte come list interi...
|
||||
if (DoorsList != null && DoorsList.Count > 0)
|
||||
{
|
||||
List<string> doorIdList = DoorsList
|
||||
.Select(x => $"{x.DoorId}")
|
||||
.ToList();
|
||||
// chiamo reset
|
||||
var list2Proc = await QDService.ResetQueueByDoorList(doorIdList);
|
||||
// se ho porte da processare --> chiamo save...
|
||||
string currDDF = "";
|
||||
int currDoorId = 0;
|
||||
int currVers = 0;
|
||||
foreach (var item in list2Proc)
|
||||
{
|
||||
currDoorId = 0;
|
||||
currVers = 0;
|
||||
int.TryParse(item, out currDoorId);
|
||||
if (currDoorId > 0)
|
||||
{
|
||||
currDDF = await WDService.DoorOpGetDDF(currDoorId);
|
||||
// versione corrente del DDF generato
|
||||
currVers = await QDService.SendCalcReq(currDoorId, currDDF);
|
||||
}
|
||||
}
|
||||
}
|
||||
isRecalc = false;
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
protected async Task deleteRecord(DoorModel currRec)
|
||||
{
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Door Deletion requested: are you sure to remove {currRec.DoorDescript}?"))
|
||||
@@ -144,6 +70,144 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task editRec(string doorId)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
NavManager.NavigateTo($"/DoorDefinition?idOrd={currOrderId}&idDoor={int.Parse(doorId)}");
|
||||
}
|
||||
|
||||
protected async Task getBackStatus()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
if (orderStatus > 10 && orderStatus <= 70)
|
||||
{
|
||||
await WDService.OrderUpdate(currOrderId, (orderStatus - 10));
|
||||
}
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task proceedStatus()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
if (orderStatus >= 10 && orderStatus < 70)
|
||||
{
|
||||
await WDService.OrderUpdate(currOrderId, (orderStatus + 10));
|
||||
}
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task ReloadData()
|
||||
{
|
||||
if (!AddDoorDict.ContainsKey("ADD NEW DOOR"))
|
||||
{
|
||||
AddDoorDict.Add("ADD NEW DOOR", "");
|
||||
}
|
||||
if (!AddFromTemplDict.ContainsKey("ADD NEW DOOR FROM TEMPLATE"))
|
||||
{
|
||||
AddFromTemplDict.Add("ADD NEW DOOR FROM TEMPLATE", "");
|
||||
}
|
||||
if (!SendOrderDict.ContainsKey("SEND TO ABH"))
|
||||
{
|
||||
SendOrderDict.Add("SEND TO ABH", "");
|
||||
}
|
||||
if (currOrderId != -1)
|
||||
{
|
||||
var SearchRecords = await WDService.DoorGetByOrderId(currOrderId);
|
||||
if (SearchRecords != null)
|
||||
{
|
||||
totalCount = SearchRecords.Count;
|
||||
|
||||
DoorsList = SearchRecords
|
||||
.Skip(numRecord * (currPage - 1))
|
||||
.Take(numRecord)
|
||||
.ToList();
|
||||
|
||||
if (DoorsList != null)
|
||||
{
|
||||
var currOrder = DoorsList.FirstOrDefault();
|
||||
if (currOrder?.OrderNav != null)
|
||||
{
|
||||
orderStatus = currOrder.OrderNav.Status;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prepara il dictionary dei testi da riportare nell'oggetto ordine
|
||||
/// </summary>
|
||||
/// <param name="door"></param>
|
||||
/// <returns></returns>
|
||||
protected Dictionary<string, string> textDictSetup(DoorModel door)
|
||||
{
|
||||
Dictionary<string, string> answ = new Dictionary<string, string>();
|
||||
answ.Add("Doors N°:", $"{door.Quantity}");
|
||||
answ.Add("Model N°:", $"{door.TypeNav?.TypeId}");
|
||||
answ.Add("DoorPrice:", $"{(door.Quantity * door.UnitCost):C2}");
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
[Inject]
|
||||
protected WDCUserService WDCUService { get; set; } = null!;
|
||||
|
||||
public string userId
|
||||
{
|
||||
get
|
||||
{
|
||||
return WDCUService.userId;
|
||||
}
|
||||
}
|
||||
|
||||
protected async void createDoor(string message)
|
||||
{
|
||||
|
||||
int doorId = await WDService.createDoor(currOrderId, userId, "mm");
|
||||
if (doorId > 0)
|
||||
{
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
// rimando alla pagina... dettaglio...
|
||||
NavManager.NavigateTo($"/DoorDefinition?idOrd={currOrderId}&idDoor={doorId}");
|
||||
}
|
||||
/// <summary>
|
||||
/// Path del servizio di recupero SVG delle porte
|
||||
/// </summary>
|
||||
/// <param name="doorId"></param>
|
||||
/// <returns></returns>
|
||||
protected string DoorSvgUrl(int doorId)
|
||||
{
|
||||
return $"api/DoorImage/GetImage.svg?DoorId={doorId}";
|
||||
}
|
||||
|
||||
protected bool isCloneMode { get; set; }
|
||||
protected bool isAddRemMode { get; set; }
|
||||
|
||||
protected async void setCloneDoorMode(string message)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
isCloneMode = !isCloneMode;
|
||||
isAddRemMode = false;
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
protected async void setAddRemDoor()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
isAddRemMode = !isAddRemMode;
|
||||
isCloneMode = false;
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
protected List<DoorOpModel> doorOps2Add = new List<DoorOpModel>();
|
||||
|
||||
/// <summary>
|
||||
/// Clona la porta selezionata con annesse door operations
|
||||
/// </summary>
|
||||
@@ -181,137 +245,11 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Path del servizio di recupero SVG delle porte
|
||||
/// </summary>
|
||||
/// <param name="doorId"></param>
|
||||
/// <returns></returns>
|
||||
protected string DoorSvgUrl(int doorId)
|
||||
{
|
||||
return $"api/DoorImage/GetImage.svg?DoorId={doorId}";
|
||||
}
|
||||
|
||||
protected async Task editRec(int doorId)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
|
||||
if (DoorsList != null)
|
||||
{
|
||||
var door = DoorsList.Where(x => x.DoorId == doorId).FirstOrDefault();
|
||||
if (door != null)
|
||||
{
|
||||
//currDoor = door;
|
||||
await E_CurrDoor.InvokeAsync(door);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task ExecDoorReq(DoorSvgObj.DoorAct currAct)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
switch (currAct.Action)
|
||||
{
|
||||
case DoorSvgObj.ActionReq.Minus:
|
||||
// TODO
|
||||
//await removeOneDoorNumber("", "");
|
||||
break;
|
||||
|
||||
case DoorSvgObj.ActionReq.Plus:
|
||||
// TODO
|
||||
//await addOneDoorNumber("", "");
|
||||
break;
|
||||
|
||||
case DoorSvgObj.ActionReq.ReqOptions:
|
||||
// TODO
|
||||
// aprire la modale di editing...
|
||||
await setModalShow(currAct.DoorId);
|
||||
break;
|
||||
|
||||
case DoorSvgObj.ActionReq.Select:
|
||||
await editRec(currAct.DoorId);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
protected async Task getBackStatus()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
if (orderStatus > 10 && orderStatus <= 70)
|
||||
{
|
||||
await WDService.OrderUpdate(currOrderId, (orderStatus - 10));
|
||||
}
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task proceedStatus()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
if (orderStatus >= 10 && orderStatus < 70)
|
||||
{
|
||||
await WDService.OrderUpdate(currOrderId, (orderStatus + 10));
|
||||
}
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task ReloadData()
|
||||
{
|
||||
// 2023.05.26 - report inserito come servizio nell'app
|
||||
#if false
|
||||
var confData = await WDService.ConfigGetKey("prt_ReportServerUrl");
|
||||
if (confData != null)
|
||||
{
|
||||
reportBaseUrl = confData.valore;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!AddDoorDict.ContainsKey("ADD NEW DOOR"))
|
||||
{
|
||||
AddDoorDict.Add("ADD NEW DOOR", "");
|
||||
}
|
||||
if (!AddFromTemplDict.ContainsKey("ADD NEW DOOR FROM TEMPLATE"))
|
||||
{
|
||||
AddFromTemplDict.Add("ADD NEW DOOR FROM TEMPLATE", "");
|
||||
}
|
||||
if (!SendOrderDict.ContainsKey("SEND TO DCA"))
|
||||
{
|
||||
SendOrderDict.Add("SEND TO DCA", "");
|
||||
}
|
||||
if (currOrderId != -1)
|
||||
{
|
||||
var SearchRecords = await WDService.DoorGetByOrderId(currOrderId);
|
||||
if (SearchRecords != null)
|
||||
{
|
||||
totalCount = SearchRecords.Count;
|
||||
|
||||
DoorsList = SearchRecords
|
||||
.Skip(numRecord * (currPage - 1))
|
||||
.Take(numRecord)
|
||||
.ToList();
|
||||
|
||||
if (DoorsList != null)
|
||||
{
|
||||
var currOrder = DoorsList.FirstOrDefault();
|
||||
if (currOrder?.OrderNav != null)
|
||||
{
|
||||
orderStatus = currOrder.OrderNav.Status;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected async void sendToCompany(int ordId, int orderStat)
|
||||
protected async void sendToAbh(int ordId, int orderStat)
|
||||
{
|
||||
if (orderStat == 10)
|
||||
{
|
||||
//int doorId = await WDService.createDoor(currOrderId, userId, "mm");
|
||||
bool done = await WDService.OrderUpdate(ordId, 20);
|
||||
if (done)
|
||||
{
|
||||
@@ -322,40 +260,6 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task setModalShow(int doorId)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
|
||||
if (DoorsList != null)
|
||||
{
|
||||
var door = DoorsList.Where(x => x.DoorId == doorId).FirstOrDefault();
|
||||
if (door != null)
|
||||
{
|
||||
//currDoor = door;
|
||||
await E_CurrDoorModal.InvokeAsync(door);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Prepara il dictionary dei testi da riportare nell'oggetto ordine
|
||||
/// </summary>
|
||||
/// <param name="door"></param>
|
||||
/// <returns></returns>
|
||||
protected Dictionary<string, string> textDictSetup(DoorModel door)
|
||||
{
|
||||
Dictionary<string, string> answ = new Dictionary<string, string>();
|
||||
answ.Add("Doors #:", $"{door.Quantity}");
|
||||
answ.Add("Model #:", $"{door.TypeNav?.TypeId}");
|
||||
answ.Add("Door Price:", $"{(door.Quantity * door.UnitCost):C2}");
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private int _totalCount { get; set; } = 0;
|
||||
|
||||
private int currPage
|
||||
{
|
||||
get => actFilter.CurrPage;
|
||||
@@ -367,13 +271,13 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
get => actFilter.NumRec;
|
||||
set => actFilter.NumRec = value;
|
||||
}
|
||||
|
||||
private string searchVal
|
||||
{
|
||||
get => actFilter.searchValue;
|
||||
set => actFilter.searchValue = value;
|
||||
}
|
||||
|
||||
private int _totalCount { get; set; } = 0;
|
||||
private int totalCount
|
||||
{
|
||||
get => _totalCount;
|
||||
@@ -387,29 +291,25 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#if false
|
||||
public string reportBaseUrl { get; set; } = "http://w2019-sql-steam/reportserver?/Test/WebDoor/";
|
||||
|
||||
protected async Task reportUrl(int orderId)
|
||||
protected async Task addOneDoorNumber(string msg1, string msg2)
|
||||
{
|
||||
var url = $"{reportBaseUrl}ReportOrder&OrderID={orderId}&rs:Command=Render&rs:format=PDF";
|
||||
|
||||
await JSRuntime.InvokeAsync<object>("open", url, "_blank");
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Path del servizio di recupero report in PDF
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <returns></returns>
|
||||
protected async Task reportUrl(int orderId)
|
||||
//var door = new DoorModel();
|
||||
var done = await WDService.DoorModQty(int.Parse(msg1), int.Parse(msg2), true);
|
||||
if (done)
|
||||
{
|
||||
await InvokeAsync(StateHasChanged);
|
||||
await ReloadData();
|
||||
}
|
||||
}
|
||||
protected async Task removeOneDoorNumber(string msg1, string msg2)
|
||||
{
|
||||
var url = $"api/Report/GetOrderReport?OrderId={orderId}&Format=PDF";
|
||||
// chiamo apertura via jscript in target _blank
|
||||
await JSRuntime.InvokeAsync<object>("open", url, "_blank");
|
||||
//var door = new DoorModel();
|
||||
var done = await WDService.DoorModQty(int.Parse(msg1), int.Parse(msg2), false);
|
||||
if (done)
|
||||
{
|
||||
await InvokeAsync(StateHasChanged);
|
||||
await ReloadData();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
.modalOrd {
|
||||
position: fixed;
|
||||
z-index: 9999;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
background-color: #000000;
|
||||
background-color: rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
.loader {
|
||||
width: 80px;
|
||||
height: 50px;
|
||||
position: relative;
|
||||
}
|
||||
.loader-text {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #C8B6FF;
|
||||
animation: text_713 3.5s ease both infinite;
|
||||
font-size: 0.8rem;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
.load {
|
||||
background-color: #9A79FF;
|
||||
border-radius: 50px;
|
||||
display: block;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
transform: translateX(64px);
|
||||
animation: loading_713 3.5s ease both infinite;
|
||||
}
|
||||
.load::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #D1C2FF;
|
||||
border-radius: inherit;
|
||||
animation: loading2_713 3.5s ease both infinite;
|
||||
}
|
||||
@keyframes text_713 {
|
||||
0% {
|
||||
letter-spacing: 1px;
|
||||
transform: translateX(0px);
|
||||
}
|
||||
40% {
|
||||
letter-spacing: 2px;
|
||||
transform: translateX(26px);
|
||||
}
|
||||
80% {
|
||||
letter-spacing: 1px;
|
||||
transform: translateX(32px);
|
||||
}
|
||||
90% {
|
||||
letter-spacing: 2px;
|
||||
transform: translateX(0px);
|
||||
}
|
||||
100% {
|
||||
letter-spacing: 1px;
|
||||
transform: translateX(0px);
|
||||
}
|
||||
}
|
||||
@keyframes loading_713 {
|
||||
0% {
|
||||
width: 16px;
|
||||
transform: translateX(0px);
|
||||
}
|
||||
40% {
|
||||
width: 100%;
|
||||
transform: translateX(0px);
|
||||
}
|
||||
80% {
|
||||
width: 16px;
|
||||
transform: translateX(64px);
|
||||
}
|
||||
90% {
|
||||
width: 100%;
|
||||
transform: translateX(0px);
|
||||
}
|
||||
100% {
|
||||
width: 16px;
|
||||
transform: translateX(0px);
|
||||
}
|
||||
}
|
||||
@keyframes loading2_713 {
|
||||
0% {
|
||||
transform: translateX(0px);
|
||||
width: 16px;
|
||||
}
|
||||
40% {
|
||||
transform: translateX(0%);
|
||||
width: 80%;
|
||||
}
|
||||
80% {
|
||||
width: 100%;
|
||||
transform: translateX(0px);
|
||||
}
|
||||
90% {
|
||||
width: 80%;
|
||||
transform: translateX(15px);
|
||||
}
|
||||
100% {
|
||||
transform: translateX(0px);
|
||||
width: 16px;
|
||||
}
|
||||
}
|
||||
/* Modal Content/Box */
|
||||
.modalOrd-content {
|
||||
margin: 20% auto;
|
||||
padding-left: 20%;
|
||||
width: 50%;
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
.modalOrd {
|
||||
//display: none;
|
||||
position: fixed;
|
||||
z-index: 9999;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
background-color: rgb(0,0,0);
|
||||
background-color: rgba(0,0,0,0.6);
|
||||
}
|
||||
|
||||
|
||||
.loader {
|
||||
width: 80px;
|
||||
height: 50px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.loader-text {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: #C8B6FF;
|
||||
animation: text_713 3.5s ease both infinite;
|
||||
font-size: .8rem;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.load {
|
||||
background-color: #9A79FF;
|
||||
border-radius: 50px;
|
||||
display: block;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
transform: translateX(64px);
|
||||
animation: loading_713 3.5s ease both infinite;
|
||||
}
|
||||
|
||||
.load::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #D1C2FF;
|
||||
border-radius: inherit;
|
||||
animation: loading2_713 3.5s ease both infinite;
|
||||
}
|
||||
|
||||
@keyframes text_713 {
|
||||
0% {
|
||||
letter-spacing: 1px;
|
||||
transform: translateX(0px);
|
||||
}
|
||||
|
||||
40% {
|
||||
letter-spacing: 2px;
|
||||
transform: translateX(26px);
|
||||
}
|
||||
|
||||
80% {
|
||||
letter-spacing: 1px;
|
||||
transform: translateX(32px);
|
||||
}
|
||||
|
||||
90% {
|
||||
letter-spacing: 2px;
|
||||
transform: translateX(0px);
|
||||
}
|
||||
|
||||
100% {
|
||||
letter-spacing: 1px;
|
||||
transform: translateX(0px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes loading_713 {
|
||||
0% {
|
||||
width: 16px;
|
||||
transform: translateX(0px);
|
||||
}
|
||||
|
||||
40% {
|
||||
width: 100%;
|
||||
transform: translateX(0px);
|
||||
}
|
||||
|
||||
80% {
|
||||
width: 16px;
|
||||
transform: translateX(64px);
|
||||
}
|
||||
|
||||
90% {
|
||||
width: 100%;
|
||||
transform: translateX(0px);
|
||||
}
|
||||
|
||||
100% {
|
||||
width: 16px;
|
||||
transform: translateX(0px);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes loading2_713 {
|
||||
0% {
|
||||
transform: translateX(0px);
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
40% {
|
||||
transform: translateX(0%);
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
80% {
|
||||
width: 100%;
|
||||
transform: translateX(0px);
|
||||
}
|
||||
|
||||
90% {
|
||||
width: 80%;
|
||||
transform: translateX(15px);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateX(0px);
|
||||
width: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Modal Content/Box */
|
||||
.modalOrd-content {
|
||||
margin: 20% auto;
|
||||
padding-left: 20%;
|
||||
width: 50%;
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
.modalOrd{position:fixed;z-index:9999;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#000;background-color:rgba(0,0,0,.6);}.loader{width:80px;height:50px;position:relative;}.loader-text{position:absolute;top:0;padding:0;margin:0;color:#c8b6ff;animation:text_713 3.5s ease both infinite;font-size:.8rem;letter-spacing:1px;}.load{background-color:#9a79ff;border-radius:50px;display:block;height:16px;width:16px;bottom:0;position:absolute;transform:translateX(64px);animation:loading_713 3.5s ease both infinite;}.load::before{position:absolute;content:"";width:100%;height:100%;background-color:#d1c2ff;border-radius:inherit;animation:loading2_713 3.5s ease both infinite;}@keyframes text_713{0%{letter-spacing:1px;transform:translateX(0);}40%{letter-spacing:2px;transform:translateX(26px);}80%{letter-spacing:1px;transform:translateX(32px);}90%{letter-spacing:2px;transform:translateX(0);}100%{letter-spacing:1px;transform:translateX(0);}}@keyframes loading_713{0%{width:16px;transform:translateX(0);}40%{width:100%;transform:translateX(0);}80%{width:16px;transform:translateX(64px);}90%{width:100%;transform:translateX(0);}100%{width:16px;transform:translateX(0);}}@keyframes loading2_713{0%{transform:translateX(0);width:16px;}40%{transform:translateX(0%);width:80%;}80%{width:100%;transform:translateX(0);}90%{width:80%;transform:translateX(15px);}100%{transform:translateX(0);width:16px;}}.modalOrd-content{margin:20% auto;padding-left:20%;width:50%;}
|
||||
@@ -1,66 +0,0 @@
|
||||
<!-- The Modal -->
|
||||
<div id="myModal" class="modalOrd">
|
||||
|
||||
<!-- Modal content -->
|
||||
<div class="modalOrd-content">
|
||||
<div class="d-flex justify-content-between">
|
||||
<h4>@($"Door ID: {CurrDoor.DoorId}")</h4>
|
||||
<span class="closeOrd mb-3" @onclick="()=>closeModal()">×</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="w-25">
|
||||
<div class="pb-1">
|
||||
<div class="d-flex justify-content-between mb-3">
|
||||
@if (CurrDoorClone.Quantity != CurrDoor.Quantity)
|
||||
{
|
||||
<button class="btn btn-outline-danger" type="button" @onclick="()=>ReloadData()">CANCEL</button>
|
||||
<button class="btn btn-outline-success" type="button" @onclick="()=>ChangeDoorNumber(true)">CONFIRM</button>
|
||||
}
|
||||
</div>
|
||||
<label for="search">Add or Remove door</label>
|
||||
<div class="input-group mb-3">
|
||||
@if (CurrDoorClone.Quantity == CurrDoor.Quantity && CurrDoor.Quantity > 1)
|
||||
{
|
||||
<button class="btn btn-outline-danger" type="button" @onclick="()=>addOrRemoveOneDoorNumber(false)">-1</button>
|
||||
}
|
||||
<input type="number" @bind="@CurrDoor.Quantity" class="form-control text-center">
|
||||
@if (CurrDoorClone.Quantity == CurrDoor.Quantity)
|
||||
{
|
||||
<button class="btn btn-outline-success" type="button" @onclick="()=>addOrRemoveOneDoorNumber(true)">+1</button>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@if (CurrDoorClone.Quantity == CurrDoor.Quantity)
|
||||
{
|
||||
<div class="pb-1">
|
||||
<div class="input-group mb-3">
|
||||
<button class="btn btn-primary w-100" type="button" @onclick="()=>doClone()">Clone door</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pb-1">
|
||||
<div class="input-group mb-3">
|
||||
<button class="btn btn-danger w-100" type="button" @onclick="()=>deleteRecord()">Delete door</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
<div class="w-75">
|
||||
<div class="doorSvgCont" style="height:100%; width:100%; background: linear-gradient(#AFCFD1, #92B2C4);min-height: 50rem;">
|
||||
<div style="align-items: center;display: flex;flex-wrap: wrap;justify-content: center;">
|
||||
<div style="width: 45%; max-height: 30rem;">
|
||||
|
||||
<img src="@($"api/DoorImage/GetImage.svg?DoorId={CurrDoorId}")" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pb-1 text-start">
|
||||
<div class="input-group mb-3">
|
||||
<button class="btn btn-danger" type="button" @onclick="()=>closeModal()">X CLOSE</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -1,219 +0,0 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.DTO;
|
||||
using WebDoorCreator.Data.Services;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.DoorMan
|
||||
{
|
||||
public partial class DoorModal
|
||||
{
|
||||
protected List<DoorOpModel> doorOps2Add = new List<DoorOpModel>();
|
||||
|
||||
public DoorModel CurrDoor { get; set; } = new DoorModel();
|
||||
|
||||
public DoorModel CurrDoorClone { get; set; } = new DoorModel();
|
||||
|
||||
[Parameter]
|
||||
public int CurrDoorId { get; set; } = 0;
|
||||
|
||||
public List<DoorModel> DoorsList { get; set; } = new List<DoorModel>();
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<DoorModel> E_DoorClose { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> E_isChange { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public int OrderId { get; set; } = 0;
|
||||
|
||||
[Parameter]
|
||||
public string userId { get; set; } = "";
|
||||
[Inject]
|
||||
protected IConfiguration config { get; set; } = null!;
|
||||
|
||||
protected WebDoorCreator.Data.DDF.Converter currDdfConv { get; set; } = null!;
|
||||
|
||||
protected DDFDto CurrentConf { get; set; } = new DDFDto();
|
||||
|
||||
protected int doorQty
|
||||
{
|
||||
get => CurrDoor.Quantity;
|
||||
set => CurrDoor.Quantity = value;
|
||||
}
|
||||
|
||||
protected string DoorSvgContent { get; set; } = "";
|
||||
|
||||
protected bool IsErr { get; set; } = false;
|
||||
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||
|
||||
protected int newDoorId { get; set; } = 0;
|
||||
|
||||
protected List<string> ordListVal { get; set; } = new List<string>();
|
||||
|
||||
[Inject]
|
||||
protected QueueDataService QDataServ { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
protected async Task addOrRemoveOneDoorNumber(bool isAdd)
|
||||
{
|
||||
//var door = new DoorModel();
|
||||
var done = await WDService.DoorModQty(0, CurrDoor.OrderId, CurrDoor.DoorId, isAdd);
|
||||
if (done)
|
||||
{
|
||||
//await E_isChange.InvokeAsync(true);
|
||||
await ReloadData();
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task ChangeDoorNumber(bool isAdd)
|
||||
{
|
||||
var done = await WDService.DoorModQty(doorQty, CurrDoor.OrderId, CurrDoor.DoorId, isAdd);
|
||||
if (done)
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task closeModal()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
var fakeDoor = new DoorModel();
|
||||
|
||||
await E_DoorClose.InvokeAsync(fakeDoor);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elimina porta se richiesto
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task deleteRecord()
|
||||
{
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Do you really want to delete this door?"))
|
||||
return;
|
||||
await Task.Delay(1);
|
||||
if (CurrDoor != null)
|
||||
{
|
||||
var done = await WDService.DoorDelete(CurrDoor);
|
||||
if (done)
|
||||
{
|
||||
await closeModal();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clona la porta selezionata con annesse door operations
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task doClone()
|
||||
{
|
||||
var DoorOpsList = await WDService.DoorOpGetByDoorId(CurrDoorId);
|
||||
if (DoorOpsList != null)
|
||||
{
|
||||
var doorOps2Clone = DoorOpsList?.Where(x => x.DoorId == CurrDoorId).ToList();
|
||||
|
||||
var door2Clone = CurrDoor;
|
||||
|
||||
if (door2Clone != null)
|
||||
{
|
||||
var doorToAdd = door2Clone.ObjClone(userId);
|
||||
// salvo!
|
||||
newDoorId = await WDService.DoorInsert(doorToAdd);
|
||||
if (newDoorId != 0 && doorOps2Clone != null)
|
||||
{
|
||||
foreach (var item in doorOps2Clone)
|
||||
{
|
||||
var doorOp2Add = item.ObjClone(userId, newDoorId);
|
||||
doorOps2Add.Add(doorOp2Add);
|
||||
}
|
||||
|
||||
// salvo!
|
||||
var done = await WDService.DoorOpInsert(newDoorId, doorOps2Add);
|
||||
if (done)
|
||||
{
|
||||
await doSave();
|
||||
await closeModal();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua salvataggio record e generazione DDF
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task doSave()
|
||||
{
|
||||
List<DoorOpModel>? listOpAll = await WDService.DoorOpGetByDoorId(newDoorId);
|
||||
if (listOpAll != null)
|
||||
{
|
||||
List<DoorOpModel> listOp = listOpAll.Where(x => x.userConfirm != "" && x.DtConfirm != null).ToList();
|
||||
if (listOp != null)
|
||||
{
|
||||
// chiamo metodo x avewre DDF serializzato
|
||||
//var list2Ord = ;
|
||||
var CurrentCompoOrder = await WDService.ListValuesGetAll("*", "Hardware");
|
||||
if (CurrentCompoOrder != null)
|
||||
{
|
||||
foreach (var item in CurrentCompoOrder.OrderBy(x => x.Ordinal).ToList())
|
||||
{
|
||||
ordListVal.Add(item.TableName);
|
||||
}
|
||||
}
|
||||
|
||||
listOp = listOp.OrderBy(d => ordListVal.IndexOf(d.ObjectId)).ToList();
|
||||
|
||||
string currDdf = currDdfConv.GetSerialized(listOp);
|
||||
// FIXME TODO: si potrebbe eliminare in futuro che va su REDIS
|
||||
// versione corrente del DDF generato
|
||||
int currVers = await QDataServ.SendCalcReq(newDoorId, currDdf);
|
||||
|
||||
if (currVers > 0)
|
||||
{
|
||||
IsErr = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
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);
|
||||
}
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task ReloadData()
|
||||
{
|
||||
var SearchRecords = await WDService.DoorGetByOrderId(OrderId);
|
||||
if (SearchRecords != null)
|
||||
{
|
||||
DoorsList = SearchRecords;
|
||||
|
||||
if (DoorsList != null)
|
||||
{
|
||||
var door = DoorsList.Where(x => x.DoorId == CurrDoorId).FirstOrDefault();
|
||||
if (door != null)
|
||||
{
|
||||
CurrDoor = door;
|
||||
}
|
||||
}
|
||||
}
|
||||
CurrDoorClone = CurrDoor.ObjClone("");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
/* Background scuro del modale */
|
||||
.modalOrd {
|
||||
position: fixed;
|
||||
z-index: 9999;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
background-color: #000000;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
/* Modal Content/Box */
|
||||
.modalOrd-content {
|
||||
background-color: #fefefe;
|
||||
margin: 3% auto;
|
||||
padding: 20px;
|
||||
border: 1px solid #888;
|
||||
width: 50%;
|
||||
border-radius: 1rem;
|
||||
animation: slideDown 0.5s;
|
||||
/* display: flex;
|
||||
justify-content: space-between;*/
|
||||
}
|
||||
/* The Close Button */
|
||||
.closeOrd {
|
||||
color: #aaa;
|
||||
float: right;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.closeOrd:hover,
|
||||
.closeOrd:focus {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
@keyframes slideDown {
|
||||
0% {
|
||||
transform: translate(0, -1000px);
|
||||
}
|
||||
100% {
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
/* Background scuro del modale */
|
||||
.modalOrd {
|
||||
//display: none;
|
||||
position: fixed;
|
||||
z-index: 9999;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
background-color: rgb(0,0,0);
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
/* Modal Content/Box */
|
||||
.modalOrd-content {
|
||||
background-color: #fefefe;
|
||||
margin: 3% auto;
|
||||
padding: 20px;
|
||||
border: 1px solid #888;
|
||||
width: 50%;
|
||||
border-radius: 1rem;
|
||||
animation: slideDown .5s;
|
||||
/* display: flex;
|
||||
justify-content: space-between;*/
|
||||
}
|
||||
|
||||
/* The Close Button */
|
||||
.closeOrd {
|
||||
color: #aaa;
|
||||
float: right;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.closeOrd:hover,
|
||||
.closeOrd:focus {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@keyframes slideDown {
|
||||
0% {
|
||||
transform: translate(0, -1000px);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
.modalOrd{position:fixed;z-index:9999;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#000;background-color:rgba(0,0,0,.4);}.modalOrd-content{background-color:#fefefe;margin:3% auto;padding:20px;border:1px solid #888;width:50%;border-radius:1rem;animation:slideDown .5s;}.closeOrd{color:#aaa;float:right;font-size:28px;font-weight:bold;}.closeOrd:hover,.closeOrd:focus{color:#000;text-decoration:none;cursor:pointer;}@keyframes slideDown{0%{transform:translate(0,-1000px);}100%{transform:translate(0,0);}}
|
||||
@@ -28,6 +28,7 @@
|
||||
}
|
||||
}
|
||||
</select>
|
||||
@*<input id="orderStatus" @bind="@orderStatus" class="form-control" />*@
|
||||
<label for="orderStatus">Order Status</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,22 +1,45 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Data;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.Filters
|
||||
{
|
||||
public partial class OrderFilter
|
||||
{
|
||||
private List<ListValuesModel>? ListValuesAll = null;
|
||||
[Parameter]
|
||||
public EventCallback<OrderSelectFilter> FilterUpdated { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public OrderSelectFilter actFilter { get; set; } = new OrderSelectFilter();
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<OrderSelectFilter> FilterUpdated { get; set; }
|
||||
private List<ListValuesModel>? ListValuesAll = null;
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
ListValuesAll = await WDService.ListValuesGetAll("All", "OrderStep");
|
||||
}
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
|
||||
private string searchVal
|
||||
{
|
||||
get => actFilter.searchValue;
|
||||
set
|
||||
{
|
||||
actFilter.CurrPage = 1;
|
||||
actFilter.searchValue = value;
|
||||
StateHasChanged();
|
||||
ReportChange();
|
||||
}
|
||||
}
|
||||
private int orderStatus
|
||||
{
|
||||
get => actFilter.OrderStatus;
|
||||
set
|
||||
{
|
||||
actFilter.CurrPage = 1;
|
||||
actFilter.OrderStatus = value;
|
||||
StateHasChanged();
|
||||
ReportChange();
|
||||
}
|
||||
}
|
||||
private DateTime dateFrom
|
||||
{
|
||||
get => actFilter.DateFrom;
|
||||
@@ -28,7 +51,6 @@ namespace WebDoorCreator.UI.Components.Filters
|
||||
ReportChange();
|
||||
}
|
||||
}
|
||||
|
||||
private DateTime dateTo
|
||||
{
|
||||
get => actFilter.DateTo;
|
||||
@@ -41,34 +63,20 @@ namespace WebDoorCreator.UI.Components.Filters
|
||||
}
|
||||
}
|
||||
|
||||
private int orderStatus
|
||||
#if false
|
||||
private string searchFamily
|
||||
{
|
||||
get => actFilter.OrderStatus;
|
||||
get => actFilter.itemFamily;
|
||||
set
|
||||
{
|
||||
actFilter.CurrPage = 1;
|
||||
actFilter.OrderStatus = value;
|
||||
actFilter.itemFamily = value;
|
||||
StateHasChanged();
|
||||
ReportChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
private string searchVal
|
||||
{
|
||||
get => actFilter.searchValue;
|
||||
set
|
||||
{
|
||||
actFilter.CurrPage = 1;
|
||||
actFilter.searchValue = value;
|
||||
StateHasChanged();
|
||||
ReportChange();
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
ListValuesAll = await WDService.ListValuesGetAll("All", "OrderStep");
|
||||
}
|
||||
private void ReportChange()
|
||||
{
|
||||
FilterUpdated.InvokeAsync(actFilter);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<b>Web Door Creator @(DateTime.Today.Year)</b> | <span class="small">v.@version</span>
|
||||
</div>
|
||||
<div class="col-7 ps-0 text-end">
|
||||
<span class="small">@($"{DateTime.Now:HH:mm:ss}")</span> | <a class="text-light" href="https://www.egalware.com/" target="_blank"><img class="img-fluid" width="16" src="images/LogoEgw.png" /> Egalware </a>
|
||||
<span class="small">@($"{DateTime.Now:HH:mm:ss}")</span> | <a class="text-light" href="https://www.egalware.com/" target="_blank"><img class="img-fluid" width="16" src="~/images/LogoEgw.png" /> Egalware </a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="d-flex justify-content-between w-100 px-4">
|
||||
<div class="d-flex justify-content-between" style="width: 80%;">
|
||||
<a class="navbar-brand" href="/">
|
||||
<img src="images/DCOlogoCut.png" style="width: 7.5rem;height: 3rem;" />
|
||||
<img src="/images/DCOlogoCut.png" style="width: 7.5rem;height: 3rem;" />
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
|
||||
aria-expanded="false" aria-label="Toggle navigation">
|
||||
@@ -24,11 +24,6 @@
|
||||
<!--Hiding to non-SuperAdmin users the option to manage the application -->
|
||||
<AuthorizeView Roles="SuperAdmin" Context="MenuHide">
|
||||
<Authorized>
|
||||
<div class="nav-item px-3 d-flex flex-warp align-items-center">
|
||||
<NavLink class="nav-link" href="UserAdmin">
|
||||
<span class="bi bi-people pe-2" aria-hidden="true"></span> User management
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-3 d-flex flex-warp align-items-center">
|
||||
<NavLink class="nav-link" href="SuperAdmin">
|
||||
<span class="oi oi-list-rich" aria-hidden="true"></span> General management
|
||||
@@ -37,6 +32,12 @@
|
||||
</Authorized>
|
||||
</AuthorizeView>
|
||||
</div>
|
||||
|
||||
@*<div class="nav-item px-3 d-flex flex-warp align-items-center">
|
||||
<NavLink class="nav-link" href="DoorDefinition">
|
||||
<span class="bi bi-door-open-fill pe-3" aria-hidden="true"></span> Door definition page
|
||||
</NavLink>
|
||||
</div>*@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -48,9 +49,7 @@
|
||||
<ul class="dropdown-menu p-2">
|
||||
<li>
|
||||
<div class="">
|
||||
<NavLink class="nav-link" href="/Identity/Account/Manage">
|
||||
<button class="btn btn-sm btn-success w-100 fw-bold text-light text-decoration-none text-dark" style="">User options</button>
|
||||
</NavLink>
|
||||
<button href="Identity/Account/Manage" class="btn btn-sm btn-success w-100 fw-bold text-light text-decoration-none text-dark" style="">User options</button>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
@@ -101,6 +100,41 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@*<div class="d-flex justify-content-between small">
|
||||
<div class="d-flex justify-content-between">
|
||||
<a href="Identity/Account/Manage" class="text-decoration-none text-dark" style="">@context.User.Identity?.Name</a>
|
||||
<div class="text-decoration-none text-secondary small" style="">
|
||||
@if (listCompanies != null)
|
||||
{
|
||||
@if (listCompanies.Count > 1)
|
||||
{
|
||||
<select @bind="userCurrCompany" class="form-select form-select-sm">
|
||||
@foreach (var item in listCompanies)
|
||||
{
|
||||
<option value="@item.CompanyId">@item.CompanyName</option>
|
||||
}
|
||||
</select>
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (compToShow != null)
|
||||
{
|
||||
<div>@compToShow.CompanyName</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div>
|
||||
<select @bind="userLang" class="form-select form-select-sm">
|
||||
<option>EN</option>
|
||||
<option>IT</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<form method="post" action="Identity/Account/LogOut">
|
||||
<button type="submit" class="btnLogout">Log out</button>
|
||||
</form>
|
||||
</div>*@
|
||||
</div>
|
||||
</nav>
|
||||
</Authorized>
|
||||
|
||||
@@ -2,7 +2,6 @@ using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Data;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.Gen
|
||||
@@ -37,8 +36,6 @@ namespace WebDoorCreator.UI.Components.Gen
|
||||
reportVocLemmas();
|
||||
}
|
||||
}
|
||||
[Inject]
|
||||
public NavigationManager NavManager { get; set; } = default!;
|
||||
|
||||
public List<string>? userClaimsList
|
||||
{
|
||||
@@ -231,57 +228,51 @@ namespace WebDoorCreator.UI.Components.Gen
|
||||
// reset preliminare
|
||||
listRecord = new List<string>();
|
||||
listCompanies = new List<CompanyModel>();
|
||||
if (!NavManager.Uri.Contains("UserAdmin"))
|
||||
if (!string.IsNullOrEmpty(userId) && string.IsNullOrEmpty(userRole))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(userId) && string.IsNullOrEmpty(userRole))
|
||||
var user = await _userManager.FindByNameAsync(userId);
|
||||
var roleList = await _userManager.GetRolesAsync(user);
|
||||
if (roleList != null)
|
||||
{
|
||||
// FARE!!! rivedere con await WDCUsrServ.UserDataGetById(userId);
|
||||
|
||||
|
||||
var user = await _userManager.FindByNameAsync(userId);
|
||||
var roleList = await _userManager.GetRolesAsync(user);
|
||||
if (roleList != null)
|
||||
var role = roleList.FirstOrDefault();
|
||||
if (role != null)
|
||||
{
|
||||
var role = roleList.FirstOrDefault();
|
||||
if (role != null)
|
||||
{
|
||||
userRole = role;
|
||||
}
|
||||
userRole = role;
|
||||
}
|
||||
var claimsList = await _userManager.GetClaimsAsync(user);
|
||||
}
|
||||
var claimsList = await _userManager.GetClaimsAsync(user);
|
||||
|
||||
if (claimsList != null)
|
||||
if (claimsList != null)
|
||||
{
|
||||
if (userRole == "SuperAdmin")
|
||||
{
|
||||
if (userRole == "SuperAdmin")
|
||||
listCompanies = await WDCService.CompanyGetByKey(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (claimsList.Count > 1)
|
||||
{
|
||||
listCompanies = await WDCService.CompanyGetByKey(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (claimsList.Count > 1)
|
||||
foreach (var item in claimsList)
|
||||
{
|
||||
foreach (var item in claimsList)
|
||||
{
|
||||
listRecord.Add(item.Value);
|
||||
var rawList = await WDCService.CompanyGetByKey(int.Parse(item.Value));
|
||||
CompanyModel firstComp = rawList.FirstOrDefault() ?? new CompanyModel();
|
||||
listCompanies.Add(firstComp);
|
||||
}
|
||||
}
|
||||
else if (claimsList.Count == 1)
|
||||
{
|
||||
var currClaim = claimsList.FirstOrDefault();
|
||||
if (currClaim != null)
|
||||
{
|
||||
listRecord.Add(currClaim.Value);
|
||||
listCompanies = await WDCService.CompanyGetByKey(int.Parse(currClaim.Value));
|
||||
}
|
||||
compToShow = listCompanies?.FirstOrDefault()!;
|
||||
listRecord.Add(item.Value);
|
||||
var rawList = await WDCService.CompanyGetByKey(int.Parse(item.Value));
|
||||
CompanyModel firstComp = rawList.FirstOrDefault() ?? new CompanyModel();
|
||||
listCompanies.Add(firstComp);
|
||||
}
|
||||
}
|
||||
fixSelCompany();
|
||||
userClaimsList = listRecord;
|
||||
else if (claimsList.Count == 1)
|
||||
{
|
||||
var currClaim = claimsList.FirstOrDefault();
|
||||
if (currClaim != null)
|
||||
{
|
||||
listRecord.Add(currClaim.Value);
|
||||
listCompanies = await WDCService.CompanyGetByKey(int.Parse(currClaim.Value));
|
||||
}
|
||||
compToShow = listCompanies?.FirstOrDefault()!;
|
||||
}
|
||||
}
|
||||
fixSelCompany();
|
||||
userClaimsList = listRecord;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
@if (HwToShow != null)
|
||||
{
|
||||
<div class="row m-0">
|
||||
<HardwareNewPanel HwLabel="@HwToShow.Label" E_act2Rel="setRefOnDelete" Lingua="@Lingua" HwCode="@HwToShow.TableName" HwAdded="@hwAdd" DoorId="@DoorId"></HardwareNewPanel>
|
||||
<HardwareNewPanel HwInst="getInstNumber(HwToShow.Value)" HwLabel="@HwToShow.Label" E_act2Rel="setRefOnDelete" Lingua="@Lingua" HwCode="@HwToShow.TableName" HwAdded="@hwAdd" DoorId="@DoorId"></HardwareNewPanel>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button class="btn btn-info" @onclick="()=>backToList()">BACK TO LIST</button>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Newtonsoft.Json;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Data;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.Hardware
|
||||
@@ -22,6 +21,11 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
[CascadingParameter]
|
||||
public string UserId { get; set; } = "";
|
||||
|
||||
#if false
|
||||
[Parameter]
|
||||
public bool isDoorOpConf { get; set; }
|
||||
#endif
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
@@ -43,19 +47,10 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected int getInstNumber(string hwCode)
|
||||
protected async Task backToList()
|
||||
{
|
||||
int answ = 0;
|
||||
|
||||
if (DoorOpList != null)
|
||||
{
|
||||
answ = DoorOpList
|
||||
.Where(x => x.ObjectId == hwCode)
|
||||
.ToList()
|
||||
.Count();
|
||||
}
|
||||
|
||||
return answ;
|
||||
await Task.Delay(1);
|
||||
HwToShow = null;
|
||||
}
|
||||
|
||||
protected async Task hwToAdd()
|
||||
@@ -215,15 +210,6 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected async Task setRefOnDelete(bool isDel)
|
||||
{
|
||||
if (isDel)
|
||||
{
|
||||
HwToShow = null;
|
||||
await ReloadData();
|
||||
}
|
||||
}
|
||||
|
||||
//CultureInfo ci = CultureInfo.InstalledUICulture;
|
||||
protected string translate(string lemma)
|
||||
{
|
||||
@@ -260,6 +246,29 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task setRefOnDelete(bool isDel)
|
||||
{
|
||||
if (isDel)
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
}
|
||||
|
||||
protected int getInstNumber(string hwCode)
|
||||
{
|
||||
int answ = 0;
|
||||
|
||||
if (DoorOpList != null)
|
||||
{
|
||||
answ = DoorOpList
|
||||
.Where(x => x.ObjectId == hwCode)
|
||||
.ToList()
|
||||
.Count();
|
||||
}
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -6,14 +6,16 @@ else
|
||||
{
|
||||
@if (DoorOpList != null)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<HwSvgObj LineColor="#CFD8DC" LineWidth="8" ObjH="200" ObjW="700" EC_ExeFunct="exeFun" ObjId="RETURN" ItemName="Back to List" ItemCount="0" ShowPlus="false" ImagePath="images/icons/ExitWhite.svg"></HwSvgObj>
|
||||
</div>
|
||||
<div class="col-4"></div>
|
||||
<div class="col-4">
|
||||
<HwSvgObj LineColor="#CFD8DC" LineWidth="8" ObjH="200" ObjW="700" EC_ExeFunct="exeFun" ObjId="@HwCode" ItemName="@(translate(HwLabel))" ItemCount="@HwInst" ShowPlus="true" ImagePath="images/icons/PlusWhite.svg"></HwSvgObj>
|
||||
@*<div class="text-center">
|
||||
<div class="row col-4">
|
||||
<div class="rectangle">
|
||||
@(translate(HwLabel))
|
||||
<div class="circle" @onclick="()=>hwToAdd()"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
<div class="row col-4">
|
||||
<HwSvgObj LineColor="#CFD8DC" LineWidth="8" ObjH="200" ObjW="700" EC_ExePlus="@(()=> hwToAdd(""))" ObjId="@HwCode" ItemName="@(translate(HwLabel))" ItemCount="@HwInst" ShowPlus="true" ImagePath=""></HwSvgObj>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Newtonsoft.Json;
|
||||
using WebDoorCreator.Data;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Components.SvgComp;
|
||||
using WebDoorCreator.UI.Components.DoorMan;
|
||||
using WebDoorCreator.UI.Data;
|
||||
using static WebDoorCreator.UI.Data.WDCRefreshService;
|
||||
|
||||
@@ -34,94 +34,24 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
public string HwLabel { get; set; } = "";
|
||||
|
||||
[Parameter]
|
||||
public string Lingua { get; set; } = "EN";
|
||||
public int HwInst { get; set; } = 0;
|
||||
|
||||
[Parameter]
|
||||
public string Lingua { get; set; } = "EN";
|
||||
[CascadingParameter]
|
||||
public string UserId { get; set; } = "";
|
||||
|
||||
protected bool _isDoorOpConf { get; set; } = false;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
WDCRefresh.EA_ConfDoorOp -= WDCRefresh_EA_ConfDoorOp;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected bool _isDoorOpConf { get; set; } = false;
|
||||
|
||||
protected bool B_doorOpUpd
|
||||
{
|
||||
get => WDCRService.isDoorOpUpd;
|
||||
set => WDCRService.isDoorOpUpd = value;
|
||||
}
|
||||
|
||||
protected List<DoorOpModel>? DoorOpList { get; set; } = null!;
|
||||
protected List<DoorOpModel> DoorOp2ModList { get; set; } = new List<DoorOpModel>();
|
||||
|
||||
protected List<DoorOpModel>? DoorOpList { get; set; } = null!;
|
||||
|
||||
protected int HwInst
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (DoorOpList != null)
|
||||
{
|
||||
answ = DoorOpList
|
||||
.Where(x => x.ObjectId == HwCode)
|
||||
.ToList()
|
||||
.Count();
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
//protected int instNum { get; set; } = 1;
|
||||
|
||||
protected bool isLoading { get; set; } = false;
|
||||
|
||||
protected List<DoorOpModel>? ListRecord { get; set; } = null;
|
||||
|
||||
[Inject]
|
||||
protected WDCRefreshService WDCRefresh { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WDCRefreshService WDCRService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDCService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WDCVocabularyService WDVService { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected async Task exeFun(HwSvgObj.ActionReq action)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
switch (action)
|
||||
{
|
||||
case HwSvgObj.ActionReq.Minus:
|
||||
// nulla (x ora)
|
||||
break;
|
||||
|
||||
case HwSvgObj.ActionReq.Plus:
|
||||
await hwToAdd("");
|
||||
break;
|
||||
|
||||
case HwSvgObj.ActionReq.Select:
|
||||
default:
|
||||
await E_act2Rel.InvokeAsync(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected int getDoorOpInstNum(int doorOpId)
|
||||
{
|
||||
int answ = 0;
|
||||
@@ -132,6 +62,56 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
return answ + 1;
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected WDCRefreshService WDCRefresh { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDCService { get; set; } = null!;
|
||||
[Inject]
|
||||
protected WDCVocabularyService WDVService { get; set; } = null!;
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
WDCRefresh.EA_ConfDoorOp -= WDCRefresh_EA_ConfDoorOp;
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
WDCRefresh.EA_ConfDoorOp += WDCRefresh_EA_ConfDoorOp;
|
||||
//return base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
protected string translate(string lemma)
|
||||
{
|
||||
string answ = "";
|
||||
|
||||
answ = WDVService.Traduci(Lingua, lemma);
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
private void WDCRefresh_EA_ConfDoorOp(object? sender, EventArgs e)
|
||||
{
|
||||
DOPEventArgs currArgs = (DOPEventArgs)e;
|
||||
// SE sono sula porta indicata + objId corretto --> refresh
|
||||
if (currArgs.DoorId == DoorId && currArgs.ObjectId == HwCode)
|
||||
{
|
||||
var pupd = InvokeAsync(async () => await ReloadData());
|
||||
}
|
||||
}
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected bool B_doorOpUpd
|
||||
{
|
||||
get => WDCRService.isDoorOpUpd;
|
||||
set => WDCRService.isDoorOpUpd = value;
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected WDCRefreshService WDCRService { get; set; } = null!;
|
||||
protected async Task hwToAdd(string message)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
@@ -256,21 +236,22 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
await Task.Delay(1);
|
||||
B_doorOpUpd = true;
|
||||
DoorOp2ModList.Add(currItem);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
WDCRefresh.EA_ConfDoorOp += WDCRefresh_EA_ConfDoorOp;
|
||||
//return base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Methods
|
||||
|
||||
protected bool isLoading { get; set; } = false;
|
||||
|
||||
protected List<DoorOpModel>? ListRecord { get; set; } = null;
|
||||
|
||||
protected async Task setRefOnDelete(bool isDel)
|
||||
{
|
||||
if (isDel)
|
||||
@@ -279,19 +260,6 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
}
|
||||
}
|
||||
|
||||
protected string translate(string lemma)
|
||||
{
|
||||
string answ = "";
|
||||
|
||||
answ = WDVService.Traduci(Lingua, lemma);
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
isLoading = true;
|
||||
@@ -301,25 +269,17 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
DoorOpList = null;
|
||||
await Task.Delay(1);
|
||||
ListRecord = await WDCService.DoorOpGetByDoorId(DoorId);
|
||||
var tempListVal = await WDCService.ListValuesGetAll(HwCode, "Folder");
|
||||
if (ListRecord != null)
|
||||
{
|
||||
DoorOpList = ListRecord.Where(x => (x.DoorId == DoorId) && (x.ObjectId == HwCode)).ToList();
|
||||
}
|
||||
isLoading = false;
|
||||
//await Task.Delay(50);
|
||||
//await Task.Delay(50);
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
private void WDCRefresh_EA_ConfDoorOp(object? sender, EventArgs e)
|
||||
{
|
||||
DOPEventArgs currArgs = (DOPEventArgs)e;
|
||||
// SE sono sula porta indicata + objId corretto --> refresh
|
||||
if (currArgs.DoorId == DoorId && currArgs.ObjectId == HwCode)
|
||||
{
|
||||
var pupd = InvokeAsync(async () => await ReloadData());
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,11 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@*<div class="d-flex justify-content-between small">
|
||||
<div class="d-flex justify-content-between small">
|
||||
<div style="width: 90%" class="me-2">
|
||||
<div class="btnHead d-flex justify-content-between">
|
||||
<div class="testata">
|
||||
@*<div class="borderTop"></div>*@
|
||||
<div class="row borderTop">
|
||||
<div class="fs-3 text-end col-8">
|
||||
@($"{translate(DoorOpInst.ObjectId)} #{instanceN}")
|
||||
@@ -154,6 +155,11 @@ else
|
||||
</div>
|
||||
</div>
|
||||
<div class="row borderBottom">
|
||||
@*<div class="col-10">
|
||||
<button class="btn btn-outline-dark" style="cursor: pointer;" @onclick="()=>doConfirm()">
|
||||
CONFIRM
|
||||
</button>
|
||||
</div>*@
|
||||
<div class="text-end col-2">
|
||||
<NavLink href="@pathFinder(DoorOpInst.DoorOpId)" target="_blank">
|
||||
<button class="btnPDFPending">
|
||||
@@ -168,151 +174,6 @@ else
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
<div class="w-100 h-100 small p-2 mt-2" style="border: 2px solid black; border-radius: 15px;">
|
||||
|
||||
<div class="text-center d-flex justify-content-between px-2 mb-3">
|
||||
@if (DoorOpInst.userConfirm != "" && DoorOpInst.DtConfirm != null)
|
||||
{
|
||||
<button class="btnPDFSuccess">
|
||||
<i class="fa-solid fa-file-pdf"></i>
|
||||
</button>
|
||||
}
|
||||
<div>
|
||||
<h5>@($"{@getTrad(DoorOpInst.ObjectId)} #{instanceN}")</h5>
|
||||
</div>
|
||||
@if (isChangedVal())
|
||||
{
|
||||
<div class="circle pulse blue"></div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="circle grey"></div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4 d-flex flex-wrap align-items-center">
|
||||
<span>Folder</span>
|
||||
</div>
|
||||
<select class="col-7" @bind="@folderName">
|
||||
@if (listValuesFname != null)
|
||||
{
|
||||
@foreach (var folder in listValuesFname)
|
||||
{
|
||||
<option value="@folder.Value">@folder.Label</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4 d-flex flex-wrap align-items-center">
|
||||
<span>Folder</span>
|
||||
</div>
|
||||
@if (listValuesFiles != null && listValuesFiles.Count > 0 && !string.IsNullOrEmpty(templateName))
|
||||
{
|
||||
<select class="col-7" @bind="@templateName">
|
||||
@foreach (var val in listValuesFiles)
|
||||
{
|
||||
<option value="@val.Value">@val.Label</option>
|
||||
}
|
||||
</select>
|
||||
}
|
||||
else
|
||||
{
|
||||
<input class="col-7" disabled>
|
||||
}
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
@if (DoorOpInst.userConfirm != "" && DoorOpInst.DtConfirm != null)
|
||||
{
|
||||
@foreach (var item in currVal)
|
||||
{
|
||||
|
||||
@if (item.Key != "Folder" && item.Key != "template" && item.Key != "shape")
|
||||
{
|
||||
@if (isCombo(item.Key))
|
||||
{
|
||||
<div class="row my-1">
|
||||
<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.Split("/")[0]">
|
||||
@(translate(@param.Split("/")[1]))
|
||||
</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="row my-1">
|
||||
<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]" />
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
</div>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-6 text-start">
|
||||
<button class="btnDelete" @onclick="() => doDeleteInst()">
|
||||
<i class="fa-solid fa-xmark"></i>
|
||||
</button>
|
||||
@if (DoorOpInst.userConfirm != "" && DoorOpInst.DtConfirm != null)
|
||||
{
|
||||
<button class="btnClone" @onclick="() => doClone()">
|
||||
<i class="fa-solid fa-copy"></i>
|
||||
</button>
|
||||
}
|
||||
</div>
|
||||
<div class="col-6 text-end">
|
||||
@if (DoorOpInst.userConfirm != "" && DoorOpInst.DtConfirm != null)
|
||||
{
|
||||
@if (isChangedVal())
|
||||
{
|
||||
<button class="btnCancel" style="cursor: pointer; --colorCode:#E67E22;" @onclick="() => doCancel()">
|
||||
<i class="fa-solid fa-rotate"></i>
|
||||
</button>
|
||||
<button class="btnSave" style="cursor: pointer; --colorCode:#27AE60;" @onclick="() => doSave()">
|
||||
<i class="fa-solid fa-cloud-arrow-up"></i>
|
||||
</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btnCancel" style="cursor: pointer; --colorCode:#7F8C8D;" @onclick="() => doCancel()">
|
||||
<i class="fa-solid fa-rotate"></i>
|
||||
</button>
|
||||
<button class="btnSave" style="cursor: pointer; --colorCode:#7F8C8D;" @onclick="() => doSave()">
|
||||
<i class="fa-solid fa-cloud-arrow-up"></i>
|
||||
</button>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<NavLink href="@pathFinder(DoorOpInst.DoorOpId)" target="_blank">
|
||||
<button class="btnPDFPending">
|
||||
<i class="fa-solid fa-file-pdf"></i>
|
||||
</button>
|
||||
</NavLink>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user