michele: controllo email
This commit is contained in:
parent
3ca93847c9
commit
a90d7ff2e8
@ -463,7 +463,6 @@ namespace VirtualTask.Controllers
|
||||
helper.SetStringValue("errMsg", errMes);
|
||||
return RedirectToAction("Error");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion DELETE
|
||||
@ -509,6 +508,7 @@ namespace VirtualTask.Controllers
|
||||
}
|
||||
return seriale;
|
||||
}
|
||||
|
||||
private async void updateSeriale(Progressivo p)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
@ -840,31 +840,31 @@ namespace VirtualTask.Controllers
|
||||
update.val_prog = p;
|
||||
update.tipo_prog = _sercomm;
|
||||
update.azienda = tenant;
|
||||
UpdateSeriale(update);
|
||||
updateSeriale(update);
|
||||
}
|
||||
return seriale;
|
||||
}
|
||||
|
||||
private async void UpdateSeriale(Progressivo p)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
token = helper.GetStringValue("tok");
|
||||
apiUrl = helper.GetStringValue("apiUrl");
|
||||
tenant = helper.GetStringValue("tenant");
|
||||
urlBase = apiUrl + "progressivo/mod";
|
||||
urlBase = urlBase + "?token=" + token;
|
||||
//private async void UpdateSeriale(Progressivo p)
|
||||
//{
|
||||
// SessionHelper helper = new SessionHelper(this);
|
||||
// token = helper.GetStringValue("tok");
|
||||
// apiUrl = helper.GetStringValue("apiUrl");
|
||||
// tenant = helper.GetStringValue("tenant");
|
||||
// urlBase = apiUrl + "progressivo/mod";
|
||||
// urlBase = urlBase + "?token=" + token;
|
||||
|
||||
client = new HttpClient();
|
||||
// client = new HttpClient();
|
||||
|
||||
var stringPayload = JsonConvert.SerializeObject(p);
|
||||
var httpContent = new StringContent(stringPayload, Encoding.UTF8, "application/json");
|
||||
var httpResponse = await client.PostAsync(urlBase, httpContent);
|
||||
// var stringPayload = JsonConvert.SerializeObject(p);
|
||||
// var httpContent = new StringContent(stringPayload, Encoding.UTF8, "application/json");
|
||||
// var httpResponse = await client.PostAsync(urlBase, httpContent);
|
||||
|
||||
if (httpResponse.Content != null)
|
||||
{
|
||||
var responseContent = await httpResponse.Content.ReadAsStringAsync();
|
||||
}
|
||||
}
|
||||
// if (httpResponse.Content != null)
|
||||
// {
|
||||
// var responseContent = await httpResponse.Content.ReadAsStringAsync();
|
||||
// }
|
||||
//}
|
||||
|
||||
#endregion altri metodi
|
||||
|
||||
|
||||
@ -19,6 +19,7 @@ namespace VirtualTask.Models
|
||||
|
||||
[Display(Name = "Email")]
|
||||
[StringLength(254)]
|
||||
[RegularExpression("^[a-zA-Z0-9_\\.-]+@([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$", ErrorMessage = "formato campo Email non valido")]
|
||||
/// <summary>email</summary>
|
||||
public string? an_email { get; set; }
|
||||
|
||||
@ -49,6 +50,7 @@ namespace VirtualTask.Models
|
||||
|
||||
[Display(Name = "Pec")]
|
||||
[StringLength(254)]
|
||||
[RegularExpression("^[a-zA-Z0-9_\\.-]+@([a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}$", ErrorMessage = "formato campo Email non valido")]
|
||||
/// <summary>pec</summary>
|
||||
public string? an_empec { get; set; }
|
||||
|
||||
|
||||
@ -5,14 +5,17 @@ namespace VirtualTask.Models
|
||||
public class AziendaRif
|
||||
{
|
||||
[Display(Name = "Azienda")]
|
||||
[StringLength(5)]
|
||||
/// <summary>azienda</summary>
|
||||
public string? piazihoc { get; set; }
|
||||
|
||||
[Display(Name = "Cod. Tecnico")]
|
||||
[StringLength(15)]
|
||||
/// <summary>tecnico</summary>
|
||||
public string? picodtec { get; set; }
|
||||
|
||||
[Display(Name = "tecnico")]
|
||||
[StringLength(5)]
|
||||
/// <summary>tecnico</summary>
|
||||
public string? pirifazi { get; set; }
|
||||
|
||||
|
||||
@ -11,7 +11,6 @@ namespace VirtualTask.Models
|
||||
|
||||
[StringLength(15)]
|
||||
[Display(Name = "Codice"), Required(ErrorMessage = "Inserire codice chiamata")]
|
||||
|
||||
public string? cccodice { get; set; }
|
||||
|
||||
[StringLength(50)]
|
||||
|
||||
@ -11,18 +11,15 @@ namespace VirtualTask.Models
|
||||
|
||||
public string? lacodazi { get; set; }
|
||||
|
||||
|
||||
[Required]
|
||||
[StringLength(15)]
|
||||
[Display(Name = "Codice Commessa")]
|
||||
public string? lacodcom { get; set; }
|
||||
|
||||
|
||||
[Required]
|
||||
[StringLength(40)]
|
||||
[Display(Name = "Fase Commessa")]
|
||||
public string? ladeslav { get; set; }
|
||||
|
||||
|
||||
[Display(Name = "Data fine commessa")]
|
||||
public DateTime? ladatchi { get; set; }
|
||||
|
||||
@ -62,11 +62,9 @@ namespace VirtualTask.Models
|
||||
/// <summary> Provincia </summary>
|
||||
[Display(Name = "Provincia")]
|
||||
[StringLength(2)]
|
||||
|
||||
public string? improvin { get; set; }
|
||||
|
||||
[Display(Name = "Cliente"), Required(ErrorMessage = "Selezionare un cliente")]
|
||||
|
||||
/// <summary> cliente associato </summary>
|
||||
public string? imultcli { get; set; }
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user