From d7672c3f399e276d1fe77f8a4025839ed2e79c32 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Thu, 5 Mar 2026 16:11:40 +0100 Subject: [PATCH] Re-issue migration + inizio pagina template corretta --- .../Controllers/LuxController.cs | 108 +++++ .../DbModel/Sales/TemplateModel.cs | 19 +- .../Migrations/20260126152631_AddOdlBom_01.cs | 196 +-------- .../Migrations/20260305092809_TemplateObj.cs | 240 ---------- ...20260305145628_AddTemplateObj.Designer.cs} | 41 +- .../20260305145628_AddTemplateObj.cs | 410 ++++++++++++++++++ .../DataLayerContextModelSnapshot.cs | 37 +- .../Services/DataLayerServices.cs | 370 +++++++++------- Lux.API/Lux.API.csproj | 2 +- .../Compo/Templates/TemplateList.razor | 101 ++++- .../Compo/Templates/TemplateList.razor.cs | 152 +++++++ Lux.UI/Lux.UI.csproj | 2 +- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 15 files changed, 991 insertions(+), 693 deletions(-) delete mode 100644 EgwCoreLib.Lux.Data/Migrations/20260305092809_TemplateObj.cs rename EgwCoreLib.Lux.Data/Migrations/{20260305092809_TemplateObj.Designer.cs => 20260305145628_AddTemplateObj.Designer.cs} (99%) create mode 100644 EgwCoreLib.Lux.Data/Migrations/20260305145628_AddTemplateObj.cs create mode 100644 Lux.UI/Components/Compo/Templates/TemplateList.razor.cs diff --git a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs index 440ebe28..215997d8 100644 --- a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs +++ b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs @@ -4629,6 +4629,114 @@ namespace EgwCoreLib.Lux.Data.Controllers return dbResult; } + /// + /// Esegue il cloning completo di un Template e di TUTTE le relative righe... + /// + /// + /// + internal async Task TemplateCloneAsync(TemplateModel rec2clone) + { + bool answ = false; + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + DateTime adesso = DateTime.Now; + // recupero offerta... + var currRec = dbCtx + .DbSetTemplate + .Where(x => x.TemplateID == rec2clone.TemplateID) + .Include(x => x.TemplateRowNav) + .FirstOrDefault(); + + // se trovo --> duplico! + if (currRec != null) + { + // recupero ultimo num offerta dell'anno corrente... + TemplateModel newRec = new TemplateModel() + { + Name = rec2clone.Name, + Envir = rec2clone.Envir, + Description = rec2clone.Description, + SourceType = rec2clone.SourceType, + }; + + // sistemo child... + newRec.TemplateRowNav = currRec.TemplateRowNav + .Select(c => new TemplateRowModel() + { + AwaitBom = c.AwaitBom, + AwaitPrice = c.AwaitPrice, + BomCost = c.BomCost, + BomOk = c.BomOk, + BomPrice = c.BomPrice, + Envir = c.Envir, + FileName = c.FileName, + FileResource = c.FileResource, + FileSize = c.FileSize, + Inserted = adesso, + ItemBOM = c.ItemBOM, + ItemJCD = c.ItemJCD, + ItemOk = c.ItemOk, + ItemSteps = c.ItemSteps, + ItemTags = c.ItemTags, + JobID = c.JobID, + Note = c.Note, + ProdItemQty = c.ProdItemQty, + Qty = c.Qty, + RowNum = c.RowNum, + SellingItemID = c.SellingItemID, + SerStruct = c.SerStruct, + StepCost = c.StepCost, + StepFlowTime = c.StepFlowTime, + StepLeadTime = c.StepLeadTime, + StepPrice = c.StepPrice, + Name = c.Name, + TemplateRowUID = c.TemplateRowDtx + }) + .ToList(); + + // infine aggiungo riga ordine e relativi child + dbCtx.DbSetTemplate.Add(newRec); + } + + // salvo TUTTI i cambiamenti... + var result = await dbCtx.SaveChangesAsync(); + answ = result > 0; + } + catch (Exception exc) + { + Log.Error($"Eccezione durante TemplateCloneAsync{Environment.NewLine}{exc}"); + } + } + return answ; + } + /// + /// Elenco completo Template da DB + /// + /// + internal async Task> TemplateGetAllAsync() + { + List dbResult = new List(); + //using (DataLayerContext dbCtx = new DataLayerContext(_config)) + using (DataLayerContext dbCtx = new DataLayerContext()) + { + try + { + dbResult = await dbCtx + .DbSetTemplate + .Include(r => r.TemplateRowNav) + .ToListAsync(); + } + catch (Exception exc) + { + Log.Error($"Eccezione durante TemplateGetAllAsync{Environment.NewLine}{exc}"); + } + } + return dbResult; + } + internal bool UpdateCodGroup(List bomList) { bool answ = false; diff --git a/EgwCoreLib.Lux.Data/DbModel/Sales/TemplateModel.cs b/EgwCoreLib.Lux.Data/DbModel/Sales/TemplateModel.cs index ff8f338e..e123236b 100644 --- a/EgwCoreLib.Lux.Data/DbModel/Sales/TemplateModel.cs +++ b/EgwCoreLib.Lux.Data/DbModel/Sales/TemplateModel.cs @@ -1,10 +1,5 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using static EgwCoreLib.Lux.Core.Enums; namespace EgwCoreLib.Lux.Data.DbModel.Sales @@ -96,18 +91,6 @@ namespace EgwCoreLib.Lux.Data.DbModel.Sales get => (TotalCost > 0 && TotalPrice > TotalCost) ? (TotalPrice - TotalCost) / TotalPrice : 0; } - /// - /// Navigazione Customer - /// - [ForeignKey("CustomerID")] - public virtual CustomerModel CustomerNav { get; set; } = null!; - - /// - /// Navigazione Dealer - /// - [ForeignKey("DealerID")] - public virtual DealerModel DealerNav { get; set; } = null!; - /// /// Navigazione alle righe offerta /// diff --git a/EgwCoreLib.Lux.Data/Migrations/20260126152631_AddOdlBom_01.cs b/EgwCoreLib.Lux.Data/Migrations/20260126152631_AddOdlBom_01.cs index a1fc52b8..9339b395 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20260126152631_AddOdlBom_01.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20260126152631_AddOdlBom_01.cs @@ -1,5 +1,4 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Migrations; #nullable disable @@ -32,103 +31,6 @@ namespace EgwCoreLib.Lux.Data.Migrations nullable: false) .Annotation("MySql:CharSet", "utf8mb4"); - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 1, - columns: new[] { "DueDateProm", "DueDateReq", "ValidUntil" }, - values: new object[] { new DateTime(2026, 3, 27, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 25, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 26, 16, 26, 31, 274, DateTimeKind.Local).AddTicks(325) }); - - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 2, - columns: new[] { "DueDateProm", "DueDateReq", "ValidUntil" }, - values: new object[] { new DateTime(2026, 3, 27, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 25, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 26, 16, 26, 31, 274, DateTimeKind.Local).AddTicks(346) }); - - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 3, - columns: new[] { "DueDateProm", "DueDateReq", "ValidUntil" }, - values: new object[] { new DateTime(2026, 3, 27, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 25, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 26, 16, 26, 31, 274, DateTimeKind.Local).AddTicks(352) }); - - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 4, - columns: new[] { "DueDateProm", "DueDateReq", "ValidUntil" }, - values: new object[] { new DateTime(2026, 3, 27, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 25, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 26, 16, 26, 31, 274, DateTimeKind.Local).AddTicks(359) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 1, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 2, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 3, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 4, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 5, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 6, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 7, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 8, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 9, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 10, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); } /// @@ -146,103 +48,7 @@ namespace EgwCoreLib.Lux.Data.Migrations name: "RawMaterials", table: "production_odl"); - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 1, - columns: new[] { "DueDateProm", "DueDateReq", "ValidUntil" }, - values: new object[] { new DateTime(2026, 3, 23, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 21, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 22, 15, 37, 12, 775, DateTimeKind.Local).AddTicks(187) }); - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 2, - columns: new[] { "DueDateProm", "DueDateReq", "ValidUntil" }, - values: new object[] { new DateTime(2026, 3, 23, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 21, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 22, 15, 37, 12, 775, DateTimeKind.Local).AddTicks(203) }); - - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 3, - columns: new[] { "DueDateProm", "DueDateReq", "ValidUntil" }, - values: new object[] { new DateTime(2026, 3, 23, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 21, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 22, 15, 37, 12, 775, DateTimeKind.Local).AddTicks(219) }); - - migrationBuilder.UpdateData( - table: "sales_offer", - keyColumn: "OfferID", - keyValue: 4, - columns: new[] { "DueDateProm", "DueDateReq", "ValidUntil" }, - values: new object[] { new DateTime(2026, 3, 23, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 21, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 22, 15, 37, 12, 775, DateTimeKind.Local).AddTicks(229) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 1, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 2, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 3, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 4, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 5, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 6, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 7, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 8, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 9, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local) }); - - migrationBuilder.UpdateData( - table: "sales_offer_row", - keyColumn: "OfferRowID", - keyValue: 10, - columns: new[] { "Inserted", "Modified" }, - values: new object[] { new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 22, 0, 0, 0, 0, DateTimeKind.Local) }); } } } diff --git a/EgwCoreLib.Lux.Data/Migrations/20260305092809_TemplateObj.cs b/EgwCoreLib.Lux.Data/Migrations/20260305092809_TemplateObj.cs deleted file mode 100644 index 437acb50..00000000 --- a/EgwCoreLib.Lux.Data/Migrations/20260305092809_TemplateObj.cs +++ /dev/null @@ -1,240 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace EgwCoreLib.Lux.Data.Migrations -{ - /// - public partial class TemplateObj : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.AlterColumn( - name: "SellingItemID", - table: "sales_order_row", - type: "int", - nullable: false, - defaultValue: 0, - oldClrType: typeof(int), - oldType: "int", - oldNullable: true); - - migrationBuilder.AlterColumn( - name: "SellingItemID", - table: "sales_offer_row", - type: "int", - nullable: false, - defaultValue: 0, - oldClrType: typeof(int), - oldType: "int", - oldNullable: true); - - migrationBuilder.AddColumn( - name: "SourceType", - table: "item_selling_item", - type: "int", - nullable: false, - defaultValue: 0); - - migrationBuilder.CreateTable( - name: "sales_template", - columns: table => new - { - TemplateID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - Envir = table.Column(type: "int", nullable: false), - SourceType = table.Column(type: "int", nullable: false), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - Description = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - CustomerID = table.Column(type: "int", nullable: false), - DealerID = table.Column(type: "int", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_sales_template", x => x.TemplateID); - table.ForeignKey( - name: "FK_sales_template_sales_customer_CustomerID", - column: x => x.CustomerID, - principalTable: "sales_customer", - principalColumn: "CustomerID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_sales_template_sales_dealer_DealerID", - column: x => x.DealerID, - principalTable: "sales_dealer", - principalColumn: "DealerID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.CreateTable( - name: "sales_template_row", - columns: table => new - { - TemplateRowID = table.Column(type: "int", nullable: false) - .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), - TemplateID = table.Column(type: "int", nullable: false), - RowNum = table.Column(type: "int", nullable: false), - Envir = table.Column(type: "int", nullable: false), - Name = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - TemplateRowUID = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - SellingItemID = table.Column(type: "int", nullable: false), - Qty = table.Column(type: "double", nullable: false), - BomCost = table.Column(type: "double", nullable: false), - BomPrice = table.Column(type: "double", nullable: false), - StepCost = table.Column(type: "double", nullable: false), - StepPrice = table.Column(type: "double", nullable: false), - StepLeadTime = table.Column(type: "double", nullable: false), - StepFlowTime = table.Column(type: "double", nullable: false), - SerStruct = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - FileResource = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - FileName = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - FileSize = table.Column(type: "bigint", nullable: false), - ItemBOM = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ItemJCD = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ItemTags = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - ProdItemQty = table.Column(type: "int", nullable: false), - JobID = table.Column(type: "int", nullable: false), - ItemSteps = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - BomOk = table.Column(type: "tinyint(1)", nullable: false), - ItemOk = table.Column(type: "tinyint(1)", nullable: false), - Note = table.Column(type: "longtext", nullable: false) - .Annotation("MySql:CharSet", "utf8mb4"), - AwaitBom = table.Column(type: "tinyint(1)", nullable: false), - AwaitPrice = table.Column(type: "tinyint(1)", nullable: false), - Inserted = table.Column(type: "datetime(6)", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_sales_template_row", x => x.TemplateRowID); - table.ForeignKey( - name: "FK_sales_template_row_item_selling_item_SellingItemID", - column: x => x.SellingItemID, - principalTable: "item_selling_item", - principalColumn: "SellingItemID", - onDelete: ReferentialAction.Restrict); - table.ForeignKey( - name: "FK_sales_template_row_sales_template_TemplateID", - column: x => x.TemplateID, - principalTable: "sales_template", - principalColumn: "TemplateID", - onDelete: ReferentialAction.Restrict); - }) - .Annotation("MySql:CharSet", "utf8mb4"); - - migrationBuilder.UpdateData( - table: "item_selling_item", - keyColumn: "SellingItemID", - keyValue: 1, - column: "SourceType", - value: 0); - - migrationBuilder.UpdateData( - table: "item_selling_item", - keyColumn: "SellingItemID", - keyValue: 2, - column: "SourceType", - value: 0); - - migrationBuilder.UpdateData( - table: "item_selling_item", - keyColumn: "SellingItemID", - keyValue: 3, - column: "SourceType", - value: 0); - - migrationBuilder.UpdateData( - table: "item_selling_item", - keyColumn: "SellingItemID", - keyValue: 4, - column: "SourceType", - value: 0); - - migrationBuilder.UpdateData( - table: "item_selling_item", - keyColumn: "SellingItemID", - keyValue: 5, - column: "SourceType", - value: 0); - - migrationBuilder.UpdateData( - table: "item_selling_item", - keyColumn: "SellingItemID", - keyValue: 6, - column: "SourceType", - value: 0); - - migrationBuilder.UpdateData( - table: "item_selling_item", - keyColumn: "SellingItemID", - keyValue: 7, - column: "SourceType", - value: 0); - - migrationBuilder.CreateIndex( - name: "IX_sales_template_CustomerID", - table: "sales_template", - column: "CustomerID"); - - migrationBuilder.CreateIndex( - name: "IX_sales_template_DealerID", - table: "sales_template", - column: "DealerID"); - - migrationBuilder.CreateIndex( - name: "IX_sales_template_row_SellingItemID", - table: "sales_template_row", - column: "SellingItemID"); - - migrationBuilder.CreateIndex( - name: "IX_sales_template_row_TemplateID", - table: "sales_template_row", - column: "TemplateID"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "sales_template_row"); - - migrationBuilder.DropTable( - name: "sales_template"); - - migrationBuilder.DropColumn( - name: "SourceType", - table: "item_selling_item"); - - migrationBuilder.AlterColumn( - name: "SellingItemID", - table: "sales_order_row", - type: "int", - nullable: true, - oldClrType: typeof(int), - oldType: "int"); - - migrationBuilder.AlterColumn( - name: "SellingItemID", - table: "sales_offer_row", - type: "int", - nullable: true, - oldClrType: typeof(int), - oldType: "int"); - - } - } -} diff --git a/EgwCoreLib.Lux.Data/Migrations/20260305092809_TemplateObj.Designer.cs b/EgwCoreLib.Lux.Data/Migrations/20260305145628_AddTemplateObj.Designer.cs similarity index 99% rename from EgwCoreLib.Lux.Data/Migrations/20260305092809_TemplateObj.Designer.cs rename to EgwCoreLib.Lux.Data/Migrations/20260305145628_AddTemplateObj.Designer.cs index 2bc865ed..e92b415f 100644 --- a/EgwCoreLib.Lux.Data/Migrations/20260305092809_TemplateObj.Designer.cs +++ b/EgwCoreLib.Lux.Data/Migrations/20260305145628_AddTemplateObj.Designer.cs @@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace EgwCoreLib.Lux.Data.Migrations { [DbContext(typeof(DataLayerContext))] - [Migration("20260305092809_TemplateObj")] - partial class TemplateObj + [Migration("20260305145628_AddTemplateObj")] + partial class AddTemplateObj { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -1487,7 +1487,7 @@ namespace EgwCoreLib.Lux.Data.Migrations RefNum = 1, RefRev = 1, RefYear = 2025, - ValidUntil = new DateTime(2026, 4, 5, 10, 28, 8, 982, DateTimeKind.Local).AddTicks(2126) + ValidUntil = new DateTime(2026, 4, 5, 15, 56, 27, 786, DateTimeKind.Local).AddTicks(8365) }, new { @@ -1507,7 +1507,7 @@ namespace EgwCoreLib.Lux.Data.Migrations RefNum = 2, RefRev = 1, RefYear = 2025, - ValidUntil = new DateTime(2026, 4, 5, 10, 28, 8, 982, DateTimeKind.Local).AddTicks(2142) + ValidUntil = new DateTime(2026, 4, 5, 15, 56, 27, 786, DateTimeKind.Local).AddTicks(8376) }, new { @@ -1527,7 +1527,7 @@ namespace EgwCoreLib.Lux.Data.Migrations RefNum = 3, RefRev = 1, RefYear = 2025, - ValidUntil = new DateTime(2026, 4, 5, 10, 28, 8, 982, DateTimeKind.Local).AddTicks(2162) + ValidUntil = new DateTime(2026, 4, 5, 15, 56, 27, 786, DateTimeKind.Local).AddTicks(8382) }, new { @@ -1547,7 +1547,7 @@ namespace EgwCoreLib.Lux.Data.Migrations RefNum = 4, RefRev = 1, RefYear = 2025, - ValidUntil = new DateTime(2026, 4, 5, 10, 28, 8, 982, DateTimeKind.Local).AddTicks(2176) + ValidUntil = new DateTime(2026, 4, 5, 15, 56, 27, 786, DateTimeKind.Local).AddTicks(8388) }); }); @@ -2204,12 +2204,6 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TemplateID")); - b.Property("CustomerID") - .HasColumnType("int"); - - b.Property("DealerID") - .HasColumnType("int"); - b.Property("Description") .IsRequired() .HasColumnType("longtext"); @@ -2226,10 +2220,6 @@ namespace EgwCoreLib.Lux.Data.Migrations b.HasKey("TemplateID"); - b.HasIndex("CustomerID"); - - b.HasIndex("DealerID"); - b.ToTable("sales_template"); }); @@ -3806,25 +3796,6 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Navigation("SellingItemNav"); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.TemplateModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", "CustomerNav") - .WithMany() - .HasForeignKey("CustomerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", "DealerNav") - .WithMany() - .HasForeignKey("DealerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CustomerNav"); - - b.Navigation("DealerNav"); - }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.TemplateRowModel", b => { b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") diff --git a/EgwCoreLib.Lux.Data/Migrations/20260305145628_AddTemplateObj.cs b/EgwCoreLib.Lux.Data/Migrations/20260305145628_AddTemplateObj.cs new file mode 100644 index 00000000..6df3bdd8 --- /dev/null +++ b/EgwCoreLib.Lux.Data/Migrations/20260305145628_AddTemplateObj.cs @@ -0,0 +1,410 @@ +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace EgwCoreLib.Lux.Data.Migrations +{ + /// + public partial class AddTemplateObj : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "SellingItemID", + table: "sales_order_row", + type: "int", + nullable: false, + defaultValue: 0, + oldClrType: typeof(int), + oldType: "int", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "SellingItemID", + table: "sales_offer_row", + type: "int", + nullable: false, + defaultValue: 0, + oldClrType: typeof(int), + oldType: "int", + oldNullable: true); + + migrationBuilder.AddColumn( + name: "SourceType", + table: "item_selling_item", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.CreateTable( + name: "sales_template", + columns: table => new + { + TemplateID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Envir = table.Column(type: "int", nullable: false), + SourceType = table.Column(type: "int", nullable: false), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + Description = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4") + }, + constraints: table => + { + table.PrimaryKey("PK_sales_template", x => x.TemplateID); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.CreateTable( + name: "sales_template_row", + columns: table => new + { + TemplateRowID = table.Column(type: "int", nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + TemplateID = table.Column(type: "int", nullable: false), + RowNum = table.Column(type: "int", nullable: false), + Envir = table.Column(type: "int", nullable: false), + Name = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + TemplateRowUID = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + SellingItemID = table.Column(type: "int", nullable: false), + Qty = table.Column(type: "double", nullable: false), + BomCost = table.Column(type: "double", nullable: false), + BomPrice = table.Column(type: "double", nullable: false), + StepCost = table.Column(type: "double", nullable: false), + StepPrice = table.Column(type: "double", nullable: false), + StepLeadTime = table.Column(type: "double", nullable: false), + StepFlowTime = table.Column(type: "double", nullable: false), + SerStruct = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + FileResource = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + FileName = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + FileSize = table.Column(type: "bigint", nullable: false), + ItemBOM = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ItemJCD = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ItemTags = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + ProdItemQty = table.Column(type: "int", nullable: false), + JobID = table.Column(type: "int", nullable: false), + ItemSteps = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + BomOk = table.Column(type: "tinyint(1)", nullable: false), + ItemOk = table.Column(type: "tinyint(1)", nullable: false), + Note = table.Column(type: "longtext", nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"), + AwaitBom = table.Column(type: "tinyint(1)", nullable: false), + AwaitPrice = table.Column(type: "tinyint(1)", nullable: false), + Inserted = table.Column(type: "datetime(6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_sales_template_row", x => x.TemplateRowID); + table.ForeignKey( + name: "FK_sales_template_row_item_selling_item_SellingItemID", + column: x => x.SellingItemID, + principalTable: "item_selling_item", + principalColumn: "SellingItemID", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_sales_template_row_sales_template_TemplateID", + column: x => x.TemplateID, + principalTable: "sales_template", + principalColumn: "TemplateID", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.UpdateData( + table: "item_selling_item", + keyColumn: "SellingItemID", + keyValue: 1, + column: "SourceType", + value: 0); + + migrationBuilder.UpdateData( + table: "item_selling_item", + keyColumn: "SellingItemID", + keyValue: 2, + column: "SourceType", + value: 0); + + migrationBuilder.UpdateData( + table: "item_selling_item", + keyColumn: "SellingItemID", + keyValue: 3, + column: "SourceType", + value: 0); + + migrationBuilder.UpdateData( + table: "item_selling_item", + keyColumn: "SellingItemID", + keyValue: 4, + column: "SourceType", + value: 0); + + migrationBuilder.UpdateData( + table: "item_selling_item", + keyColumn: "SellingItemID", + keyValue: 5, + column: "SourceType", + value: 0); + + migrationBuilder.UpdateData( + table: "item_selling_item", + keyColumn: "SellingItemID", + keyValue: 6, + column: "SourceType", + value: 0); + + migrationBuilder.UpdateData( + table: "item_selling_item", + keyColumn: "SellingItemID", + keyValue: 7, + column: "SourceType", + value: 0); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "DueDateProm", "DueDateReq", "ValidUntil" }, + values: new object[] { new DateTime(2026, 5, 4, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 4, 4, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 4, 5, 15, 56, 27, 786, DateTimeKind.Local).AddTicks(8365) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 2, + columns: new[] { "DueDateProm", "DueDateReq", "ValidUntil" }, + values: new object[] { new DateTime(2026, 5, 4, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 4, 4, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 4, 5, 15, 56, 27, 786, DateTimeKind.Local).AddTicks(8376) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 3, + columns: new[] { "DueDateProm", "DueDateReq", "ValidUntil" }, + values: new object[] { new DateTime(2026, 5, 4, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 4, 4, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 4, 5, 15, 56, 27, 786, DateTimeKind.Local).AddTicks(8382) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 4, + columns: new[] { "DueDateProm", "DueDateReq", "ValidUntil" }, + values: new object[] { new DateTime(2026, 5, 4, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 4, 4, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 4, 5, 15, 56, 27, 786, DateTimeKind.Local).AddTicks(8388) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 4, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 5, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 6, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 7, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 8, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 9, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 10, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 3, 5, 0, 0, 0, 0, DateTimeKind.Local) }); + + migrationBuilder.CreateIndex( + name: "IX_sales_template_row_SellingItemID", + table: "sales_template_row", + column: "SellingItemID"); + + migrationBuilder.CreateIndex( + name: "IX_sales_template_row_TemplateID", + table: "sales_template_row", + column: "TemplateID"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "sales_template_row"); + + migrationBuilder.DropTable( + name: "sales_template"); + + migrationBuilder.DropColumn( + name: "SourceType", + table: "item_selling_item"); + + migrationBuilder.AlterColumn( + name: "SellingItemID", + table: "sales_order_row", + type: "int", + nullable: true, + oldClrType: typeof(int), + oldType: "int"); + + migrationBuilder.AlterColumn( + name: "SellingItemID", + table: "sales_offer_row", + type: "int", + nullable: true, + oldClrType: typeof(int), + oldType: "int"); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 1, + columns: new[] { "DueDateProm", "DueDateReq", "ValidUntil" }, + values: new object[] { new DateTime(2026, 3, 27, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 25, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 26, 16, 26, 31, 274, DateTimeKind.Local).AddTicks(325) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 2, + columns: new[] { "DueDateProm", "DueDateReq", "ValidUntil" }, + values: new object[] { new DateTime(2026, 3, 27, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 25, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 26, 16, 26, 31, 274, DateTimeKind.Local).AddTicks(346) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 3, + columns: new[] { "DueDateProm", "DueDateReq", "ValidUntil" }, + values: new object[] { new DateTime(2026, 3, 27, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 25, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 26, 16, 26, 31, 274, DateTimeKind.Local).AddTicks(352) }); + + migrationBuilder.UpdateData( + table: "sales_offer", + keyColumn: "OfferID", + keyValue: 4, + columns: new[] { "DueDateProm", "DueDateReq", "ValidUntil" }, + values: new object[] { new DateTime(2026, 3, 27, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 25, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 2, 26, 16, 26, 31, 274, DateTimeKind.Local).AddTicks(359) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 1, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 2, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 3, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 4, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 5, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 6, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 7, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 8, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 9, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); + + migrationBuilder.UpdateData( + table: "sales_offer_row", + keyColumn: "OfferRowID", + keyValue: 10, + columns: new[] { "Inserted", "Modified" }, + values: new object[] { new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local), new DateTime(2026, 1, 26, 0, 0, 0, 0, DateTimeKind.Local) }); + } + } +} diff --git a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs index e6a9d600..10fe79e4 100644 --- a/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs +++ b/EgwCoreLib.Lux.Data/Migrations/DataLayerContextModelSnapshot.cs @@ -1484,7 +1484,7 @@ namespace EgwCoreLib.Lux.Data.Migrations RefNum = 1, RefRev = 1, RefYear = 2025, - ValidUntil = new DateTime(2026, 4, 5, 10, 28, 8, 982, DateTimeKind.Local).AddTicks(2126) + ValidUntil = new DateTime(2026, 4, 5, 15, 56, 27, 786, DateTimeKind.Local).AddTicks(8365) }, new { @@ -1504,7 +1504,7 @@ namespace EgwCoreLib.Lux.Data.Migrations RefNum = 2, RefRev = 1, RefYear = 2025, - ValidUntil = new DateTime(2026, 4, 5, 10, 28, 8, 982, DateTimeKind.Local).AddTicks(2142) + ValidUntil = new DateTime(2026, 4, 5, 15, 56, 27, 786, DateTimeKind.Local).AddTicks(8376) }, new { @@ -1524,7 +1524,7 @@ namespace EgwCoreLib.Lux.Data.Migrations RefNum = 3, RefRev = 1, RefYear = 2025, - ValidUntil = new DateTime(2026, 4, 5, 10, 28, 8, 982, DateTimeKind.Local).AddTicks(2162) + ValidUntil = new DateTime(2026, 4, 5, 15, 56, 27, 786, DateTimeKind.Local).AddTicks(8382) }, new { @@ -1544,7 +1544,7 @@ namespace EgwCoreLib.Lux.Data.Migrations RefNum = 4, RefRev = 1, RefYear = 2025, - ValidUntil = new DateTime(2026, 4, 5, 10, 28, 8, 982, DateTimeKind.Local).AddTicks(2176) + ValidUntil = new DateTime(2026, 4, 5, 15, 56, 27, 786, DateTimeKind.Local).AddTicks(8388) }); }); @@ -2201,12 +2201,6 @@ namespace EgwCoreLib.Lux.Data.Migrations MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property("TemplateID")); - b.Property("CustomerID") - .HasColumnType("int"); - - b.Property("DealerID") - .HasColumnType("int"); - b.Property("Description") .IsRequired() .HasColumnType("longtext"); @@ -2223,10 +2217,6 @@ namespace EgwCoreLib.Lux.Data.Migrations b.HasKey("TemplateID"); - b.HasIndex("CustomerID"); - - b.HasIndex("DealerID"); - b.ToTable("sales_template"); }); @@ -3803,25 +3793,6 @@ namespace EgwCoreLib.Lux.Data.Migrations b.Navigation("SellingItemNav"); }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.TemplateModel", b => - { - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.CustomerModel", "CustomerNav") - .WithMany() - .HasForeignKey("CustomerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("EgwCoreLib.Lux.Data.DbModel.Sales.DealerModel", "DealerNav") - .WithMany() - .HasForeignKey("DealerID") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CustomerNav"); - - b.Navigation("DealerNav"); - }); - modelBuilder.Entity("EgwCoreLib.Lux.Data.DbModel.Sales.TemplateRowModel", b => { b.HasOne("EgwCoreLib.Lux.Data.DbModel.Items.SellingItemModel", "SellingItemNav") diff --git a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs index 619f2b5a..c9c959a1 100644 --- a/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs +++ b/EgwCoreLib.Lux.Data/Services/DataLayerServices.cs @@ -13,17 +13,9 @@ using Microsoft.Extensions.Configuration; using Newtonsoft.Json; using NLog; using StackExchange.Redis; -using System; -using System.Collections.Generic; -using System.ComponentModel.Design; using System.Diagnostics; -using System.Linq; -using System.Resources; -using System.Security.Cryptography; using System.Text; -using System.Threading.Tasks; using static EgwCoreLib.Lux.Core.Enums; -using static System.Runtime.InteropServices.JavaScript.JSType; namespace EgwCoreLib.Lux.Data.Services { @@ -1920,43 +1912,6 @@ namespace EgwCoreLib.Lux.Data.Services return result; } -#if false - /// - /// Elenco record ProductionOdl Ready (NON Assegnati) - /// - /// - /// - public async Task> ProductionOdlUnassignAsync() - { - string source = "DB"; - Stopwatch sw = new Stopwatch(); - sw.Start(); - List? result = new List(); - // cerco in redis... - string currKey = $"{redisBaseKey}:ProdOdl:Unassigned"; - RedisValue rawData = await redisDb.StringGetAsync(currKey); - if (rawData.HasValue && rawData.Length() > 2) - { - result = JsonConvert.DeserializeObject>($"{rawData}"); - source = "REDIS"; - } - else - { - result = await dbController.ProductionOdlUnassignAsync(); - // serializzo e salvo con config x evitare loop... - rawData = JsonConvert.SerializeObject(result, JSSettings); - await redisDb.StringSetAsync(currKey, rawData, LongCache); - } - if (result == null) - { - result = new List(); - } - sw.Stop(); - Log.Debug($"ProductionOdlUnassignAsync | {source} | {sw.Elapsed.TotalMilliseconds}ms"); - return result; - } -#endif - /// /// Assegnazione in blocco degli item agli ODL corrispondenti /// @@ -2075,37 +2030,6 @@ namespace EgwCoreLib.Lux.Data.Services return result; } - /// - /// Recupero ODL da UID - /// - /// - /// - public async Task ProdOdlGetByUidAsync(string uID) - { - string source = "DB"; - Stopwatch sw = new Stopwatch(); - sw.Start(); - ProductionODLModel? result = null; - // cerco in redis... - string currKey = $"{redisBaseKey}:ProdOdl:{uID}"; - RedisValue rawData = await redisDb.StringGetAsync(currKey); - if (rawData.HasValue && rawData.Length() > 2) - { - result = JsonConvert.DeserializeObject($"{rawData}"); - source = "REDIS"; - } - else - { - result = await dbController.ProdOdlGetByUidAsync(uID); - // serializzo e salvo con config x evitare loop... - rawData = JsonConvert.SerializeObject(result, JSSettings); - await redisDb.StringSetAsync(currKey, rawData, LongCache); - } - sw.Stop(); - Log.Debug($"ProdOdlGetByUidAsync | {source} | {sw.Elapsed.TotalMilliseconds}ms"); - return result; - } - /// /// Elenco ODL piatto da assegnare /// @@ -2140,6 +2064,37 @@ namespace EgwCoreLib.Lux.Data.Services return result; } + /// + /// Recupero ODL da UID + /// + /// + /// + public async Task ProdOdlGetByUidAsync(string uID) + { + string source = "DB"; + Stopwatch sw = new Stopwatch(); + sw.Start(); + ProductionODLModel? result = null; + // cerco in redis... + string currKey = $"{redisBaseKey}:ProdOdl:{uID}"; + RedisValue rawData = await redisDb.StringGetAsync(currKey); + if (rawData.HasValue && rawData.Length() > 2) + { + result = JsonConvert.DeserializeObject($"{rawData}"); + source = "REDIS"; + } + else + { + result = await dbController.ProdOdlGetByUidAsync(uID); + // serializzo e salvo con config x evitare loop... + rawData = JsonConvert.SerializeObject(result, JSSettings); + await redisDb.StringSetAsync(currKey, rawData, LongCache); + } + sw.Stop(); + Log.Debug($"ProdOdlGetByUidAsync | {source} | {sw.Elapsed.TotalMilliseconds}ms"); + return result; + } + /// /// Aggiorna record ProdOdl (se trovato) con ItemListRaw (raw) inviata x calcolo PROD /// @@ -2224,74 +2179,6 @@ namespace EgwCoreLib.Lux.Data.Services return dbResult; } -#if false - public async Task> ProdAssignByOrderRow(int OrderRowID) - { - string source = "DB"; - Stopwatch sw = new Stopwatch(); - sw.Start(); - List? result = new List(); - // cerco in redis... - string currKey = $"{redisBaseKey}:ProdAssign:OrdRowId:{OrderRowID}"; - RedisValue rawData = await redisDb.StringGetAsync(currKey); - if (rawData.HasValue && rawData.Length() > 2) - { - result = JsonConvert.DeserializeObject>($"{rawData}"); - source = "REDIS"; - } - else - { - result = await dbController.ProdAssignByOrderRow(OrderRowID); - // serializzo e salvo con config x evitare loop... - rawData = JsonConvert.SerializeObject(result, JSSettings); - await redisDb.StringSetAsync(currKey, rawData, LongCache); - } - if (result == null) - { - result = new List(); - } - sw.Stop(); - Log.Debug($"ProdAssignByOrderRow | {source} | {sw.Elapsed.TotalMilliseconds}ms"); - return result; - } - - /// - /// Verifica ed eventualmente crea ProdAssign dato elenco macchine - /// - /// - /// - /// - public async Task> ProdAssignCheckExist(int OrderRowID, List ListPlant) - { - string source = "DB"; - Stopwatch sw = new Stopwatch(); - sw.Start(); - List? result = new List(); - // cerco in redis... - string currKey = $"{redisBaseKey}:ProdAssign:OrdRowId:{OrderRowID}"; - RedisValue rawData = await redisDb.StringGetAsync(currKey); - if (rawData.HasValue && rawData.Length() > 2) - { - result = JsonConvert.DeserializeObject>($"{rawData}"); - source = "REDIS"; - } - else - { - result = await dbController.ProdAssignCheckExist(OrderRowID, ListPlant); - // serializzo e salvo con config x evitare loop... - rawData = JsonConvert.SerializeObject(result, JSSettings); - await redisDb.StringSetAsync(currKey, rawData, LongCache); - } - if (result == null) - { - result = new List(); - } - sw.Stop(); - Log.Debug($"ProdAssignCheckExist | {source} | {sw.Elapsed.TotalMilliseconds}ms"); - return result; - } -#endif - /// Esegue Delete del record ricevuto /// /// @@ -2552,25 +2439,6 @@ namespace EgwCoreLib.Lux.Data.Services return result; } -#if false - /// - /// Recupero nuovo record BOM diretto dal DB - /// - /// - /// - public OfferRowModel? OfferRowGetByOfferRowID(int offerRowID) - { - string source = "DB"; - Stopwatch sw = new Stopwatch(); - sw.Start(); - OfferRowModel? result = null; - result = dbController.OfferRowGetByOfferRowID(offerRowID); - sw.Stop(); - Log.Debug($"OfferRowGetByOfferRowID | {source} | {sw.Elapsed.TotalMilliseconds}ms"); - return result; - } -#endif - /// /// Elenco completo Tags disponibili /// @@ -2605,8 +2473,184 @@ namespace EgwCoreLib.Lux.Data.Services return result; } + /// + /// Esegue clone completo del template indicato e svuota la cache + /// + /// + /// + public async Task TemplateCloneAsync(TemplateModel rec2clone) + { + Stopwatch sw = new Stopwatch(); + sw.Start(); + // calcolo + bool fatto = await dbController.TemplateCloneAsync(rec2clone); + // svuoto cache... + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:Template:*"); + await ExecFlushRedisPatternAsync((RedisValue)$"{redisBaseKey}:TemplateRows:*"); + sw.Stop(); + Log.Debug($"TemplateCloneAsync in {sw.Elapsed.TotalMilliseconds} ms"); + return fatto; + } + + /// + /// Elenco completo Template da DB + /// + /// + public async Task> TemplateGetAllAsync() + { + string source = "DB"; + Stopwatch sw = new Stopwatch(); + sw.Start(); + List? result = new List(); + // cerco in redis... + string currKey = $"{redisBaseKey}:Template:ALL"; + RedisValue rawData = await redisDb.StringGetAsync(currKey); + //if (!string.IsNullOrEmpty($"{rawData}")) + if (rawData.HasValue) + { + result = JsonConvert.DeserializeObject>($"{rawData}"); + source = "REDIS"; + } + else + { + result = await dbController.TemplateGetAllAsync(); + // serializzo e salvo con config x evitare loop... + rawData = JsonConvert.SerializeObject(result, JSSettings); + await redisDb.StringSetAsync(currKey, rawData, LongCache); + } + if (result == null) + { + result = new List(); + } + sw.Stop(); + Log.Debug($"TemplateGetAllAsync | {source} | {sw.Elapsed.TotalMilliseconds}ms"); + return result; + } + #endregion Public Methods +#if false + /// + /// Elenco record ProductionOdl Ready (NON Assegnati) + /// + /// + /// + public async Task> ProductionOdlUnassignAsync() + { + string source = "DB"; + Stopwatch sw = new Stopwatch(); + sw.Start(); + List? result = new List(); + // cerco in redis... + string currKey = $"{redisBaseKey}:ProdOdl:Unassigned"; + RedisValue rawData = await redisDb.StringGetAsync(currKey); + if (rawData.HasValue && rawData.Length() > 2) + { + result = JsonConvert.DeserializeObject>($"{rawData}"); + source = "REDIS"; + } + else + { + result = await dbController.ProductionOdlUnassignAsync(); + // serializzo e salvo con config x evitare loop... + rawData = JsonConvert.SerializeObject(result, JSSettings); + await redisDb.StringSetAsync(currKey, rawData, LongCache); + } + if (result == null) + { + result = new List(); + } + sw.Stop(); + Log.Debug($"ProductionOdlUnassignAsync | {source} | {sw.Elapsed.TotalMilliseconds}ms"); + return result; + } +#endif +#if false + public async Task> ProdAssignByOrderRow(int OrderRowID) + { + string source = "DB"; + Stopwatch sw = new Stopwatch(); + sw.Start(); + List? result = new List(); + // cerco in redis... + string currKey = $"{redisBaseKey}:ProdAssign:OrdRowId:{OrderRowID}"; + RedisValue rawData = await redisDb.StringGetAsync(currKey); + if (rawData.HasValue && rawData.Length() > 2) + { + result = JsonConvert.DeserializeObject>($"{rawData}"); + source = "REDIS"; + } + else + { + result = await dbController.ProdAssignByOrderRow(OrderRowID); + // serializzo e salvo con config x evitare loop... + rawData = JsonConvert.SerializeObject(result, JSSettings); + await redisDb.StringSetAsync(currKey, rawData, LongCache); + } + if (result == null) + { + result = new List(); + } + sw.Stop(); + Log.Debug($"ProdAssignByOrderRow | {source} | {sw.Elapsed.TotalMilliseconds}ms"); + return result; + } + + /// + /// Verifica ed eventualmente crea ProdAssign dato elenco macchine + /// + /// + /// + /// + public async Task> ProdAssignCheckExist(int OrderRowID, List ListPlant) + { + string source = "DB"; + Stopwatch sw = new Stopwatch(); + sw.Start(); + List? result = new List(); + // cerco in redis... + string currKey = $"{redisBaseKey}:ProdAssign:OrdRowId:{OrderRowID}"; + RedisValue rawData = await redisDb.StringGetAsync(currKey); + if (rawData.HasValue && rawData.Length() > 2) + { + result = JsonConvert.DeserializeObject>($"{rawData}"); + source = "REDIS"; + } + else + { + result = await dbController.ProdAssignCheckExist(OrderRowID, ListPlant); + // serializzo e salvo con config x evitare loop... + rawData = JsonConvert.SerializeObject(result, JSSettings); + await redisDb.StringSetAsync(currKey, rawData, LongCache); + } + if (result == null) + { + result = new List(); + } + sw.Stop(); + Log.Debug($"ProdAssignCheckExist | {source} | {sw.Elapsed.TotalMilliseconds}ms"); + return result; + } +#endif +#if false + /// + /// Recupero nuovo record BOM diretto dal DB + /// + /// + /// + public OfferRowModel? OfferRowGetByOfferRowID(int offerRowID) + { + string source = "DB"; + Stopwatch sw = new Stopwatch(); + sw.Start(); + OfferRowModel? result = null; + result = dbController.OfferRowGetByOfferRowID(offerRowID); + sw.Stop(); + Log.Debug($"OfferRowGetByOfferRowID | {source} | {sw.Elapsed.TotalMilliseconds}ms"); + return result; + } +#endif + #region Protected Fields /// diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index d3a25105..1dba8e24 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 1.1.2603.0512 + 1.1.2603.0516 diff --git a/Lux.UI/Components/Compo/Templates/TemplateList.razor b/Lux.UI/Components/Compo/Templates/TemplateList.razor index 8e833376..4c8d6a3f 100644 --- a/Lux.UI/Components/Compo/Templates/TemplateList.razor +++ b/Lux.UI/Components/Compo/Templates/TemplateList.razor @@ -1,5 +1,98 @@ -

