MICHELE: progresivi + models vincoli lunghezza

This commit is contained in:
michele 2023-11-21 10:28:06 +01:00
parent 92eca245f8
commit 8dfbad66ab
11 changed files with 66 additions and 11 deletions

View File

@ -370,6 +370,7 @@ namespace VirtualTask.Controllers
#endregion DELETE
#region metodi interni
private List<SelectListItem> getImpianti()
{
SessionHelper helper = new SessionHelper(this);
@ -574,9 +575,6 @@ namespace VirtualTask.Controllers
return numero;
}
#endregion
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
@ -584,5 +582,7 @@ namespace VirtualTask.Controllers
string e = helper.GetStringValue("errMsg");
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier, ErrMsg = e });
}
#endregion
}
}

View File

@ -18,34 +18,42 @@ namespace VirtualTask.Models
public string? ancodazi { get; set; }
[Display(Name = "EMAIL")]
[StringLength(254)]
/// <summary>email</summary>
public string? an_email { get; set; }
[Display(Name = "CODICE FISCALE")]
[StringLength(16)]
/// <summary>codice fiscale</summary>
public string? ancodfis { get; set; }
[Display(Name = "PARTITA IVA")]
[StringLength(12)]
/// <summary>partita iva</summary>
public string? anpariva { get; set; }
[Display(Name = "INDIRIZZO")]
[StringLength(35)]
/// <summary>indirizzo</summary>
public string? anindiri { get; set; }
[Display(Name = "TELEFONO")]
[StringLength(36)]
/// <summary>telefono</summary>
public string? antelefo { get; set; }
[Display(Name = "CELLULARE")]
[StringLength(36)]
/// <summary>cellulare</summary>
public string? annumcel { get; set; }
[Display(Name = "PEC")]
[StringLength(254)]
/// <summary>pec</summary>
public string? an_empec { get; set; }
[Display(Name = "RAGIONE SOCIALE"), Required(ErrorMessage = "Ragione sociale obbligatoria")]
[StringLength(60)]
/// <summary>descrizione </summary>
public string? andescri { get; set; }

View File

