Merge branch 'master' of 10.0.0.83:/usr/local/git/VirtualTask

This commit is contained in:
Marco Audiffredi 2023-10-12 12:20:38 +02:00
commit d060682e74
11 changed files with 279 additions and 80 deletions

View File

@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Diagnostics;
using System.Text; using System.Text;
using VirtualTask.Models; using VirtualTask.Models;
using X.PagedList; using X.PagedList;
@ -12,6 +13,7 @@ namespace VirtualTask.Controllers
string urlBase = string.Empty; string urlBase = string.Empty;
string token = string.Empty; string token = string.Empty;
string tenant = string.Empty; string tenant = string.Empty;
string errMes = string.Empty;
HttpClient client; HttpClient client;
@ -43,7 +45,7 @@ namespace VirtualTask.Controllers
{ {
string data = response.Content.ReadAsStringAsync().Result; string data = response.Content.ReadAsStringAsync().Result;
modelList = JsonConvert.DeserializeObject<List<Chiamate>>(data); modelList = JsonConvert.DeserializeObject<List<Chiamate>>(data);
}
if (!string.IsNullOrEmpty(searchString)) if (!string.IsNullOrEmpty(searchString))
{ {
modelList = modelList.Where(s => s.chcodimp.ToUpper().Contains(searchString.ToUpper())).ToList(); modelList = modelList.Where(s => s.chcodimp.ToUpper().Contains(searchString.ToUpper())).ToList();
@ -66,6 +68,13 @@ namespace VirtualTask.Controllers
return View(shortLinks); return View(shortLinks);
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
}
#endregion INDEX #endregion INDEX
@ -99,6 +108,12 @@ namespace VirtualTask.Controllers
{ {
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
return View(); return View();
} }
@ -132,6 +147,12 @@ namespace VirtualTask.Controllers
modelList = JsonConvert.DeserializeObject<List<Chiamate>>(data); modelList = JsonConvert.DeserializeObject<List<Chiamate>>(data);
chiamata = modelList.Where(x => x.chserial.Equals(id)).First(); chiamata = modelList.Where(x => x.chserial.Equals(id)).First();
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
return View(chiamata); return View(chiamata);
} }
@ -165,6 +186,12 @@ namespace VirtualTask.Controllers
modelList = JsonConvert.DeserializeObject<List<Chiamate>>(data); modelList = JsonConvert.DeserializeObject<List<Chiamate>>(data);
chiamata = modelList.Where(t => t.chserial.Equals(id)).First(); chiamata = modelList.Where(t => t.chserial.Equals(id)).First();
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
return View(chiamata); return View(chiamata);
} }
@ -191,10 +218,17 @@ namespace VirtualTask.Controllers
string data = JsonConvert.SerializeObject(model); string data = JsonConvert.SerializeObject(model);
StringContent content = new StringContent(data, Encoding.UTF8, "application/json"); StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
HttpResponseMessage response = client.PostAsync(baseAddress, content).Result; HttpResponseMessage response = client.PostAsync(baseAddress, content).Result;
if (response.IsSuccessStatusCode) if (response.IsSuccessStatusCode)
{ {
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
return View(model); return View(model);
} }
@ -226,6 +260,12 @@ namespace VirtualTask.Controllers
modelList = JsonConvert.DeserializeObject<List<Chiamate>>(data); modelList = JsonConvert.DeserializeObject<List<Chiamate>>(data);
chiamata = modelList.Where(x => x.chserial.Equals(id)).First(); chiamata = modelList.Where(x => x.chserial.Equals(id)).First();
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
return View(chiamata); return View(chiamata);
} }
@ -251,9 +291,23 @@ namespace VirtualTask.Controllers
{ {
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
return View(); return View();
} }
#endregion DELETE #endregion DELETE
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
SessionHelper helper = new SessionHelper(this);
string e = helper.GetStringValue("errMsg");
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier, ErrMsg = e });
}
} }
} }

View File

@ -78,7 +78,6 @@ namespace VirtualTask.Controllers
helper.SetStringValue("errMsg", errMes); helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error"); return RedirectToAction("Error");
} }
} }
#endregion INDEX #endregion INDEX
@ -125,8 +124,6 @@ namespace VirtualTask.Controllers
helper.SetStringValue("errMsg", errMes); helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error"); return RedirectToAction("Error");
} }
} }
#endregion CREATE #endregion CREATE