TemplateListMan

- -@code { - +@if (isLoading) +{ + +} +else if (totalCount == 0) +{ +
+
+
+ Nessun record trovato +
+
+ +
+
+
+} +else +{ + + + + + + + + + + @if (SelRecord == null) + { + + } + + + + + + + + + @foreach (var item in ListRecords) + { + + + + + + + + @if (SelRecord == null) + { + + } + + + + + + + } + + @if (totalCount >= numRecord) + { + + + + + + } +
+ + IDDateStatoCodiceDescrizioneImportoMarg.
+ + + + @item.TemplateID + @*
@($"{item.Inserted:yyyy-MM-dd}")
+
@($"{item.ValidUntil:yyyy-MM-dd}")
*@ +
+ @* *@ + + @* @item.OfferCode *@ +
@item.Envir
+
@item.Description + @item.NumRows + + @item.NumItems + + @item.NumProdItems + +
@item.TotalPrice.ToString("C2")
+
(@item.TotalCost.ToString("C2"))
+
+ @item.MaxDiscount.ToString("P2") +
+ +
} diff --git a/Lux.UI/Components/Compo/Templates/TemplateList.razor.cs b/Lux.UI/Components/Compo/Templates/TemplateList.razor.cs new file mode 100644 index 00000000..0ba6dca2 --- /dev/null +++ b/Lux.UI/Components/Compo/Templates/TemplateList.razor.cs @@ -0,0 +1,152 @@ +using EgwCoreLib.Lux.Core; +using EgwCoreLib.Lux.Data.DbModel.Sales; +using EgwCoreLib.Lux.Data.Services; +using Microsoft.AspNetCore.Components; +using Microsoft.JSInterop; + +namespace Lux.UI.Components.Compo.Templates +{ + public partial class TemplateList + { + #region Public Properties + + /// + /// Modello dell'offerta corrente (bindato dal genitore). + /// + [Parameter] + public string SearchVal { get; set; } = string.Empty; + + #endregion Public Properties + + #region Protected Fields + + protected int totalCount = 0; + + #endregion Protected Fields + + #region Protected Properties + + /// + /// Servizi di accesso ai dati iniettati dal framework. + /// + [Inject] + protected DataLayerServices DLService { get; set; } = null!; + + [Inject] + protected IJSRuntime JSRuntime { get; set; } = null!; + + #endregion Protected Properties + + private EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS CurrEnvir = EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS.WINDOW; + private Enums.ItemSourceType CurrSourceType = Enums.ItemSourceType.Jwd; + + #region Protected Methods + + protected string CheckSelect(TemplateModel curRec) + { + string answ = ""; + if (SelRecord != null) + { + answ = curRec.TemplateID == SelRecord.TemplateID ? "table-info" : ""; + } + return answ; + } + + protected async Task DoClone(TemplateModel rec2clone) + { + if (!await JSRuntime.InvokeAsync("confirm", $"Confermi di voler duplicare interamente il template selezionato?{Environment.NewLine}---------------------------{Environment.NewLine}Env: {rec2clone.Envir} | {rec2clone.Name}{Environment.NewLine}{rec2clone.Description}{Environment.NewLine}Articoli: {rec2clone.NumItems}{Environment.NewLine}---------------------------{Environment.NewLine}Importo: {rec2clone.TotalPrice:C2}")) + return; + // clona intera offerta + tutte le righe... + await DLService.TemplateCloneAsync(rec2clone); + await ReloadData(); + UpdateTable(); + } + + protected void DoEdit(TemplateModel curRec) + { + EditRecord = curRec; + } + + protected void DoReset() + { + EditRecord = null; + SelRecord = null; + } + + protected void DoAdd() + { + DateTime adesso = DateTime.Now; + EditRecord = new TemplateModel() + { + Name = $"New Template {adesso.Year}", + Description = $"Nuovo Template {adesso:ddd yyyy.MM.dd HH:mm:ss}", + Envir = CurrEnvir, + SourceType = CurrSourceType + }; + } + + protected void DoSelect(TemplateModel curRec) + { + SelRecord = curRec; + } + + protected override async Task OnParametersSetAsync() + { + await ReloadData(); + UpdateTable(); + } + + protected async Task ReloadData() + { + AllRecords = await DLService.TemplateGetAllAsync(); + } + + protected void SaveNumRec(int newNum) + { + numRecord = newNum; + UpdateTable(); + } + + protected void SavePage(int newNum) + { + currPage = newNum; + UpdateTable(); + } + + protected void UpdateTable() + { + ListFilt.Clear(); + if (!string.IsNullOrEmpty(SearchVal)) + { + ListFilt = AllRecords + .Where(x => x.Name.Contains(SearchVal, StringComparison.InvariantCultureIgnoreCase) || x.Description.Contains(SearchVal, StringComparison.InvariantCultureIgnoreCase)) + .ToList(); + } + else + { + ListFilt = AllRecords; + } + totalCount = ListFilt.Count; + // gestione paginazione + ListFilt + .Skip(numRecord * (currPage - 1)) + .Take(numRecord) + .ToList(); + } + + #endregion Protected Methods + + #region Private Fields + + private List AllRecords = new List(); + private int currPage = 1; + private TemplateModel? EditRecord = null; + private bool isLoading = false; + private List ListFilt = new List(); + private List ListRecords = new List(); + private int numRecord = 10; + private TemplateModel? SelRecord = null; + + #endregion Private Fields + } +} \ No newline at end of file diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index d26a1b6a..b1fe9c8e 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 1.1.2603.0512 + 1.1.2603.0516 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 0322361c..8bab041f 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 1.1.2603.0512

+

Versione: 1.1.2603.0516


Note di rilascio:
  • diff --git a/Resources/VersNum.txt b/Resources/VersNum.txt index 7e6038a8..f55eca45 100644 --- a/Resources/VersNum.txt +++ b/Resources/VersNum.txt @@ -1 +1 @@ -1.1.2603.0512 +1.1.2603.0516 diff --git a/Resources/manifest.xml b/Resources/manifest.xml index 962613ea..5242f034 100644 --- a/Resources/manifest.xml +++ b/Resources/manifest.xml @@ -1,6 +1,6 @@ - 1.1.2603.0512 + 1.1.2603.0516 http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html false