@ -1,4 +1,6 @@
namespace VirtualTask.Models
using System.ComponentModel.DataAnnotations;
namespace VirtualTask.Models
{
public class AziendaRif
{
@ -11,9 +13,11 @@
/// <summary>tecnico</summary>
public string? pirifazi { get; set; }
[StringLength(50)]
/// <summary>Nome azienda collegata</summary>
public string? pinomede { get; set; }
[StringLength(254)]
/// <summary>url logo</summary>
public string? pilogurl { get; set; }

View File

@ -35,6 +35,7 @@ namespace VirtualTask.Models
public string? chrifer { get; set; }
[Display(Name = "TELEFONO")]
[StringLength(18)]
public string? chtelef { get; set; }
[Display(Name = "COD. SEGNALAZIONE")]

View File

@ -9,9 +9,12 @@ namespace VirtualTask.Models
[Display(Name = "AZIENDA")]
public string? cccodazi { get; set; }
[StringLength(15)]
[Display(Name = "CODICE"), Required(ErrorMessage = "Inserire codice chiamata")]
public string? cccodice { get; set; }
[StringLength(50)]
[Display(Name = "DESCRIZIONE"), Required(ErrorMessage = "Inserire descrizione")]
public string? ccdescr { get; set; }

View File

@ -5,7 +5,9 @@ namespace VirtualTask.Models
{
public class Impianto
{
[Display(Name = "Codice Impianto"), Required(ErrorMessage = "Inserire codice impianto")]
[StringLength(10)]
/// <summary>Codice Impianto</summary>
public string? imcodimp { get; set; }
@ -14,15 +16,18 @@ namespace VirtualTask.Models
public string? imcodazi { get; set; }
[Display(Name = "Descrizione"), Required(ErrorMessage = "Inserire descrizione")]
[StringLength(40)]
/// <summary>Descrizione Impianto</summary>
public string? imdescri { get; set; }
/// <summary>Tipo indirizzo (Via, piazza..)</summary>
[Display(Name = "Via,piazza,..")]
[StringLength(10)]
public string? imindiri1 { get; set; }
/// <summary> indirizzo </summary>
[Display(Name = "Indirizzo")]
[StringLength(30)]
public string? imindiri2 { get; set; }
/// <summary> numero civico </summary>
@ -31,26 +36,33 @@ namespace VirtualTask.Models
/// <summary> sottonumero </summary>
[Display(Name = "Interno")]
[StringLength(4)]
public string? imindiri4 { get; set; }
/// <summary>scala</summary>
[Display(Name = "Scala")]
[StringLength(3)]
public string? imindiri5 { get; set; }
/// <summary> localita </summary>
[Display(Name = "Località")]
[StringLength(30)]
public string? imlocali { get; set; }
/// <summary> Cap </summary>
[Display(Name = "Cap")]
[StringLength(5)]
public string? imcodcap { get; set; }
/// <summary> Comune </summary>
[Display(Name = "Comune")]
[StringLength(20)]
public string? imcomune { get; set; }
/// <summary> Provincia </summary>
[Display(Name = "Provincia")]
[StringLength(2)]
public string? improvin { get; set; }
[Display(Name = "Cliente")]

View File

@ -1,10 +1,14 @@
namespace VirtualTask.Models
using System.ComponentModel.DataAnnotations;
namespace VirtualTask.Models
{
public class Progressivo
{
[StringLength(5)]
/// <summary>Azienda</summary>
public string? azienda { get; set; }
[StringLength(10)]
/// <summary>stringa definisce il tipo di progressivo da gestire</summary>
public string? tipo_prog { get; set; }

View File

@ -17,6 +17,7 @@ namespace VirtualTask.Models
public string? azienda_impianto { get; set; }
[Display(Name = "CODICE IMPIANTO"), Required(ErrorMessage = "Inserisci codice impianto")]
[StringLength(10)]
public string? codice_impianto { get; set; }
[Display(Name = "AZ. CHIAMATA")]
@ -32,15 +33,19 @@ namespace VirtualTask.Models
public DateTime data_rapportino { get; set; }
[Display(Name = "ORA INIZIO")]
[StringLength(2)]
public string? ora_ini_rapportino { get; set; }
[StringLength(2)]
[Display(Name = "MINUTO INIZIO")]
public string? min_ini_rapportino { get; set; }
[Display(Name = "ORA FINE")]
[StringLength(2)]
public string? ora_fin_rapportino { get; set; }
[Display(Name = "MINUTO FINE")]
[StringLength(2)]
public string? min_fin_rapportino { get; set; }
[Display(Name = "CODICE CHIUSURA 1")]
@ -119,18 +124,21 @@ namespace VirtualTask.Models
public string? lavoro_eseguito { get; set; }
[Display(Name = "ESITO")]
[StringLength(1)]
public string? esito_intervento { get; set; }
[Display(Name = "NOTE")]
public string? note_intervento { get; set; }
[Display(Name = "NUOVO CONTRATTO")]
[StringLength(2)]
public string? nuovo_contratto { get; set; }
[Display(Name = "ORE LAVORO")]
public double? ore_lavoro { get; set; }
[Display(Name = "CAUSALE")]
[StringLength(5)]
public string? causale { get; set; }
[Display(Name = "MATERIALE")]
@ -146,6 +154,7 @@ namespace VirtualTask.Models
public double? spese_viaggio { get; set; }
[Display(Name = "PAGAMENTO")]
[StringLength(20)]
public string? pagamento { get; set; }
[Display(Name = "ANTICIPO")]

View File

@ -8,18 +8,23 @@ namespace VirtualTask.Models
public int id { get; set; }
[Display(Name = "Nome"), Required(ErrorMessage = "Nome obbligatorio")]
[StringLength(50)]
public string? nome { get; set; }
[Display(Name = "Cognome"), Required(ErrorMessage = "Cognome obbligatorio")]
[StringLength(50)]
public string? cognome { get; set; }
[Display(Name = "Telefono"), Required(ErrorMessage = "Telefono obbligatorio")]
[StringLength(50)]
public string? telefono { get; set;}
[Display(Name = "Cellulare"), Required(ErrorMessage = "Cellulare obbligatorio")]
[StringLength(50)]
public string? cellulare { get; set;}
[RegularExpression("^[a-zA-Z0-9_\\.-]+@([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$", ErrorMessage = "formato campo Email non valido")]
[StringLength(100)]
[Display(Name = "Email"), Required(ErrorMessage = "Email obbligatorio")]
public string? email { get; set;}
@ -28,17 +33,27 @@ namespace VirtualTask.Models
public string? emailConf { get; set;}
[Display(Name = "Azienda"), Required(ErrorMessage = "Azienda obbligatorio")]
[StringLength(5)]
public string? azienda { get; set; }
[Display(Name = "Username"), Required(ErrorMessage = "Username obbligatorio")]
[StringLength(20)]
public string? username { get; set; }
[Display(Name = "Password"), Required(ErrorMessage = "Password obbligatorio")]
[StringLength(20)]
public string? passwd { get; set;}
[StringLength(50)]
public string? citta { get; set;}
[StringLength(2)]
public string? provincia { get; set;}
[StringLength(2)]
public string? nazione { get; set;}
[StringLength(1)]
public string? attivato { get; set;}
}
}

View File

@ -10,18 +10,23 @@ namespace VirtualTask.Models
public string? tccodazi { get; set; }
[Display(Name = "CODICE"), Required(ErrorMessage = "Inserire codice tecnico")]
[StringLength(15)]
public string? tccodice { get; set; }
[Display(Name = "DESCRIZIONE"), Required(ErrorMessage = "Inserire descrizione")]
[StringLength(40)]
public string? tcdescri { get; set;}
[Display(Name = "TELEFONO")]
[StringLength(18)]
public string? tctelef1 { get; set;}
[Display(Name = "UTENTE"), Required(ErrorMessage = "Inserire Utente")]
[StringLength(20)]
public string? tcuser { get; set;}
[Display(Name = "PASSWORD")]
[StringLength(20)]
public string? tcpwd { get; set;}
[Display(Name = "COSTO ORDINARIO")]

View File

@ -26,12 +26,6 @@
<span asp-validation-for="picodtec" class="text-danger"></span>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<div class="form-group">
@* <label asp-for="pirifazi" class="control-label"></label> *@
<input asp-for="picodtec" class="agy-form-field require" placeholder="Tecnico" />
<span asp-validation-for="pirifazi" class="text-danger"></span>
</div>
<div class="col-lg-6 col-md-6 col-sm-12 col-12">&nbsp;</div>
<div class="form-group">
@* <label asp-for="pinomede" class="control-label"></label> *@
<input asp-for="pinomede" class="agy-form-field require" placeholder="Azienda coll." />