View File

@ -2,6 +2,7 @@
using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.Rendering;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Diagnostics;
using System.Drawing.Printing; using System.Drawing.Printing;
using System.Text; using System.Text;
using VirtualTask.Models; using VirtualTask.Models;
@ -16,6 +17,7 @@ namespace VirtualTask.Controllers
string token = string.Empty; string token = string.Empty;
string tenant = string.Empty; string tenant = string.Empty;
string errMes = string.Empty; string errMes = string.Empty;
HttpClient client; HttpClient client;
public ImpiantiController() public ImpiantiController()
{ {
@ -46,6 +48,7 @@ namespace VirtualTask.Controllers
string data = response.Content.ReadAsStringAsync().Result; string data = response.Content.ReadAsStringAsync().Result;
modelList = JsonConvert.DeserializeObject<List<Impianto>>(data); modelList = JsonConvert.DeserializeObject<List<Impianto>>(data);
modelList = modelList.Where(s => !string.IsNullOrEmpty(s.imcodimp)).ToList(); modelList = modelList.Where(s => !string.IsNullOrEmpty(s.imcodimp)).ToList();
if (!string.IsNullOrEmpty(searchString)) if (!string.IsNullOrEmpty(searchString))
{ {
modelList = modelList.Where(s => s.indirizzo.ToUpper().Contains(searchString.ToUpper())).ToList(); modelList = modelList.Where(s => s.indirizzo.ToUpper().Contains(searchString.ToUpper())).ToList();
@ -58,6 +61,7 @@ namespace VirtualTask.Controllers
{ {
page = 1; page = 1;
} }
var pageSize = 10; var pageSize = 10;
var shortLinks = modelList var shortLinks = modelList
@ -72,9 +76,6 @@ namespace VirtualTask.Controllers
helper.SetStringValue("errMsg", errMes); helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error"); return RedirectToAction("Error");
} }
} }
#endregion INDEX #endregion INDEX
@ -105,12 +106,17 @@ namespace VirtualTask.Controllers
string data = JsonConvert.SerializeObject(model); string data = JsonConvert.SerializeObject(model);
StringContent content = new StringContent(data, Encoding.UTF8, "application/json"); StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
HttpResponseMessage response = client.PostAsync(baseAddress, content).Result; HttpResponseMessage response = client.PostAsync(baseAddress, content).Result;
if (response.IsSuccessStatusCode) if (response.IsSuccessStatusCode)
{ {
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
else
return View(); {
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
} }
#endregion CREATE #endregion CREATE
@ -140,6 +146,12 @@ namespace VirtualTask.Controllers
modelList = JsonConvert.DeserializeObject<List<Impianto>>(data); modelList = JsonConvert.DeserializeObject<List<Impianto>>(data);
impianto = modelList.Where(x => x.imcodimp.Equals(id)).First(); impianto = modelList.Where(x => x.imcodimp.Equals(id)).First();
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
return View(impianto); return View(impianto);
@ -174,6 +186,13 @@ namespace VirtualTask.Controllers
modelList = JsonConvert.DeserializeObject<List<Impianto>>(data); modelList = JsonConvert.DeserializeObject<List<Impianto>>(data);
impianto = modelList.Where(x => x.imcodimp.Equals(id)).First(); impianto = modelList.Where(x => x.imcodimp.Equals(id)).First();
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
ViewBag.AllStockList = LoadStockitems(); ViewBag.AllStockList = LoadStockitems();
return View(impianto); return View(impianto);
} }
@ -204,7 +223,14 @@ namespace VirtualTask.Controllers
{ {
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
return View(model); else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
//return View(model);
} }
#endregion EDIT #endregion EDIT
@ -233,6 +259,12 @@ namespace VirtualTask.Controllers
modelList = JsonConvert.DeserializeObject<List<Impianto>>(data); modelList = JsonConvert.DeserializeObject<List<Impianto>>(data);
impianto = modelList.Where(t => t.imcodimp.Equals(id)).First(); impianto = modelList.Where(t => t.imcodimp.Equals(id)).First();
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
return View(impianto); return View(impianto);
@ -258,8 +290,14 @@ namespace VirtualTask.Controllers
{ {
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
return View(); //return View();
} }
@ -292,5 +330,13 @@ namespace VirtualTask.Controllers
} }
return selectItems; return selectItems;
} }
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
SessionHelper helper = new SessionHelper(this);
string e = helper.GetStringValue("errMsg");
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier, ErrMsg = e });
}
} }
} }

