Spostato su BaseParamList

This commit is contained in:
Samuele Locatelli
2023-04-26 13:01:24 +02:00
parent b474606de0
commit 895337468d
8 changed files with 105 additions and 53 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebDoorCreator.Core", "WebD
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebDoorCreator.Data", "WebDoorCreator.Data\WebDoorCreator.Data.csproj", "{26466C0D-8946-466B-A38C-C1A9603DA2DC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebDoorCreator.API", "WebDoorCreator.API\WebDoorCreator.API.csproj", "{2DFE8045-2F56-43E2-9D2F-1180EF7AD721}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebDoorCreator.API", "WebDoorCreator.API\WebDoorCreator.API.csproj", "{2DFE8045-2F56-43E2-9D2F-1180EF7AD721}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -0,0 +1,16 @@
@if (CurrBaseDoorOp == null)
{
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
}
else
{
int numIdx = 1;
@foreach (var item in CurrBaseDoorOp)
{
<hr />
<h3>record @(numIdx++)</h3>
<DoorDefSizingSI Lingua="@userLang" DoorOpInst="@item" HwCode="@item.ObjectId"></DoorDefSizingSI>
<hr />
<br />
}
}
@@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using System.Net.Http;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Components.Forms;
using Microsoft.AspNetCore.Components.Routing;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.Web.Virtualization;
using Microsoft.JSInterop;
using WebDoorCreator.UI;
using WebDoorCreator.UI.Components;
using WebDoorCreator.UI.Components.Buttons;
using WebDoorCreator.UI.Components.CompMan;
using WebDoorCreator.UI.Components.DoorMan;
using WebDoorCreator.UI.Components.DoorDef;
using WebDoorCreator.UI.Components.Gen;
using WebDoorCreator.UI.Components.Order;
using WebDoorCreator.UI.Components.Users;
using WebDoorCreator.UI.Components.Hardware;
using WebDoorCreator.UI.Shared;
using WebDoorCreator.Data.DbModels;
namespace WebDoorCreator.UI.Components.DoorDef
{
public partial class BaseParamList
{
/// <summary>
/// Elenco parametri di base
/// </summary>
[Parameter]
public List<DoorOpModel>? CurrBaseDoorOp { get; set; } = null;
protected string userLang { get; set; } = "EN";
}
}
@@ -1,6 +1,6 @@
@if (currVal == null)
{
<EgwCoreLib.Razor.LoadingData></EgwCoreLib.Razor.LoadingData>
<EgwCoreLib.Razor.LoadingDataSmall></EgwCoreLib.Razor.LoadingDataSmall>
}
else
{
+2
View File
@@ -19,6 +19,8 @@
#region Public Properties
public Dictionary<string, string> UserPref { get; set; } = new Dictionary<string, string>();
public string userId
{
get => _userId;
+9 -14
View File
@@ -16,25 +16,20 @@
</div>
<div>
@if (currDefStep == Core.Enum.DoorDefStep.Door)
{
@if (ListBaseDoorOp != null)
<CascadingValue Value="@WDCUService.userId">
@if (currDefStep == Core.Enum.DoorDefStep.Door)
{
@foreach (var item in ListBaseDoorOp)
@if (ListBaseDoorOp != null)
{
<CascadingValue Value="@WDCUService.userId">
<DoorDefSizingSI Lingua="@userLang" DoorOpInst="@item" HwCode="@item.ObjectId"></DoorDefSizingSI>
</CascadingValue>
<BaseParamList CurrBaseDoorOp="@ListBaseDoorOp"></BaseParamList>
}
@*<DoorSizingStep E_paramChanged="catchParamChange" DoorId="@idDoor"></DoorSizingStep>*@
}
@*<DoorSizingStep E_paramChanged="catchParamChange" DoorId="@idDoor"></DoorSizingStep>*@
}
else if (currDefStep == Core.Enum.DoorDefStep.Hardware)
{
<CascadingValue Value="@WDCUService.userId">
else if (currDefStep == Core.Enum.DoorDefStep.Hardware)
{
<HardwareList isHwStep="@setHwToNull" DoorId="@idDoor" Lingua="@userLang"></HardwareList>
</CascadingValue>
}
}
</CascadingValue>
</div>
</div>
<div class="col-5">
+32 -16
View File
@@ -15,6 +15,8 @@ namespace WebDoorCreator.UI.Pages
public void Dispose()
{
ListBaseDoorOp = null;
orderStatus = null;
WDCUService.EA_CurrLanguage -= WDUService_EA_CurrLanguage;
QDataServ.CalcDonePipe.EA_NewMessage -= CalcDonePipe_EA_NewMessage;
}
@@ -81,10 +83,20 @@ namespace WebDoorCreator.UI.Pages
protected async Task ReloadData()
{
ListBaseDoorOp = null;
ListHwDoorOp = null;
orderStatus = null;
await Task.Delay(1);
var ListRecordDoorOp = await WDService.DoorOpGetByDoorId(idDoor);
if (ListRecordDoorOp != null)
{
ListHwDoorOp = ListRecordDoorOp;
ListBaseDoorOp = ListRecordDoorOp.Where(x => x.ObjectId == "Size" || x.ObjectId == "Profiles").ToList();
// calcolo gli hw togliendo DoorOpBase
foreach (var item in ListBaseDoorOp)
{
ListHwDoorOp.Remove(item);
}
}
var domani = DateTime.Today.AddDays(1);
ListOrdersStatus = null;
@@ -97,22 +109,6 @@ namespace WebDoorCreator.UI.Pages
await Task.Delay(1);
}
#endregion Protected Methods
#region Private Fields
private static Logger Log = LogManager.GetCurrentClassLogger();
private List<DoorOpModel>? ListBaseDoorOp = null;
private List<OrderStatusViewModel>? ListOrdersStatus = null;
#endregion Private Fields
#region Private Methods
private Core.Enum.DoorDefStep currDefStep { get; set; } = Core.Enum.DoorDefStep.Door;
private bool setHwToNull { get; set; } = false;
/// <summary>
/// gestione impostazione step
/// </summary>
@@ -129,6 +125,26 @@ namespace WebDoorCreator.UI.Pages
}
}
#endregion Protected Methods
#region Private Fields
private static Logger Log = LogManager.GetCurrentClassLogger();
#endregion Private Fields
#region Private Properties
private Core.Enum.DoorDefStep currDefStep { get; set; } = Core.Enum.DoorDefStep.Door;
private List<DoorOpModel>? ListBaseDoorOp { get; set; } = null;
private List<DoorOpModel>? ListHwDoorOp { get; set; } = null;
private List<OrderStatusViewModel>? ListOrdersStatus { get; set; } = null;
private bool setHwToNull { get; set; } = false;
#endregion Private Properties
#region Private Methods
private async void CalcDonePipe_EA_NewMessage(object? sender, EventArgs e)
{
DoorSvgContent = "";
+3 -21
View File
@@ -12,7 +12,7 @@ order:
project:
pO:
line:
date: 21-04-2023
date: 2023-04-26T12:20:39.8125610+02:00
piece: DO_1
size:
width: 33.8125
@@ -21,7 +21,7 @@ size:
swing: RH
secure: UP
material: wood
profiles:
profiles:
lockedge:
type: BV
machining: ON
@@ -41,26 +41,8 @@ profiles:
hardware:
ept:
- template: Generic\StdEPT
ToptoCL: 15
ToptoCL: 16
FacetoCL: 0.875
- template: Generic\StdEPT
ToptoCL: 15
FacetoCL: 0.875
flush_bolts:
- template: Corner\8501
type: corner
side: top
position: 5
offset_WS: 0.0
groove:
- template: Generic\Groove
type: side
width: 0.6
depth: 0.8
offset_WS: 0
side: bottom
---