COmpletata bozza test invio BTL con Aedifica
This commit is contained in:
@@ -3,8 +3,6 @@
|
||||
|
||||
<PageTitle>Aedifica</PageTitle>
|
||||
|
||||
<WebAedificaMaker
|
||||
EC_OnSave="SaveText"
|
||||
LiveSVG="@currSvg">
|
||||
<WebAedificaMaker EC_OnSave="SendBtlRequest" LiveSVG="@currSvg">
|
||||
</WebAedificaMaker>
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Test.UI.Components.Pages
|
||||
subChannel = Config.GetValue<string>("ServerConf:SvgChannel") ?? "";
|
||||
}
|
||||
|
||||
private async Task SaveText(Dictionary<string, string> CurrArgs)
|
||||
private async Task SendBtlRequest(Dictionary<string, string> CurrArgs)
|
||||
{
|
||||
m_CurrArgs = CurrArgs;
|
||||
// chiamo la chiamata POST alla API, che manda la richiesta via REDIS
|
||||
|
||||
@@ -15,4 +15,8 @@
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.18" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WebWindow.Base\WebWindow.Base.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
@using Microsoft.AspNetCore.Components.Forms
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<div class="card text-center" style="min-height: 50rem">
|
||||
<div class="card-header" style="background-color: #d5f1f2;">
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
<li class="nav-item">
|
||||
File BTL
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="alert alert-light text-center display-4">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="mb-3">
|
||||
<textarea class="form-control" id="FileBTL" rows="3" @bind="@m_FilePath"></textarea>
|
||||
<button class="btn btn-lg btn-primary btn-sm" @onclick="DoSave">Save</button>
|
||||
<InputFile OnChange="UploadFile" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="card text-center" style="min-height: 50rem">
|
||||
<div class="card-header" style="background-color: #d5f1f2;">
|
||||
<ul class="nav nav-tabs card-header-tabs">
|
||||
<li class="nav-item">
|
||||
File BTL
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
@outSvg
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<InputFile OnChange="UploadFile" />
|
||||
@* <div class="alert alert-light text-center display-4">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="mb-3">
|
||||
<button class="btn btn-lg btn-primary btn-sm" @onclick="DoSave">Save</button>
|
||||
<textarea class="form-control" id="FileBTL" rows="3" @bind="@m_FilePath"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
@outSvg
|
||||
</div>
|
||||
</div>
|
||||
@@ -8,6 +8,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
using WebWindow.Base;
|
||||
|
||||
namespace WebAedificaConfigurator
|
||||
{
|
||||
@@ -54,15 +55,15 @@ namespace WebAedificaConfigurator
|
||||
|
||||
// leggo il contenuto del PRIMO (singolo) file
|
||||
IBrowserFile file = e.File;
|
||||
// limite file size (e.g., 5 MB)
|
||||
var maxAllowedSize = 1024 * 1024;
|
||||
// limite file size (al momento 10 MB)
|
||||
var maxAllowedSize = 10* 1024 * 1024;
|
||||
|
||||
using var stream = file.OpenReadStream(maxAllowedSize);
|
||||
using var reader = new StreamReader(stream);
|
||||
string rawContent = await reader.ReadToEndAsync();
|
||||
// parametri richiesta
|
||||
Args.Add("Mode", $"{(int)Enums.EngineQueryType.Preview}");
|
||||
Args.Add("Btl", rawContent);
|
||||
// da sostituire con Enums.EngineQueryType.Preview
|
||||
Args.Add("Mode", "1");
|
||||
await EC_OnSave.InvokeAsync(Args);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebWindow.Base
|
||||
{
|
||||
public class Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// Modo chiamata Engine
|
||||
/// </summary>
|
||||
|
||||
public enum EngineQueryType
|
||||
{
|
||||
None = 0,
|
||||
Preview,
|
||||
Bom,
|
||||
HardwareModelList
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SubMode di chiamata Engine
|
||||
/// </summary>
|
||||
public enum EngineSubMode
|
||||
{
|
||||
NULL = 0,
|
||||
LIST = 1,
|
||||
CALCSASH = 2,
|
||||
SASHOPTIONS = 3
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Elenco produttori Hardware
|
||||
/// </summary>
|
||||
public enum EngineHwManufacturers
|
||||
{
|
||||
NULL = 0,
|
||||
AGB = 1,
|
||||
MAICO = 2,
|
||||
ROTO = 3
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>2.7.9.1313</Version>
|
||||
<Version>2.7.9.1615</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione JWD per LUX</Description>
|
||||
@@ -23,3 +23,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.9.1313</Version>
|
||||
<Version>2.7.9.1615</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -37,3 +37,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>2.7.9.1313</Version>
|
||||
<Version>2.7.9.1615</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione JWD per LUX</Description>
|
||||
@@ -48,3 +48,8 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user