View File

@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.Rendering;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Diagnostics;
using System.Text; using System.Text;
using VirtualTask.Models; using VirtualTask.Models;
using X.PagedList; using X.PagedList;
@ -12,6 +13,7 @@ namespace VirtualTask.Controllers
string apiUrl = string.Empty; string apiUrl = string.Empty;
string urlBase = string.Empty; string urlBase = string.Empty;
string token = string.Empty; string token = string.Empty;
string errMes = string.Empty;
HttpClient client; HttpClient client;
@ -43,7 +45,7 @@ namespace VirtualTask.Controllers
{ {
string data = response.Content.ReadAsStringAsync().Result; string data = response.Content.ReadAsStringAsync().Result;
modelList = JsonConvert.DeserializeObject<List<Rapp_New>>(data); modelList = JsonConvert.DeserializeObject<List<Rapp_New>>(data);
}
if (!string.IsNullOrEmpty(searchString)) if (!string.IsNullOrEmpty(searchString))
{ {
modelList = modelList.Where(s => s.descrizione_intervento.ToUpper().Contains(searchString.ToUpper())).ToList(); modelList = modelList.Where(s => s.descrizione_intervento.ToUpper().Contains(searchString.ToUpper())).ToList();
@ -66,6 +68,13 @@ namespace VirtualTask.Controllers
return View(shortLinks); return View(shortLinks);
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
}
#endregion INDEX #endregion INDEX
@ -98,6 +107,12 @@ namespace VirtualTask.Controllers
{ {
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
return View(); return View();
} }
@ -131,6 +146,12 @@ namespace VirtualTask.Controllers
modelList = JsonConvert.DeserializeObject<List<Rapp_New>>(data); modelList = JsonConvert.DeserializeObject<List<Rapp_New>>(data);
rapp = modelList.Where(x => x.seriale_rapportino.Equals(id)).First(); rapp = modelList.Where(x => x.seriale_rapportino.Equals(id)).First();
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
return View(rapp); return View(rapp);
} }
@ -163,7 +184,12 @@ namespace VirtualTask.Controllers
string data = response.Content.ReadAsStringAsync().Result; string data = response.Content.ReadAsStringAsync().Result;
modelList = JsonConvert.DeserializeObject<List<Rapp_New>>(data); modelList = JsonConvert.DeserializeObject<List<Rapp_New>>(data);
rapp = modelList.Where(x => x.seriale_rapportino.Equals(id)).First(); rapp = modelList.Where(x => x.seriale_rapportino.Equals(id)).First();
}
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
} }
return View(rapp); return View(rapp);
@ -193,6 +219,12 @@ namespace VirtualTask.Controllers
{ {
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
return View(rapp); return View(rapp);
} }
@ -227,6 +259,12 @@ namespace VirtualTask.Controllers
modelList = JsonConvert.DeserializeObject<List<Rapp_New>>(data); modelList = JsonConvert.DeserializeObject<List<Rapp_New>>(data);
rapp = modelList.Where(x => x.seriale_rapportino.Equals(id)).First(); rapp = modelList.Where(x => x.seriale_rapportino.Equals(id)).First();
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
return View(rapp); return View(rapp);
} }
@ -255,6 +293,12 @@ namespace VirtualTask.Controllers
{ {
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
return View(); return View();
} }
@ -290,5 +334,13 @@ namespace VirtualTask.Controllers
return selectItems; return selectItems;
} }
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
SessionHelper helper = new SessionHelper(this);
string e = helper.GetStringValue("errMsg");
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier, ErrMsg = e });
}
} }
} }

View File

