Merge branch 'release/FixFiltroCliNegotiations01'

This commit is contained in:
Samuele Locatelli
2024-02-12 15:14:33 +01:00
14 changed files with 1909 additions and 37 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>2.0.2402.1012</Version>
<Version>2.0.2402.1215</Version>
<Copyright>Egalware 2021+</Copyright>
</PropertyGroup>
+1 -1
View File
@@ -11,7 +11,7 @@
"ConnectionStrings": {
"Redis": "localhost:6379,DefaultDatabase=5,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
"Sherpa.Anagr": "Data Source=W2019-SQL-STEAM;Initial Catalog=SteamWare_Anagrafica;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;",
//"Sherpa.Fatt": "Data Source=SQL2016DEV;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
//"Sherpa.Fatt": "Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.Fatt_DEV;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
"Sherpa.Fatt": "Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
},
@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SHERPA.BBM.CORE.DbModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
/// <summary>
/// Tabella dei tipi di Items/Risorsa (upgrade da enum)
/// </summary>
[Table("ResType")]
public partial class ItemResTypeModel
{
[Key, Column("ResTypeId"), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int ResTypeId { get; set; }
[Column("Name"), MaxLength(250)]
public string Name { get; set; } = "ND";
}
}
+51
View File
@@ -0,0 +1,51 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using SHERPA.BBM.CORE.DbModels;
namespace SHERPA.BBM.CORE
{
public class ItemResTypeConfig : IEntityTypeConfiguration<ItemResTypeModel>
{
#region Public Methods
public void Configure(EntityTypeBuilder<ItemResTypeModel> builder)
{
//// sistemo identity
//builder.Property(prop => prop.NegotTypeId)
// .UseIdentityColumn(1, 1);
builder.Property(prop => prop.ResTypeId)
.ValueGeneratedOnAdd();
// Default seeded users
builder.HasData(
seedRecord(-1,"ND"),
seedRecord(1, "HR"),
seedRecord(2, "License"),
seedRecord(3, "HW"),
seedRecord(4, "Service"),
seedRecord(5, "Lic_CMS"),
seedRecord(6, "Lic_ESSETRE"),
seedRecord(7, "Lic_MULTIAX"),
seedRecord(8, "Lic_OMAG"),
seedRecord(9, "Lic_SAOMAD"),
seedRecord(10, "Lic_MES")
);
}
#endregion Public Methods
#region Protected Methods
protected ItemResTypeModel seedRecord(int id, string name)
{
var newRec = new ItemResTypeModel()
{
ResTypeId = id,
Name = name };
return newRec;
}
#endregion Protected Methods
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,31 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SHERPA.BBM.CORE.Migrations
{
public partial class AddItemResTypeModel : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ResType",
columns: table => new
{
ResTypeId = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ResType", x => x.ResTypeId);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ResType");
}
}
}
@@ -56,7 +56,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("OrdId");
b.ToTable("AccMov", (string)null);
b.ToTable("AccMov");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.BasketsModel", b =>
@@ -102,7 +102,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("CompanyId");
b.ToTable("Baskets", (string)null);
b.ToTable("Baskets");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.BillingExtModel", b =>
@@ -187,7 +187,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("CustExtId");
b.ToTable("BillingExt", (string)null);
b.ToTable("BillingExt");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.BillingModel", b =>
@@ -237,7 +237,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("OrdId");
b.ToTable("Billing", (string)null);
b.ToTable("Billing");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.CompanyModel", b =>
@@ -261,7 +261,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasKey("CompanyId");
b.ToTable("Company", (string)null);
b.ToTable("Company");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.CustDecodModel", b =>
@@ -293,7 +293,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasKey("CustExtId");
b.ToTable("CustDecod", (string)null);
b.ToTable("CustDecod");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.CustomersModel", b =>
@@ -328,7 +328,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasKey("CustomerId");
b.ToTable("Customers", (string)null);
b.ToTable("Customers");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.DocsModel", b =>
@@ -396,7 +396,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("NegotiationId");
b.ToTable("Docs", (string)null);
b.ToTable("Docs");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.Fatt2DocModel", b =>
@@ -440,7 +440,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("DocId");
b.ToTable("Fatt2Doc", (string)null);
b.ToTable("Fatt2Doc");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.FluxCountersModel", b =>
@@ -456,7 +456,26 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasKey("CodCounter");
b.ToTable("FluxCounters", (string)null);
b.ToTable("FluxCounters");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.ItemResTypeModel", b =>
{
b.Property<int>("ResTypeId")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("ResTypeId");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ResTypeId"), 1L, 1);
b.Property<string>("Name")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)")
.HasColumnName("Name");
b.HasKey("ResTypeId");
b.ToTable("ResType");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.ItemsModel", b =>
@@ -493,7 +512,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasKey("ItemId");
b.ToTable("Items", (string)null);
b.ToTable("Items");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.MTypeModel", b =>
@@ -510,7 +529,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasKey("CodMType");
b.ToTable("MTypeModel", (string)null);
b.ToTable("MTypeModel");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.NegotiationsModel", b =>
@@ -558,7 +577,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("CustomerId");
b.ToTable("Negotiations", (string)null);
b.ToTable("Negotiations");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.NegotTypeModel", b =>
@@ -590,7 +609,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasKey("NegotTypeId");
b.ToTable("NegotType", (string)null);
b.ToTable("NegotType");
b.HasData(
new
@@ -703,7 +722,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("NegotiationId");
b.ToTable("Orders", (string)null);
b.ToTable("Orders");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.OrderResModel", b =>
@@ -757,7 +776,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("OrdId");
b.ToTable("OrderRes", (string)null);
b.ToTable("OrderRes");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.ResourcesModel", b =>
@@ -811,7 +830,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("ItemId");
b.ToTable("Resources", (string)null);
b.ToTable("Resources");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.TagItemModel", b =>
@@ -829,7 +848,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasIndex("TagId");
b.ToTable("Tag2Item", (string)null);
b.ToTable("Tag2Item");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.TagModel", b =>
@@ -857,7 +876,7 @@ namespace SHERPA.BBM.CORE.Migrations
b.HasKey("TagId");
b.ToTable("Tags", (string)null);
b.ToTable("Tags");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.vBasketsDataModel", b =>
@@ -1148,11 +1167,131 @@ namespace SHERPA.BBM.CORE.Migrations
.HasColumnType("decimal(18,6)")
.HasColumnName("Ordinato");
b.Property<string>("RagSoc")
.HasColumnType("nvarchar(max)")
.HasColumnName("RagSoc");
b.HasKey("NegotiationId");
b.ToView("v_NegotData");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.vOrderDataModel", b =>
{
b.Property<int>("OrdId")
.HasColumnType("int")
.HasColumnName("OrdId")
.HasColumnOrder(0);
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrdId"), 1L, 1);
b.Property<decimal>("AmountTot")
.HasPrecision(18, 6)
.HasColumnType("decimal(18,6)")
.HasColumnName("AmountTot");
b.Property<string>("BaskDescript")
.HasColumnType("nvarchar(max)")
.HasColumnName("BaskDescript");
b.Property<int>("BasketId")
.HasColumnType("int")
.HasColumnName("BasketId");
b.Property<decimal>("BillTot")
.HasPrecision(18, 6)
.HasColumnType("decimal(18,6)")
.HasColumnName("BillTot");
b.Property<string>("CodBasket")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasColumnName("CodBasket");
b.Property<string>("CodDoc")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasColumnName("CodDoc");
b.Property<string>("CodMType")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasColumnName("CodMType");
b.Property<string>("CodNegotiation")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)")
.HasColumnName("CodNegotiation");
b.Property<int>("CustomerId")
.HasColumnType("int")
.HasColumnName("CustomerId");
b.Property<DateTime>("DateIns")
.HasColumnType("datetime2")
.HasColumnName("DateIns");
b.Property<string>("Descript")
.HasMaxLength(250)
.HasColumnType("nvarchar(250)")
.HasColumnName("Descript");
b.Property<int>("DocId")
.HasColumnType("int")
.HasColumnName("DocId");
b.Property<bool>("HasBill")
.HasColumnType("bit")
.HasColumnName("HasBill");
b.Property<bool>("MovOpen")
.HasColumnType("bit")
.HasColumnName("MovOpen");
b.Property<string>("NegotDescript")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)")
.HasColumnName("NegotDescript");
b.Property<int>("NegotiationId")
.HasColumnType("int")
.HasColumnName("NegotiationId");
b.Property<string>("Note")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)")
.HasColumnName("Note");
b.Property<int>("Num")
.HasColumnType("int")
.HasColumnName("Num");
b.Property<int>("OrdStatus")
.HasColumnType("int")
.HasColumnName("OrdStatus");
b.Property<int>("OrdType")
.HasColumnType("int")
.HasColumnName("OrdType");
b.Property<decimal>("PaidTot")
.HasPrecision(18, 6)
.HasColumnType("decimal(18,6)")
.HasColumnName("PaidTot");
b.Property<string>("RagSoc")
.HasColumnType("nvarchar(max)")
.HasColumnName("RagSoc");
b.Property<int>("YearRef")
.HasColumnType("int")
.HasColumnName("YearRef");
b.HasKey("OrdId");
b.ToView("v_OrderData");
});
modelBuilder.Entity("SHERPA.BBM.CORE.DbModels.vTrendDataModel", b =>
{
b.Property<int>("YearRef")
+2 -4
View File
@@ -64,6 +64,7 @@ namespace SHERPA.BBM.CORE
public virtual DbSet<vYearDataModel> DbSetYearData { get; set; } = null!;
public virtual DbSet<vDocsDataModel> DbSetDocsData { get; set; } = null!;
public virtual DbSet<vOrderDataModel> DbSetOrderData { get; set; } = null!;
public virtual DbSet<ItemResTypeModel> DbSetItemResType { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
@@ -81,9 +82,6 @@ namespace SHERPA.BBM.CORE
// PROD
//optionsBuilder.UseSqlServer("Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.BBM;Trusted_Connection=True;");
// DEV 2016
//optionsBuilder.UseSqlServer("Data Source=SQL2016DEV;Initial Catalog=SHERPA.BBM;Trusted_Connection=True;");
}
}
}
@@ -321,7 +319,7 @@ namespace SHERPA.BBM.CORE
if (!disableMigrate)
{
modelBuilder.ApplyConfiguration(new NegotConfig());
//modelBuilder.ApplyConfiguration(new ItemResTypeConfig());
}
OnModelCreatingPartial(modelBuilder);
+13 -6
View File
@@ -11,7 +11,17 @@ namespace SHERPA.BBM.UI.Components
public int AnnoSel { get; set; } = 0;
[Parameter]
public int CustomerId { get; set; } = 0;
public int CustomerId
{
get => custId;
set
{
custId = value;
// condiziono visualizzazione...
var pUpd = Task.Run(async () => await ReloadAllData());
pUpd.Wait();
}
}
[Parameter]
public EventCallback<int> MoveRequested { get; set; }
@@ -19,11 +29,7 @@ namespace SHERPA.BBM.UI.Components
[Parameter]
public int BaskIdSour
{
get
{
return baskIdSour;
}
get => baskIdSour;
set
{
baskIdSour = value;
@@ -152,6 +158,7 @@ namespace SHERPA.BBM.UI.Components
#region Private Properties
private int custId { get; set; } = 0;
private int baskIdSour { get; set; } = 0;
private int currPage { get; set; } = 1;
@@ -194,6 +194,8 @@ namespace SHERPA.BBM.UI.Components
{
itemsList = rawItems;
}
// ordino x importo
itemsList = itemsList.OrderByDescending(x => x.UnitPrice).ToList();
}
#endregion Protected Methods
+2 -2
View File
@@ -89,7 +89,7 @@
</div>
</div>
</div>
<NegotMovList AnnoSel="@YearSel" BaskIdSour="@SelBasketIdSx" MoveRequested="moveRight"></NegotMovList>
<NegotMovList AnnoSel="@YearSel" BaskIdSour="@SelBasketIdSx" MoveRequested="moveRight" CustomerId="SelCustomerIdSx"></NegotMovList>
</div>
<div class="col-6">
<div class="d-flex flex-column small">
@@ -140,7 +140,7 @@
</div>
</div>
</div>
<NegotMovList AnnoSel="@YearSel" BaskIdSour="@SelBasketIdDx" MoveRequested="moveLeft"></NegotMovList>
<NegotMovList AnnoSel="@YearSel" BaskIdSour="@SelBasketIdDx" MoveRequested="moveLeft" CustomerId="SelCustomerIdDx"></NegotMovList>
</div>
</div>
}
-1
View File
@@ -172,7 +172,6 @@ namespace SHERPA.BBM.UI.Pages
{
return _dxCustId;
}
set
{
_dxCustId = value;
+1 -1
View File
@@ -4,7 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
<UserSecretsId>60fcdaab-6c1e-4bec-9d88-f7727ef1c12c</UserSecretsId>
<ApplicationIcon>wwwroot\favicon.ico</ApplicationIcon>
<Version>2.0.2402.1210</Version>
<Version>2.0.2402.1215</Version>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Copyright>Egalware 2021+</Copyright>
-2
View File
@@ -12,8 +12,6 @@
"ConnectionStrings": {
"Redis": "localhost:6379,DefaultDatabase=5,connectTimeout=5000,syncTimeout=5000,asyncTimeout=5000,abortConnect=false,ssl=false",
"Sherpa.Anagr": "Data Source=W2019-SQL-STEAM;Initial Catalog=SteamWare_Anagrafica;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;",
//"Sherpa.BBM": "Data Source=SQL2016DEV;Initial Catalog=SHERPA.BBM;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;",
//"Sherpa.Fatt": "Data Source=SQL2016DEV;Initial Catalog=SHERPA.Fatt;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"
//"Sherpa.BBM": "Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.BBM_DEV;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;",
//"Sherpa.Fatt": "Data Source=W2019-SQL-STEAM;Initial Catalog=SHERPA.Fatt_DEV;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=Sherpa.BBM;"