Merge branch 'release/AddHwOptFlux_01'

This commit is contained in:
Samuele Locatelli
2025-10-22 11:46:13 +02:00
39 changed files with 1256 additions and 713 deletions
+46
View File
@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EgwCoreLib.Lux.Core
{
public class DictUtils
{
#region Public Methods
/// <summary>
/// Comparatore equality obj dizionario
/// </summary>
/// <typeparam name="TKey"></typeparam>
/// <typeparam name="TValue"></typeparam>
/// <param name="dict1"></param>
/// <param name="dict2"></param>
/// <returns></returns>
public static bool DictAreEqual<TKey, TValue>(Dictionary<TKey, TValue> dict1, Dictionary<TKey, TValue> dict2)
{
// Handle null cases
if (dict1 == null || dict2 == null)
return dict1 == dict2;
// Quick size check
if (dict1.Count != dict2.Count)
return false;
// Compare each key-value pair
foreach (var kvp in dict1)
{
if (!dict2.TryGetValue(kvp.Key, out TValue value))
return false; // Key missing in dict2
if (!EqualityComparer<TValue>.Default.Equals(kvp.Value, value))
return false; // Value mismatch
}
return true;
}
#endregion Public Methods
}
}
@@ -21,8 +21,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Egw.Lux.WebWindowComplex" Version="2.7.10.1710" />
<PackageReference Include="Egw.Window.Data" Version="2.7.10.1012" />
<PackageReference Include="Egw.Lux.WebWindow.Base" Version="2.7.10.2117" />
<PackageReference Include="Egw.Lux.WebWindowComplex" Version="2.7.10.2117" />
<PackageReference Include="Egw.Window.Data" Version="2.7.10.2116" />
<PackageReference Include="EgwMultiEngineManager.Data" Version="2.7.10.1" />
</ItemGroup>
</Project>
+9 -3
View File
@@ -86,6 +86,7 @@ namespace EgwCoreLib.Lux.Core
BomAlt
}
#if false
/// <summary>
/// Modo chiamata Engine
/// </summary>
@@ -96,8 +97,10 @@ namespace EgwCoreLib.Lux.Core
Preview,
Bom,
HardwareModelList
}
}
#endif
#if false
/// <summary>
/// SubMode di chiamata Engine
/// </summary>
@@ -107,9 +110,11 @@ namespace EgwCoreLib.Lux.Core
LIST = 1,
CALCSASH = 2,
SASHOPTIONS = 3
}
}
#endif
#if false
/// <summary>
/// Elenco produttori Hardware
/// </summary>
@@ -119,6 +124,7 @@ namespace EgwCoreLib.Lux.Core
AGB = 1,
MAICO = 2,
ROTO = 3
}
}
#endif
}
}
@@ -1502,6 +1502,19 @@ namespace EgwCoreLib.Lux.Data.Controllers
if (currRec == null)
{
dbCtx.DbSetOfferRow.Add(updRec);
// se ci sono record successivi li devo spostare...
var list2move = dbCtx
.DbSetOfferRow
.Where(x => x.OfferID == updRec.OfferID && x.RowNum >= updRec.RowNum)
.ToList();
if (list2move != null && list2move.Count > 0)
{
foreach (var item2move in list2move)
{
item2move.RowNum++;
dbCtx.Entry(item2move).State = EntityState.Modified;
}
}
}
// altrimenti aggiorno
else
@@ -50,7 +50,7 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales
/// <summary>
/// ID dell'articolo di vendita offerto
/// </summary>
public int SellingItemID { get; set; }
public int? SellingItemID { get; set; }
/// <summary>
/// Quantità della risorsa
@@ -209,6 +209,6 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales
/// Navigazione Item
/// </summary>
[ForeignKey("SellingItemID")]
public virtual SellingItemModel SellingItemNav { get; set; } = null!;
public virtual SellingItemModel? SellingItemNav { get; set; }
}
}
@@ -46,7 +46,7 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales
/// <summary>
/// ID dell'articolo di vendita Orderto
/// </summary>
public int SellingItemID { get; set; }
public int? SellingItemID { get; set; }
/// <summary>
/// Costo dei componeti BOM (RockBottom)
@@ -164,6 +164,6 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales
/// Navigazione Item
/// </summary>
[ForeignKey("SellingItemID")]
public virtual SellingItemModel SellingItemNav { get; set; } = null!;
public virtual SellingItemModel? SellingItemNav { get; set; }
}
}
@@ -27,16 +27,16 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Egw.Lux.WebWindow.Base" Version="2.7.10.1710" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="8.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Analyzers" Version="8.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.17">
<PackageReference Include="Egw.Lux.WebWindow.Base" Version="2.7.10.2117" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.21" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="8.0.21" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Analyzers" Version="8.0.21" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.21">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.17">
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.21" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.21">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
@@ -12,7 +12,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace EgwCoreLib.Lux.Data.Migrations
{
[DbContext(typeof(DataLayerContext))]
[Migration("20251021075301_InitDb")]
[Migration("20251021091403_InitDb")]
partial class InitDb
{
/// <inheritdoc />
@@ -1252,13 +1252,13 @@ namespace EgwCoreLib.Lux.Data.Migrations
DueDateProm = new DateTime(2025, 12, 20, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2025, 11, 20, 0, 0, 0, 0, DateTimeKind.Local),
Envir = 1,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(608),
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(610),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(143),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(144),
OffertState = 0,
RefNum = 1,
RefRev = 1,
RefYear = 2024,
ValidUntil = new DateTime(2025, 11, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(605)
ValidUntil = new DateTime(2025, 11, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(140)
},
new
{
@@ -1272,13 +1272,13 @@ namespace EgwCoreLib.Lux.Data.Migrations
DueDateProm = new DateTime(2025, 12, 20, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2025, 11, 20, 0, 0, 0, 0, DateTimeKind.Local),
Envir = 2,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(622),
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(624),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(156),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(157),
OffertState = 0,
RefNum = 2,
RefRev = 1,
RefYear = 2024,
ValidUntil = new DateTime(2025, 11, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(621)
ValidUntil = new DateTime(2025, 11, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(155)
},
new
{
@@ -1292,13 +1292,13 @@ namespace EgwCoreLib.Lux.Data.Migrations
DueDateProm = new DateTime(2025, 12, 20, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2025, 11, 20, 0, 0, 0, 0, DateTimeKind.Local),
Envir = 4,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(632),
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(633),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(166),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(167),
OffertState = 0,
RefNum = 3,
RefRev = 1,
RefYear = 2024,
ValidUntil = new DateTime(2025, 11, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(630)
ValidUntil = new DateTime(2025, 11, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(164)
},
new
{
@@ -1312,13 +1312,13 @@ namespace EgwCoreLib.Lux.Data.Migrations
DueDateProm = new DateTime(2025, 12, 20, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2025, 11, 20, 0, 0, 0, 0, DateTimeKind.Local),
Envir = 3,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(641),
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(643),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(175),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(177),
OffertState = 0,
RefNum = 4,
RefRev = 1,
RefYear = 2024,
ValidUntil = new DateTime(2025, 11, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(640)
ValidUntil = new DateTime(2025, 11, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(174)
});
});
@@ -1393,7 +1393,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.Property<int>("RowNum")
.HasColumnType("int");
b.Property<int>("SellingItemID")
b.Property<int?>("SellingItemID")
.HasColumnType("int");
b.Property<string>("SerStruct")
@@ -1415,33 +1415,6 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.ToTable("sales_offer_row");
b.HasData(
new
{
OfferRowID = 1,
AwaitBom = false,
AwaitPrice = false,
BomCost = 900.0,
BomOk = true,
BomPrice = 950.0,
Envir = 1,
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(766),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(768),
Note = "Finestra Vetro Fisso 2025",
OfferID = 1,
OfferRowUID = "SOR.25.00000001",
Qty = 3.0,
RowNum = 1,
SellingItemID = 2,
SerStruct = "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Abete\",\"ColorMaterial\":\"White\",\"Glass\":\"Vetro BE 2S 4/12/4\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"IdGroup\":1,\"AreaList\":[{\"FillType\":\"GLASS\",\"IdGroup\":4,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"FRAME\"}]}",
StepCost = 0.0,
StepPrice = 0.0
},
new
{
OfferRowID = 2,
@@ -1454,11 +1427,11 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(782),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(424),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(783),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(426),
Note = "Finestra Anta Singola 2025",
OfferID = 1,
OfferRowUID = "SOR.25.00000002",
@@ -1470,6 +1443,33 @@ namespace EgwCoreLib.Lux.Data.Migrations
StepPrice = 0.0
},
new
{
OfferRowID = 1,
AwaitBom = false,
AwaitPrice = false,
BomCost = 900.0,
BomOk = true,
BomPrice = 950.0,
Envir = 1,
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(440),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(441),
Note = "Finestra Vetro Fisso 2025",
OfferID = 1,
OfferRowUID = "SOR.25.00000001",
Qty = 3.0,
RowNum = 2,
SellingItemID = 2,
SerStruct = "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Abete\",\"ColorMaterial\":\"White\",\"Glass\":\"Vetro BE 2S 4/12/4\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"IdGroup\":1,\"AreaList\":[{\"FillType\":\"GLASS\",\"IdGroup\":4,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"FRAME\"}]}",
StepCost = 0.0,
StepPrice = 0.0
},
new
{
OfferRowID = 3,
AwaitBom = false,
@@ -1481,17 +1481,17 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(794),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(452),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(796),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(454),
Note = "Persiana per Finestra anta singola 2025",
OfferID = 1,
OfferRowUID = "SOR.25.00000003",
Qty = 3.0,
RowNum = 2,
SellingItemID = 2,
RowNum = 3,
SellingItemID = 3,
SerStruct = "{}",
StepCost = 0.0,
StepPrice = 0.0
@@ -1508,17 +1508,17 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(807),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(465),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(809),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(466),
Note = "Installazione serramento",
OfferID = 1,
OfferRowUID = "SOR.25.00000004",
Qty = 3.0,
RowNum = 3,
SellingItemID = 3,
RowNum = 4,
SellingItemID = 4,
SerStruct = "{}",
StepCost = 0.0,
StepPrice = 0.0
@@ -1535,17 +1535,17 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(840),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(499),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(842),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(501),
Note = "Demo file 01",
OfferID = 2,
OfferRowUID = "SOR.25.00000005",
Qty = 10.0,
RowNum = 1,
SellingItemID = 4,
SellingItemID = 5,
SerStruct = "",
StepCost = 0.0,
StepPrice = 0.0
@@ -1562,17 +1562,17 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(853),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(512),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(855),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(514),
Note = "Demo file 02",
OfferID = 2,
OfferRowUID = "SOR.25.00000006",
Qty = 4.0,
RowNum = 1,
SellingItemID = 4,
SellingItemID = 5,
SerStruct = "",
StepCost = 0.0,
StepPrice = 0.0
@@ -1589,17 +1589,17 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(884),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(543),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(886),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(545),
Note = "Demo file 01",
OfferID = 3,
OfferRowUID = "SOR.25.00000007",
Qty = 4.0,
RowNum = 1,
SellingItemID = 5,
SellingItemID = 6,
SerStruct = "",
StepCost = 0.0,
StepPrice = 0.0
@@ -1616,17 +1616,17 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(897),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(555),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(899),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(557),
Note = "Demo file 02",
OfferID = 3,
OfferRowUID = "SOR.25.00000008",
Qty = 12.0,
RowNum = 1,
SellingItemID = 5,
SellingItemID = 6,
SerStruct = "",
StepCost = 0.0,
StepPrice = 0.0
@@ -1643,17 +1643,17 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(927),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(585),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(929),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(587),
Note = "Demo file 01",
OfferID = 4,
OfferRowUID = "SOR.25.00000009",
Qty = 6.0,
RowNum = 1,
SellingItemID = 6,
SellingItemID = 7,
SerStruct = "",
StepCost = 0.0,
StepPrice = 0.0
@@ -1670,17 +1670,17 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(940),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(598),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(942),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(600),
Note = "Demo file 02",
OfferID = 4,
OfferRowUID = "SOR.25.0000000A",
Qty = 4.0,
RowNum = 1,
SellingItemID = 6,
SellingItemID = 7,
SerStruct = "",
StepCost = 0.0,
StepPrice = 0.0
@@ -1791,7 +1791,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.Property<int>("RowNum")
.HasColumnType("int");
b.Property<int>("SellingItemID")
b.Property<int?>("SellingItemID")
.HasColumnType("int");
b.Property<string>("SerStruct")
@@ -1871,8 +1871,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 1,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(281),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(332),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9815),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9876),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 5.0,
@@ -1884,8 +1884,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 2,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(335),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(337),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9879),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9881),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 8.0,
@@ -1897,8 +1897,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 3,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(339),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(340),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9883),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9884),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 5.0,
@@ -1910,8 +1910,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 4,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(343),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(344),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9886),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9888),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -1923,8 +1923,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 5,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(346),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(348),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9890),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9891),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 10.0,
@@ -1936,8 +1936,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 6,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(350),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(351),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9894),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9895),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -1949,8 +1949,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 7,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(354),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(355),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9897),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9898),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 50.0,
@@ -1962,8 +1962,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 8,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(357),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(359),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9901),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9902),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -1975,8 +1975,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 9,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(361),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(363),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9904),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9906),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -1988,8 +1988,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 10,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(365),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(366),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9908),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9909),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -2730,8 +2730,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav")
.WithMany()
.HasForeignKey("SellingItemID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
.OnDelete(DeleteBehavior.Restrict);
b.Navigation("OfferNav");
@@ -2776,8 +2775,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav")
.WithMany()
.HasForeignKey("SellingItemID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
.OnDelete(DeleteBehavior.Restrict);
b.Navigation("OrderNav");
@@ -592,7 +592,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
Envir = table.Column<int>(type: "int", nullable: false),
OfferRowUID = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
SellingItemID = table.Column<int>(type: "int", nullable: false),
SellingItemID = table.Column<int>(type: "int", nullable: true),
Qty = table.Column<double>(type: "double", nullable: false),
BomCost = table.Column<double>(type: "double", nullable: false),
BomPrice = table.Column<double>(type: "double", nullable: false),
@@ -714,7 +714,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
OrderID = table.Column<int>(type: "int", nullable: false),
RowNum = table.Column<int>(type: "int", nullable: false),
SellingItemID = table.Column<int>(type: "int", nullable: false),
SellingItemID = table.Column<int>(type: "int", nullable: true),
BomCost = table.Column<double>(type: "double", nullable: false),
Qty = table.Column<double>(type: "double", nullable: false),
BomPrice = table.Column<double>(type: "double", nullable: false),
@@ -1027,10 +1027,10 @@ namespace EgwCoreLib.Lux.Data.Migrations
columns: new[] { "OfferID", "ConsNote", "CustomerID", "DealerID", "Description", "DictPresel", "Discount", "DueDateProm", "DueDateReq", "Envir", "Inserted", "Modified", "OffertState", "RefNum", "RefRev", "RefYear", "ValidUntil" },
values: new object[,]
{
{ 1, "", 2, 2, "Offerta per tre serramenti", "", 0.0, new DateTime(2025, 12, 20, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 11, 20, 0, 0, 0, 0, DateTimeKind.Local), 1, new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(608), new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(610), 0, 1, 1, 2024, new DateTime(2025, 11, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(605) },
{ 2, "", 2, 2, "Offerta BEAM", "", 0.0, new DateTime(2025, 12, 20, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 11, 20, 0, 0, 0, 0, DateTimeKind.Local), 2, new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(622), new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(624), 0, 2, 1, 2024, new DateTime(2025, 11, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(621) },
{ 3, "", 2, 2, "Offerta Cabinet", "", 0.0, new DateTime(2025, 12, 20, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 11, 20, 0, 0, 0, 0, DateTimeKind.Local), 4, new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(632), new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(633), 0, 3, 1, 2024, new DateTime(2025, 11, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(630) },
{ 4, "", 2, 2, "Offerta Wall", "", 0.0, new DateTime(2025, 12, 20, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 11, 20, 0, 0, 0, 0, DateTimeKind.Local), 3, new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(641), new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(643), 0, 4, 1, 2024, new DateTime(2025, 11, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(640) }
{ 1, "", 2, 2, "Offerta per tre serramenti", "", 0.0, new DateTime(2025, 12, 20, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 11, 20, 0, 0, 0, 0, DateTimeKind.Local), 1, new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(143), new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(144), 0, 1, 1, 2024, new DateTime(2025, 11, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(140) },
{ 2, "", 2, 2, "Offerta BEAM", "", 0.0, new DateTime(2025, 12, 20, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 11, 20, 0, 0, 0, 0, DateTimeKind.Local), 2, new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(156), new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(157), 0, 2, 1, 2024, new DateTime(2025, 11, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(155) },
{ 3, "", 2, 2, "Offerta Cabinet", "", 0.0, new DateTime(2025, 12, 20, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 11, 20, 0, 0, 0, 0, DateTimeKind.Local), 4, new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(166), new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(167), 0, 3, 1, 2024, new DateTime(2025, 11, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(164) },
{ 4, "", 2, 2, "Offerta Wall", "", 0.0, new DateTime(2025, 12, 20, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2025, 11, 20, 0, 0, 0, 0, DateTimeKind.Local), 3, new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(175), new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(177), 0, 4, 1, 2024, new DateTime(2025, 11, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(174) }
});
migrationBuilder.InsertData(
@@ -1057,16 +1057,16 @@ namespace EgwCoreLib.Lux.Data.Migrations
columns: new[] { "OfferRowID", "AwaitBom", "AwaitPrice", "BomCost", "BomOk", "BomPrice", "Envir", "FileName", "FileResource", "FileSize", "Inserted", "ItemBOM", "ItemOk", "ItemSteps", "Modified", "Note", "OfferID", "OfferRowUID", "Qty", "RowNum", "SellingItemID", "SerStruct", "StepCost", "StepPrice" },
values: new object[,]
{
{ 1, false, false, 900.0, true, 950.0, 1, "", "", 0L, new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(766), "", true, "{}", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(768), "Finestra Vetro Fisso 2025", 1, "SOR.25.00000001", 3.0, 1, 2, "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Abete\",\"ColorMaterial\":\"White\",\"Glass\":\"Vetro BE 2S 4/12/4\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"IdGroup\":1,\"AreaList\":[{\"FillType\":\"GLASS\",\"IdGroup\":4,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"FRAME\"}]}", 0.0, 0.0 },
{ 2, false, false, 900.0, true, 950.0, 1, "", "", 0L, new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(782), "", true, "{}", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(783), "Finestra Anta Singola 2025", 1, "SOR.25.00000002", 3.0, 1, 1, "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Abete\",\"ColorMaterial\":\"White\",\"Glass\":\"Vetro BE 2S 4/12/4\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"IdGroup\":1,\"AreaList\":[{\"bIsSashVertical\":true,\"SashList\":[{\"nSashId\":1,\"OpeningType\":\"TILTTURN_LEFT\",\"bHasHandle\":true,\"dDimension\":100.0}],\"SashType\":\"NULL\",\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"Hardware\":\"000558\",\"IdGroup\":2,\"AreaList\":[{\"FillType\":\"GLASS\",\"IdGroup\":3,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"SASH\"}],\"AreaType\":\"FRAME\"}]}", 0.0, 0.0 },
{ 3, false, false, 160.0, true, 200.0, 1, "", "", 0L, new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(794), "", true, "{}", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(796), "Persiana per Finestra anta singola 2025", 1, "SOR.25.00000003", 3.0, 2, 2, "{}", 0.0, 0.0 },
{ 4, false, false, 200.0, true, 250.0, 1, "", "", 0L, new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(807), "", true, "{}", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(809), "Installazione serramento", 1, "SOR.25.00000004", 3.0, 3, 3, "{}", 0.0, 0.0 },
{ 5, false, false, 800.0, true, 1150.0, 2, "", "", 0L, new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(840), "", true, "{}", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(842), "Demo file 01", 2, "SOR.25.00000005", 10.0, 1, 4, "", 0.0, 0.0 },
{ 6, false, false, 600.0, true, 950.0, 2, "", "", 0L, new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(853), "", true, "{}", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(855), "Demo file 02", 2, "SOR.25.00000006", 4.0, 1, 4, "", 0.0, 0.0 },
{ 7, false, false, 200.0, true, 250.0, 3, "", "", 0L, new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(884), "", true, "{}", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(886), "Demo file 01", 3, "SOR.25.00000007", 4.0, 1, 5, "", 0.0, 0.0 },
{ 8, false, false, 50.0, true, 80.0, 3, "", "", 0L, new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(897), "", true, "{}", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(899), "Demo file 02", 3, "SOR.25.00000008", 12.0, 1, 5, "", 0.0, 0.0 },
{ 9, false, false, 800.0, true, 1150.0, 4, "", "", 0L, new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(927), "", true, "{}", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(929), "Demo file 01", 4, "SOR.25.00000009", 6.0, 1, 6, "", 0.0, 0.0 },
{ 10, false, false, 600.0, true, 950.0, 4, "", "", 0L, new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(940), "", true, "{}", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(942), "Demo file 02", 4, "SOR.25.0000000A", 4.0, 1, 6, "", 0.0, 0.0 }
{ 1, false, false, 900.0, true, 950.0, 1, "", "", 0L, new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(440), "", true, "{}", new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(441), "Finestra Vetro Fisso 2025", 1, "SOR.25.00000001", 3.0, 2, 2, "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Abete\",\"ColorMaterial\":\"White\",\"Glass\":\"Vetro BE 2S 4/12/4\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"IdGroup\":1,\"AreaList\":[{\"FillType\":\"GLASS\",\"IdGroup\":4,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"FRAME\"}]}", 0.0, 0.0 },
{ 2, false, false, 900.0, true, 950.0, 1, "", "", 0L, new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(424), "", true, "{}", new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(426), "Finestra Anta Singola 2025", 1, "SOR.25.00000002", 3.0, 1, 1, "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Abete\",\"ColorMaterial\":\"White\",\"Glass\":\"Vetro BE 2S 4/12/4\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"IdGroup\":1,\"AreaList\":[{\"bIsSashVertical\":true,\"SashList\":[{\"nSashId\":1,\"OpeningType\":\"TILTTURN_LEFT\",\"bHasHandle\":true,\"dDimension\":100.0}],\"SashType\":\"NULL\",\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"Hardware\":\"000558\",\"IdGroup\":2,\"AreaList\":[{\"FillType\":\"GLASS\",\"IdGroup\":3,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"SASH\"}],\"AreaType\":\"FRAME\"}]}", 0.0, 0.0 },
{ 3, false, false, 160.0, true, 200.0, 1, "", "", 0L, new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(452), "", true, "{}", new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(454), "Persiana per Finestra anta singola 2025", 1, "SOR.25.00000003", 3.0, 3, 3, "{}", 0.0, 0.0 },
{ 4, false, false, 200.0, true, 250.0, 1, "", "", 0L, new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(465), "", true, "{}", new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(466), "Installazione serramento", 1, "SOR.25.00000004", 3.0, 4, 4, "{}", 0.0, 0.0 },
{ 5, false, false, 800.0, true, 1150.0, 2, "", "", 0L, new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(499), "", true, "{}", new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(501), "Demo file 01", 2, "SOR.25.00000005", 10.0, 1, 5, "", 0.0, 0.0 },
{ 6, false, false, 600.0, true, 950.0, 2, "", "", 0L, new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(512), "", true, "{}", new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(514), "Demo file 02", 2, "SOR.25.00000006", 4.0, 1, 5, "", 0.0, 0.0 },
{ 7, false, false, 200.0, true, 250.0, 3, "", "", 0L, new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(543), "", true, "{}", new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(545), "Demo file 01", 3, "SOR.25.00000007", 4.0, 1, 6, "", 0.0, 0.0 },
{ 8, false, false, 50.0, true, 80.0, 3, "", "", 0L, new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(555), "", true, "{}", new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(557), "Demo file 02", 3, "SOR.25.00000008", 12.0, 1, 6, "", 0.0, 0.0 },
{ 9, false, false, 800.0, true, 1150.0, 4, "", "", 0L, new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(585), "", true, "{}", new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(587), "Demo file 01", 4, "SOR.25.00000009", 6.0, 1, 7, "", 0.0, 0.0 },
{ 10, false, false, 600.0, true, 950.0, 4, "", "", 0L, new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(598), "", true, "{}", new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(600), "Demo file 02", 4, "SOR.25.0000000A", 4.0, 1, 7, "", 0.0, 0.0 }
});
migrationBuilder.InsertData(
@@ -1103,16 +1103,16 @@ namespace EgwCoreLib.Lux.Data.Migrations
columns: new[] { "StockMovID", "CodDoc", "DtCreate", "MovCod", "Note", "QtyRec", "StockStatusId", "UnitVal", "UserId" },
values: new object[,]
{
{ 1, "", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(281), "CAR", "DEMO", 5.0, 1, 0.0, "samuele.locatelli@egalware.com" },
{ 2, "", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(335), "CAR", "DEMO", 8.0, 2, 0.0, "samuele.locatelli@egalware.com" },
{ 3, "", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(339), "CAR", "DEMO", 5.0, 3, 0.0, "samuele.locatelli@egalware.com" },
{ 4, "", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(343), "CAR", "DEMO", 1.0, 4, 0.0, "samuele.locatelli@egalware.com" },
{ 5, "", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(346), "CAR", "DEMO", 10.0, 5, 0.0, "samuele.locatelli@egalware.com" },
{ 6, "", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(350), "CAR", "DEMO", 1.0, 6, 0.0, "samuele.locatelli@egalware.com" },
{ 7, "", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(354), "CAR", "DEMO", 50.0, 7, 0.0, "samuele.locatelli@egalware.com" },
{ 8, "", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(357), "CAR", "DEMO", 1.0, 8, 0.0, "samuele.locatelli@egalware.com" },
{ 9, "", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(361), "CAR", "DEMO", 1.0, 9, 0.0, "samuele.locatelli@egalware.com" },
{ 10, "", new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(365), "CAR", "DEMO", 1.0, 10, 0.0, "samuele.locatelli@egalware.com" }
{ 1, "", new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9815), "CAR", "DEMO", 5.0, 1, 0.0, "samuele.locatelli@egalware.com" },
{ 2, "", new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9879), "CAR", "DEMO", 8.0, 2, 0.0, "samuele.locatelli@egalware.com" },
{ 3, "", new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9883), "CAR", "DEMO", 5.0, 3, 0.0, "samuele.locatelli@egalware.com" },
{ 4, "", new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9886), "CAR", "DEMO", 1.0, 4, 0.0, "samuele.locatelli@egalware.com" },
{ 5, "", new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9890), "CAR", "DEMO", 10.0, 5, 0.0, "samuele.locatelli@egalware.com" },
{ 6, "", new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9894), "CAR", "DEMO", 1.0, 6, 0.0, "samuele.locatelli@egalware.com" },
{ 7, "", new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9897), "CAR", "DEMO", 50.0, 7, 0.0, "samuele.locatelli@egalware.com" },
{ 8, "", new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9901), "CAR", "DEMO", 1.0, 8, 0.0, "samuele.locatelli@egalware.com" },
{ 9, "", new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9904), "CAR", "DEMO", 1.0, 9, 0.0, "samuele.locatelli@egalware.com" },
{ 10, "", new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9908), "CAR", "DEMO", 1.0, 10, 0.0, "samuele.locatelli@egalware.com" }
});
migrationBuilder.InsertData(
@@ -1249,13 +1249,13 @@ namespace EgwCoreLib.Lux.Data.Migrations
DueDateProm = new DateTime(2025, 12, 20, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2025, 11, 20, 0, 0, 0, 0, DateTimeKind.Local),
Envir = 1,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(608),
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(610),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(143),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(144),
OffertState = 0,
RefNum = 1,
RefRev = 1,
RefYear = 2024,
ValidUntil = new DateTime(2025, 11, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(605)
ValidUntil = new DateTime(2025, 11, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(140)
},
new
{
@@ -1269,13 +1269,13 @@ namespace EgwCoreLib.Lux.Data.Migrations
DueDateProm = new DateTime(2025, 12, 20, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2025, 11, 20, 0, 0, 0, 0, DateTimeKind.Local),
Envir = 2,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(622),
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(624),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(156),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(157),
OffertState = 0,
RefNum = 2,
RefRev = 1,
RefYear = 2024,
ValidUntil = new DateTime(2025, 11, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(621)
ValidUntil = new DateTime(2025, 11, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(155)
},
new
{
@@ -1289,13 +1289,13 @@ namespace EgwCoreLib.Lux.Data.Migrations
DueDateProm = new DateTime(2025, 12, 20, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2025, 11, 20, 0, 0, 0, 0, DateTimeKind.Local),
Envir = 4,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(632),
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(633),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(166),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(167),
OffertState = 0,
RefNum = 3,
RefRev = 1,
RefYear = 2024,
ValidUntil = new DateTime(2025, 11, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(630)
ValidUntil = new DateTime(2025, 11, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(164)
},
new
{
@@ -1309,13 +1309,13 @@ namespace EgwCoreLib.Lux.Data.Migrations
DueDateProm = new DateTime(2025, 12, 20, 0, 0, 0, 0, DateTimeKind.Local),
DueDateReq = new DateTime(2025, 11, 20, 0, 0, 0, 0, DateTimeKind.Local),
Envir = 3,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(641),
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(643),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(175),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(177),
OffertState = 0,
RefNum = 4,
RefRev = 1,
RefYear = 2024,
ValidUntil = new DateTime(2025, 11, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(640)
ValidUntil = new DateTime(2025, 11, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(174)
});
});
@@ -1390,7 +1390,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.Property<int>("RowNum")
.HasColumnType("int");
b.Property<int>("SellingItemID")
b.Property<int?>("SellingItemID")
.HasColumnType("int");
b.Property<string>("SerStruct")
@@ -1412,33 +1412,6 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.ToTable("sales_offer_row");
b.HasData(
new
{
OfferRowID = 1,
AwaitBom = false,
AwaitPrice = false,
BomCost = 900.0,
BomOk = true,
BomPrice = 950.0,
Envir = 1,
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(766),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(768),
Note = "Finestra Vetro Fisso 2025",
OfferID = 1,
OfferRowUID = "SOR.25.00000001",
Qty = 3.0,
RowNum = 1,
SellingItemID = 2,
SerStruct = "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Abete\",\"ColorMaterial\":\"White\",\"Glass\":\"Vetro BE 2S 4/12/4\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"IdGroup\":1,\"AreaList\":[{\"FillType\":\"GLASS\",\"IdGroup\":4,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"FRAME\"}]}",
StepCost = 0.0,
StepPrice = 0.0
},
new
{
OfferRowID = 2,
@@ -1451,11 +1424,11 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(782),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(424),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(783),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(426),
Note = "Finestra Anta Singola 2025",
OfferID = 1,
OfferRowUID = "SOR.25.00000002",
@@ -1467,6 +1440,33 @@ namespace EgwCoreLib.Lux.Data.Migrations
StepPrice = 0.0
},
new
{
OfferRowID = 1,
AwaitBom = false,
AwaitPrice = false,
BomCost = 900.0,
BomOk = true,
BomPrice = 950.0,
Envir = 1,
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(440),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(441),
Note = "Finestra Vetro Fisso 2025",
OfferID = 1,
OfferRowUID = "SOR.25.00000001",
Qty = 3.0,
RowNum = 2,
SellingItemID = 2,
SerStruct = "{\"ProfilePath\":\"Profilo78\",\"Material\":\"Abete\",\"ColorMaterial\":\"White\",\"Glass\":\"Vetro BE 2S 4/12/4\",\"AreaList\":[{\"Shape\":\"RECTANGLE\",\"DimensionList\":[{\"nIndex\":1,\"sName\":\"Width\",\"dValue\":800.0},{\"nIndex\":2,\"sName\":\"Height\",\"dValue\":1200.0}],\"JointList\":[{\"nIndex\":1,\"JointType\":\"FULL_H\"},{\"nIndex\":2,\"JointType\":\"FULL_H\"},{\"nIndex\":3,\"JointType\":\"FULL_H\"},{\"nIndex\":4,\"JointType\":\"FULL_H\"}],\"BottomRail\":false,\"BottomRailQty\":0,\"IdGroup\":1,\"AreaList\":[{\"FillType\":\"GLASS\",\"IdGroup\":4,\"AreaList\":[],\"AreaType\":\"FILL\"}],\"AreaType\":\"FRAME\"}]}",
StepCost = 0.0,
StepPrice = 0.0
},
new
{
OfferRowID = 3,
AwaitBom = false,
@@ -1478,17 +1478,17 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(794),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(452),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(796),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(454),
Note = "Persiana per Finestra anta singola 2025",
OfferID = 1,
OfferRowUID = "SOR.25.00000003",
Qty = 3.0,
RowNum = 2,
SellingItemID = 2,
RowNum = 3,
SellingItemID = 3,
SerStruct = "{}",
StepCost = 0.0,
StepPrice = 0.0
@@ -1505,17 +1505,17 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(807),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(465),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(809),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(466),
Note = "Installazione serramento",
OfferID = 1,
OfferRowUID = "SOR.25.00000004",
Qty = 3.0,
RowNum = 3,
SellingItemID = 3,
RowNum = 4,
SellingItemID = 4,
SerStruct = "{}",
StepCost = 0.0,
StepPrice = 0.0
@@ -1532,17 +1532,17 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(840),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(499),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(842),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(501),
Note = "Demo file 01",
OfferID = 2,
OfferRowUID = "SOR.25.00000005",
Qty = 10.0,
RowNum = 1,
SellingItemID = 4,
SellingItemID = 5,
SerStruct = "",
StepCost = 0.0,
StepPrice = 0.0
@@ -1559,17 +1559,17 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(853),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(512),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(855),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(514),
Note = "Demo file 02",
OfferID = 2,
OfferRowUID = "SOR.25.00000006",
Qty = 4.0,
RowNum = 1,
SellingItemID = 4,
SellingItemID = 5,
SerStruct = "",
StepCost = 0.0,
StepPrice = 0.0
@@ -1586,17 +1586,17 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(884),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(543),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(886),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(545),
Note = "Demo file 01",
OfferID = 3,
OfferRowUID = "SOR.25.00000007",
Qty = 4.0,
RowNum = 1,
SellingItemID = 5,
SellingItemID = 6,
SerStruct = "",
StepCost = 0.0,
StepPrice = 0.0
@@ -1613,17 +1613,17 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(897),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(555),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(899),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(557),
Note = "Demo file 02",
OfferID = 3,
OfferRowUID = "SOR.25.00000008",
Qty = 12.0,
RowNum = 1,
SellingItemID = 5,
SellingItemID = 6,
SerStruct = "",
StepCost = 0.0,
StepPrice = 0.0
@@ -1640,17 +1640,17 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(927),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(585),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(929),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(587),
Note = "Demo file 01",
OfferID = 4,
OfferRowUID = "SOR.25.00000009",
Qty = 6.0,
RowNum = 1,
SellingItemID = 6,
SellingItemID = 7,
SerStruct = "",
StepCost = 0.0,
StepPrice = 0.0
@@ -1667,17 +1667,17 @@ namespace EgwCoreLib.Lux.Data.Migrations
FileName = "",
FileResource = "",
FileSize = 0L,
Inserted = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(940),
Inserted = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(598),
ItemBOM = "",
ItemOk = true,
ItemSteps = "{}",
Modified = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(942),
Modified = new DateTime(2025, 10, 21, 11, 14, 2, 982, DateTimeKind.Local).AddTicks(600),
Note = "Demo file 02",
OfferID = 4,
OfferRowUID = "SOR.25.0000000A",
Qty = 4.0,
RowNum = 1,
SellingItemID = 6,
SellingItemID = 7,
SerStruct = "",
StepCost = 0.0,
StepPrice = 0.0
@@ -1788,7 +1788,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.Property<int>("RowNum")
.HasColumnType("int");
b.Property<int>("SellingItemID")
b.Property<int?>("SellingItemID")
.HasColumnType("int");
b.Property<string>("SerStruct")
@@ -1868,8 +1868,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 1,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(281),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(332),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9815),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9876),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 5.0,
@@ -1881,8 +1881,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 2,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(335),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(337),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9879),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9881),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 8.0,
@@ -1894,8 +1894,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 3,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(339),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(340),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9883),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9884),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 5.0,
@@ -1907,8 +1907,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 4,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(343),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(344),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9886),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9888),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -1920,8 +1920,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 5,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(346),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(348),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9890),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9891),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 10.0,
@@ -1933,8 +1933,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 6,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(350),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(351),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9894),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9895),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -1946,8 +1946,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 7,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(354),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(355),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9897),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9898),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 50.0,
@@ -1959,8 +1959,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 8,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(357),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(359),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9901),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9902),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -1972,8 +1972,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 9,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(361),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(363),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9904),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9906),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -1985,8 +1985,8 @@ namespace EgwCoreLib.Lux.Data.Migrations
{
StockMovID = 10,
CodDoc = "",
DtCreate = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(365),
DtMod = new DateTime(2025, 10, 21, 9, 53, 0, 823, DateTimeKind.Local).AddTicks(366),
DtCreate = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9908),
DtMod = new DateTime(2025, 10, 21, 11, 14, 2, 981, DateTimeKind.Local).AddTicks(9909),
MovCod = "CAR",
Note = "DEMO",
QtyRec = 1.0,
@@ -2727,8 +2727,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav")
.WithMany()
.HasForeignKey("SellingItemID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
.OnDelete(DeleteBehavior.Restrict);
b.Navigation("OfferNav");
@@ -2773,8 +2772,7 @@ namespace EgwCoreLib.Lux.Data.Migrations
b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav")
.WithMany()
.HasForeignKey("SellingItemID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
.OnDelete(DeleteBehavior.Restrict);
b.Navigation("OrderNav");
@@ -282,28 +282,28 @@ namespace EgwCoreLib.Lux.Data
// inizializzazione dei valori di default x Offerta 1 = WINDOW
modelBuilder.Entity<OfferRowModel>().HasData(
new OfferRowModel { OfferRowID = 1, OfferID = 1, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, OfferRowUID = $"SOR.{DateTime.Today:yy}.{1:X8}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 900, BomPrice = 950, SellingItemID = 2, Qty = 3, RowNum = 1, SerStruct = jwdVetroFisso, Note = "Finestra Vetro Fisso 2025", ItemSteps = "{}", BomOk = true, ItemOk = true },
new OfferRowModel { OfferRowID = 2, OfferID = 1, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, OfferRowUID = $"SOR.{DateTime.Today:yy}.{2:X8}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 900, BomPrice = 950, SellingItemID = 1, Qty = 3, RowNum = 1, SerStruct = jwdAntaSingola, Note = "Finestra Anta Singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true },
new OfferRowModel { OfferRowID = 3, OfferID = 1, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, OfferRowUID = $"SOR.{DateTime.Today:yy}.{3:X8}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 160, BomPrice = 200, SellingItemID = 2, Qty = 3, RowNum = 2, SerStruct = "{}", Note = "Persiana per Finestra anta singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true },
new OfferRowModel { OfferRowID = 4, OfferID = 1, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, OfferRowUID = $"SOR.{DateTime.Today:yy}.{4:X8}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 200, BomPrice = 250, SellingItemID = 3, Qty = 3, RowNum = 3, SerStruct = "{}", Note = "Installazione serramento", ItemSteps = "{}", BomOk = true, ItemOk = true }
new OfferRowModel { OfferRowID = 1, OfferID = 1, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, OfferRowUID = $"SOR.{DateTime.Today:yy}.{1:X8}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 900, BomPrice = 950, SellingItemID = 2, Qty = 3, RowNum = 2, SerStruct = jwdVetroFisso, Note = "Finestra Vetro Fisso 2025", ItemSteps = "{}", BomOk = true, ItemOk = true },
new OfferRowModel { OfferRowID = 3, OfferID = 1, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, OfferRowUID = $"SOR.{DateTime.Today:yy}.{3:X8}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 160, BomPrice = 200, SellingItemID = 3, Qty = 3, RowNum = 3, SerStruct = "{}", Note = "Persiana per Finestra anta singola 2025", ItemSteps = "{}", BomOk = true, ItemOk = true },
new OfferRowModel { OfferRowID = 4, OfferID = 1, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, OfferRowUID = $"SOR.{DateTime.Today:yy}.{4:X8}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 200, BomPrice = 250, SellingItemID = 4, Qty = 3, RowNum = 4, SerStruct = "{}", Note = "Installazione serramento", ItemSteps = "{}", BomOk = true, ItemOk = true }
);
// inizializzazione dei valori di default x Offerta 2 = BEAM
modelBuilder.Entity<OfferRowModel>().HasData(
new OfferRowModel { OfferRowID = 5, OfferID = 2, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM, OfferRowUID = $"SOR.{DateTime.Today:yy}.{5:X8}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 800, BomPrice = 1150, SellingItemID = 4, Qty = 10, RowNum = 1, SerStruct = "", Note = "Demo file 01", ItemSteps = "{}", BomOk = true, ItemOk = true },
new OfferRowModel { OfferRowID = 6, OfferID = 2, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM, OfferRowUID = $"SOR.{DateTime.Today:yy}.{6:X8}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 600, BomPrice = 950, SellingItemID = 4, Qty = 4, RowNum = 1, SerStruct = "", Note = "Demo file 02", ItemSteps = "{}", BomOk = true, ItemOk = true }
new OfferRowModel { OfferRowID = 5, OfferID = 2, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM, OfferRowUID = $"SOR.{DateTime.Today:yy}.{5:X8}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 800, BomPrice = 1150, SellingItemID = 5, Qty = 10, RowNum = 1, SerStruct = "", Note = "Demo file 01", ItemSteps = "{}", BomOk = true, ItemOk = true },
new OfferRowModel { OfferRowID = 6, OfferID = 2, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM, OfferRowUID = $"SOR.{DateTime.Today:yy}.{6:X8}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 600, BomPrice = 950, SellingItemID = 5, Qty = 4, RowNum = 1, SerStruct = "", Note = "Demo file 02", ItemSteps = "{}", BomOk = true, ItemOk = true }
);
// inizializzazione dei valori di default x Offerta 3 = CABINET
modelBuilder.Entity<OfferRowModel>().HasData(
new OfferRowModel { OfferRowID = 7, OfferID = 3, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WALL, OfferRowUID = $"SOR.{DateTime.Today:yy}.{7:X8}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 200, BomPrice = 250, SellingItemID = 5, Qty = 4, RowNum = 1, SerStruct = "", Note = "Demo file 01", ItemSteps = "{}", BomOk = true, ItemOk = true },
new OfferRowModel { OfferRowID = 8, OfferID = 3, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WALL, OfferRowUID = $"SOR.{DateTime.Today:yy}.{8:X8}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 50, BomPrice = 80, SellingItemID = 5, Qty = 12, RowNum = 1, SerStruct = "", Note = "Demo file 02", ItemSteps = "{}", BomOk = true, ItemOk = true }
new OfferRowModel { OfferRowID = 7, OfferID = 3, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WALL, OfferRowUID = $"SOR.{DateTime.Today:yy}.{7:X8}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 200, BomPrice = 250, SellingItemID = 6, Qty = 4, RowNum = 1, SerStruct = "", Note = "Demo file 01", ItemSteps = "{}", BomOk = true, ItemOk = true },
new OfferRowModel { OfferRowID = 8, OfferID = 3, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WALL, OfferRowUID = $"SOR.{DateTime.Today:yy}.{8:X8}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 50, BomPrice = 80, SellingItemID = 6, Qty = 12, RowNum = 1, SerStruct = "", Note = "Demo file 02", ItemSteps = "{}", BomOk = true, ItemOk = true }
);
// inizializzazione dei valori di default x Offerta 4 = WALL
modelBuilder.Entity<OfferRowModel>().HasData(
new OfferRowModel { OfferRowID = 9, OfferID = 4, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.CABINET, OfferRowUID = $"SOR.{DateTime.Today:yy}.{9:X8}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 800, BomPrice = 1150, SellingItemID = 6, Qty = 6, RowNum = 1, SerStruct = "", Note = "Demo file 01", ItemSteps = "{}", BomOk = true, ItemOk = true },
new OfferRowModel { OfferRowID = 10, OfferID = 4, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.CABINET, OfferRowUID = $"SOR.{DateTime.Today:yy}.{10:X8}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 600, BomPrice = 950, SellingItemID = 6, Qty = 4, RowNum = 1, SerStruct = "", Note = "Demo file 02", ItemSteps = "{}", BomOk = true, ItemOk = true }
new OfferRowModel { OfferRowID = 9, OfferID = 4, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.CABINET, OfferRowUID = $"SOR.{DateTime.Today:yy}.{9:X8}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 800, BomPrice = 1150, SellingItemID = 7, Qty = 6, RowNum = 1, SerStruct = "", Note = "Demo file 01", ItemSteps = "{}", BomOk = true, ItemOk = true },
new OfferRowModel { OfferRowID = 10, OfferID = 4, Envir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.CABINET, OfferRowUID = $"SOR.{DateTime.Today:yy}.{10:X8}", Inserted = DateTime.Now, Modified = DateTime.Now, BomCost = 600, BomPrice = 950, SellingItemID = 7, Qty = 4, RowNum = 1, SerStruct = "", Note = "Demo file 02", ItemSteps = "{}", BomOk = true, ItemOk = true }
);
}
+79 -13
View File
@@ -14,12 +14,12 @@ using System.Threading.Tasks;
namespace EgwCoreLib.Lux.Data.Services
{
/// <summary>
/// Classe base per i servizi che fornisce funzionalità comuni come
/// Classe base per i servizi che fornisce funzionalità comuni come
/// - connessione a Redis
/// - configurazione
/// - gestione dei messaggi
/// - strategie di caching.
///
/// - gestione dei messaggi
/// - strategie di caching.
///
/// Questa classe agisce come modello per altri servizi derivati.
/// </summary>
public class BaseServ
@@ -41,7 +41,11 @@ namespace EgwCoreLib.Lux.Data.Services
// channel name setup
svgChannel = _config.GetValue<string>("ServerConf:SvgChannel") ?? "Egw:svg:img";
bomChannel = _config.GetValue<string>("ServerConf:BomChannel") ?? "Egw:bom";
updateChannel = _config.GetValue<string>("ServerConf:UpdateChannel") ?? "Egw-update";
updateChannel = _config.GetValue<string>("ServerConf:UpdateChannel") ?? "Egw:update";
shapeChannel = _config.GetValue<string>("ServerConf:ShapeChannel") ?? "Egw:shape:curr";
hwListChannel = _config.GetValue<string>("ServerConf:HwListChannel") ?? "Egw:hw:list";
hwOptChannel = _config.GetValue<string>("ServerConf:HwOptChannel") ?? "Egw:hw:opt";
profListChannel = _config.GetValue<string>("ServerConf:ProfListChannel") ?? "Egw:prof:list";
// Appends ":*" to the channels to enable wildcard subscription for dynamic events
if (!svgChannel.EndsWith(":*"))
{
@@ -55,6 +59,22 @@ namespace EgwCoreLib.Lux.Data.Services
{
updateChannel += ":*";
}
if (!shapeChannel.EndsWith(":*"))
{
shapeChannel += ":*";
}
if (!hwListChannel.EndsWith(":*"))
{
hwListChannel += ":*";
}
if (!hwOptChannel.EndsWith(":*"))
{
hwOptChannel += ":*";
}
if (!profListChannel.EndsWith(":*"))
{
profListChannel += ":*";
}
// Configurazione serializzatore JSON per risolvere errore di loop circolare
JSSettings = new JsonSerializerSettings()
@@ -63,9 +83,13 @@ namespace EgwCoreLib.Lux.Data.Services
};
// Configurazione pipe dei messaggi
CalcDonePipe = new MessagePipe(redisConn, svgChannel);
BomPipe = new MessagePipe(RedisConn, bomChannel);
UpdatePipe = new MessagePipe(RedisConn, updateChannel);
PipeSvg = new MessagePipe(redisConn, svgChannel);
PipeBom = new MessagePipe(RedisConn, bomChannel);
PipeUpdate = new MessagePipe(RedisConn, updateChannel);
PipeShape = new MessagePipe(RedisConn, shapeChannel);
PipeHwList = new MessagePipe(RedisConn, hwListChannel);
PipeHwOpt = new MessagePipe(RedisConn, hwOptChannel);
PipeProfList = new MessagePipe(RedisConn, profListChannel);
}
#endregion Public Constructors
@@ -75,18 +99,41 @@ namespace EgwCoreLib.Lux.Data.Services
/// <summary>
/// Pipe dei messaggi per la comunicazione riguardo update calcolo BOM
/// </summary>
public MessagePipe BomPipe { get; set; } = null!;
public MessagePipe PipeBom { get; set; } = null!;
/// <summary>
/// Pipe dei messaggi per la comunicazione tra servizi di calcolo e interfaccia utente.
/// I messaggi vengono inviati sul canale Redis definito da svgChannel.
/// Pipe dei messaggi per ritorno HwList da Engine di calcolo verso interfaccia utente.
/// I messaggi vengono inviati sul canale Redis definito da HwListChannel.
/// </summary>
public MessagePipe CalcDonePipe { get; set; } = null!;
public MessagePipe PipeHwList { get; set; } = null!;
/// <summary>
/// Pipe dei messaggi per ritorno HwOptions calcolate da Engine di calcolo verso interfaccia utente.
/// I messaggi vengono inviati sul canale Redis definito da HwOptChannel.
/// </summary>
public MessagePipe PipeHwOpt { get; set; } = null!;
/// <summary>
/// Pipe dei messaggi per ritorno ProfileList calcolate da Engine di calcolo verso interfaccia utente.
/// I messaggi vengono inviati sul canale Redis definito da ProfListChannel.
/// </summary>
public MessagePipe PipeProfList { get; set; } = null!;
/// <summary>
/// Pipe dei messaggi per ritorno Shape calcolate da Engine di calcolo verso interfaccia utente.
/// I messaggi vengono inviati sul canale Redis definito da ShapeChannel.
/// </summary>
public MessagePipe PipeShape { get; set; } = null!;
/// <summary>
/// Pipe dei messaggi per ritorno SVG calcolati da Engine di calcolo verso interfaccia utente.
/// I messaggi vengono inviati sul canale Redis definito da SvgChannel.
/// </summary>
public MessagePipe PipeSvg { get; set; } = null!;
/// <summary>
/// Pipe dei messaggi per la comunicazione riguardo update generico UI
/// </summary>
public MessagePipe UpdatePipe { get; set; } = null!;
public MessagePipe PipeUpdate { get; set; } = null!;
#endregion Public Properties
@@ -178,12 +225,31 @@ namespace EgwCoreLib.Lux.Data.Services
/// </summary>
private int cacheTtlShort = 60 * 1;
/// <summary>
/// Canale ritorno Hw List
/// </summary>
private string hwListChannel = "";
/// <summary>
/// Canale ritorno Hw Options
/// </summary>
private string hwOptChannel = "";
/// <summary>
/// Canale ritorno Profile List
/// </summary>
private string profListChannel = "";
/// <summary>
/// Generatore di numeri casuali utilizzato per introdurre variabilità dinamica nelle durate della cache
/// (simula variazioni reali nella freschezza dei dati e nei tempi di scadenza).
/// </summary>
private Random rnd = new Random();
/// <summary>
/// Canale ritorno shape calcolate
/// </summary>
private string shapeChannel = "";
/// <summary>
/// Nome del canale Redis utilizzato per l'invio/ricezione di messaggi relativi a img svg.
/// Predefinito a "svg:img" con suffisso ":*".
@@ -16,6 +16,7 @@ namespace EgwCoreLib.Lux.Data.Services
{
public class ConfigDataService : BaseServ
{
#region Public Constructors
public ConfigDataService(IConfiguration configuration, IConnectionMultiplexer RedisConn) : base(configuration, RedisConn)
{
@@ -23,11 +24,15 @@ namespace EgwCoreLib.Lux.Data.Services
Log.Info($"ConfigDataService | Init OK");
}
#endregion Public Constructors
#region Public Methods
/// <summary>
/// restituisce l'elenco dell'HW valido in memoria
/// Restituisce l'elenco dell'HW valido da cache REDIS
/// </summary>
/// <returns></returns>
public List<HardwareModel> ElencoHw(Constants.EXECENVIRONMENTS execEnvironment, string HwReq = "HW.AGB")
public List<HardwareModel> HwModelList(Constants.EXECENVIRONMENTS execEnvironment, string HwReq = "HW.AGB")
{
List<HardwareModel> result = new List<HardwareModel>();
// leggo obj da redis cache
@@ -38,16 +43,36 @@ namespace EgwCoreLib.Lux.Data.Services
{
var currList = JsonConvert.DeserializeObject<List<HardwareModel>>($"{rawData}");
result = currList ?? new List<HardwareModel>();
//var currList = JsonConvert.DeserializeObject<HwListDTO>($"{rawData}");
//if (currList != null && currList.ListItem != null)
//{
// result = currList.ListItem;
//}
}
return result;
}
/// <summary>
/// Restituisce l'elenco dei profili da cache REDIS
/// </summary>
/// <returns></returns>
public List<string> ProfileList(Constants.EXECENVIRONMENTS execEnvironment, string ProfReq = "Default")
{
List<string> result = new List<string>();
// leggo obj da redis cache
var currKey = $"{redisBaseKey}:{execEnvironment}:PROFLIST:{ProfReq}";
RedisValue rawData = redisDb.StringGet(currKey);
// prendo solo i valori validi (Description <> FamilyName)
if (rawData.HasValue)
{
var currList = JsonConvert.DeserializeObject<List<string>>($"{rawData}");
result = currList ?? new List<string>();
}
return result;
}
#endregion Public Methods
#region Private Fields
private static Logger Log = LogManager.GetCurrentClassLogger();
private string redisBaseKey = "Lux";
#endregion Private Fields
}
}
}
@@ -155,6 +155,7 @@ namespace EgwCoreLib.Lux.Data.Services
/// Elenco completo Config Profile
/// </summary>
/// <returns></returns>
[Obsolete("Superato da gestione profili direttametne dal Calc")]
public async Task<List<ProfileModel>> ConfProfileGetAllAsync()
{
string source = "DB";
@@ -853,7 +854,7 @@ namespace EgwCoreLib.Lux.Data.Services
return fatto;
}
/// <summary>
/// Effettua eliminazione della riga offerta
/// </summary>
@@ -1000,24 +1001,37 @@ namespace EgwCoreLib.Lux.Data.Services
{
try
{
// salvo il set come oggetti deserializzati/testati?
#if false
// deserializzo la Bom...
var bomList = JsonConvert.DeserializeObject<List<BomItemDTO>>(rawContent);
if (bomList != null)
{
// verifico 1:1 gli item ricevuti dalla BOM sul DB con eventuale insert
dbController.ItemUpsertFromBom(bomList);
// salvo la BOM nel record del DB relativo all'oggetto richiesto
dbController.OfferUpsertFromBom(uID, bomList);
}
#endif
// non effettuo salvataggio sul DB perché master del dato è esterno e lo lasceremo solo in cache REDIS
await Task.Delay(1);
}
catch { }
}
await Task.Delay(1);
}
/// <summary>
/// Esegue salvataggio ProfileList sul DB
/// </summary>
/// <param name="uID">UID dell'item offerta di cui si è ricevuto la BOM</param>
/// <param name="execEnvironment">Environment dell'item</param>
/// <param name="rawContent">HardwareModelList serializzata</param>
/// <returns></returns>
public async Task SaveProfileListAsync(string uID, Constants.EXECENVIRONMENTS execEnvironment, string rawContent)
{
// salvo sul DB il risultato della BOM
if (!string.IsNullOrEmpty(rawContent))
{
try
{
// non effettuo salvataggio sul DB perché master del dato è esterno e lo lasceremo solo in cache REDIS
await Task.Delay(1);
}
catch { }
}
}
#endregion Public Methods
#region Protected Fields
@@ -21,12 +21,17 @@ namespace EgwCoreLib.Lux.Data.Services
{
_config = config;
_redisService = redisService;
svgChannel = _config.GetValue<string>("ServerConf:SvgChannel") ?? "svg:img";
// conf channels x comunicazione broadcast
hwOptChannel = _config.GetValue<string>("ServerConf:HwOptChannel") ?? "Egw:hw";
svgChannel = _config.GetValue<string>("ServerConf:SvgChannel") ?? "Egw:svg:img";
bomChannel = _config.GetValue<string>("ServerConf:BomChannel") ?? "Egw:bom";
hmlChannel = _config.GetValue<string>("ServerConf:HwListChannel") ?? "Egw:hml";
profListChannel = _config.GetValue<string>("ServerConf:ProfListChannel") ?? "Egw:prof";
updateChannel = _config.GetValue<string>("ServerConf:UpdateChannel") ?? "Egw:update";
// conf tag x cache
liveTag = _config.GetValue<string>("ServerConf:ImageLiveTag") ?? "svg";
cacheTag = _config.GetValue<string>("ServerConf:ImageFileTag") ?? "svgfile";
calcTag = _config.GetValue<string>("ServerConf:ImageCalcTag") ?? "svg-preview";
bomChannel = _config.GetValue<string>("ServerConf:BomChannel") ?? "Egw-bom";
updateChannel = _config.GetValue<string>("ServerConf:UpdateChannel") ?? "Egw-update";
// verifico la url base
apiUrl = _config.GetValue<string>("ServerConf:Prog.ApiUrl") ?? "https://iis01.egalware.com/lux/srv/api";
imgBasePath = _config.GetValue<string>("ServerConf:ImageBaseUrl") ?? "window";
@@ -118,7 +123,7 @@ namespace EgwCoreLib.Lux.Data.Services
string tag = isLive ? liveTag : cacheTag;
if (imgUID.EndsWith(".svg"))
{
imgUID.Replace(".svg","");
imgUID.Replace(".svg", "");
}
string rndImg = $"{DateTime.Now:HHmmssfff}";
string fullUrl = $"{baseUrl}/{tag}/{imgUID}-{rndImg}.svg?envir={envir}".Replace("////", "//");
@@ -151,6 +156,23 @@ namespace EgwCoreLib.Lux.Data.Services
return $"{rawVal}";
}
/// <summary>
/// Salva e invia su channel richiesto un update x UID
/// è attesao un refresh per chi sottoscrive il canale
/// </summary>
/// <param name="env"></param>
/// <param name="uid"></param>
public async Task<bool> PublishUpdateAsync(string uid, Constants.EXECENVIRONMENTS env)
{
bool done = false;
// invio notifica sul canale di update generale...
string notifyChannel = $"{updateChannel}:{env}";
// contenuto è UID
long numSent = await _redisService.PublishAsync(notifyChannel, $"{uid}");
done = numSent > 0;
return done;
}
/// <summary>
/// Calcola URL immagine dato
/// </summary>
@@ -188,24 +210,7 @@ namespace EgwCoreLib.Lux.Data.Services
}
/// <summary>
/// Salva e invia su channel richiesto un update x UID
/// è attesao un refresh per chi sottoscrive il canale
/// </summary>
/// <param name="env"></param>
/// <param name="uid"></param>
public async Task<bool> PublishUpdateAsync(string uid, Constants.EXECENVIRONMENTS env)
{
bool done = false;
// invio notifica sul canale di update generale...
string notifyChannel = $"{updateChannel}:{env}";
// contenuto è UID
long numSent = await _redisService.PublishAsync(notifyChannel, $"{uid}");
done = numSent > 0;
return done;
}
/// <summary>
/// Salva e invia su channel img redis SVG per il doc richiesto
/// Salva e invia su channel dedicato HML l'elenco degli HarwareModel (conf preferiti) gestiti
/// </summary>
/// <param name="uid"></param>
/// <param name="rawData"></param>
@@ -220,6 +225,22 @@ namespace EgwCoreLib.Lux.Data.Services
return done;
}
/// <summary>
/// Salva e invia su channel profile list gestiti
/// </summary>
/// <param name="uid"></param>
/// <param name="rawData"></param>
public async Task<bool> SaveProfileListAsync(string uid, Constants.EXECENVIRONMENTS env, string rawData)
{
// salvo img in cache
string currKey = $"{redisBaseKey}:{env}:PROFLIST:{uid.Replace("/", ":")}";
var done = await _redisService.SetAsync(currKey, rawData);
// invio notifica nuova svg generata sul canale... viene inviato solo svg con ID nel canale
string notifyChannel = $"{profListChannel}:{uid}";
long numSent = await _redisService.PublishAsync(notifyChannel, rawData);
return done;
}
/// <summary>
/// Salva e invia su channel img redis SVG per il doc richiesto
/// </summary>
@@ -253,6 +274,23 @@ namespace EgwCoreLib.Lux.Data.Services
long numSent = await _redisService.PublishAsync(notifyChannel, svgContent);
return done;
}
/// <summary>
/// Salva e invia su channel l'XML delle HW options per il doc richiesto
/// </summary>
/// <param name="uid"></param>
/// <param name="env"></param>
/// <param name="xmlContent"></param>
public async Task<bool> SaveHwOptAsync(string uid, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS env, string xmlContent)
{
// salvo img in cache
string currKey = $"{redisBaseKey}:{env}:HwOpt:{uid.Replace("/", ":")}";
// lascio in cache 15 min x poterlo verificare
var done = await _redisService.SetAsync(currKey, xmlContent, TimeSpan.FromMinutes(15));
// invio notifica nuova XML sul canale (inviato solo XML pulito con ID nel canale)
string notifyChannel = $"{hwOptChannel}:{uid}";
long numSent = await _redisService.PublishAsync(notifyChannel, xmlContent);
return done;
}
#endregion Public Methods
@@ -265,15 +303,16 @@ namespace EgwCoreLib.Lux.Data.Services
private readonly string apiUrl = "";
private readonly string bomChannel = "bom:item";
private readonly string updateChannel = "ui:update";
private readonly string cacheTag = "svgfile";
private readonly string calcTag = "svgpreview";
private readonly string hmlChannel = "hml:item";
private readonly string hwOptChannel = "hw:opt";
private readonly string imgBasePath = "";
private readonly string liveTag = "svg";
private readonly string profListChannel = "prof:list";
private readonly string shapeChannel = "shape:curr";
private readonly string svgChannel = "svg:img";
private readonly string updateChannel = "ui:update";
private IConfiguration _config;
private string imageBaseUrl = "";
+8 -3
View File
@@ -1,4 +1,5 @@
using EgwCoreLib.Lux.Core.RestPayload;
using Egw.Window.Data;
using EgwCoreLib.Lux.Core.RestPayload;
using EgwCoreLib.Lux.Data.Services;
using EgwMultiEngineManager.Data;
using Microsoft.AspNetCore.Mvc;
@@ -45,7 +46,11 @@ namespace Lux.API.Controllers
// controllo se mancassero parametri...
if (!DictExec.ContainsKey("Mode"))
{
DictExec.Add("Mode", "1");
DictExec.Add("Mode", $"{(int)Enums.QuestionModes.PREVIEW}");
}
if (!DictExec.ContainsKey("SubMode"))
{
DictExec.Add("SubMode", $"{(int)Enums.QuestionConfSubModes.NULL}");
}
if (!DictExec.ContainsKey("UID"))
{
@@ -84,7 +89,7 @@ namespace Lux.API.Controllers
{
Dictionary<string, string> DictExec = new Dictionary<string, string>();
// cablata la BOM
DictExec.Add("Mode", "2");
DictExec.Add("Mode", $"{(int)Enums.QuestionModes.BOM}");
// UID cablato x ora...
DictExec.Add("UID", id);
DictExec.Add("Jwd", currSer);
+8 -7
View File
@@ -1,4 +1,5 @@
using EgwCoreLib.Lux.Core;
using Egw.Window.Data;
using EgwCoreLib.Lux.Core;
using EgwCoreLib.Lux.Data.DbModel.Config;
using EgwCoreLib.Lux.Data.Services;
using EgwMultiEngineManager.Data;
@@ -60,7 +61,7 @@ namespace Lux.API.Controllers
if (!string.IsNullOrEmpty(currJwd))
{
Dictionary<string, string> DictExec = new Dictionary<string, string>();
DictExec.Add("Mode", "2");
DictExec.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.BOM}");
// UID cablato x ora...
DictExec.Add("UID", id);
DictExec.Add("Jwd", currJwd);
@@ -102,11 +103,11 @@ namespace Lux.API.Controllers
private async Task sendHwReq()
{
Dictionary<string, string> DictExec = new Dictionary<string, string>();
DictExec.Add("Mode", $"{(int)Enums.EngineQueryType.HardwareModelList}");
DictExec.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.HARDWARE}");
// da rivedere?
DictExec.Add("UID", "HW.AGB");
DictExec.Add("SubMode", $"{(int)Enums.EngineSubMode.LIST}");
DictExec.Add("Manufacturer", $"{(int)Enums.EngineHwManufacturers.AGB}");
DictExec.Add("SubMode", $"{(int)Egw.Window.Data.Enums.QuestionHwSubModes.LIST}");
DictExec.Add("Manufacturer", $"{(int)Egw.Window.Data.Enums.HardwareManufacturers.AGB}");
int nId = 1;
// da modificare con tipo richiesta...
QuestionDTO currArgs = new QuestionDTO(nId, EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, DictExec);
@@ -127,7 +128,7 @@ namespace Lux.API.Controllers
Stopwatch sw = new Stopwatch();
sw.Start();
string hwReq = id ?? "HW.AGB";
var answ = _confService.ElencoHw(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, hwReq);
var answ = _confService.HwModelList(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, hwReq);
if (answ == null || answ.Count == 0)
{
await sendHwReq();
@@ -238,7 +239,7 @@ namespace Lux.API.Controllers
if (!string.IsNullOrEmpty(currJwd))
{
Dictionary<string, string> DictExec = new Dictionary<string, string>();
DictExec.Add("Mode", "1");
DictExec.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.PREVIEW}");
// UID cablato x ora...
DictExec.Add("UID", id);
DictExec.Add("Jwd", currJwd);
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>0.9.2510.2109</Version>
<Version>0.9.2510.2211</Version>
</PropertyGroup>
<ItemGroup>
+57 -9
View File
@@ -43,34 +43,82 @@ namespace Lux.API.Services
{
if (retData.Args != null && retData.Args.Count > 0)
{
/*------------------------------------------
* Richieste "continue" di stato/update *
* ----------------------------------------*/
// gestione ritorno preview SVG
if (retData.Args.ContainsKey("Svg"))
{
// dovrei leggere dagli args l'IUID dell'SVG ritornato...
// salvo SVG
string newSvg = retData.Args["Svg"];
// recupero UID ed SVG
string UID = retData.Args["UID"];
string newSvg = retData.Args["Svg"];
// reinvio in redis (cache + channel)
await cacheService.SaveSvgAsync(UID, retData.ExecEnvironment, newSvg);
}
// gesitone ritorno BOM
if (retData.Args.ContainsKey("BOM"))
{
string newBom = retData.Args["BOM"];
// recupero UID e BOM
string UID = retData.Args["UID"];
// salvo BOM ricevuta RAW in redis
string newBom = retData.Args["BOM"];
// salvo BOM ricevuta RAW in redis (cache)
await cacheService.SaveBomAsync(UID, retData.ExecEnvironment, newBom);
// salvo la BOM completa con i dati recuperati dal DB
await dbService.SaveBomAsync(UID, retData.ExecEnvironment, newBom);
// pubblico refresh info così da segnalare richeista di update conseguente
// pubblico refresh info così da segnalare richiesta di update conseguente
await cacheService.PublishUpdateAsync(UID, retData.ExecEnvironment);
}
// gestione ritorno tipo Shape
if (retData.Args.ContainsKey("SashShape"))
{
//// salvo HardwareList ricevuta
//string profList = retData.Args["HardwareModelList"];
//string UID = retData.Args["UID"];
//await cacheService.SaveHmlAsync(UID, retData.ExecEnvironment, profList);
//await dbService.SaveHmlAsync(UID, retData.ExecEnvironment, profList);
}
// gestione ritorno opzioni HW
if (retData.Args.ContainsKey("HardwareOptions"))
{
// recupero UID ed SVG
string UID = retData.Args["UID"];
string newHwOpt = retData.Args["HardwareOptions"];
// reinvio in redis (cache + channel)
await cacheService.SaveHwOptAsync(UID, retData.ExecEnvironment, newHwOpt);
}
/*------------------------------------------
* Richieste "one shot" di configurazione
* - fare 1/gg o su richiesta utente
* ----------------------------------------*/
// Gestione ritorno lista preferiti HW (ammissibili)
if (retData.Args.ContainsKey("HardwareModelList"))
{
// salvo HardwareList ricevuta
string newHml = retData.Args["HardwareModelList"];
// recupero UID e lista preferiti HW
string UID = retData.Args["UID"];
string newHml = retData.Args["HardwareModelList"];
// salvo HardwareList ricevuta
await cacheService.SaveHmlAsync(UID, retData.ExecEnvironment, newHml);
await dbService.SaveHmlAsync(UID, retData.ExecEnvironment, newHml);
}
// gestione ritorno lista profili VALIDI per JWD
if (retData.Args.ContainsKey("ProfileList"))
{
// recupero UID e elenco profili validi
string UID = retData.Args["UID"];
string profList = retData.Args["ProfileList"];
// salvo ProfileList ricevuta
await cacheService.SaveProfileListAsync(UID, retData.ExecEnvironment, profList);
await dbService.SaveProfileListAsync(UID, retData.ExecEnvironment, profList);
}
}
}
}
+2 -2
View File
@@ -7,8 +7,8 @@
},
"ServerConf": {
"BaseUrl": "/lux/srv/",
"PubChannel": "EgwDevEngineInput",
"SubChannel": "EgwDevEngineOutput",
//"PubChannel": "EgwDevEngineInput",
//"SubChannel": "EgwDevEngineOutput",
"ImageBaseUrl": "https://iis01.egalware.com/lux/srv/api/window/"
}
}
+5
View File
@@ -59,10 +59,15 @@
"PubChannel": "EgwEngineInput",
"SubChannel": "EgwEngineOutput",
"SvgChannel": "Egw:svg:img",
"ShapeChannel": "Egw:shape:curr",
"HwListChannel": "Egw:hw:list",
"HwOptChannel": "Egw:hw:opt",
"ProfListChannel": "Egw:prof:list",
"BomChannel": "Egw:bom",
"UpdateChannel": "Egw:update",
"BaseUrl": "/lux/srv/",
"ImageBaseUrl": "https://iis01.egalware.com/lux/srv/api/window/",
"ImageCalcTag": "svg-preview",
"ImageLiveTag": "svg",
"ImageFileTag": "svgfile"
}
+3 -3
View File
@@ -9,9 +9,9 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Egw.Lux.WebWindowComplex" Version="2.7.10.1710" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.17" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.0.17" />
<PackageReference Include="Egw.Lux.WebWindowComplex" Version="2.7.10.2117" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.21" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.0.21" />
</ItemGroup>
<ItemGroup>
@@ -1,8 +1,13 @@
<div class="card shadow">
<div class="card-header">
<div class="card-header text-bg-secondary">
<div class="d-flex justify-content-between">
<div class="px-0">
<h5>Conf. Hardware</h5>
<div class="px-0 d-flex">
<div class="px-0">
<h5>Conf. Hardware</h5>
</div>
<div class="px-2">
<button class="btn btn-sm btn-primary" title="Richiesta Update" @onclick="DoReqUpdate"><i class="fa-solid fa-arrow-rotate-right"></i></button>
</div>
</div>
<div class="px-0">
<div class="px-0 d-flex justify-content-between">
@@ -10,7 +15,7 @@
<div class="input-group input-group-sm" title="ricerca">
<span class="input-group-text"><i class="fas fa-search"></i></span>
<input type="text" class="form-control" @bind="@SearchVal">
<button class="btn btn-outline-secondary" @onclick="ResetSearch"><i class="fas fa-ban"></i></button>
<button class="btn @btnResetCss" @onclick="ResetSearch"><i class="fas fa-ban"></i></button>
</div>
</div>
</div>
@@ -31,8 +36,8 @@
<table class="table table-sm table-striped">
<thead>
<tr>
<th class="text-nowrap text-center">
<button class="btn btn-sm btn-primary" title="Reset selezione" @onclick="DoReset"><i class="fa-solid fa-arrow-rotate-right"></i></button>
<th class="text-nowrap">
Cod.
</th>
@* <th>ID</th> *@
<th class="text-nowrap">Fam.</th>
@@ -1,17 +1,42 @@
using EgwCoreLib.Lux.Core.RestPayload;
using EgwCoreLib.Lux.Data.DbModel.Config;
using EgwCoreLib.Lux.Data.DbModel.Sales;
using EgwCoreLib.Lux.Data.Services;
using EgwMultiEngineManager.Data;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using System.Threading.Tasks;
namespace Lux.UI.Components.Compo.Config
{
public partial class HardwareMan
public partial class HardwareMan : IDisposable
{
#region Public Methods
/// <summary>
/// Dispose sottoscrizione canale
/// </summary>
public void Dispose()
{
DLService.PipeHwList.EA_NewMessage -= PipeHwList_EA_NewMessage;
}
#endregion Public Methods
#region Protected Properties
[Inject]
protected ConfigDataService CDService { get; set; } = null!;
[Inject]
protected IConfiguration Config { get; set; } = null!;
[Inject]
protected CalcRequestService CService { get; set; } = null!;
[Inject]
protected DataLayerServices DLService { get; set; } = null!;
[Inject]
protected IJSRuntime JSRuntime { get; set; } = null!;
@@ -34,21 +59,20 @@ namespace Lux.UI.Components.Compo.Config
#region Protected Methods
/// <summary>
/// Reset selezione
/// Richiesta update elenco HW preferiti/configurati
/// </summary>
protected void DoReset()
protected async Task DoReqUpdate()
{
EditRecord = null;
SelRecord = null;
// chiamata richiesta update da calc
await callRefreshHwList(confHw);
}
/// <summary>
/// Selezione articolo x display info
/// </summary>
/// <param name="curRec"></param>
protected void DoSelect(HardwareModel curRec)
protected override void OnInitialized()
{
SelRecord = curRec;
apiUrl = Config.GetValue<string>("ServerConf:Prog.ApiUrl") ?? "";
genericBasePath = Config.GetValue<string>("ServerConf:GenericBaseUrl") ?? "";
calcTag = Config.GetValue<string>("ServerConf:CalcTag") ?? "calc";
DLService.PipeHwList.EA_NewMessage += PipeHwList_EA_NewMessage;
}
protected override void OnParametersSet()
@@ -79,80 +103,85 @@ namespace Lux.UI.Components.Compo.Config
#region Private Fields
private List<HardwareModel> AllRecords = new();
private string apiUrl = "";
private string calcTag = "calc";
/// <summary>
/// Conf HW corrente (produttore) - gestire con conf?
/// </summary>
private string confHw = "HW.AGB";
private int currPage = 1;
private HardwareModel? EditRecord = null;
private string genericBasePath = "generic";
private bool isLoading = false;
private List<HardwareModel> ListRecords = new();
private int numRecord = 5;
private HardwareModel? SelRecord = null;
private int totalCount = 0;
#endregion Private Fields
#region Private Properties
private string btnResetCss
{
get => string.IsNullOrEmpty(searchVal) ? "btn-outline-light" : "btn-primary";
}
private string searchVal { get; set; } = string.Empty;
#endregion Private Properties
#if false
/// <summary>
/// impossta record x eliminazione
/// </summary>
/// <param name="selRec"></param>
protected async Task DoDelete(HardwareModel selRec)
{
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Sicuro di voler eliminare il record? Dettagli: {selRec.HardwareID} | {selRec.Description} | {selRec.Thickness}"))
return;
// esegue eliminazione del record...
await CDService.ConfHardwareDeleteAsync(selRec);
EditRecord = null;
SelRecord = null;
await ReloadData();
UpdateTable();
}
/// <summary>
/// Edit articolo selezionato
/// </summary>
/// <param name="curRec"></param>
protected void DoEdit(HardwareModel curRec)
{
EditRecord = curRec;
}
#endif
#if false
private async Task DoAdd()
{
// aggiungo un nuovo record in coda...
EditRecord = new HardwareModel()
{
Description = "New Glass",
Code = "",
Thickness = 30
};
await DoSave(EditRecord);
}
private async Task DoSave(HardwareModel currRec)
{
// salvo
await CDService.ConfHardwareUpsertAsync(currRec);
await ResetEdit();
UpdateTable();
EditRecord = null;
SelRecord = null;
}
#endif
#region Private Methods
/// <summary>
/// Effettua vera richiesta della BOM
/// </summary>
/// <param name="reqUid"></param>
/// <returns></returns>
private async Task callRefreshHwList(string reqUid)
{
Dictionary<string, string> DictExec = new Dictionary<string, string>();
DictExec.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.HARDWARE}");
// da rivedere?
DictExec.Add("UID", reqUid);
DictExec.Add("SubMode", $"{(int)Egw.Window.Data.Enums.QuestionHwSubModes.LIST}");
DictExec.Add("Manufacturer", $"{(int)Egw.Window.Data.Enums.HardwareManufacturers.AGB}");
CalcRequestDTO req = new CalcRequestDTO()
{
EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW,
DictExec = DictExec
};
// svuotiamo cache dati...
AllRecords = new List<HardwareModel>();
isLoading = true;
// chiamo la chiamata POST alla API, che manda la richiesta via REDIS
await CService.CallRestPost($"{apiUrl}/{genericBasePath}", $"{calcTag}/{reqUid}", req);
}
/// <summary>
/// Ricevuto update da Calc x elenco HW: aggiorno!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void PipeHwList_EA_NewMessage(object? sender, EventArgs e)
{
ReloadData();
UpdateTable();
_ = InvokeAsync(StateHasChanged);
}
private void ReloadData()
{
isLoading = true;
AllRecords = CDService.ElencoHw(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, "HW.AGB");
AllRecords = CDService.HwModelList(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, confHw);
// se ho ricerca testuale faccio filtro ulteriore...
if (string.IsNullOrEmpty(SearchVal))
{
@@ -172,15 +201,6 @@ namespace Lux.UI.Components.Compo.Config
totalCount = AllRecords.Count;
}
#if false
private void ResetEdit()
{
// reset edit
EditRecord = null;
ReloadData();
}
#endif
/// <summary>
/// Filtro e paginazione
/// </summary>
+10 -27
View File
@@ -1,8 +1,13 @@
<div class="card shadow">
<div class="card-header">
<div class="card-header text-bg-secondary">
<div class="d-flex justify-content-between">
<div class="px-0">
<h5>Conf. Profilo</h5>
<div class="px-0 d-flex">
<div class="px-0">
<h5>Conf. Profilo</h5>
</div>
<div class="px-2">
<button class="btn btn-sm btn-primary" title="Richiesta Update" @onclick="DoReqUpdate"><i class="fa-solid fa-arrow-rotate-right"></i></button>
</div>
</div>
<div class="px-0">
<div class="px-0 d-flex justify-content-between">
@@ -10,7 +15,7 @@
<div class="input-group input-group-sm" title="ricerca">
<span class="input-group-text"><i class="fas fa-search"></i></span>
<input type="text" class="form-control" @bind="@SearchVal">
<button class="btn btn-outline-secondary" @onclick="ResetSearch"><i class="fas fa-ban"></i></button>
<button class="btn @btnResetCss" @onclick="ResetSearch"><i class="fas fa-ban"></i></button>
</div>
</div>
</div>
@@ -31,16 +36,7 @@
<table class="table table-sm table-striped">
<thead>
<tr>
<th class="text-nowrap text-center">
<button class="btn btn-sm btn-primary" title="Reset selezione" @onclick="DoReset"><i class="fa-solid fa-arrow-rotate-right"></i></button>
</th>
@* <th>ID</th> *@
<th class="text-nowrap">Cod.</th>
<th class="w-100">Descrizione</th>
<th class="text-nowrap text-end">Size mm</th>
<th class="text-nowrap text-end">
<button class="btn btn-sm btn-success" @onclick="DoAdd"><i class="fa-solid fa-plus"></i></button>
</th>
</tr>
</thead>
<tbody>
@@ -48,20 +44,7 @@
@foreach (var item in ListRecords)
{
<tr>
<td class="text-center">@item.ProfileID</td>
<td class="">@item.Code</td>
<td class="w-100">@item.Description</td>
<td class="text-end">@($"{item.Thickness:N2}")</td>
<td class="text-nowrap text-end">
@if (false)
{
<button class="btn btn-sm btn-danger" @onclick="() => DoDelete(item)"><i class="fa-solid fa-trash-can"></i></button>
}
else
{
<button class="btn btn-sm btn-secondary" disabled><i class="fa-solid fa-trash-can"></i></button>
}
</td>
<td class="">@item</td>
</tr>
}
</tbody>
@@ -1,14 +1,37 @@
using EgwCoreLib.Lux.Core.RestPayload;
using EgwCoreLib.Lux.Data.DbModel.Config;
using EgwCoreLib.Lux.Data.Services;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using System.ComponentModel;
namespace Lux.UI.Components.Compo.Config
{
public partial class ProfileMan
public partial class ProfileMan : IDisposable
{
#region Public Methods
/// <summary>
/// Dispose sottoscrizione canale
/// </summary>
public void Dispose()
{
DLService.PipeProfList.EA_NewMessage -= PipeProfList_EA_NewMessage;
}
#endregion Public Methods
#region Protected Properties
[Inject]
protected ConfigDataService CDService { get; set; } = null!;
[Inject]
protected IConfiguration Config { get; set; } = null!;
[Inject]
protected CalcRequestService CService { get; set; } = null!;
[Inject]
protected DataLayerServices DLService { get; set; } = null!;
@@ -23,7 +46,7 @@ namespace Lux.UI.Components.Compo.Config
if (searchVal != value)
{
searchVal = value;
_ = FullUpdate();
FullUpdate();
}
}
}
@@ -33,52 +56,25 @@ namespace Lux.UI.Components.Compo.Config
#region Protected Methods
/// <summary>
/// impossta record x eliminazione
/// Richiesta update elenco HW preferiti/configurati
/// </summary>
/// <param name="selRec"></param>
protected async Task DoDelete(ProfileModel selRec)
protected async Task DoReqUpdate()
{
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Sicuro di voler eliminare il record? Dettagli: {selRec.ProfileID} | {selRec.Description} | {selRec.Thickness}"))
return;
// esegue eliminazione del record...
await DLService.ConfProfileDeleteAsync(selRec);
EditRecord = null;
SelRecord = null;
await ReloadData();
UpdateTable();
// chiamata richiesta update da calc
await callRefreshProfList();
}
/// <summary>
/// Edit articolo selezionato
/// </summary>
/// <param name="curRec"></param>
protected void DoEdit(ProfileModel curRec)
protected override void OnInitialized()
{
EditRecord = curRec;
apiUrl = Config.GetValue<string>("ServerConf:Prog.ApiUrl") ?? "";
genericBasePath = Config.GetValue<string>("ServerConf:GenericBaseUrl") ?? "";
calcTag = Config.GetValue<string>("ServerConf:CalcTag") ?? "calc";
DLService.PipeProfList.EA_NewMessage += PipeProfList_EA_NewMessage;
}
/// <summary>
/// Reset selezione
/// </summary>
protected void DoReset()
protected override void OnParametersSet()
{
EditRecord = null;
}
/// <summary>
/// Selezione articolo x display info
/// </summary>
/// <param name="curRec"></param>
protected void DoSelect(ProfileModel curRec)
{
SelRecord = curRec;
}
protected override async Task OnParametersSetAsync()
{
await ReloadData();
ReloadData();
UpdateTable();
}
@@ -103,84 +99,108 @@ namespace Lux.UI.Components.Compo.Config
#region Private Fields
private List<ProfileModel> AllRecords = new();
private List<string> AllRecords = new();
private string apiUrl = "";
private string calcTag = "calc";
/// <summary>
/// Per eventuale gestione multi-profilo su multi tenant
/// </summary>
private string confProf = "Default";
private int currPage = 1;
private ProfileModel? EditRecord = null;
private string genericBasePath = "generic";
private bool isLoading = false;
private List<ProfileModel> ListRecords = new();
private List<string> ListRecords = new();
private int numRecord = 5;
private ProfileModel? SelRecord = null;
private int totalCount = 0;
#endregion Private Fields
#region Private Properties
private string btnResetCss
{
get => string.IsNullOrEmpty(searchVal) ? "btn-outline-light" : "btn-primary";
}
private string searchVal { get; set; } = string.Empty;
#endregion Private Properties
#region Private Methods
private async Task DoAdd()
/// <summary>
/// Effettua vera richiesta della BOM
/// </summary>
/// <returns></returns>
private async Task callRefreshProfList()
{
// aggiungo un nuovo record in coda...
EditRecord = new ProfileModel()
Dictionary<string, string> DictExec = new Dictionary<string, string>();
DictExec.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.CONFIG}");
// preparo args
string reqUid = "Default";
DictExec.Add("UID", reqUid);
DictExec.Add("SubMode", $"{(int)Egw.Window.Data.Enums.QuestionConfSubModes.PROFILELIST}");
CalcRequestDTO req = new CalcRequestDTO()
{
Description = "New Glass",
Code = "",
Thickness = 30
EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW,
DictExec = DictExec
};
await DoSave(EditRecord);
// svuotiamo cache dati...
AllRecords = new List<string>();
isLoading = true;
// chiamo la chiamata POST alla API, che manda la richiesta via REDIS
await CService.CallRestPost($"{apiUrl}/{genericBasePath}", $"{calcTag}/{reqUid}", req);
}
private async Task DoSave(ProfileModel currRec)
private void FullUpdate()
{
// salvo
await DLService.ConfProfileUpsertAsync(currRec);
await ResetEdit();
ReloadData();
UpdateTable();
EditRecord = null;
SelRecord = null;
}
private async Task FullUpdate()
/// <summary>
/// Ricevuto update da Calc x elenco profili: aggiorno!
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void PipeProfList_EA_NewMessage(object? sender, EventArgs e)
{
await ReloadData();
UpdateTable();
await InvokeAsync(StateHasChanged);
FullUpdate();
_ = InvokeAsync(StateHasChanged);
}
private async Task ReloadData()
private void ReloadData()
{
isLoading = true;
AllRecords = await DLService.ConfProfileGetAllAsync();
AllRecords = CDService.ProfileList(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, confProf);
// se ho ricerca testuale faccio filtro ulteriore...
if (string.IsNullOrEmpty(SearchVal))
{
AllRecords = AllRecords
.OrderBy(x => x.Description)
.OrderBy(x => x)
.ToList();
}
else
{
AllRecords = AllRecords
.Where(x =>
x.Description.Contains(SearchVal, StringComparison.InvariantCultureIgnoreCase) ||
x.Code.Contains(SearchVal, StringComparison.InvariantCultureIgnoreCase))
.OrderBy(x => x.Description)
.Where(x => x.Contains(SearchVal, StringComparison.InvariantCultureIgnoreCase))
.OrderBy(x => x)
.ToList();
}
totalCount = AllRecords.Count;
}
private async Task ResetEdit()
{
// reset edit
EditRecord = null;
await ReloadData();
}
/// <summary>
/// Filtro e paginazione
/// </summary>
@@ -22,6 +22,9 @@ namespace Lux.UI.Components.Compo
#region Protected Properties
[Inject]
protected ConfigDataService CDService { get; set; } = null!;
[Inject]
protected DataLayerServices DLService { get; set; } = null!;
@@ -73,7 +76,7 @@ namespace Lux.UI.Components.Compo
// leggo dati di base
var AllColors = await DLService.GenValGetFiltAsync("WoodCol");
var AllConfGlass = await DLService.ConfGlassGetAllAsync();
var AllConfProfile = await DLService.ConfProfileGetAllAsync();
var AllConfProfile = CDService.ProfileList(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, "Default");
var AllConfWood = await DLService.ConfWoodGetAllAsync();
// conversione tipi
ListColors = AllColors
@@ -82,9 +85,7 @@ namespace Lux.UI.Components.Compo
ListGlass = AllConfGlass
.Select(x => x.Description)
.ToList();
ListProfiles = AllConfProfile
.Select(x => x.Description)
.ToList();
ListProfiles = AllConfProfile;
ListWood = AllConfWood
.Select(x => x.Description)
.ToList();
@@ -0,0 +1,34 @@
<div class="row">
@if (isLoading)
{
<LoadingData></LoadingData>
}
else
{
<div class="col-3">
<div class="form-floating mb-3">
<input type="date" class="form-control" @bind="CurrRecord.DueDateReq" />
<label class="small">Data Richiesta</label>
</div>
@* </div>
<div class="col-3"> *@
<div class="form-floating mb-3">
<input type="date" class="form-control" @bind="CurrRecord.DueDateProm" />
<label class="small">Data Promessa</label>
</div>
</div>
<div class="col-9">
<div class="form-floating mb-3">
<textarea style="min-height: 8.5rem;" type="text" class="form-control" @bind="CurrRecord.ConsNote" />
<label class="small">Note Consegna</label>
</div>
</div>
<div class="col-6">
<button class="btn btn-lg btn-success w-100" @onclick="DoSave"><i class="fa-solid fa-floppy-disk"></i> Save</button>
</div>
<div class="col-6">
<button class="btn btn-lg btn-warning w-100" @onclick="DoCancel"><i class="fa-solid fa-ban"></i> Cancel</button>
</div>
}
</div>
@@ -0,0 +1,42 @@
using EgwCoreLib.Lux.Data.DbModel.Sales;
using Microsoft.AspNetCore.Components;
namespace Lux.UI.Components.Compo
{
public partial class OfferDelivery
{
#region Public Properties
[Parameter]
public OfferModel CurrRecord { get; set; } = null!;
[Parameter]
public EventCallback<bool> EC_Close { get; set; }
[Parameter]
public EventCallback<OfferModel> EC_Updated { get; set; }
#endregion Public Properties
#region Private Fields
private bool isLoading = false;
#endregion Private Fields
#region Private Methods
private async Task DoCancel()
{
await EC_Close.InvokeAsync(true);
}
private async Task DoSave()
{
// richiesta update con salvataggio record
await EC_Updated.InvokeAsync(CurrRecord);
}
#endregion Private Methods
}
}
+119 -86
View File
@@ -2,20 +2,33 @@
{
<WebWindowComplex.TableComp ListPayload="SetupList"
LiveData="CurrData"
EC_OnUpdate="SaveJWD"
EC_DoUpdate="SaveJWD"
EC_OnClose="CloseEdit">
</WebWindowComplex.TableComp>
}
else
{
<div class="card shadow">
<div class="card-header bg-info bg-opacity-50 bg-gradient d-flex justify-content-between">
<div class="px-0 fs-4">Dettaglio Offerta</div>
<div class="card-header bg-success bg-opacity-50 bg-gradient d-flex justify-content-between">
<div class="px-0 d-flex">
<div class="px-1">
<button class="btn btn-sm btn-success" @onclick="() => ForceReloadData()">Prodotto <i class="fa-solid fa-plus"></i></button>
</div>
<div class="px-1">
<button class="btn btn-sm btn-success" @onclick="() => DoAddNote()">Nota <i class="fa-solid fa-plus"></i></button>
</div>
<div class="px-1">
<button class="btn btn-sm btn-success" @onclick="() => ForceReloadData()">Articolo (buy) <i class="fa-solid fa-plus"></i></button>
</div>
</div>
<div class="px-0 text-center fs-4">
Dettaglio Offerta
</div>
<div class="px-0 d-flex justify-content-end">
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit)
{
<div class="px-1">
<button class="btn btn-sm btn-warning" @onclick="() => OfferForceParameters()">Forza Parametri <i class="fa-solid fa-hammer"></i></button>
<button class="btn btn-sm btn-primary" @onclick="() => OfferForceParameters()">Forza Parametri <i class="fa-solid fa-hammer"></i></button>
</div>
<div class="px-1">
<button class="btn btn-sm btn-primary" @onclick="() => OfferUpdatePrices()">Aggiorna Prezzi <i class="fa-solid fa-calculator"></i></button>
@@ -70,10 +83,12 @@ else
<tbody>
@foreach (var item in ListRecords)
{
bool isNote = item.SellingItemID == null;
<tr class="@RowClass(item)">
<td class="text-nowrap">
<span class="px-1">
@item.RowNum
@* @item.RowNum *@
<button class="btn btn-sm btn-primary" @onclick="() => DoSelect(item)"><i class="fa-solid fa-magnifying-glass"></i></button>
</span>
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit)
{
@@ -95,103 +110,121 @@ else
@item.RowNum
}
</td>
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit)
@if (isNote)
{
<td>
@if (string.IsNullOrEmpty(item.SerStruct) || item.SerStruct.Length <= 2)
<td colspan="8" class="small">
@if (CurrEditMode == EditMode.RecData && EditRecord != null && EditRecord.OfferRowID == item.OfferRowID)
{
<img class="img-fluid" src="@(imgUrl(item.OfferRowUID, $"{item.Envir}"))" width="48" />
<div class="input-group">
<textarea class="form-input w-100" style="height: 4rem;" type="text" @bind="@item.Note" />
</div>
}
else
{
<img class="img-fluid" src="@(imgUrl(item.OfferRowUID, $"{item.Envir}"))" width="48" @onclick="() => DoEditJwd(item)" title="Edit Item" />
@HtmlConv(item.Note)
}
</td>
}
<td class="small">
<div>@item.OfferRowUID</div>
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit && !string.IsNullOrEmpty(item.SerStruct) && item.SerStruct.Length > 2)
{
<button class="btn btn-sm btn-primary" @onclick="() => RequestBom(item)" title="Richiesta ricalcolo BOM">
BOM <i class="fa-solid fa-arrow-right-arrow-left pe-2"></i>
@if (item.AwaitBom)
{
<span class="text-warning spinner-grow spinner-grow-sm" aria-hidden="true"></span>
}
</button>
}
@if (item.Envir != EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW || !string.IsNullOrEmpty(item.FileName))
{
<div class="input-group input-group-sm">
@if (EditRecord != null && EditRecord.OfferRowID == item.OfferRowID)
{
<span>
<InputFile class="form-control" OnChange="UploadFile" style="width: 24rem;" />
</span>
<button class="btn btn-sm btn-info" @onclick="() => ToggleFileEdit(null)"><i class="fa-solid fa-floppy-disk"></i></button>
}
else
{
<span class="input-group-text small"><b>@item.FileName</b> | @fSize(item.FileSize)</span>
<button class="btn btn-sm btn-primary" @onclick="() => ToggleFileEdit(item)"><i class="fa-solid fa-floppy-disk"></i></button>
}
</div>
}
</td>
@if (CurrEditMode == EditMode.RecData && EditRecord != null && EditRecord.OfferRowID == item.OfferRowID)
{
<td>
<div class="input-group">
<input class="form-input w-100" style="width: 16rem;" type="text" @bind="@item.Note" />
</div>
</td>
<td class="text-end">
<input class="text-end" style="width: 4rem;" type="number" @bind="@item.Qty" />
</td>
}
else
{
<td>@item.Note</td>
<td class="text-end">
<b>@item.Qty</b>
</td>
}
<td class="text-end text-nowrap">
<div class="fw-bold" title="Prezzo Finito">
@if (!(item.BomOk && item.ItemOk))
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit)
{
<td>
@if (string.IsNullOrEmpty(item.SerStruct) || item.SerStruct.Length <= 2)
{
<img class="img-fluid" src="@(imgUrl(item.OfferRowUID, $"{item.Envir}"))" width="48" />
}
else
{
<img class="img-fluid" src="@(imgUrl(item.OfferRowUID, $"{item.Envir}"))" width="48" @onclick="() => DoEditJwd(item)" title="Edit Item" />
}
</td>
}
<td class="small">
<div>@item.OfferRowUID</div>
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit && !string.IsNullOrEmpty(item.SerStruct) && item.SerStruct.Length > 2)
{
<span class="text-danger me-2" title=""><i class="fa-solid fa-triangle-exclamation"></i></span>
<button class="btn btn-sm btn-primary" @onclick="() => RequestBom(item)" title="Richiesta ricalcolo BOM">
BOM <i class="fa-solid fa-arrow-right-arrow-left pe-2"></i>
@if (item.AwaitBom)
{
<span class="text-warning spinner-grow spinner-grow-sm" aria-hidden="true"></span>
}
</button>
}
@if (item.AwaitPrice)
@if (item.Envir != EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW || !string.IsNullOrEmpty(item.FileName))
{
<span class="text-warning spinner-grow spinner-grow-sm" aria-hidden="true"></span>
}
@($"{item.UnitPrice:C2}")
</div>
<div class="small text-secondary" title="RockBottom Price">(@item.UnitCost.ToString("C2"))</div>
</td>
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit)
{
<td class="text-end">
@if (!string.IsNullOrEmpty(item.ItemBOM))
{
<button class="btn btn-sm btn-info" title="Cambio materiali assegnati" @onclick="() => DoSwapMat(item)"><i class="fa-solid fa-arrow-right-arrow-left"></i></button>
<div class="input-group input-group-sm">
@if (EditRecord != null && EditRecord.OfferRowID == item.OfferRowID)
{
<span>
<InputFile class="form-control" OnChange="UploadFile" style="width: 24rem;" />
</span>
<button class="btn btn-sm btn-info" @onclick="() => ToggleFileEdit(null)"><i class="fa-solid fa-floppy-disk"></i></button>
}
else
{
<span class="input-group-text small"><b>@item.FileName</b> | @fSize(item.FileSize)</span>
<button class="btn btn-sm btn-primary" @onclick="() => ToggleFileEdit(item)"><i class="fa-solid fa-floppy-disk"></i></button>
}
</div>
}
</td>
@if (CurrEditMode == EditMode.RecData && EditRecord != null && EditRecord.OfferRowID == item.OfferRowID)
{
<td>
<div class="input-group">
<input class="form-input w-100" style="width: 16rem;" type="text" @bind="@item.Note" />
</div>
</td>
<td class="text-end">
<input class="text-end" style="width: 4rem;" type="number" @bind="@item.Qty" />
</td>
}
else
{
<td>@item.Note</td>
<td class="text-end">
<b>@item.Qty</b>
</td>
}
<td class="text-end text-nowrap">
<div class="fw-bold" title="Prezzo Finito">
@if (!(item.BomOk && item.ItemOk))
{
<span class="text-danger me-2" title=""><i class="fa-solid fa-triangle-exclamation"></i></span>
}
@if (item.AwaitPrice)
{
<span class="text-warning spinner-grow spinner-grow-sm" aria-hidden="true"></span>
}
@($"{item.UnitPrice:C2}")
</div>
<div class="small text-secondary" title="RockBottom Price">(@item.UnitCost.ToString("C2"))</div>
</td>
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit)
{
<td class="text-end">
@if (!string.IsNullOrEmpty(item.ItemBOM))
{
<button class="btn btn-sm btn-info" title="Cambio materiali assegnati" @onclick="() => DoSwapMat(item)"><i class="fa-solid fa-arrow-right-arrow-left"></i></button>
}
</td>
}
<td class="text-end text-nowrap">
<div class="fw-bold" title="Prezzo Finito">
@if (item.AwaitPrice)
{
<span class="text-warning spinner-grow spinner-grow-sm" aria-hidden="true"></span>
}
@($"{item.TotalPrice:C2}")
</div>
<div class="small text-secondary" title="RockBottom Price">(@item.TotalCost.ToString("C2"))</div>
</td>
<td class="text-end text-nowrap" title="Margine / Sconto MAX applicabile">
@item.MaxDiscount.ToString("P2")
</td>
}
<td class="text-end text-nowrap">
<div class="fw-bold" title="Prezzo Finito">
@if (item.AwaitPrice)
{
<span class="text-warning spinner-grow spinner-grow-sm" aria-hidden="true"></span>
}
@($"{item.TotalPrice:C2}")
</div>
<div class="small text-secondary" title="RockBottom Price">(@item.TotalCost.ToString("C2"))</div>
</td>
<td class="text-end text-nowrap" title="Margine / Sconto MAX applicabile">
@item.MaxDiscount.ToString("P2")
</td>
@if (DisplayMode == EgwCoreLib.Lux.Core.Enums.DisplayMode.Edit)
{
<td>
+233 -93
View File
@@ -1,18 +1,13 @@
using EgwCoreLib.Lux.Core;
using EgwCoreLib.Lux.Core.RestPayload;
using EgwCoreLib.Lux.Data;
using EgwCoreLib.Lux.Data.DbModel.Config;
using EgwCoreLib.Lux.Data.DbModel.Sales;
using EgwCoreLib.Lux.Data.DbModel.Utils;
using EgwCoreLib.Lux.Data.Services;
using EgwMultiEngineManager.Data;
using Lux.UI.Components.Compo.Config;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Forms;
using Microsoft.EntityFrameworkCore.Storage.Json;
using Microsoft.JSInterop;
using NLog.LayoutRenderers;
using System.Text;
using Newtonsoft.Json;
using WebWindowComplex;
using WebWindowComplex.DTO;
using static EgwCoreLib.Lux.Core.Enums;
@@ -73,8 +68,11 @@ namespace Lux.UI.Components.Compo
/// </summary>
public void Dispose()
{
DLService.UpdatePipe.EA_NewMessage -= UpdatePipe_EA_NewMessage;
DLService.CalcDonePipe.EA_NewMessage -= CalcDonePipe_EA_NewMessage;
DLService.PipeUpdate.EA_NewMessage -= PipeUpdate_EA_NewMessage;
DLService.PipeSvg.EA_NewMessage -= PipeSvg_EA_NewMessage;
DLService.PipeHwOpt.EA_NewMessage -= PipeHwOpt_EA_NewMessage;
DLService.PipeProfList.EA_NewMessage -= PipeProfList_EA_NewMessage;
DLService.PipeShape.EA_NewMessage -= PipeShape_EA_NewMessage;
}
#endregion Public Methods
@@ -179,6 +177,34 @@ namespace Lux.UI.Components.Compo
EditRecord = null;
}
/// <summary>
/// Aggiunge una nuova riga vuota come nota sotto il record selezionato oppure in coda...
/// </summary>
/// <returns></returns>
protected async Task DoAddNote()
{
int numRow = AllRecords.Count + 1;
if (EditRecord != null)
{
numRow = EditRecord.RowNum + 1;
}
OfferRowModel newNote = new OfferRowModel()
{
OfferID = CurrRecord.OfferID,
Envir = CurrRecord.Envir,
RowNum = numRow,
OfferRowUID = "",
Qty = 0,
BomCost = 0,
BomPrice = 0,
StepCost = 0,
StepPrice = 0
};
await DLService.OffertRowUpsert(newNote);
await ReloadData();
UpdateTable();
}
/// <summary>
/// Annullamento modifica
/// </summary>
@@ -274,12 +300,6 @@ namespace Lux.UI.Components.Compo
/// <param name="curRec"></param>
protected void DoEdit(OfferRowModel curRec)
{
#if false
// preparazione dati da record corrente
PrepareWindowData(curRec.SerStruct);
// reset prev
prevJwd = "";
#endif
// imposto edit record
EditRecord = curRec;
/// modalitàedit: gestione valori campi record
@@ -320,6 +340,18 @@ namespace Lux.UI.Components.Compo
isLoading = false;
}
/// <summary>
/// Seleziono riga senza cambiare modalità editing
/// </summary>
/// <param name="curRec"></param>
protected void DoSelect(OfferRowModel curRec)
{
// imposto edit record
EditRecord = curRec;
/// modalitàedit: gestione valori campi record
CurrEditMode = EditMode.None;
}
protected void DoSwapMat(OfferRowModel currRow)
{
CurrEditMode = EditMode.BOM;
@@ -337,6 +369,14 @@ namespace Lux.UI.Components.Compo
return EgwCoreLib.Utils.FileHelpers.SizeSuffix(size, 1);
}
/// <summary>
/// Formattazione testo come html x display
/// </summary>
protected MarkupString HtmlConv(string rawData)
{
return (MarkupString)rawData.Replace(Environment.NewLine, "<br />").Replace("\n", "<br />");//.Replace(" ", "&nbsp;");
}
/// <summary>
/// Calcolo URL immagine
/// </summary>
@@ -453,8 +493,11 @@ namespace Lux.UI.Components.Compo
ConfInit();
prevJwd = "";
await ReloadBaseList();
DLService.UpdatePipe.EA_NewMessage += UpdatePipe_EA_NewMessage;
DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
DLService.PipeUpdate.EA_NewMessage += PipeUpdate_EA_NewMessage;
DLService.PipeSvg.EA_NewMessage += PipeSvg_EA_NewMessage;
DLService.PipeHwOpt.EA_NewMessage += PipeHwOpt_EA_NewMessage;
DLService.PipeProfList.EA_NewMessage += PipeProfList_EA_NewMessage;
DLService.PipeShape.EA_NewMessage += PipeShape_EA_NewMessage;
}
protected override async Task OnParametersSetAsync()
@@ -497,7 +540,7 @@ namespace Lux.UI.Components.Compo
private List<HardwareModel> AllConfHardware = new();
private List<ProfileModel> AllConfProfile = new();
private List<WoodModel> AllConfWood = new();
@@ -526,8 +569,11 @@ namespace Lux.UI.Components.Compo
/// </summary>
private EditMode CurrEditMode = EditMode.None;
private string currOptXml = "";
private int currPage = 1;
private List<string> currProfList = new List<string>();
private string currShape = "";
private string currSvg = "";
/// <summary>
@@ -535,9 +581,12 @@ namespace Lux.UI.Components.Compo
/// </summary>
private OfferRowModel? EditRecord = null;
private string genBasePath = "generic";
private string genericBasePath = "";
private string GenericBasePath = "";
/// <summary>
/// Channel update HwOptions
/// </summary>
private string hwOptChannel = "";
private string imgBasePath = "";
@@ -557,12 +606,25 @@ namespace Lux.UI.Components.Compo
/// </summary>
private string prevJwd = "";
/// <summary>
/// Channel update Profile List
/// </summary>
private string profListChannel = "";
/// <summary>
/// Dizionario richieste
/// </summary>
private Dictionary<string, string> reqDict = new Dictionary<string, string>();
private string subChannel = "";
/// <summary>
/// Channel update Shape
/// </summary>
private string shapeChannel = "";
/// <summary>
/// Channel update SVG
/// </summary>
private string svgChannel = "";
private int totalCount = 0;
@@ -570,32 +632,6 @@ namespace Lux.UI.Components.Compo
#region Private Methods
/// <summary>
/// Ricevuto SVG, se è il mio lo aggiorno...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void CalcDonePipe_EA_NewMessage(object? sender, EventArgs e)
{
// vale SOLO SE sono in editing...
if (EditRecord != null)
{
// aggiorno visualizzazione
PubSubEventArgs currArgs = (PubSubEventArgs)e;
// conversione on-the-fly SVG da mostrare
if (!string.IsNullOrEmpty(currArgs.newMessage))
{
if (currArgs.msgUid.Equals($"{subChannel}:{EditRecord.OfferRowUID}"))
{
currSvg = currArgs.newMessage;
// salvo in live data...
CurrData.SvgPreview = currSvg;
}
await InvokeAsync(StateHasChanged);
}
}
}
/// <summary>
/// Chiude edit andando eventualmente a salvare
/// </summary>
@@ -637,7 +673,7 @@ namespace Lux.UI.Components.Compo
calcRequestDTO.EnvType = EditRecord.Envir;
calcRequestDTO.DictExec = reqDict;
// chiamo la chiamata POST alla API, che manda la richiesta via REDIS
await ICService.CallRestPost($"{apiUrl}/{GenericBasePath}", $"{calcTag}/{EditRecord.OfferRowUID}", calcRequestDTO);
await ICService.CallRestPost($"{apiUrl}/{genericBasePath}", $"{calcTag}/{EditRecord.OfferRowUID}", calcRequestDTO);
}
EditRecord = null;
CurrEditMode = EditMode.None;
@@ -648,9 +684,12 @@ namespace Lux.UI.Components.Compo
{
apiUrl = Config.GetValue<string>("ServerConf:Prog.ApiUrl") ?? "";
imgBasePath = Config.GetValue<string>("ServerConf:ImageBaseUrl") ?? "";
GenericBasePath = Config.GetValue<string>("ServerConf:GenericBaseUrl") ?? "";
genericBasePath = Config.GetValue<string>("ServerConf:GenericBaseUrl") ?? "";
calcTag = Config.GetValue<string>("ServerConf:CalcTag") ?? "calc";
subChannel = Config.GetValue<string>("ServerConf:SvgChannel") ?? "";
svgChannel = Config.GetValue<string>("ServerConf:SvgChannel") ?? "";
shapeChannel = Config.GetValue<string>("ServerConf:ShapeChannel") ?? "";
hwOptChannel = Config.GetValue<string>("ServerConf:HwOptChannel") ?? "";
profListChannel = Config.GetValue<string>("ServerConf:ProfListChannel") ?? "";
}
private async Task DoRecalcOffer()
@@ -684,6 +723,142 @@ namespace Lux.UI.Components.Compo
isLoading = false;
}
/// <summary>
/// Ricevuto HwOpt, processo
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void PipeHwOpt_EA_NewMessage(object? sender, EventArgs e)
{
// vale SOLO SE sono in editing...
if (EditRecord != null)
{
// aggiorno visualizzazione
PubSubEventArgs currArgs = (PubSubEventArgs)e;
// conversione on-the-fly SVG da mostrare
if (!string.IsNullOrEmpty(currArgs.newMessage))
{
if (currArgs.msgUid.Equals($"{hwOptChannel}:{EditRecord.OfferRowUID}"))
{
currOptXml = currArgs.newMessage;
// salvo in live data...
CurrData.OptionsXml = currOptXml;
}
await InvokeAsync(StateHasChanged);
}
}
}
/// <summary>
/// Ricevuta profile list, processo
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void PipeProfList_EA_NewMessage(object? sender, EventArgs e)
{
// vale SOLO SE sono in editing...
if (EditRecord != null)
{
// aggiorno visualizzazione
PubSubEventArgs currArgs = (PubSubEventArgs)e;
// conversione on-the-fly SVG da mostrare
if (!string.IsNullOrEmpty(currArgs.newMessage))
{
if (currArgs.msgUid.Equals($"{profListChannel}:{EditRecord.OfferRowUID}"))
{
try
{
// new List<string>();
currProfList = JsonConvert.DeserializeObject<List<string>>(currArgs.newMessage) ?? SetupList.Profile;
// salvo in live data...
SetupList.Profile = currProfList;
}
catch
{ }
}
await InvokeAsync(StateHasChanged);
}
}
}
/// <summary>
/// Ricevuta shape, procersso
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void PipeShape_EA_NewMessage(object? sender, EventArgs e)
{
// vale SOLO SE sono in editing...
if (EditRecord != null)
{
// aggiorno visualizzazione
PubSubEventArgs currArgs = (PubSubEventArgs)e;
// conversione on-the-fly SVG da mostrare
if (!string.IsNullOrEmpty(currArgs.newMessage))
{
if (currArgs.msgUid.Equals($"{shapeChannel}:{EditRecord.OfferRowUID}"))
{
currShape = currArgs.newMessage;
// salvo in live data...
CurrData.Shape = currShape;
}
await InvokeAsync(StateHasChanged);
}
}
}
/// <summary>
/// Ricevuto SVG, se è il mio lo aggiorno...
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void PipeSvg_EA_NewMessage(object? sender, EventArgs e)
{
// vale SOLO SE sono in editing...
if (EditRecord != null)
{
// aggiorno visualizzazione
PubSubEventArgs currArgs = (PubSubEventArgs)e;
// conversione on-the-fly SVG da mostrare
if (!string.IsNullOrEmpty(currArgs.newMessage))
{
if (currArgs.msgUid.Equals($"{svgChannel}:{EditRecord.OfferRowUID}"))
{
currSvg = currArgs.newMessage;
// salvo in live data...
CurrData.SvgPreview = currSvg;
}
await InvokeAsync(StateHasChanged);
}
}
}
/// <summary>
/// Task verifica update ricevuti
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private async void PipeUpdate_EA_NewMessage(object? sender, EventArgs e)
{
// aggiorno visualizzazione
PubSubEventArgs currArgs = (PubSubEventArgs)e;
// conversione on-the-fly SVG da mostrare
if (!string.IsNullOrEmpty(currArgs.newMessage))
{
// cerco se faccia aprte dei record correnti...
var recFound = AllRecords.Any(x => x.OfferRowUID == currArgs.newMessage);
if (recFound)
{
isLoading = true;
await Task.Delay(10);
// se si tratta dell'UID corrente --> fa update
await DoRecalcOffer();
await InvokeAsync(StateHasChanged);
}
}
await Task.Delay(1);
}
/// <summary>
/// Preparazione dati x componente edit JWD
/// </summary>
@@ -717,21 +892,19 @@ namespace Lux.UI.Components.Compo
// lettura config setup varie da DB/Cache Redis
AllConfEnvir = await DLService.ConfEnvirParamGetAllAsync();
AllConfGlass = await DLService.ConfGlassGetAllAsync();
var rawHw = CDService.ElencoHw(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, "HW.AGB");
var rawProfiles = CDService.ProfileList(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, "Default");
AvailProfileList = rawProfiles;
var rawHw = CDService.HwModelList(EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW, "HW.AGB");
// hw filtro solo validi...
AllConfHardware = rawHw
.Where(x => !x.FamilyName.Equals(x.Description, StringComparison.OrdinalIgnoreCase))
.ToList();
AllConfProfile = await DLService.ConfProfileGetAllAsync();
AllConfWood = await DLService.ConfWoodGetAllAsync();
AllColors = await DLService.GenValGetFiltAsync("WoodCol");
// conversione tipi
AvailGlassList = AllConfGlass
.Select(x => x.Description)
.ToList();
AvailProfileList = AllConfProfile
.Select(x => x.Description)
.ToList();
AvailFamilyHardwareList = AllConfHardware
.DistinctBy(x => x.FamilyName)
.OrderBy(x => x.FamilyName)
@@ -781,7 +954,6 @@ namespace Lux.UI.Components.Compo
string serKey = envRec != null ? envRec.SerStrucKey : "Jwd";
// cablata la BOM
DictExec.Add("Mode", $"{(int)Egw.Window.Data.Enums.QuestionModes.BOM}");
//DictExec.Add("Mode", "2");
// UID cablato x ora...
DictExec.Add("UID", currRec.OfferRowUID);
DictExec.Add(serKey, currRec.SerStruct);
@@ -796,7 +968,7 @@ namespace Lux.UI.Components.Compo
await InvokeAsync(StateHasChanged);
// chiamo la chiamata POST alla API, che manda la richiesta via REDIS
await CService.CallRestPost($"{apiUrl}/{genBasePath}", $"{calcTag}/{currRec.OfferRowUID}", req);
await CService.CallRestPost($"{apiUrl}/{genericBasePath}", $"{calcTag}/{currRec.OfferRowUID}", req);
}
/// <summary>
@@ -828,12 +1000,12 @@ namespace Lux.UI.Components.Compo
// SE contiene il mio Jwd...
if (args.ContainsKey("Jwd"))
{
reqDict = args;
string serStruct = reqDict["Jwd"];
string serStruct = args["Jwd"];
// controllo SE variato...
if (!prevJwd.Equals(serStruct))
if (!prevJwd.Equals(serStruct) || !DictUtils.DictAreEqual(reqDict, args))
{
// aggiorno val prev
reqDict = args;
prevJwd = serStruct;
// aggiorno live data
CurrData.CurrJwd = serStruct;
@@ -842,7 +1014,7 @@ namespace Lux.UI.Components.Compo
calcRequestDTO.EnvType = EditRecord.Envir;
calcRequestDTO.DictExec = reqDict;
// chiamo la chiamata POST alla API, che manda la richiesta via REDIS
await ICService.CallRestPost($"{apiUrl}/{GenericBasePath}", $"{calcTag}/{EditRecord.OfferRowUID}", calcRequestDTO);
await ICService.CallRestPost($"{apiUrl}/{genericBasePath}", $"{calcTag}/{EditRecord.OfferRowUID}", calcRequestDTO);
#if false
// salvo su DB!
await DLService.OffertRowUpdateSerStruct(EditRecord.OfferRowID, serStruct);
@@ -899,38 +1071,6 @@ namespace Lux.UI.Components.Compo
}
}
/// <summary>
/// Task verifica update ricevuti
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
/// <exception cref="NotImplementedException"></exception>
private async void UpdatePipe_EA_NewMessage(object? sender, EventArgs e)
{
// aggiorno visualizzazione
PubSubEventArgs currArgs = (PubSubEventArgs)e;
// conversione on-the-fly SVG da mostrare
if (!string.IsNullOrEmpty(currArgs.newMessage))
{
// cerco se faccia aprte dei record correnti...
var recFound = AllRecords.Any(x => x.OfferRowUID == currArgs.newMessage);
if (recFound)
{
isLoading = true;
await Task.Delay(10);
#if false
if (currArgs.msgUid.Equals($"{subChannel}:{windowUid}"))
{
}
#endif
// se si tratta dell'UID corrente --> fa update
await DoRecalcOffer();
await InvokeAsync(StateHasChanged);
}
}
await Task.Delay(1);
}
/// <summary>
/// Filtro e paginazione
/// </summary>
@@ -982,7 +1122,7 @@ namespace Lux.UI.Components.Compo
CalcRequestDTO calcRequestDTO = new CalcRequestDTO();
calcRequestDTO.EnvType = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.BEAM;
calcRequestDTO.DictExec = fileArgs;
await ICService.CallRestPost($"{apiUrl}/{GenericBasePath}", $"{calcTag}/{EditRecord.OfferRowUID}", calcRequestDTO);
await ICService.CallRestPost($"{apiUrl}/{genericBasePath}", $"{calcTag}/{EditRecord.OfferRowUID}", calcRequestDTO);
#if false
// salvo in locale il file: SISTEMARE PERMESSI
+3 -3
View File
@@ -19,15 +19,15 @@
</div>
<div class="card-body py-1">
<div class="row">
<div class="col-12 col-md-6 g-2" style="min-height: 24rem;">
<ProfileMan></ProfileMan>
</div>
<div class="col-12 col-md-6 g-2" style="min-height: 24rem;">
<WoodMan></WoodMan>
</div>
<div class="col-12 col-md-6 g-2" style="min-height: 24rem;">
<GlassMan></GlassMan>
</div>
<div class="col-12 col-md-6 g-2" style="min-height: 24rem;">
<ProfileMan></ProfileMan>
</div>
<div class="col-12 col-md-6 g-2" style="min-height: 24rem;">
<HardwareMan></HardwareMan>
</div>
+1 -8
View File
@@ -67,18 +67,11 @@
}
else if (currStep == CompileStep.Delivery)
{
<div class="alert alert-info text-center display-4">
scegli la consegna e trasporto
<button class="btn btn-sm btn-primary" title="Reset selezione" @onclick="DoReset"><i class="fa-solid fa-arrow-rotate-right"></i></button>
</div>
<OfferDelivery CurrRecord="EditRecord" EC_Close="DoClose" EC_Updated="DoSave"></OfferDelivery>
}
else if (currStep == CompileStep.FinalCheck)
{
<OfferCheck CurrRecord="EditRecord" EC_Close="DoClose"></OfferCheck>
@* <div class="alert alert-info text-center display-4">
display check finali
<button class="btn btn-sm btn-primary" title="Reset selezione" @onclick="DoReset"><i class="fa-solid fa-arrow-rotate-right"></i></button>
</div> *@
}
</div>
</div>
+3 -3
View File
@@ -11,7 +11,7 @@ namespace Lux.UI.Components.Pages
public void Dispose()
{
DLService.CalcDonePipe.EA_NewMessage -= CalcDonePipe_EA_NewMessage;
DLService.PipeSvg.EA_NewMessage -= PipeSvg_EA_NewMessage;
}
#endregion Public Methods
@@ -50,7 +50,7 @@ namespace Lux.UI.Components.Pages
imgBasePath = Config.GetValue<string>("ServerConf:ImageBaseUrl") ?? "";
calcTag = Config.GetValue<string>("ServerConf:ImageCalcTag") ?? "";
subChannel = Config.GetValue<string>("ServerConf:SvgChannel") ?? "";
DLService.CalcDonePipe.EA_NewMessage += CalcDonePipe_EA_NewMessage;
DLService.PipeSvg.EA_NewMessage += PipeSvg_EA_NewMessage;
}
protected void Reset()
@@ -85,7 +85,7 @@ namespace Lux.UI.Components.Pages
#region Private Methods
private async void CalcDonePipe_EA_NewMessage(object? sender, EventArgs e)
private async void PipeSvg_EA_NewMessage(object? sender, EventArgs e)
{
// aggiorno visualizzazione
PubSubEventArgs currArgs = (PubSubEventArgs)e;
+10 -7
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UserSecretsId>aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50</UserSecretsId>
<Version>0.9.2510.2109</Version>
<Version>0.9.2510.2211</Version>
</PropertyGroup>
<ItemGroup>
@@ -17,14 +17,17 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Egw.Lux.WebWindowComplex" Version="2.7.10.1710" />
<PackageReference Include="Egw.Lux.WebWindowComplex" Version="2.7.10.2117" />
<PackageReference Include="EgwCoreLib.Razor" Version="1.5.2510.610" />
<PackageReference Include="EgwCoreLib.Utils" Version="1.5.2510.610" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.17" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.17" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.17" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.21" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.21" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.21" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.21" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.21">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NLog" Version="6.0.1" />
<PackageReference Include="NLog.Web.AspNetCore" Version="6.0.1" />
</ItemGroup>
+4
View File
@@ -67,6 +67,10 @@
"PubChannel": "EgwEngineInput",
"SubChannel": "EgwEngineOutput",
"SvgChannel": "Egw:svg:img",
"ShapeChannel": "Egw:shape:curr",
"HwListChannel": "Egw:hw:list",
"HwOptChannel": "Egw:hw:opt",
"ProfListChannel": "Egw:prof:list",
"BomChannel": "Egw:bom",
"UpdateChannel": "Egw:update",
"BaseUrl": "/lux/ui/"
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>LUX - Web Windows MES</i>
<h4>Versione: 0.9.2510.2109</h4>
<h4>Versione: 0.9.2510.2211</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
0.9.2510.2109
0.9.2510.2211
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>0.9.2510.2109</version>
<version>0.9.2510.2211</version>
<url>http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip</url>
<changelog>http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html</changelog>
<mandatory>false</mandatory>