@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Diagnostics;
using System.Text; using System.Text;
using VirtualTask.Models; using VirtualTask.Models;
using X.PagedList; using X.PagedList;
@ -14,6 +15,7 @@ namespace VirtualTask.Controllers
string urlBase = string.Empty; string urlBase = string.Empty;
string token = string.Empty; string token = string.Empty;
string tenant = string.Empty; string tenant = string.Empty;
string errMes = string.Empty;
//MF commentati perchè L'Uri viene costruito //MF commentati perchè L'Uri viene costruito
//Uri baseAddress = new Uri("http://10.0.0.187:8000/api/Polo/tecniciList?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3Njk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI"); //Uri baseAddress = new Uri("http://10.0.0.187:8000/api/Polo/tecniciList?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3Njk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI");
@ -56,7 +58,7 @@ namespace VirtualTask.Controllers
{ {
string data = response.Content.ReadAsStringAsync().Result; string data = response.Content.ReadAsStringAsync().Result;
modelList = JsonConvert.DeserializeObject<List<Tecnici>>(data); modelList = JsonConvert.DeserializeObject<List<Tecnici>>(data);
}
if (!string.IsNullOrEmpty(searchString)) if (!string.IsNullOrEmpty(searchString))
{ {
modelList = modelList.Where(s => s.tcdescri.ToUpper().Contains(searchString.ToUpper())).ToList(); modelList = modelList.Where(s => s.tcdescri.ToUpper().Contains(searchString.ToUpper())).ToList();
@ -79,6 +81,13 @@ namespace VirtualTask.Controllers
return View(shortLinks); return View(shortLinks);
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
}
#endregion INDEX #endregion INDEX
@ -86,7 +95,6 @@ namespace VirtualTask.Controllers
public IActionResult Create() public IActionResult Create()
{ {
return View(); return View();
} }
@ -113,12 +121,17 @@ namespace VirtualTask.Controllers
string data = JsonConvert.SerializeObject(model); string data = JsonConvert.SerializeObject(model);
StringContent content = new StringContent(data, Encoding.UTF8, "application/json"); StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
HttpResponseMessage response = client.PostAsync(baseAddress, content).Result; HttpResponseMessage response = client.PostAsync(baseAddress, content).Result;
if (response.IsSuccessStatusCode) if (response.IsSuccessStatusCode)
{ {
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
else
return View(); {
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("ErrMsg", errMes);
return RedirectToAction("Index");
}
} }
#endregion CREATE #endregion CREATE
@ -150,6 +163,12 @@ namespace VirtualTask.Controllers
modelList = JsonConvert.DeserializeObject<List<Tecnici>>(data); modelList = JsonConvert.DeserializeObject<List<Tecnici>>(data);
tecnico = modelList.Where(x => x.tccodice.Equals(id)).First(); tecnico = modelList.Where(x => x.tccodice.Equals(id)).First();
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
return View(tecnico); return View(tecnico);
} }
@ -184,6 +203,12 @@ namespace VirtualTask.Controllers
tecnico = modelList.Where(x => x.tccodice.Equals(id)).First(); tecnico = modelList.Where(x => x.tccodice.Equals(id)).First();
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
return View(tecnico); return View(tecnico);
} }
@ -252,6 +277,12 @@ namespace VirtualTask.Controllers
modelList = JsonConvert.DeserializeObject<List<Tecnici>>(data); modelList = JsonConvert.DeserializeObject<List<Tecnici>>(data);
tecnico = modelList.Where(x => x.tccodice.Equals(id)).First(); tecnico = modelList.Where(x => x.tccodice.Equals(id)).First();
} }
else
{
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
return View(tecnico); return View(tecnico);
} }
@ -280,10 +311,22 @@ namespace VirtualTask.Controllers
{ {
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
else
return View(); {
errMes = response.Content.ReadAsStringAsync().Result;
helper.SetStringValue("errMsg", errMes);
return RedirectToAction("Error");
}
} }
#endregion DELETE #endregion DELETE
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()
{
SessionHelper helper = new SessionHelper(this);
string e = helper.GetStringValue("errMsg");
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier, ErrMsg = e });
}
} }
} }

View File

