ProvSuIscrizione
This commit is contained in:
@ -29,7 +29,9 @@ public class IscrizioneEvento : EntitaBase
|
|||||||
public string? Cognome{ get; set; }
|
public string? Cognome{ get; set; }
|
||||||
public string? Email { get; set; }
|
public string? Email { get; set; }
|
||||||
public string? NumeroTelefono { get; set; }
|
public string? NumeroTelefono { get; set; }
|
||||||
public string? Provincia { get; set; }
|
[ForeignKey(nameof(Provincia))]
|
||||||
|
public Guid? ProvinciaId { get; set; }
|
||||||
|
public ProvinciaIstat Provincia { get; set; }
|
||||||
public string? Comune { get; set; }
|
public string? Comune { get; set; }
|
||||||
public string? Cap { get; set; }
|
public string? Cap { get; set; }
|
||||||
public string? RagioneSociale { get; set; }
|
public string? RagioneSociale { get; set; }
|
||||||
|
|||||||
@ -18,7 +18,7 @@ public class StandManagerDbContext : OAServiceContext
|
|||||||
public DbSet<InvitoEvento> InvitoEvento { get; set; }
|
public DbSet<InvitoEvento> InvitoEvento { get; set; }
|
||||||
public DbSet<IscrizioneEvento> IscrizioneEvento { get; set; }
|
public DbSet<IscrizioneEvento> IscrizioneEvento { get; set; }
|
||||||
public DbSet<Permission> Permission { get; set; }
|
public DbSet<Permission> Permission { get; set; }
|
||||||
public DbSet<ProvinciaIstat> Provincie { get; set; }
|
public DbSet<ProvinciaIstat> Province { get; set; }
|
||||||
public DbSet<Referente> Referente { get; set; }
|
public DbSet<Referente> Referente { get; set; }
|
||||||
public DbSet<Ruolo> Ruolo { get; set; }
|
public DbSet<Ruolo> Ruolo { get; set; }
|
||||||
public DbSet<Sezione> Sezione { get; set; }
|
public DbSet<Sezione> Sezione { get; set; }
|
||||||
|
|||||||
1158
StandManager.Infrastructure/Migrations/20251222143554_ModificaProvSuIscrizione.Designer.cs
generated
Normal file
1158
StandManager.Infrastructure/Migrations/20251222143554_ModificaProvSuIscrizione.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,59 @@
|
|||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace StandManager.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class ModificaProvSuIscrizione : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Provincia",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "ProvinciaId",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
type: "uniqueidentifier",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_IscrizioneEvento_ProvinciaId",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
column: "ProvinciaId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_IscrizioneEvento_Provincie_ProvinciaId",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
column: "ProvinciaId",
|
||||||
|
principalTable: "Provincie",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_IscrizioneEvento_Provincie_ProvinciaId",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_IscrizioneEvento_ProvinciaId",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ProvinciaId",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Provincia",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
1158
StandManager.Infrastructure/Migrations/20251222143749_RinominataEntita.Designer.cs
generated
Normal file
1158
StandManager.Infrastructure/Migrations/20251222143749_RinominataEntita.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,130 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace StandManager.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class RinominataEntita : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_IscrizioneEvento_Provincie_ProvinciaId",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Provincie_Utente_IdUtenteCreazione",
|
||||||
|
table: "Provincie");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Provincie_Utente_IdUtenteModifica",
|
||||||
|
table: "Provincie");
|
||||||
|
|
||||||
|
migrationBuilder.DropPrimaryKey(
|
||||||
|
name: "PK_Provincie",
|
||||||
|
table: "Provincie");
|
||||||
|
|
||||||
|
migrationBuilder.RenameTable(
|
||||||
|
name: "Provincie",
|
||||||
|
newName: "Province");
|
||||||
|
|
||||||
|
migrationBuilder.RenameIndex(
|
||||||
|
name: "IX_Provincie_IdUtenteModifica",
|
||||||
|
table: "Province",
|
||||||
|
newName: "IX_Province_IdUtenteModifica");
|
||||||
|
|
||||||
|
migrationBuilder.RenameIndex(
|
||||||
|
name: "IX_Provincie_IdUtenteCreazione",
|
||||||
|
table: "Province",
|
||||||
|
newName: "IX_Province_IdUtenteCreazione");
|
||||||
|
|
||||||
|
migrationBuilder.AddPrimaryKey(
|
||||||
|
name: "PK_Province",
|
||||||
|
table: "Province",
|
||||||
|
column: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_IscrizioneEvento_Province_ProvinciaId",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
column: "ProvinciaId",
|
||||||
|
principalTable: "Province",
|
||||||
|
principalColumn: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Province_Utente_IdUtenteCreazione",
|
||||||
|
table: "Province",
|
||||||
|
column: "IdUtenteCreazione",
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Province_Utente_IdUtenteModifica",
|
||||||
|
table: "Province",
|
||||||
|
column: "IdUtenteModifica",
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_IscrizioneEvento_Province_ProvinciaId",
|
||||||
|
table: "IscrizioneEvento");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Province_Utente_IdUtenteCreazione",
|
||||||
|
table: "Province");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Province_Utente_IdUtenteModifica",
|
||||||
|
table: "Province");
|
||||||
|
|
||||||
|
migrationBuilder.DropPrimaryKey(
|
||||||
|
name: "PK_Province",
|
||||||
|
table: "Province");
|
||||||
|
|
||||||
|
migrationBuilder.RenameTable(
|
||||||
|
name: "Province",
|
||||||
|
newName: "Provincie");
|
||||||
|
|
||||||
|
migrationBuilder.RenameIndex(
|
||||||
|
name: "IX_Province_IdUtenteModifica",
|
||||||
|
table: "Provincie",
|
||||||
|
newName: "IX_Provincie_IdUtenteModifica");
|
||||||
|
|
||||||
|
migrationBuilder.RenameIndex(
|
||||||
|
name: "IX_Province_IdUtenteCreazione",
|
||||||
|
table: "Provincie",
|
||||||
|
newName: "IX_Provincie_IdUtenteCreazione");
|
||||||
|
|
||||||
|
migrationBuilder.AddPrimaryKey(
|
||||||
|
name: "PK_Provincie",
|
||||||
|
table: "Provincie",
|
||||||
|
column: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_IscrizioneEvento_Provincie_ProvinciaId",
|
||||||
|
table: "IscrizioneEvento",
|
||||||
|
column: "ProvinciaId",
|
||||||
|
principalTable: "Provincie",
|
||||||
|
principalColumn: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Provincie_Utente_IdUtenteCreazione",
|
||||||
|
table: "Provincie",
|
||||||
|
column: "IdUtenteCreazione",
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Provincie_Utente_IdUtenteModifica",
|
||||||
|
table: "Provincie",
|
||||||
|
column: "IdUtenteModifica",
|
||||||
|
principalTable: "Utente",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -452,8 +452,8 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
b.Property<string>("PartitaIva")
|
b.Property<string>("PartitaIva")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("Provincia")
|
b.Property<Guid?>("ProvinciaId")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<string>("RagioneSociale")
|
b.Property<string>("RagioneSociale")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
@ -481,6 +481,8 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
|
|
||||||
b.HasIndex("InvitoEventoId");
|
b.HasIndex("InvitoEventoId");
|
||||||
|
|
||||||
|
b.HasIndex("ProvinciaId");
|
||||||
|
|
||||||
b.HasIndex("TipologiaClienteId");
|
b.HasIndex("TipologiaClienteId");
|
||||||
|
|
||||||
b.ToTable("IscrizioneEvento");
|
b.ToTable("IscrizioneEvento");
|
||||||
@ -561,7 +563,7 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
|
|
||||||
b.HasIndex("IdUtenteModifica");
|
b.HasIndex("IdUtenteModifica");
|
||||||
|
|
||||||
b.ToTable("Provincie");
|
b.ToTable("Province");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("StandManager.Domain.Entita.Referente", b =>
|
modelBuilder.Entity("StandManager.Domain.Entita.Referente", b =>
|
||||||
@ -959,6 +961,10 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
.WithMany("IscrizioniEvento")
|
.WithMany("IscrizioniEvento")
|
||||||
.HasForeignKey("InvitoEventoId");
|
.HasForeignKey("InvitoEventoId");
|
||||||
|
|
||||||
|
b.HasOne("StandManager.Domain.Entita.ProvinciaIstat", "Provincia")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("ProvinciaId");
|
||||||
|
|
||||||
b.HasOne("StandManager.Domain.Entita.TipologiaCliente", "TipologiaCliente")
|
b.HasOne("StandManager.Domain.Entita.TipologiaCliente", "TipologiaCliente")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("TipologiaClienteId");
|
.HasForeignKey("TipologiaClienteId");
|
||||||
@ -971,6 +977,8 @@ namespace StandManager.Infrastructure.Migrations
|
|||||||
|
|
||||||
b.Navigation("InvitoEvento");
|
b.Navigation("InvitoEvento");
|
||||||
|
|
||||||
|
b.Navigation("Provincia");
|
||||||
|
|
||||||
b.Navigation("TipologiaCliente");
|
b.Navigation("TipologiaCliente");
|
||||||
|
|
||||||
b.Navigation("UtenteCreazione");
|
b.Navigation("UtenteCreazione");
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
public IInvitoEventoService InvitoEventoService{ get; set; }
|
public IInvitoEventoService InvitoEventoService{ get; set; }
|
||||||
public IIscrizioneEventoService IscrizioneEventoService{ get; set; }
|
public IIscrizioneEventoService IscrizioneEventoService{ get; set; }
|
||||||
public IPermissionService PermissionService{ get; set; }
|
public IPermissionService PermissionService{ get; set; }
|
||||||
|
public IProvinciaIstatService ProvinciaIstatService{ get; set; }
|
||||||
public IReferenteService ReferenteService{ get; set; }
|
public IReferenteService ReferenteService{ get; set; }
|
||||||
public IRuoloService RuoloService{ get; set; }
|
public IRuoloService RuoloService{ get; set; }
|
||||||
public ISezioneService SezioneService{ get; set; }
|
public ISezioneService SezioneService{ get; set; }
|
||||||
|
|||||||
@ -0,0 +1,6 @@
|
|||||||
|
using OAService.Service.Servizi.Interfacce;
|
||||||
|
using StandManager.Domain.Entita;
|
||||||
|
|
||||||
|
namespace StandManager.Service.Interfaces;
|
||||||
|
|
||||||
|
public interface IProvinciaIstatService : ITService<ProvinciaIstat> {}
|
||||||
@ -3,4 +3,4 @@ using StandManager.Domain.Entita;
|
|||||||
|
|
||||||
namespace StandManager.Service.Interfaces;
|
namespace StandManager.Service.Interfaces;
|
||||||
|
|
||||||
public interface ITipologiaClienteService : ITService<TipologiaCliente> {}
|
public interface ITipologiaClienteService : ITService<TipologiaCliente> {}
|
||||||
@ -4,9 +4,10 @@ namespace StandManager.Service;
|
|||||||
|
|
||||||
public class ManagerService : IManagerService
|
public class ManagerService : IManagerService
|
||||||
{
|
{
|
||||||
public ManagerService(IUtenteService utenteService, IClienteService clienteService, IComuneIstatService comuneIstatService, IDestinazioneService destinazioneService, IEventoService eventoService,
|
public ManagerService(IUtenteService utenteService, IClienteService clienteService, IComuneIstatService comuneIstatService, IDestinazioneService destinazioneService,
|
||||||
IInvitoEventoService invitoEventoService, IIscrizioneEventoService iscrizioneEventoService, IReferenteService referenteService,
|
IEventoService eventoService, IInvitoEventoService invitoEventoService, IIscrizioneEventoService iscrizioneEventoService, IReferenteService referenteService,
|
||||||
ITipologiaClienteService tipologiaClienteService, IFeatureService featureService, IPermissionService permissionService, IRuoloService ruoloService, ISezioneService sezioneService)
|
ITipologiaClienteService tipologiaClienteService, IFeatureService featureService, IPermissionService permissionService, IRuoloService ruoloService,
|
||||||
|
ISezioneService sezioneService, IProvinciaIstatService provinciaIstatService)
|
||||||
{
|
{
|
||||||
UtenteService = utenteService;
|
UtenteService = utenteService;
|
||||||
ClienteService = clienteService;
|
ClienteService = clienteService;
|
||||||
@ -21,6 +22,7 @@ public class ManagerService : IManagerService
|
|||||||
PermissionService = permissionService;
|
PermissionService = permissionService;
|
||||||
RuoloService = ruoloService;
|
RuoloService = ruoloService;
|
||||||
SezioneService = sezioneService;
|
SezioneService = sezioneService;
|
||||||
|
ProvinciaIstatService = provinciaIstatService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IUtenteService UtenteService { get; set; }
|
public IUtenteService UtenteService { get; set; }
|
||||||
@ -31,6 +33,7 @@ public class ManagerService : IManagerService
|
|||||||
public IInvitoEventoService InvitoEventoService{ get; set; }
|
public IInvitoEventoService InvitoEventoService{ get; set; }
|
||||||
public IIscrizioneEventoService IscrizioneEventoService { get; set; }
|
public IIscrizioneEventoService IscrizioneEventoService { get; set; }
|
||||||
public IPermissionService PermissionService { get; set; }
|
public IPermissionService PermissionService { get; set; }
|
||||||
|
public IProvinciaIstatService ProvinciaIstatService { get; set; }
|
||||||
public IReferenteService ReferenteService { get; set; }
|
public IReferenteService ReferenteService { get; set; }
|
||||||
public IRuoloService RuoloService { get; set; }
|
public IRuoloService RuoloService { get; set; }
|
||||||
public ISezioneService SezioneService { get; set; }
|
public ISezioneService SezioneService { get; set; }
|
||||||
|
|||||||
16
StandManager.Service/ProvinciaIstatService.cs
Normal file
16
StandManager.Service/ProvinciaIstatService.cs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
using OAService.Service.Servizi.Implementazioni;
|
||||||
|
using StandManager.Domain.Entita;
|
||||||
|
using StandManager.Service.Interfaces;
|
||||||
|
using StandManager.Service.Repository;
|
||||||
|
|
||||||
|
namespace StandManager.Service;
|
||||||
|
|
||||||
|
public class ProvinciaIstatService : TService<ProvinciaIstat>, IProvinciaIstatService
|
||||||
|
{
|
||||||
|
private readonly IStandManagerUnitOfWork _unitOfWork;
|
||||||
|
|
||||||
|
public ProvinciaIstatService(IStandManagerUnitOfWork unitOfWork) : base(unitOfWork)
|
||||||
|
{
|
||||||
|
_unitOfWork = unitOfWork;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -38,8 +38,8 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4 mb-3">
|
<div class="col-4 mb-3">
|
||||||
<RadzenFormField Text="Provincia" Variant="Variant.Flat" Style="width: 100%;">
|
<RadzenFormField Text="Provincia" Variant="Variant.Flat" Style="width: 100%;">
|
||||||
<RadzenDropDown @bind-Value="@iscrizione.Provincia" Style="width: 100%" TextProperty="" Placeholder="Seleziona la provincia"
|
<RadzenDropDown TValue="Guid" @bind-Value="@iscrizione.Provincia" Style="width: 100%" TextProperty="Info" ValueProperty="Id" Placeholder="Seleziona la provincia"
|
||||||
Data="@provinciaList" Size="ButtonSize.Small" />
|
Data="@provList" Size="ButtonSize.Small" />
|
||||||
</RadzenFormField>
|
</RadzenFormField>
|
||||||
<ValidationMessage For="@(() => iscrizione.Provincia)" />
|
<ValidationMessage For="@(() => iscrizione.Provincia)" />
|
||||||
</div>
|
</div>
|
||||||
@ -155,11 +155,12 @@
|
|||||||
[SupplyParameterFromForm]
|
[SupplyParameterFromForm]
|
||||||
private IscrizioneEventoViewModel iscrizione { get; set; } = new();
|
private IscrizioneEventoViewModel iscrizione { get; set; } = new();
|
||||||
private IEnumerable<string> comuneList { get; set; }
|
private IEnumerable<string> comuneList { get; set; }
|
||||||
private IEnumerable<string> provinciaList { get; set; }
|
|
||||||
private IEnumerable<DestinazioneViewModel> destinazioniList { get; set; }
|
private IEnumerable<DestinazioneViewModel> destinazioniList { get; set; }
|
||||||
private IEnumerable<LookupViewModel<Guid>> tipologiaList { get; set; }
|
private IEnumerable<LookupViewModel<Guid>> tipologiaList { get; set; }
|
||||||
private IEnumerable<string> esperienzaList { get; set; }
|
private IEnumerable<string> esperienzaList { get; set; }
|
||||||
private IEnumerable<LookupViewModel<int>> ruoloList { get; set; }
|
private IEnumerable<LookupViewModel<int>> ruoloList { get; set; }
|
||||||
|
|
||||||
|
private List<ProvinciaViewModel> provList { get; set; }
|
||||||
|
|
||||||
private bool presaVisionePrivacy { get; set; }
|
private bool presaVisionePrivacy { get; set; }
|
||||||
private bool presaVisioneDatiPersonali { get; set; }
|
private bool presaVisioneDatiPersonali { get; set; }
|
||||||
@ -172,11 +173,14 @@
|
|||||||
var destinazioniIds = invito.IscrizioniEvento?.Select(x => x.DestinazioneId).ToList() ?? new List<Guid?>();
|
var destinazioniIds = invito.IscrizioniEvento?.Select(x => x.DestinazioneId).ToList() ?? new List<Guid?>();
|
||||||
destinazioniList = (await _managerService.DestinazioneService.RicercaQueryable(filtro: x => x.ClienteId == invito.ClienteId && !destinazioniIds.Any(y => y == x.Id))).Select(x => (DestinazioneViewModel)x).ToList();
|
destinazioniList = (await _managerService.DestinazioneService.RicercaQueryable(filtro: x => x.ClienteId == invito.ClienteId && !destinazioniIds.Any(y => y == x.Id))).Select(x => (DestinazioneViewModel)x).ToList();
|
||||||
comuneList = new List<string>() { "Brescia" };
|
comuneList = new List<string>() { "Brescia" };
|
||||||
provinciaList = new List<string>() { "BS" };
|
|
||||||
esperienzaList = new List<string>() { "Si", "No" };
|
esperienzaList = new List<string>() { "Si", "No" };
|
||||||
tipologiaList = (await _managerService.TipologiaClienteService.RicercaQueryable(x => x.Eliminato == false, ordinamento: x => x.OrderBy(y => y.Nome)))
|
tipologiaList = (await _managerService.TipologiaClienteService.RicercaQueryable(x => x.Eliminato == false, ordinamento: x => x.OrderBy(y => y.Nome)))
|
||||||
.Select(x => new LookupViewModel<Guid>(x.Id, x.Nome)).ToList();
|
.Select(x => new LookupViewModel<Guid>(x.Id, x.Nome)).ToList();
|
||||||
ruoloList = eUtils.GetEnumList<RuoloTipo>();
|
ruoloList = eUtils.GetEnumList<RuoloTipo>();
|
||||||
|
provList = (await _managerService.ProvinciaIstatService.RicercaQueryable(
|
||||||
|
x => x.Eliminato == false,
|
||||||
|
ordinamento: x => x.OrderBy(y => y.Provincia)))
|
||||||
|
.Select(x => (ProvinciaViewModel)x).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task onIscrizioneSave()
|
private async Task onIscrizioneSave()
|
||||||
|
|||||||
@ -26,7 +26,7 @@ public class IscrizioneEventoViewModel
|
|||||||
[Required(ErrorMessage = "Il numero di telefono è obbigatorio")]
|
[Required(ErrorMessage = "Il numero di telefono è obbigatorio")]
|
||||||
public string NumeroTelefono { get; set; }
|
public string NumeroTelefono { get; set; }
|
||||||
[Required(ErrorMessage = "La provincia è obbigatoria")]
|
[Required(ErrorMessage = "La provincia è obbigatoria")]
|
||||||
public string Provincia { get; set; }
|
public Guid Provincia { get; set; }
|
||||||
[Required(ErrorMessage = "Il comune è obbigatorio")]
|
[Required(ErrorMessage = "Il comune è obbigatorio")]
|
||||||
public string Comune { get; set; }
|
public string Comune { get; set; }
|
||||||
[Required(ErrorMessage = "Il CAP è obbigatorio")]
|
[Required(ErrorMessage = "Il CAP è obbigatorio")]
|
||||||
@ -54,7 +54,7 @@ public class IscrizioneEventoViewModel
|
|||||||
model.Cognome = Cognome;
|
model.Cognome = Cognome;
|
||||||
model.Email = Email;
|
model.Email = Email;
|
||||||
model.NumeroTelefono = NumeroTelefono;
|
model.NumeroTelefono = NumeroTelefono;
|
||||||
model.Provincia = Provincia;
|
/*model.Provincia = Provincia;*/
|
||||||
model.Comune = Comune;
|
model.Comune = Comune;
|
||||||
model.Cap = Cap;
|
model.Cap = Cap;
|
||||||
model.RagioneSociale = RagioneSociale;
|
model.RagioneSociale = RagioneSociale;
|
||||||
@ -83,7 +83,7 @@ public class IscrizioneEventoViewModel
|
|||||||
Cognome = model.Cognome,
|
Cognome = model.Cognome,
|
||||||
Email = model.Email,
|
Email = model.Email,
|
||||||
NumeroTelefono = model.NumeroTelefono,
|
NumeroTelefono = model.NumeroTelefono,
|
||||||
Provincia = model.Provincia,
|
Provincia = model.Provincia?.Id ?? Guid.Empty,
|
||||||
Comune = model.Comune,
|
Comune = model.Comune,
|
||||||
Cap = model.Cap,
|
Cap = model.Cap,
|
||||||
RagioneSociale = model.RagioneSociale,
|
RagioneSociale = model.RagioneSociale,
|
||||||
|
|||||||
@ -1,8 +1,23 @@
|
|||||||
namespace StandManager.Model;
|
using StandManager.Domain.Entita;
|
||||||
|
|
||||||
|
namespace StandManager.Model;
|
||||||
|
|
||||||
public class ProvinciaViewModel
|
public class ProvinciaViewModel
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public string Sigla { get; set; }
|
public string Sigla { get; set; }
|
||||||
public string Provincia { get; set; }
|
public string Provincia { get; set; }
|
||||||
|
public string Info => $"{Sigla} - {Provincia}";
|
||||||
|
|
||||||
|
public static implicit operator ProvinciaViewModel(ProvinciaIstat model)
|
||||||
|
{
|
||||||
|
return model == null
|
||||||
|
? null
|
||||||
|
: new ProvinciaViewModel()
|
||||||
|
{
|
||||||
|
Provincia = model.Provincia,
|
||||||
|
Sigla = model.Sigla,
|
||||||
|
Id = model.Id
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user