@ -9,16 +9,22 @@ namespace VirtualTask.Models
{ {
[Display (Name= "AZIENDA")] [Display (Name= "AZIENDA")]
public string? chcodazi { get; set; } public string? chcodazi { get; set; }
[Display(Name = "SERIALE")] [Display(Name = "SERIALE")]
public string? chserial { get; set; } public string? chserial { get; set; }
[Display(Name = "CODICE ESERCIZIO")] [Display(Name = "CODICE ESERCIZIO")]
public string? chcodese { get; set; } public string? chcodese { get; set; }
[Display(Name = "TIPO")] [Display(Name = "TIPO")]
public string? chtipo { get; set; } public string? chtipo { get; set; }
[Display(Name = "NUMERO")] [Display(Name = "NUMERO")]
public double? chnumero { get; set; } public double? chnumero { get; set; }
[Display(Name = "DATA")] [Display(Name = "DATA")]
public DateTime? chdata { get; set; } public DateTime? chdata { get; set; }
public int? chora { get; set; } public int? chora { get; set; }
public int? chmin { get; set; } public int? chmin { get; set; }
public int? chopins { get; set; } public int? chopins { get; set; }

View File

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

View File

@ -5,7 +5,7 @@ namespace VirtualTask.Models
{ {
public class Impianto public class Impianto
{ {
[Display(Name = "Codice Impianto")] [Display(Name = "Codice Impianto"), Required(ErrorMessage = "Inserire codice impianto")]
/// <summary>Codice Impianto</summary> /// <summary>Codice Impianto</summary>
public string? imcodimp { get; set; } public string? imcodimp { get; set; }
@ -13,7 +13,7 @@ namespace VirtualTask.Models
/// <summary> Azienda </summary> /// <summary> Azienda </summary>
public string? imcodazi { get; set; } public string? imcodazi { get; set; }
[Display(Name = "Descrizione")] [Display(Name = "Descrizione"), Required(ErrorMessage = "Inserire descrizione")]
/// <summary>Descrizione Impianto</summary> /// <summary>Descrizione Impianto</summary>
public string? imdescri { get; set; } public string? imdescri { get; set; }

View File

@ -7,7 +7,7 @@ namespace VirtualTask.Models
{ {
public class Rapp_New public class Rapp_New
{ {
[Display(Name = "SERIALE RAPPORTINO")] [Display(Name = "SERIALE RAPPORTINO"), Required(ErrorMessage = "Inserisci il seriale rapportino")]
public string? seriale_rapportino { get; set; } public string? seriale_rapportino { get; set; }
[Display(Name = "TIPO RAPPORTINI")] [Display(Name = "TIPO RAPPORTINI")]
@ -16,7 +16,7 @@ namespace VirtualTask.Models
[Display(Name = "AZIENDA")] [Display(Name = "AZIENDA")]
public string? azienda_impianto { get; set; } public string? azienda_impianto { get; set; }
[Display(Name = "CODICE IMPIANTO")] [Display(Name = "CODICE IMPIANTO"), Required(ErrorMessage = "Inserisci codice impianto")]
public string? codice_impianto { get; set; } public string? codice_impianto { get; set; }
[Display(Name = "AZ. CHIAMATA")] [Display(Name = "AZ. CHIAMATA")]

View File

@ -9,16 +9,16 @@ namespace VirtualTask.Models
[Display(Name = "AZIENDA")] [Display(Name = "AZIENDA")]
public string? tccodazi { get; set; } public string? tccodazi { get; set; }
[Display(Name = "CODICE")] [Display(Name = "CODICE"), Required(ErrorMessage = "Inserire codice tecnico")]
public string? tccodice { get; set; } public string? tccodice { get; set; }
[Display(Name = "DESCRIZIONE")] [Display(Name = "DESCRIZIONE"), Required(ErrorMessage = "Inserire descrizione")]
public string? tcdescri { get; set;} public string? tcdescri { get; set;}
[Display(Name = "TELEFONO")] [Display(Name = "TELEFONO")]
public string? tctelef1 { get; set;} public string? tctelef1 { get; set;}
[Display(Name = "UTENTE")] [Display(Name = "UTENTE"), Required(ErrorMessage = "Inserire Utente")]
public string? tcuser { get; set;} public string? tcuser { get; set;}
[Display(Name = "PASSWORD")] [Display(Name = "PASSWORD")]

View File

@ -24,8 +24,8 @@
<input asp-for="ccdescr" class="form-control" /> <input asp-for="ccdescr" class="form-control" />
<span asp-validation-for="ccdescr" class="text-danger"></span> <span asp-validation-for="ccdescr" class="text-danger"></span>
</div> </div>
<div class="form-group">
<label asp-for="ccdessup" class="control-label"></label> <label asp-for="ccdessup" class="control-label"></label>
<div class="form-group">
<input asp-for="ccdessup" class="form-control" /> <input asp-for="ccdessup" class="form-control" />
<span asp-validation-for="ccdessup" class="text-danger"></span> <span asp-validation-for="ccdessup" class="text-danger"></span>
</div> </div>