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

This commit is contained in:
Marco Audiffredi 2023-09-29 15:07:57 +02:00
commit 859956602c
20 changed files with 3386 additions and 89 deletions

View File

@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using NuGet.Common;
using System.Runtime.Intrinsics.Arm;
using System.Text;
using VirtualTask.Models;
using X.PagedList;
@ -18,8 +19,11 @@ namespace VirtualTask.Controllers
HttpClient client;
public AnagController()
{
}
#region INDEX
public IActionResult Index(string searchString, int? page = 1)
{
SessionHelper helper = new SessionHelper(this);
@ -42,14 +46,17 @@ namespace VirtualTask.Controllers
string data = response.Content.ReadAsStringAsync().Result;
modelList = JsonConvert.DeserializeObject<List<Anag>>(data);
}
if (!string.IsNullOrEmpty(searchString))
{
modelList = modelList.Where(s => s.andescri.ToUpper().Contains(searchString.ToUpper())).ToList();
ViewData["CurrentFilter"] = searchString;
}
else
{
ViewData["CurrentFilter"] = null;
}
if (page != null && page < 1)
{
@ -57,12 +64,207 @@ namespace VirtualTask.Controllers
}
var pageSize = 10;
var shortLinks = modelList
.OrderByDescending(s => s.ancodice)
.ToPagedList(page ?? 1, pageSize);
return View(shortLinks);
}
#endregion INDEX
#region CREATE
public IActionResult Create()
{
return View();
}
[HttpPost]
public IActionResult Create(Anag model)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "anagrafiche/add";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
string data = JsonConvert.SerializeObject(model);
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
HttpResponseMessage response = client.PostAsync(baseAddress, content).Result;
if (response.IsSuccessStatusCode)
{
return RedirectToAction("Index");
}
return View();
}
#endregion CREATE
#region DETAIL
public IActionResult Details(string id)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "anagraficheList";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
Anag anag = new Anag();
List<Anag> modelList = new List<Anag>();
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
if (response.IsSuccessStatusCode)
{
string data = response.Content.ReadAsStringAsync().Result;
modelList = JsonConvert.DeserializeObject<List<Anag>>(data);
anag = modelList.Where(x => x.ancodice.Equals(id)).First();
}
return View(anag);
}
#endregion DETAIL
#region EDIT
public IActionResult Edit(string id)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "anagraficheList";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
Anag anag = new Anag();
List<Anag> modelList = new List<Anag>();
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
if (response.IsSuccessStatusCode)
{
string data = response.Content.ReadAsStringAsync().Result;
modelList = JsonConvert.DeserializeObject<List<Anag>>(data);
anag = modelList.Where(x => x.ancodice.Equals(id)).First();
}
return View(anag);
}
[HttpPost]
public IActionResult Edit(Anag model)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "anagrafiche/mod";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
string data = JsonConvert.SerializeObject(model);
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
HttpResponseMessage response = client.PostAsync(baseAddress, content).Result;
if (response.IsSuccessStatusCode)
{
return RedirectToAction("Index");
}
return View(model);
}
#endregion EDIT
#region DELETE
[HttpGet]
public IActionResult Delete(string id)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "anagraficheList";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
Anag anag = new Anag();
List<Anag> modelList = new List<Anag>();
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
if (response.IsSuccessStatusCode)
{
string data = response.Content.ReadAsStringAsync().Result;
modelList = JsonConvert.DeserializeObject<List<Anag>>(data);
anag = modelList.Where(x => x.ancodice.Equals(id)).First();
}
return View(anag);
}
//DA MODIFICARE PERCHE' NON E' UNA DELETE MA UN UPDATE DELLA DATA OBSOLESCENZA
[HttpPost, ActionName("DeleteConfirmed")]
public IActionResult DeleteConfirmed(string id)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "anagrafiche/del?" + "codice=" + id + "&";
urlBase = urlBase + "token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
string data = JsonConvert.SerializeObject(id);
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
HttpResponseMessage response = client.PostAsync(baseAddress, content).Result;
if (response.IsSuccessStatusCode)
{
return RedirectToAction("Index");
}
return View();
}
#endregion DELETE
}
}

View File

@ -4,52 +4,99 @@ using System.Net;
using System.Reflection;
using System.Text;
using VirtualTask.Models;
using X.PagedList;
namespace VirtualTask.Controllers
{
public class ChiusureController : Controller
{
Uri baseAddress = new Uri("http://10.0.0.187:8000/api/Polo/codici_chiusura?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3Njk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI");
string apiUrl = string.Empty;
string urlBase = string.Empty;
string token = string.Empty;
//Uri baseAddress = new Uri("http://10.0.0.187:8000/api/Polo/codici_chiusura?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3Njk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI");
HttpClient client;
Uri baseAddressCreate = new Uri("http://10.0.0.187:8000/api/Polo/chiusure/add?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3Njk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI");
HttpClient clientCreate;
//Uri baseAddressCreate = new Uri("http://10.0.0.187:8000/api/Polo/chiusure/add?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3Njk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI");
//HttpClient clientCreate;
Uri baseAddressEdit = new Uri("http://10.0.0.187:8000/api/Polo/chiusure/mod?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3Njk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI");
HttpClient clientEdit;
//Uri baseAddressEdit = new Uri("http://10.0.0.187:8000/api/Polo/chiusure/mod?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3Njk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI");
//HttpClient clientEdit;
Uri baseAddressDelete = new Uri("http://10.0.0.187:8000/api/Polo/chiusure/del?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3Njk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI");
HttpClient clientDelete;
//Uri baseAddressDelete = new Uri("http://10.0.0.187:8000/api/Polo/chiusure/del?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3Njk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI");
//HttpClient clientDelete;
public ChiusureController()
{
client = new HttpClient();
client.BaseAddress = baseAddress;
//client = new HttpClient();
//client.BaseAddress = baseAddress;
clientCreate = new HttpClient();
clientCreate.BaseAddress = baseAddressCreate;
//clientCreate = new HttpClient();
//clientCreate.BaseAddress = baseAddressCreate;
clientEdit = new HttpClient();
clientEdit.BaseAddress = baseAddressEdit;
//clientEdit = new HttpClient();
//clientEdit.BaseAddress = baseAddressEdit;
clientDelete = new HttpClient();
clientDelete.BaseAddress = baseAddressDelete;
//clientDelete = new HttpClient();
//clientDelete.BaseAddress = baseAddressDelete;
}
#region INDEX
public IActionResult Index()
public IActionResult Index(string searchString, int? page = 1)
{
//List<Chiusure> modelList = new List<Chiusure>();
//HttpResponseMessage response = client.GetAsync(baseAddress).Result;
//if (response.IsSuccessStatusCode)
//{
// string data = response.Content.ReadAsStringAsync().Result;
// modelList = JsonConvert.DeserializeObject<List<Chiusure>>(data);
//}
//return View(modelList);
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
if (string.IsNullOrEmpty(token))
return RedirectToAction("Index", "Login");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "codici_chiusura";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
List<Chiusure> modelList = new List<Chiusure>();
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
if (response.IsSuccessStatusCode)
{
string data = response.Content.ReadAsStringAsync().Result;
modelList = JsonConvert.DeserializeObject<List<Chiusure>>(data);
}
return View(modelList);
if (!string.IsNullOrEmpty(searchString))
{
modelList = modelList.Where(s => s.ccdescr.ToUpper().Contains(searchString.ToUpper())).ToList();
ViewData["CurrentFilter"] = searchString;
}
else
ViewData["CurrentFilter"] = null;
if (page != null && page < 1)
{
page = 1;
}
var pageSize = 10;
var shortLinks = modelList
.OrderByDescending(s => s.cccodice)
.ToPagedList(page ?? 1, pageSize);
return View(shortLinks);
}
#endregion INDEX
@ -64,9 +111,20 @@ namespace VirtualTask.Controllers
[HttpPost]
public IActionResult Create(Chiusure model)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "chiusure/add";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
string data = JsonConvert.SerializeObject(model);
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
HttpResponseMessage response = client.PostAsync(baseAddressCreate, content).Result;
HttpResponseMessage response = client.PostAsync(baseAddress, content).Result;
if (response.IsSuccessStatusCode)
{
return RedirectToAction("Index");
@ -81,6 +139,17 @@ namespace VirtualTask.Controllers
public IActionResult Details(string id)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "codici_chiusura";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
Chiusure chiusura = new Chiusure();
List<Chiusure> modelList = new List<Chiusure>();
@ -103,6 +172,17 @@ namespace VirtualTask.Controllers
public IActionResult Edit(string id)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "codici_chiusura";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
Chiusure ele = new Chiusure();
List<Chiusure> modelList = new List<Chiusure>();
@ -123,9 +203,20 @@ namespace VirtualTask.Controllers
[HttpPost]
public IActionResult Edit(Chiusure model)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "chiusure/mod";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
string data = JsonConvert.SerializeObject(model);
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
HttpResponseMessage response = client.PostAsync(baseAddressEdit, content).Result;
HttpResponseMessage response = client.PostAsync(baseAddress, content).Result;
if (response.IsSuccessStatusCode)
{
return RedirectToAction("Index");
@ -140,6 +231,17 @@ namespace VirtualTask.Controllers
[HttpGet]
public IActionResult Delete(string id)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "codici_chiusura";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
Chiusure elem = new Chiusure();
List<Chiusure> modelList = new List<Chiusure>();
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
@ -150,21 +252,28 @@ namespace VirtualTask.Controllers
modelList = JsonConvert.DeserializeObject<List<Chiusure>>(data);
elem = modelList.Where(t => t.cccodice.Equals(id)).First();
}
return View(elem);
}
[HttpPost, ActionName("DeleteConfirmed")]
public IActionResult DeleteConfirmed(/*Chiusure model*/ string id)
public IActionResult DeleteConfirmed(string id)
{
//var prova = id;
Uri cod = new Uri("http://10.0.0.187:8000/api/Polo/chiusure/del?");
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "chiusure/del?" + "codice=" + id + "&";
urlBase = urlBase + "token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
string data = JsonConvert.SerializeObject(id);
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
HttpResponseMessage response = client.PostAsync(cod + "codice=" + id + "&" +"token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZ" +
"W50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3N" +
"jk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI", content).Result;
HttpResponseMessage response = client.PostAsync(baseAddress, content).Result;
if (response.IsSuccessStatusCode)
{
@ -176,6 +285,5 @@ namespace VirtualTask.Controllers
}
#endregion DELETE
}
}

View File

@ -85,7 +85,6 @@ namespace VirtualTask.Controllers
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client.BaseAddress = baseAddress;
string data = JsonConvert.SerializeObject(model);
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
HttpResponseMessage response = client.PostAsync(baseAddress, content).Result;

View File

@ -0,0 +1,293 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Newtonsoft.Json;
using System.Text;
using VirtualTask.Models;
using X.PagedList;
namespace VirtualTask.Controllers
{
public class Rapp_NewController : Controller
{
string apiUrl = string.Empty;
string urlBase = string.Empty;
string token = string.Empty;
HttpClient client;
public Rapp_NewController()
{
client = new HttpClient();
}
#region INDEX
public IActionResult Index(string searchString, int? page = 1)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
if (string.IsNullOrEmpty(token))
return RedirectToAction("Index", "Login");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "rappnewList";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
List<Rapp_New> modelList = new List<Rapp_New>();
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
if (response.IsSuccessStatusCode)
{
string data = response.Content.ReadAsStringAsync().Result;
modelList = JsonConvert.DeserializeObject<List<Rapp_New>>(data);
}
if (!string.IsNullOrEmpty(searchString))
{
modelList = modelList.Where(s => s.descrizione_intervento.ToUpper().Contains(searchString.ToUpper())).ToList();
ViewData["CurrentFilter"] = searchString;
}
else
ViewData["CurrentFilter"] = null;
if (page != null && page < 1)
{
page = 1;
}
var pageSize = 10;
var shortLinks = modelList
.OrderByDescending(s => s.seriale_rapportino)
.ToPagedList(page ?? 1, pageSize);
return View(shortLinks);
}
#endregion INDEX
#region CREATE
public IActionResult Create()
{
ViewBag.AllStockList = LoadStockitems();
return View();
}
//metodo per avere riempire combobox con la tabella delle chiusure
private List<SelectListItem> LoadStockitems()
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "codici_chiusura";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
List<SelectListItem> selectItems = new List<SelectListItem>();
List<Chiusure> modelList = new List<Chiusure>();
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
if (response.IsSuccessStatusCode)
{
string data = response.Content.ReadAsStringAsync().Result;
modelList = JsonConvert.DeserializeObject<List<Chiusure>>(data);
foreach (var role in modelList)
{
SelectListItem listItem = new SelectListItem();
listItem.Value = role.cccodice;
listItem.Text = role.ccdescr;
selectItems.Add(listItem);
}
}
return selectItems;
}
[HttpPost]
public IActionResult Create(Rapp_New model)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
if (string.IsNullOrEmpty(token))
return RedirectToAction("Index", "Login");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "rappnew/add";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client.BaseAddress = baseAddress;
string data = JsonConvert.SerializeObject(model);
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
HttpResponseMessage response = client.PostAsync(baseAddress, content).Result;
if (response.IsSuccessStatusCode)
{
return RedirectToAction("Index");
}
return View();
}
#endregion CREATE
#region DETAIL
public IActionResult Details(string id)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "rappnewList";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
Rapp_New rapp = new Rapp_New();
List<Rapp_New> modelList = new List<Rapp_New>();
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
if (response.IsSuccessStatusCode)
{
string data = response.Content.ReadAsStringAsync().Result;
modelList = JsonConvert.DeserializeObject<List<Rapp_New>>(data);
rapp = modelList.Where(x => x.seriale_rapportino.Equals(id)).First();
}
return View(rapp);
}
#endregion DETAIL
#region EDIT
public IActionResult Edit(string id)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "rappnewList";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
Rapp_New rapp = new Rapp_New();
List<Rapp_New> modelList = new List<Rapp_New>();
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
if (response.IsSuccessStatusCode)
{
string data = response.Content.ReadAsStringAsync().Result;
modelList = JsonConvert.DeserializeObject<List<Rapp_New>>(data);
rapp = modelList.Where(x => x.seriale_rapportino.Equals(id)).First();
}
return View(rapp);
}
[HttpPost]
public IActionResult Edit(Rapp_New rapp)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "rappnew/mod";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
string data = JsonConvert.SerializeObject(rapp);
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
HttpResponseMessage response = client.PostAsync(baseAddress, content).Result;
if (response.IsSuccessStatusCode)
{
return RedirectToAction("Index");
}
return View(rapp);
}
#endregion EDIT
#region DELETE
[HttpGet]
public IActionResult Delete(string id)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "rappnewList";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
Rapp_New rapp = new Rapp_New();
List<Rapp_New> modelList = new List<Rapp_New>();
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
if (response.IsSuccessStatusCode)
{
string data = response.Content.ReadAsStringAsync().Result;
modelList = JsonConvert.DeserializeObject<List<Rapp_New>>(data);
rapp = modelList.Where(x => x.seriale_rapportino.Equals(id)).First();
}
return View(rapp);
}
[HttpPost, ActionName("DeleteConfirmed")]
public IActionResult DeleteConfirmed(string id)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "rappnew/del?" + "serialeRapportino=" + id + "&";
urlBase = urlBase + "token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
string data = JsonConvert.SerializeObject(id);
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
HttpResponseMessage response = client.PostAsync(baseAddress, content).Result;
if (response.IsSuccessStatusCode)
{
return RedirectToAction("Index");
}
return View();
}
#endregion DELETE
}
}

View File

@ -2,59 +2,108 @@
using Newtonsoft.Json;
using System.Text;
using VirtualTask.Models;
using X.PagedList;
using static System.Net.Mime.MediaTypeNames;
namespace VirtualTask.Controllers
{
public class TecniciController : Controller
{
Uri baseAddress = new Uri("http://10.0.0.187:8000/api/Polo/tecniciList?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3Njk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI");
string apiUrl = string.Empty;
string urlBase = string.Empty;
string token = string.Empty;
//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");
HttpClient client;
Uri baseAddressCreate = new Uri("http://10.0.0.187:8000/api/Polo/tecnici/add?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3Njk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI");
HttpClient clientCreate;
//Uri baseAddressCreate = new Uri("http://10.0.0.187:8000/api/Polo/tecnici/add?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3Njk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI");
//HttpClient clientCreate;
Uri baseAddressEdit = new Uri("http://10.0.0.187:8000/api/Polo/tecnici/mod?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3Njk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI");
HttpClient clientEdit;
//Uri baseAddressEdit = new Uri("http://10.0.0.187:8000/api/Polo/tecnici/mod?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3Njk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI");
//HttpClient clientEdit;
Uri baseAddressDelete = new Uri("http://10.0.0.187:8000/api/Polo/tecnici/del?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3Njk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI");
HttpClient clientDelete;
//Uri baseAddressDelete = new Uri("http://10.0.0.187:8000/api/Polo/tecnici/del?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3Njk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI");
//HttpClient clientDelete;
public TecniciController()
{
client = new HttpClient();
client.BaseAddress = baseAddress;
//client = new HttpClient();
//client.BaseAddress = baseAddress;
clientCreate = new HttpClient();
clientCreate.BaseAddress = baseAddressCreate;
//clientCreate = new HttpClient();
//clientCreate.BaseAddress = baseAddressCreate;
clientEdit = new HttpClient();
clientEdit.BaseAddress = baseAddressEdit;
//clientEdit = new HttpClient();
//clientEdit.BaseAddress = baseAddressEdit;
clientDelete = new HttpClient();
clientDelete.BaseAddress = baseAddressDelete;
//clientDelete = new HttpClient();
//clientDelete.BaseAddress = baseAddressDelete;
}
#region INDEX
public IActionResult Index()
public IActionResult Index(string searchString, int? page = 1)
{
List<Tecnici> tecniciList = new List<Tecnici>();
//List<Tecnici> tecniciList = new List<Tecnici>();
//HttpResponseMessage response = client.GetAsync(baseAddress).Result;
//if (response.IsSuccessStatusCode)
//{
// string data = response.Content.ReadAsStringAsync().Result;
// tecniciList = JsonConvert.DeserializeObject<List<Tecnici>>(data);
//}
//return View(tecniciList);
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
if (string.IsNullOrEmpty(token))
return RedirectToAction("Index", "Login");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "tecniciList";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
List<Tecnici> modelList = new List<Tecnici>();
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
if (response.IsSuccessStatusCode)
{
string data = response.Content.ReadAsStringAsync().Result;
tecniciList = JsonConvert.DeserializeObject<List<Tecnici>>(data);
modelList = JsonConvert.DeserializeObject<List<Tecnici>>(data);
}
if (!string.IsNullOrEmpty(searchString))
{
modelList = modelList.Where(s => s.tcdescri.ToUpper().Contains(searchString.ToUpper())).ToList();
ViewData["CurrentFilter"] = searchString;
}
else
ViewData["CurrentFilter"] = null;
if (page != null && page < 1)
{
page = 1;
}
return View(tecniciList);
var pageSize = 10;
var shortLinks = modelList
.OrderByDescending(s => s.tccodice)
.ToPagedList(page ?? 1, pageSize);
return View(shortLinks);
}
#endregion INDEX
#region CREATE
public IActionResult Create()
{
@ -64,9 +113,20 @@ namespace VirtualTask.Controllers
[HttpPost]
public IActionResult Create(Tecnici model)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "tecnici/add";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
string data = JsonConvert.SerializeObject(model);
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
HttpResponseMessage response = client.PostAsync(baseAddressCreate, content).Result;
HttpResponseMessage response = client.PostAsync(baseAddress, content).Result;
if (response.IsSuccessStatusCode)
{
return RedirectToAction("Index");
@ -81,6 +141,17 @@ namespace VirtualTask.Controllers
public IActionResult Details(string id)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "tecniciList";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
Tecnici tecnico = new Tecnici();
List<Tecnici> modelList = new List<Tecnici>();
@ -90,7 +161,7 @@ namespace VirtualTask.Controllers
if (response.IsSuccessStatusCode)
{
string data = response.Content.ReadAsStringAsync().Result;
modelList = JsonConvert.DeserializeObject < List<Tecnici>>(data);
modelList = JsonConvert.DeserializeObject<List<Tecnici>>(data);
tecnico = modelList.Where(x => x.tccodice.Equals(id)).First();
}
@ -101,8 +172,19 @@ namespace VirtualTask.Controllers
#region EDIT
public IActionResult Edit(string id)
public IActionResult Edit(string id)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "tecniciList";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
Tecnici tecnico = new Tecnici();
List<Tecnici> modelList = new List<Tecnici>();
@ -112,7 +194,7 @@ namespace VirtualTask.Controllers
if (response.IsSuccessStatusCode)
{
string data = response.Content.ReadAsStringAsync().Result;
modelList = JsonConvert.DeserializeObject< List<Tecnici>>(data);
modelList = JsonConvert.DeserializeObject<List<Tecnici>>(data);
tecnico = modelList.Where(x => x.tccodice.Equals(id)).First();
}
@ -123,11 +205,22 @@ namespace VirtualTask.Controllers
[HttpPost]
public IActionResult Edit(Tecnici tecnico)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "tecnici/mod";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
string data = JsonConvert.SerializeObject(tecnico);
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
HttpResponseMessage response = client.PostAsync(baseAddressEdit, content).Result;
HttpResponseMessage response = client.PostAsync(baseAddress, content).Result;
if (response.IsSuccessStatusCode)
{
@ -144,11 +237,22 @@ namespace VirtualTask.Controllers
[HttpGet]
public IActionResult Delete(string id)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "tecniciList";
urlBase = urlBase + "?token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
Tecnici tecnico = new Tecnici();
List<Tecnici> modelList = new List<Tecnici>();
HttpResponseMessage response= client.GetAsync(baseAddress).Result;
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
if (response.IsSuccessStatusCode)
{
@ -163,15 +267,22 @@ namespace VirtualTask.Controllers
[HttpPost, ActionName("DeleteConfirmed")]
public IActionResult DeleteConfirmed(string id)
{
Uri codice = new Uri("http://10.0.0.187:8000/api/Polo/tecnici/del?");
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
urlBase = apiUrl + "tecnici/del?" + "codice=" + id + "&";
urlBase = urlBase + "token=" + token;
Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
client.BaseAddress = baseAddress;
string data = JsonConvert.SerializeObject(id);
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
HttpResponseMessage response = client.PostAsync(codice + "codice=" + id + "&" + "token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZ" +
"W50aXR5L2NsYWltcy9uYW1lIjoiVEVTVCIsImp0aSI6IjA2MzA5MzlmLTBhZDgtNDhkMi04ZTI5LWI3Mjk3N2IyOWM1YiIsInRlbmFudCI6Ik1BUlJPIiwidGNjb2RpY2UiOiJaWlogICAgICAgICAgICAiLCJleHAiOjE3MDE3N" +
"jk0NTUsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6NjE5NTUiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjQyMDAifQ.CDt3wR6ube4zzNscVG9Qv6bzOnNF6A9-bIZxxjbKmKI", content).Result;
HttpResponseMessage response = client.PostAsync(baseAddress, content).Result;
if (response.IsSuccessStatusCode)
{

193
Models/Rapp_New.cs Normal file
View File

@ -0,0 +1,193 @@
using Microsoft.VisualBasic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Xml.Linq;
namespace VirtualTask.Models
{
public class Rapp_New
{
[Display(Name = "SERIALE RAPPORTINO")]
public string? seriale_rapportino { get; set; }
[Display(Name = "TIPO RAPPORTINI")]
public string? tipo_rapportino { get; set; }
[Display(Name = "AZIENDA")]
public string? azienda_impianto { get; set; }
[Display(Name = "CODICE IMPIANTO")]
public string? codice_impianto { get; set; }
[Display(Name = "AZ. CHIAMATA")]
public string? azienda_chiamata { get; set; }
[Display(Name = "SERIALE CHIAMATA")]
public string? seriale_chiamata { get; set; }
[Display(Name = "SERIALE COMMESSA")]
public string? seriale_commessa { get; set; }
[Display(Name = "DATA RAPPORTINO")]
public DateTime data_rapportino { get; set; }
[Display(Name = "ORA INIZIO")]
public string? ora_ini_rapportino { get; set; }
[Display(Name = "MINUTO INIZIO")]
public string? min_ini_rapportino { get; set; }
[Display(Name = "ORA FINE")]
public string? ora_fin_rapportino { get; set; }
[Display(Name = "MINUTO FINE")]
public string? min_fin_rapportino { get; set; }
[Display(Name = "CODICE CHIUSURA 1")]
public string? codice_chiusura_1 { get; set; }
[Display(Name = "CODICE CHIUSURA 2")]
public string? codice_chiusura_2 { get; set; }
[Display(Name = "CODICE CHIUSURA 3")]
public string? codice_chiusura_3 { get; set; }
[Display(Name = "CODICE CHIUSURA 4")]
public string? codice_chiusura_4 { get; set; }
[Display(Name = "CODICE CHIUSURA 5")]
public string? codice_chiusura_5 { get; set; }
[Display(Name = "CODICE CHIUSURA 6")]
public string? codice_chiusura_6 { get; set; }
[Display(Name = "CODICE CHIUSURA 7")]
public string? codice_chiusura_7 { get; set; }
[Display(Name = "CODICE CHIUSURA 8")]
public string? codice_chiusura_8 { get; set; }
[Display(Name = "CODICE CHIUSURA 9")]
public string? codice_chiusura_9 { get; set; }
[Display(Name = "CODICE CHIUSURA 10")]
public string? codice_chiusura_10 { get; set; }
[Display(Name = "DESC. INTERVENTO")]
public string? descrizione_intervento { get; set; }
[Display(Name = "STATO")]
public string? stato_finale { get; set; }
[Display(Name = "GENERATO")]
public string? generato { get; set; }
[Display(Name = "AZ. TECNICO")]
public string? azienda_tecnico { get; set; }
[Display(Name = "COD. TECNICO")]
public string? codice_tecnico { get; set; }
[Display(Name = "RIFIUTATA")]
public string? rifiutata { get; set; }
[Display(Name = "FIRMA")]
public string? firma { get; set; }
[Display(Name = "INCARICO")]
public string? incarico { get; set; }
[Display(Name = "DATA VALIDITA'")]
public DateTime data_validita { get; set; }
[Display(Name = "IMMAGINE")]
public string? immagine { get; set; }
[Display(Name = "SERIALE BUONO")]
public string? ser_buono { get; set; }
[Display(Name = "DATA EFFETTIVA")]
public DateTime? data_effettiva { get; set; }
[Display(Name = "CODICE INTERVENTO")]
public string? codice_intervento { get; set; }
[Display(Name = "DIFETTI")]
public string? difetti_riscontrati { get; set; }
[Display(Name = "LAVORO")]
public string? lavoro_eseguito { get; set; }
[Display(Name = "ESITO")]
public string? esito_intervento { get; set; }
[Display(Name = "NOTE")]
public string? note_intervento { get; set; }
[Display(Name = "NUOVO CONTRATTO")]
public string? nuovo_contratto { get; set; }
[Display(Name = "ORE LAVORO")]
public double? ore_lavoro { get; set; }
[Display(Name = "CAUSALE")]
public string? causale { get; set; }
[Display(Name = "MATERIALE")]
public double? materiale { get; set; }
[Display(Name = "DIRITTO CHIAMATA")]
public double? diritto_chiamata { get; set; }
[Display(Name = "MANODOPERA")]
public double? manodopera { get; set; }
[Display(Name = "SPESE VIAGGIO")]
public double? spese_viaggio { get; set; }
[Display(Name = "PAGAMENTO")]
public string? pagamento { get; set; }
[Display(Name = "ANTICIPO")]
public double? anticipo { get; set; }
[Display(Name = "TOTALE")]
public double? totale { get; set; }
[Display(Name = "NOTE PAGAMENTO")]
public string? note_pagamento { get; set; }
[Display(Name = "TIPO INTERVENTO")]
public string? tipo_intervento { get; set; }
[Display(Name = "FOTO 1")]
public string? rafoto { get; set; }
[Display(Name = "FOTO 2")]
public string? rafoto2 { get; set; }
[Display(Name = "FOTO 3")]
public string? rafoto3 { get; set; }
[Display(Name = "FOTO 4")]
public string? rafoto4 { get; set; }
[Display(Name = "FOTO 5")]
public string? rafoto5 { get; set; }
[Display(Name = "FOTO 6")]
public string? rafoto6 { get; set; }
[Display(Name = "FOTO 7")]
public string? rafoto7 { get; set; }
[Display(Name = "FOTO 8")]
public string? rafoto8 { get; set; }
[Display(Name = "FOTO 9")]
public string? rafoto9 { get; set; }
[Display(Name = "FOTO 10")]
public string? rafoto10 { get; set; }
}
}

88
Views/Anag/Create.cshtml Normal file
View File

@ -0,0 +1,88 @@
@model VirtualTask.Models.Anag
@{
ViewData["Title"] = "Create";
}
<h1>Create</h1>
<h4>Anag</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="antipcon" class="control-label"></label>
<input asp-for="antipcon" class="form-control" />
<span asp-validation-for="antipcon" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ancodice" class="control-label"></label>
<input asp-for="ancodice" class="form-control" />
<span asp-validation-for="ancodice" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="an_email" class="control-label"></label>
<input asp-for="an_email" class="form-control" />
<span asp-validation-for="an_email" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ancodfis" class="control-label"></label>
<input asp-for="ancodfis" class="form-control" />
<span asp-validation-for="ancodfis" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="anpariva" class="control-label"></label>
<input asp-for="anpariva" class="form-control" />
<span asp-validation-for="anpariva" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="anindiri" class="control-label"></label>
<input asp-for="anindiri" class="form-control" />
<span asp-validation-for="anindiri" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="antelefo" class="control-label"></label>
<input asp-for="antelefo" class="form-control" />
<span asp-validation-for="antelefo" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="annumcel" class="control-label"></label>
<input asp-for="annumcel" class="form-control" />
<span asp-validation-for="annumcel" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="an_empec" class="control-label"></label>
<input asp-for="an_empec" class="form-control" />
<span asp-validation-for="an_empec" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="andescri" class="control-label"></label>
<input asp-for="andescri" class="form-control" />
<span asp-validation-for="andescri" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="annumlis" class="control-label"></label>
<input asp-for="annumlis" class="form-control" />
<span asp-validation-for="annumlis" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="andtobso" class="control-label"></label>
<input asp-for="andtobso" class="form-control" />
<span asp-validation-for="andtobso" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-primary" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

93
Views/Anag/Delete.cshtml Normal file
View File

@ -0,0 +1,93 @@
@model VirtualTask.Models.Anag
@{
ViewData["Title"] = "Delete";
}
<h1>Delete</h1>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>Anag</h4>
<hr />
<dl class="row">
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.antipcon)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.antipcon)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.ancodice)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.ancodice)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.an_email)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.an_email)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.ancodfis)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.ancodfis)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.anpariva)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.anpariva)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.anindiri)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.anindiri)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.antelefo)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.antelefo)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.annumcel)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.annumcel)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.an_empec)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.an_empec)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.andescri)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.andescri)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.annumlis)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.annumlis)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.andtobso)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.andtobso)
</dd>
</dl>
<form asp-action="DeleteConfirmed">
<input type="submit" value="Delete" class="btn btn-danger" /> |
<input type="hidden" id="id" value=@Html.DisplayFor(model => model.ancodice) name="id" />
<a asp-action="Index">Back to List</a>
</form>
</div>

90
Views/Anag/Details.cshtml Normal file
View File

@ -0,0 +1,90 @@
@model VirtualTask.Models.Anag
@{
ViewData["Title"] = "Details";
}
<h1>Details</h1>
<div>
<h4>Anag</h4>
<hr />
<dl class="row">
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.antipcon)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.antipcon)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.ancodice)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.ancodice)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.an_email)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.an_email)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.ancodfis)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.ancodfis)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.anpariva)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.anpariva)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.anindiri)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.anindiri)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.antelefo)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.antelefo)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.annumcel)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.annumcel)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.an_empec)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.an_empec)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.andescri)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.andescri)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.annumlis)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.annumlis)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.andtobso)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.andtobso)
</dd>
</dl>
</div>
<div>
@Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) |
<a asp-action="Index">Back to List</a>
</div>

88
Views/Anag/Edit.cshtml Normal file
View File

@ -0,0 +1,88 @@
@model VirtualTask.Models.Anag
@{
ViewData["Title"] = "Edit";
}
<h1>Edit</h1>
<h4>Anag</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="antipcon" class="control-label"></label>
<input asp-for="antipcon" class="form-control" />
<span asp-validation-for="antipcon" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ancodice" class="control-label"></label>
<input asp-for="ancodice" class="form-control" />
<span asp-validation-for="ancodice" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="an_email" class="control-label"></label>
<input asp-for="an_email" class="form-control" />
<span asp-validation-for="an_email" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ancodfis" class="control-label"></label>
<input asp-for="ancodfis" class="form-control" />
<span asp-validation-for="ancodfis" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="anpariva" class="control-label"></label>
<input asp-for="anpariva" class="form-control" />
<span asp-validation-for="anpariva" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="anindiri" class="control-label"></label>
<input asp-for="anindiri" class="form-control" />
<span asp-validation-for="anindiri" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="antelefo" class="control-label"></label>
<input asp-for="antelefo" class="form-control" />
<span asp-validation-for="antelefo" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="annumcel" class="control-label"></label>
<input asp-for="annumcel" class="form-control" />
<span asp-validation-for="annumcel" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="an_empec" class="control-label"></label>
<input asp-for="an_empec" class="form-control" />
<span asp-validation-for="an_empec" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="andescri" class="control-label"></label>
<input asp-for="andescri" class="form-control" />
<span asp-validation-for="andescri" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="annumlis" class="control-label"></label>
<input asp-for="annumlis" class="form-control" />
<span asp-validation-for="annumlis" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="andtobso" class="control-label"></label>
<input asp-for="andtobso" class="form-control" />
<span asp-validation-for="andtobso" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Save" class="btn btn-primary" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@ -106,9 +106,9 @@
@Html.DisplayFor(modelItem => item.andtobso)
</td>*@
<td>
@Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
@Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
@Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
@Html.ActionLink("Edit", "Edit", new { id = item.ancodice }) |
@Html.ActionLink("Details", "Details", new { id = item.ancodice }) |
@Html.ActionLink("Delete", "Delete", new { id = item.ancodice })
</td>
</tr>
}

View File

@ -135,6 +135,7 @@
<form asp-action="DeleteConfirmed">
<input type="submit" value="Delete" class="btn btn-danger" /> |
<input type="hidden" id="id" value=@Html.DisplayFor(model => model.cccodice) name="id" />
<a asp-action="Index">Back to List</a>
</form>
</div>

View File

@ -1,5 +1,10 @@
@model IEnumerable<VirtualTask.Models.Chiusure>
@using X.PagedList.Mvc.Core;
@using X.PagedList.Web.Common;
@using X.PagedList;
@model IPagedList<VirtualTask.Models.Chiusure>
<link href="~/Content/PagedList.css" rel="stylesheet" type="text/css" />
@{
ViewData["Title"] = "Index";
}
@ -9,20 +14,31 @@
<p>
<a asp-action="Create">Create New</a>
</p>
@using (Html.BeginForm())
{
<p>
Find by name: @Html.TextBox("SearchString")
<input type="submit" value="search"/>
</p>
}
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.cccodazi)
@* @Html.DisplayNameFor(model => model.cccodazi) *@
AZIENDA
</th>
<th>
@Html.DisplayNameFor(model => model.cccodice)
@* @Html.DisplayNameFor(model => model.cccodice) *@
CODICE
</th>
<th>
@Html.DisplayNameFor(model => model.ccdescr)
@* @Html.DisplayNameFor(model => model.ccdescr) *@
DESCRIZIONE
</th>
<th>
@Html.DisplayNameFor(model => model.ccdessup)
@* @Html.DisplayNameFor(model => model.ccdessup) *@
DESC. SUP.
</th>
@ -37,7 +53,7 @@
<tr>
<td>
@Html.DisplayFor(modelItem => item.cccodazi)
</td>
</td> @* => *@
<td>
@Html.DisplayFor(modelItem => item.cccodice)
</td>
@ -57,3 +73,18 @@
}
</tbody>
</table>
<br />
<nav>
@Html.PagedListPager(Model, page => Url.Action("index", new { page = page, searchString=@ViewData["CurrentFilter"] }), new PagedListRenderOptions()
{
ActiveLiElementClass = "active",
PageClasses = new[]{ "page-link"},
LiElementClasses=new[] { "page-item" },
UlElementClasses = new[] { "pagination","justify-content-center", "mt-3" },
LinkToNextPageFormat = "Next",
LinkToPreviousPageFormat = "Previous",
MaximumPageNumbersToDisplay = 5,
DisplayLinkToPreviousPage = PagedListDisplayMode.Always,
DisplayLinkToNextPage = PagedListDisplayMode.Always
})
</nav>

View File

@ -0,0 +1,367 @@
@model VirtualTask.Models.Rapp_New
@{
ViewData["Title"] = "Create";
}
<h1>Create</h1>
<h4>Rapp_New</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="seriale_rapportino" class="control-label"></label>
<input asp-for="seriale_rapportino" class="form-control" />
<span asp-validation-for="seriale_rapportino" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="tipo_rapportino" class="control-label"></label>
<input asp-for="tipo_rapportino" class="form-control" />
<span asp-validation-for="tipo_rapportino" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="azienda_impianto" class="control-label"></label>
<input asp-for="azienda_impianto" class="form-control" />
<span asp-validation-for="azienda_impianto" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_impianto" class="control-label"></label>
<input asp-for="codice_impianto" class="form-control" />
<span asp-validation-for="codice_impianto" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="azienda_chiamata" class="control-label"></label>
<input asp-for="azienda_chiamata" class="form-control" />
<span asp-validation-for="azienda_chiamata" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="seriale_chiamata" class="control-label"></label>
<input asp-for="seriale_chiamata" class="form-control" />
<span asp-validation-for="seriale_chiamata" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="seriale_commessa" class="control-label"></label>
<input asp-for="seriale_commessa" class="form-control" />
<span asp-validation-for="seriale_commessa" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="data_rapportino" class="control-label"></label>
<input asp-for="data_rapportino" class="form-control" />
<span asp-validation-for="data_rapportino" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ora_ini_rapportino" class="control-label"></label>
<input asp-for="ora_ini_rapportino" class="form-control" />
<span asp-validation-for="ora_ini_rapportino" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="min_ini_rapportino" class="control-label"></label>
<input asp-for="min_ini_rapportino" class="form-control" />
<span asp-validation-for="min_ini_rapportino" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ora_fin_rapportino" class="control-label"></label>
<input asp-for="ora_fin_rapportino" class="form-control" />
<span asp-validation-for="ora_fin_rapportino" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="min_fin_rapportino" class="control-label"></label>
<input asp-for="min_fin_rapportino" class="form-control" />
<span asp-validation-for="min_fin_rapportino" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_1" class="control-label"></label>
@* <input asp-for="codice_chiusura_1" class="form-control" /> *@
@Html.DropDownListFor(x => x.codice_chiusura_1,
(IEnumerable<SelectListItem>)ViewBag.AllStockList)
<span asp-validation-for="codice_chiusura_1" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_2" class="control-label"></label>
@* <input asp-for="codice_chiusura_2" class="form-control" /> *@
@Html.DropDownListFor(x => x.codice_chiusura_2,
(IEnumerable<SelectListItem>)ViewBag.AllStockList)
<span asp-validation-for="codice_chiusura_2" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_3" class="control-label"></label>
@* <input asp-for="codice_chiusura_3" class="form-control" /> *@
@Html.DropDownListFor(x => x.codice_chiusura_3,
(IEnumerable<SelectListItem>)ViewBag.AllStockList)
<span asp-validation-for="codice_chiusura_3" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_4" class="control-label"></label>
@* <input asp-for="codice_chiusura_4" class="form-control" /> *@
@Html.DropDownListFor(x => x.codice_chiusura_4,
(IEnumerable<SelectListItem>)ViewBag.AllStockList)
<span asp-validation-for="codice_chiusura_4" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_5" class="control-label"></label>
@* <input asp-for="codice_chiusura_5" class="form-control" /> *@
@Html.DropDownListFor(x => x.codice_chiusura_5,
(IEnumerable<SelectListItem>)ViewBag.AllStockList)
<span asp-validation-for="codice_chiusura_5" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_6" class="control-label"></label>
@* <input asp-for="codice_chiusura_6" class="form-control" /> *@
@Html.DropDownListFor(x => x.codice_chiusura_6,
(IEnumerable<SelectListItem>)ViewBag.AllStockList)
<span asp-validation-for="codice_chiusura_6" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_7" class="control-label"></label>
@* <input asp-for="codice_chiusura_7" class="form-control" /> *@
@Html.DropDownListFor(x => x.codice_chiusura_7,
(IEnumerable<SelectListItem>)ViewBag.AllStockList)
<span asp-validation-for="codice_chiusura_7" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_8" class="control-label"></label>
@* <input asp-for="codice_chiusura_8" class="form-control" /> *@
@Html.DropDownListFor(x => x.codice_chiusura_8,
(IEnumerable<SelectListItem>)ViewBag.AllStockList)
<span asp-validation-for="codice_chiusura_8" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_9" class="control-label"></label>
@* <input asp-for="codice_chiusura_9" class="form-control" /> *@
@Html.DropDownListFor(x => x.codice_chiusura_9,
(IEnumerable<SelectListItem>)ViewBag.AllStockList)
<span asp-validation-for="codice_chiusura_9" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_10" class="control-label"></label>
@* <input asp-for="codice_chiusura_10" class="form-control" /> *@
@Html.DropDownListFor(x => x.codice_chiusura_10,
(IEnumerable<SelectListItem>)ViewBag.AllStockList)
<span asp-validation-for="codice_chiusura_10" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="descrizione_intervento" class="control-label"></label>
<input asp-for="descrizione_intervento" class="form-control" />
<span asp-validation-for="descrizione_intervento" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="stato_finale" class="control-label"></label>
<input asp-for="stato_finale" class="form-control" />
<span asp-validation-for="stato_finale" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="generato" class="control-label"></label>
<input asp-for="generato" class="form-control" />
<span asp-validation-for="generato" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="azienda_tecnico" class="control-label"></label>
<input asp-for="azienda_tecnico" class="form-control" />
<span asp-validation-for="azienda_tecnico" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_tecnico" class="control-label"></label>
<input asp-for="codice_tecnico" class="form-control" />
<span asp-validation-for="codice_tecnico" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rifiutata" class="control-label"></label>
<input asp-for="rifiutata" class="form-control" />
<span asp-validation-for="rifiutata" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="firma" class="control-label"></label>
<input asp-for="firma" class="form-control" />
<span asp-validation-for="firma" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="incarico" class="control-label"></label>
<input asp-for="incarico" class="form-control" />
<span asp-validation-for="incarico" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="data_validita" class="control-label"></label>
<input asp-for="data_validita" class="form-control" />
<span asp-validation-for="data_validita" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="immagine" class="control-label"></label>
<input asp-for="immagine" class="form-control" />
<span asp-validation-for="immagine" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ser_buono" class="control-label"></label>
<input asp-for="ser_buono" class="form-control" />
<span asp-validation-for="ser_buono" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="data_effettiva" class="control-label"></label>
<input asp-for="data_effettiva" class="form-control" />
<span asp-validation-for="data_effettiva" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_intervento" class="control-label"></label>
<input asp-for="codice_intervento" class="form-control" />
<span asp-validation-for="codice_intervento" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="difetti_riscontrati" class="control-label"></label>
<input asp-for="difetti_riscontrati" class="form-control" />
<span asp-validation-for="difetti_riscontrati" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="lavoro_eseguito" class="control-label"></label>
<input asp-for="lavoro_eseguito" class="form-control" />
<span asp-validation-for="lavoro_eseguito" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="esito_intervento" class="control-label"></label>
<input asp-for="esito_intervento" class="form-control" />
<span asp-validation-for="esito_intervento" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="note_intervento" class="control-label"></label>
<input asp-for="note_intervento" class="form-control" />
<span asp-validation-for="note_intervento" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="nuovo_contratto" class="control-label"></label>
<input asp-for="nuovo_contratto" class="form-control" />
<span asp-validation-for="nuovo_contratto" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ore_lavoro" class="control-label"></label>
<input asp-for="ore_lavoro" class="form-control" />
<span asp-validation-for="ore_lavoro" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="causale" class="control-label"></label>
<input asp-for="causale" class="form-control" />
<span asp-validation-for="causale" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="materiale" class="control-label"></label>
<input asp-for="materiale" class="form-control" />
<span asp-validation-for="materiale" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="diritto_chiamata" class="control-label"></label>
<input asp-for="diritto_chiamata" class="form-control" />
<span asp-validation-for="diritto_chiamata" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="manodopera" class="control-label"></label>
<input asp-for="manodopera" class="form-control" />
<span asp-validation-for="manodopera" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="spese_viaggio" class="control-label"></label>
<input asp-for="spese_viaggio" class="form-control" />
<span asp-validation-for="spese_viaggio" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="pagamento" class="control-label"></label>
<input asp-for="pagamento" class="form-control" />
<span asp-validation-for="pagamento" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="anticipo" class="control-label"></label>
<input asp-for="anticipo" class="form-control" />
<span asp-validation-for="anticipo" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="totale" class="control-label"></label>
<input asp-for="totale" class="form-control" />
<span asp-validation-for="totale" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="note_pagamento" class="control-label"></label>
<input asp-for="note_pagamento" class="form-control" />
<span asp-validation-for="note_pagamento" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="tipo_intervento" class="control-label"></label>
<input asp-for="tipo_intervento" class="form-control" />
<span asp-validation-for="tipo_intervento" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto" class="control-label"></label>
<input asp-for="rafoto" class="form-control" />
<span asp-validation-for="rafoto" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto2" class="control-label"></label>
<input asp-for="rafoto2" class="form-control" />
<span asp-validation-for="rafoto2" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto3" class="control-label"></label>
<input asp-for="rafoto3" class="form-control" />
<span asp-validation-for="rafoto3" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto4" class="control-label"></label>
<input asp-for="rafoto4" class="form-control" />
<span asp-validation-for="rafoto4" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto5" class="control-label"></label>
<input asp-for="rafoto5" class="form-control" />
<span asp-validation-for="rafoto5" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto6" class="control-label"></label>
<input asp-for="rafoto6" class="form-control" />
<span asp-validation-for="rafoto6" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto7" class="control-label"></label>
<input asp-for="rafoto7" class="form-control" />
<span asp-validation-for="rafoto7" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto8" class="control-label"></label>
<input asp-for="rafoto8" class="form-control" />
<span asp-validation-for="rafoto8" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto9" class="control-label"></label>
<input asp-for="rafoto9" class="form-control" />
<span asp-validation-for="rafoto9" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto10" class="control-label"></label>
<input asp-for="rafoto10" class="form-control" />
<span asp-validation-for="rafoto10" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-primary" />
</div>
</form>
</div>
</div>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/css/select2.min.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/select2@4.0.13/dist/js/select2.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/css/bootstrap-select.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/js/bootstrap-select.min.js"></script>
<!-- (Optional) Latest compiled and minified JavaScript translation files -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/js/i18n/defaults-*.min.js"></script>
<script type="text/javascript">
$(function () {
$("#codice_chiusura_1").select2();
});
</script>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@ -0,0 +1,387 @@
@model VirtualTask.Models.Rapp_New
@{
ViewData["Title"] = "Delete";
}
<h1>Delete</h1>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>Rapp_New</h4>
<hr />
<dl class="row">
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.seriale_rapportino)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.seriale_rapportino)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.tipo_rapportino)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.tipo_rapportino)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.azienda_impianto)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.azienda_impianto)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_impianto)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_impianto)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.azienda_chiamata)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.azienda_chiamata)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.seriale_chiamata)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.seriale_chiamata)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.seriale_commessa)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.seriale_commessa)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.data_rapportino)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.data_rapportino)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.ora_ini_rapportino)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.ora_ini_rapportino)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.min_ini_rapportino)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.min_ini_rapportino)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.ora_fin_rapportino)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.ora_fin_rapportino)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.min_fin_rapportino)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.min_fin_rapportino)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_1)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_1)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_2)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_2)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_3)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_3)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_4)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_4)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_5)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_5)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_6)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_6)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_7)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_7)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_8)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_8)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_9)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_9)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_10)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_10)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.descrizione_intervento)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.descrizione_intervento)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.stato_finale)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.stato_finale)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.generato)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.generato)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.azienda_tecnico)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.azienda_tecnico)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_tecnico)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_tecnico)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rifiutata)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rifiutata)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.firma)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.firma)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.incarico)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.incarico)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.data_validita)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.data_validita)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.immagine)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.immagine)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.ser_buono)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.ser_buono)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.data_effettiva)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.data_effettiva)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_intervento)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_intervento)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.difetti_riscontrati)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.difetti_riscontrati)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.lavoro_eseguito)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.lavoro_eseguito)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.esito_intervento)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.esito_intervento)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.note_intervento)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.note_intervento)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.nuovo_contratto)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.nuovo_contratto)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.ore_lavoro)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.ore_lavoro)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.causale)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.causale)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.materiale)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.materiale)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.diritto_chiamata)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.diritto_chiamata)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.manodopera)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.manodopera)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.spese_viaggio)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.spese_viaggio)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.pagamento)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.pagamento)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.anticipo)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.anticipo)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.totale)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.totale)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.note_pagamento)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.note_pagamento)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.tipo_intervento)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.tipo_intervento)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto2)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto2)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto3)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto3)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto4)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto4)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto5)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto5)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto6)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto6)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto7)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto7)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto8)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto8)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto9)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto9)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto10)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto10)
</dd>
</dl>
<form asp-action="DeleteConfirmed">
<input type="submit" value="Delete" class="btn btn-danger" /> |
<input type="hidden" id="id" value=@Html.DisplayFor(model => model.seriale_rapportino) name="id" />
<a asp-action="Index">Back to List</a>
</form>
</div>

View File

@ -0,0 +1,384 @@
@model VirtualTask.Models.Rapp_New
@{
ViewData["Title"] = "Details";
}
<h1>Details</h1>
<div>
<h4>Rapp_New</h4>
<hr />
<dl class="row">
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.seriale_rapportino)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.seriale_rapportino)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.tipo_rapportino)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.tipo_rapportino)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.azienda_impianto)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.azienda_impianto)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_impianto)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_impianto)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.azienda_chiamata)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.azienda_chiamata)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.seriale_chiamata)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.seriale_chiamata)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.seriale_commessa)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.seriale_commessa)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.data_rapportino)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.data_rapportino)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.ora_ini_rapportino)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.ora_ini_rapportino)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.min_ini_rapportino)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.min_ini_rapportino)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.ora_fin_rapportino)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.ora_fin_rapportino)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.min_fin_rapportino)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.min_fin_rapportino)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_1)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_1)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_2)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_2)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_3)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_3)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_4)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_4)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_5)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_5)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_6)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_6)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_7)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_7)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_8)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_8)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_9)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_9)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_chiusura_10)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_chiusura_10)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.descrizione_intervento)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.descrizione_intervento)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.stato_finale)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.stato_finale)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.generato)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.generato)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.azienda_tecnico)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.azienda_tecnico)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_tecnico)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_tecnico)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rifiutata)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rifiutata)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.firma)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.firma)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.incarico)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.incarico)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.data_validita)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.data_validita)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.immagine)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.immagine)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.ser_buono)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.ser_buono)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.data_effettiva)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.data_effettiva)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.codice_intervento)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.codice_intervento)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.difetti_riscontrati)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.difetti_riscontrati)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.lavoro_eseguito)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.lavoro_eseguito)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.esito_intervento)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.esito_intervento)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.note_intervento)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.note_intervento)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.nuovo_contratto)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.nuovo_contratto)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.ore_lavoro)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.ore_lavoro)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.causale)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.causale)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.materiale)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.materiale)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.diritto_chiamata)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.diritto_chiamata)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.manodopera)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.manodopera)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.spese_viaggio)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.spese_viaggio)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.pagamento)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.pagamento)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.anticipo)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.anticipo)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.totale)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.totale)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.note_pagamento)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.note_pagamento)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.tipo_intervento)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.tipo_intervento)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto2)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto2)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto3)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto3)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto4)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto4)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto5)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto5)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto6)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto6)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto7)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto7)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto8)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto8)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto9)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto9)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.rafoto10)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.rafoto10)
</dd>
</dl>
</div>
<div>
@Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) |
<a asp-action="Index">Back to List</a>
</div>

333
Views/Rapp_New/Edit.cshtml Normal file
View File

@ -0,0 +1,333 @@
@model VirtualTask.Models.Rapp_New
@{
ViewData["Title"] = "Edit";
}
<h1>Edit</h1>
<h4>Rapp_New</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="seriale_rapportino" class="control-label"></label>
<input asp-for="seriale_rapportino" class="form-control" />
<span asp-validation-for="seriale_rapportino" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="tipo_rapportino" class="control-label"></label>
<input asp-for="tipo_rapportino" class="form-control" />
<span asp-validation-for="tipo_rapportino" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="azienda_impianto" class="control-label"></label>
<input asp-for="azienda_impianto" class="form-control" />
<span asp-validation-for="azienda_impianto" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_impianto" class="control-label"></label>
<input asp-for="codice_impianto" class="form-control" />
<span asp-validation-for="codice_impianto" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="azienda_chiamata" class="control-label"></label>
<input asp-for="azienda_chiamata" class="form-control" />
<span asp-validation-for="azienda_chiamata" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="seriale_chiamata" class="control-label"></label>
<input asp-for="seriale_chiamata" class="form-control" />
<span asp-validation-for="seriale_chiamata" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="seriale_commessa" class="control-label"></label>
<input asp-for="seriale_commessa" class="form-control" />
<span asp-validation-for="seriale_commessa" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="data_rapportino" class="control-label"></label>
<input asp-for="data_rapportino" class="form-control" />
<span asp-validation-for="data_rapportino" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ora_ini_rapportino" class="control-label"></label>
<input asp-for="ora_ini_rapportino" class="form-control" />
<span asp-validation-for="ora_ini_rapportino" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="min_ini_rapportino" class="control-label"></label>
<input asp-for="min_ini_rapportino" class="form-control" />
<span asp-validation-for="min_ini_rapportino" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ora_fin_rapportino" class="control-label"></label>
<input asp-for="ora_fin_rapportino" class="form-control" />
<span asp-validation-for="ora_fin_rapportino" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="min_fin_rapportino" class="control-label"></label>
<input asp-for="min_fin_rapportino" class="form-control" />
<span asp-validation-for="min_fin_rapportino" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_1" class="control-label"></label>
<input asp-for="codice_chiusura_1" class="form-control" />
<span asp-validation-for="codice_chiusura_1" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_2" class="control-label"></label>
<input asp-for="codice_chiusura_2" class="form-control" />
<span asp-validation-for="codice_chiusura_2" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_3" class="control-label"></label>
<input asp-for="codice_chiusura_3" class="form-control" />
<span asp-validation-for="codice_chiusura_3" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_4" class="control-label"></label>
<input asp-for="codice_chiusura_4" class="form-control" />
<span asp-validation-for="codice_chiusura_4" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_5" class="control-label"></label>
<input asp-for="codice_chiusura_5" class="form-control" />
<span asp-validation-for="codice_chiusura_5" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_6" class="control-label"></label>
<input asp-for="codice_chiusura_6" class="form-control" />
<span asp-validation-for="codice_chiusura_6" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_7" class="control-label"></label>
<input asp-for="codice_chiusura_7" class="form-control" />
<span asp-validation-for="codice_chiusura_7" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_8" class="control-label"></label>
<input asp-for="codice_chiusura_8" class="form-control" />
<span asp-validation-for="codice_chiusura_8" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_9" class="control-label"></label>
<input asp-for="codice_chiusura_9" class="form-control" />
<span asp-validation-for="codice_chiusura_9" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_chiusura_10" class="control-label"></label>
<input asp-for="codice_chiusura_10" class="form-control" />
<span asp-validation-for="codice_chiusura_10" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="descrizione_intervento" class="control-label"></label>
<input asp-for="descrizione_intervento" class="form-control" />
<span asp-validation-for="descrizione_intervento" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="stato_finale" class="control-label"></label>
<input asp-for="stato_finale" class="form-control" />
<span asp-validation-for="stato_finale" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="generato" class="control-label"></label>
<input asp-for="generato" class="form-control" />
<span asp-validation-for="generato" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="azienda_tecnico" class="control-label"></label>
<input asp-for="azienda_tecnico" class="form-control" />
<span asp-validation-for="azienda_tecnico" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_tecnico" class="control-label"></label>
<input asp-for="codice_tecnico" class="form-control" />
<span asp-validation-for="codice_tecnico" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rifiutata" class="control-label"></label>
<input asp-for="rifiutata" class="form-control" />
<span asp-validation-for="rifiutata" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="firma" class="control-label"></label>
<input asp-for="firma" class="form-control" />
<span asp-validation-for="firma" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="incarico" class="control-label"></label>
<input asp-for="incarico" class="form-control" />
<span asp-validation-for="incarico" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="data_validita" class="control-label"></label>
<input asp-for="data_validita" class="form-control" />
<span asp-validation-for="data_validita" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="immagine" class="control-label"></label>
<input asp-for="immagine" class="form-control" />
<span asp-validation-for="immagine" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ser_buono" class="control-label"></label>
<input asp-for="ser_buono" class="form-control" />
<span asp-validation-for="ser_buono" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="data_effettiva" class="control-label"></label>
<input asp-for="data_effettiva" class="form-control" />
<span asp-validation-for="data_effettiva" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="codice_intervento" class="control-label"></label>
<input asp-for="codice_intervento" class="form-control" />
<span asp-validation-for="codice_intervento" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="difetti_riscontrati" class="control-label"></label>
<input asp-for="difetti_riscontrati" class="form-control" />
<span asp-validation-for="difetti_riscontrati" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="lavoro_eseguito" class="control-label"></label>
<input asp-for="lavoro_eseguito" class="form-control" />
<span asp-validation-for="lavoro_eseguito" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="esito_intervento" class="control-label"></label>
<input asp-for="esito_intervento" class="form-control" />
<span asp-validation-for="esito_intervento" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="note_intervento" class="control-label"></label>
<input asp-for="note_intervento" class="form-control" />
<span asp-validation-for="note_intervento" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="nuovo_contratto" class="control-label"></label>
<input asp-for="nuovo_contratto" class="form-control" />
<span asp-validation-for="nuovo_contratto" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ore_lavoro" class="control-label"></label>
<input asp-for="ore_lavoro" class="form-control" />
<span asp-validation-for="ore_lavoro" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="causale" class="control-label"></label>
<input asp-for="causale" class="form-control" />
<span asp-validation-for="causale" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="materiale" class="control-label"></label>
<input asp-for="materiale" class="form-control" />
<span asp-validation-for="materiale" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="diritto_chiamata" class="control-label"></label>
<input asp-for="diritto_chiamata" class="form-control" />
<span asp-validation-for="diritto_chiamata" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="manodopera" class="control-label"></label>
<input asp-for="manodopera" class="form-control" />
<span asp-validation-for="manodopera" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="spese_viaggio" class="control-label"></label>
<input asp-for="spese_viaggio" class="form-control" />
<span asp-validation-for="spese_viaggio" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="pagamento" class="control-label"></label>
<input asp-for="pagamento" class="form-control" />
<span asp-validation-for="pagamento" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="anticipo" class="control-label"></label>
<input asp-for="anticipo" class="form-control" />
<span asp-validation-for="anticipo" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="totale" class="control-label"></label>
<input asp-for="totale" class="form-control" />
<span asp-validation-for="totale" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="note_pagamento" class="control-label"></label>
<input asp-for="note_pagamento" class="form-control" />
<span asp-validation-for="note_pagamento" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="tipo_intervento" class="control-label"></label>
<input asp-for="tipo_intervento" class="form-control" />
<span asp-validation-for="tipo_intervento" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto" class="control-label"></label>
<input asp-for="rafoto" class="form-control" />
<span asp-validation-for="rafoto" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto2" class="control-label"></label>
<input asp-for="rafoto2" class="form-control" />
<span asp-validation-for="rafoto2" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto3" class="control-label"></label>
<input asp-for="rafoto3" class="form-control" />
<span asp-validation-for="rafoto3" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto4" class="control-label"></label>
<input asp-for="rafoto4" class="form-control" />
<span asp-validation-for="rafoto4" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto5" class="control-label"></label>
<input asp-for="rafoto5" class="form-control" />
<span asp-validation-for="rafoto5" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto6" class="control-label"></label>
<input asp-for="rafoto6" class="form-control" />
<span asp-validation-for="rafoto6" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto7" class="control-label"></label>
<input asp-for="rafoto7" class="form-control" />
<span asp-validation-for="rafoto7" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto8" class="control-label"></label>
<input asp-for="rafoto8" class="form-control" />
<span asp-validation-for="rafoto8" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto9" class="control-label"></label>
<input asp-for="rafoto9" class="form-control" />
<span asp-validation-for="rafoto9" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="rafoto10" class="control-label"></label>
<input asp-for="rafoto10" class="form-control" />
<span asp-validation-for="rafoto10" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Save" class="btn btn-primary" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

486
Views/Rapp_New/Index.cshtml Normal file
View File

@ -0,0 +1,486 @@
@model IPagedList<VirtualTask.Models.Rapp_New>
@using X.PagedList;
@using X.PagedList.Mvc.Core;
@using X.PagedList.Web.Common;
<link href="~/Content/PagedList.css" rel="stylesheet" type="text/css" />
@{
ViewData["Title"] = "Index";
}
<h1>Index</h1>
<p>
<a asp-action="Create">Create New</a>
</p>
@using (Html.BeginForm())
{
<p>
Find by name: @Html.TextBox("SearchString")
<input type="submit" value="Search" />
</p>
}
<table class="table">
<thead>
<tr>
<th>
@* @Html.DisplayNameFor(model => model.seriale_rapportino) *@
SERIALE RAPPORTINO
</th>
<th>
@* @Html.DisplayNameFor(model => model.tipo_rapportino) *@
TIPO RAPPORTINI
</th>
<th>
@* @Html.DisplayNameFor(model => model.azienda_impianto) *@
AZIENDA
</th>
<th>
@* @Html.DisplayNameFor(model => model.codice_impianto) *@
CODICE IMPIANTO
</th>
<th>
@* @Html.DisplayNameFor(model => model.azienda_chiamata) *@
AZ. CHIAMATA
</th>
<th>
@* @Html.DisplayNameFor(model => model.seriale_chiamata) *@
SERIALE CHIAMATA
</th>
<th>
@* @Html.DisplayNameFor(model => model.seriale_commessa) *@
SERIALE COMMESSA
</th>
<th>
@* @Html.DisplayNameFor(model => model.data_rapportino) *@
DATA RAPPORTINO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.ora_ini_rapportino) *@
ORA INIZIO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.min_ini_rapportino) *@
MINUTO INIZIO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.ora_fin_rapportino) *@
ORA FINE
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.min_fin_rapportino) *@
MINUTO FINE
</th>
<th>
@* @Html.DisplayNameFor(model => model.codice_chiusura_1) *@
CODICE CHIUSURA 1
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.codice_chiusura_2) *@
CODICE CHIUSURA 2
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.codice_chiusura_3) *@
CODICE CHIUSURA 3
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.codice_chiusura_4) *@
CODICE CHIUSURA 4
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.codice_chiusura_5) *@
CODICE CHIUSURA 5
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.codice_chiusura_6) *@
CODICE CHIUSURA 6
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.codice_chiusura_7) *@
CODICE CHIUSURA 7
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.codice_chiusura_8) *@
CODICE CHIUSURA 8
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.codice_chiusura_9) *@
CODICE CHIUSURA 9
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.codice_chiusura_10) *@
CODICE CHIUSURA 10
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.descrizione_intervento) *@
DESC. INTERVENTO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.stato_finale) *@
STATO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.generato) *@
GENERATO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.azienda_tecnico) *@
AZ. TECNICO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.codice_tecnico) *@
COD. TECNICO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.rifiutata) *@
RIFIUTATA
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.firma) *@
FIRMA
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.incarico) *@
INCARICO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.data_validita) *@
DATA VALIDITA'
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.immagine) *@
IMMAGINE
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.ser_buono) *@
SERIALE BUONO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.data_effettiva) *@
DATA EFFETTIVA
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.codice_intervento) *@
CODICE INTERVENTO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.difetti_riscontrati) *@
DIFETTI
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.lavoro_eseguito) *@
LAVORO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.esito_intervento) *@
ESITO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.note_intervento) *@
NOTE
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.nuovo_contratto) *@
NUOVO CONTRATTO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.ore_lavoro) *@
ORE LAVORO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.causale) *@
CAUSALE
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.materiale) *@
MATERIALE
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.diritto_chiamata) *@
DIRITTO CHIAMATA
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.manodopera) *@
MANODOPERA
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.spese_viaggio) *@
SPESE VIAGGIO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.pagamento) *@
PAGAMENTO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.anticipo) *@
ANTICIPO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.totale) *@
TOTALE
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.note_pagamento) *@
NOTE PAGAMENTO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.tipo_intervento) *@
TIPO INTERVENTO
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.rafoto) *@
FOTO 1
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.rafoto2) *@
FOTO 2
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.rafoto3) *@
FOTO 3
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.rafoto4) *@
FOTO 4
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.rafoto5) *@
FOTO 5
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.rafoto6) *@
FOTO 6
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.rafoto7) *@
FOTO 7
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.rafoto8) *@
FOTO 8
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.rafoto9) *@
FOTO 9
</th>
<th hidden>
@* @Html.DisplayNameFor(model => model.rafoto10) *@
FOTO 10
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.seriale_rapportino)
</td>
<td>
@Html.DisplayFor(modelItem => item.tipo_rapportino)
</td>
<td>
@Html.DisplayFor(modelItem => item.azienda_impianto)
</td>
<td>
@Html.DisplayFor(modelItem => item.codice_impianto)
</td>
<td>
@Html.DisplayFor(modelItem => item.azienda_chiamata)
</td>
<td>
@Html.DisplayFor(modelItem => item.seriale_chiamata)
</td>
<td>
@Html.DisplayFor(modelItem => item.seriale_commessa)
</td>
<td>
@Html.DisplayFor(modelItem => item.data_rapportino)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.ora_ini_rapportino)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.min_ini_rapportino)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.ora_fin_rapportino)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.min_fin_rapportino)
</td>
<td>
@Html.DisplayFor(modelItem => item.codice_chiusura_1)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.codice_chiusura_2)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.codice_chiusura_3)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.codice_chiusura_4)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.codice_chiusura_5)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.codice_chiusura_6)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.codice_chiusura_7)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.codice_chiusura_8)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.codice_chiusura_9)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.codice_chiusura_10)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.descrizione_intervento)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.stato_finale)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.generato)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.azienda_tecnico)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.codice_tecnico)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.rifiutata)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.firma)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.incarico)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.data_validita)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.immagine)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.ser_buono)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.data_effettiva)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.codice_intervento)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.difetti_riscontrati)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.lavoro_eseguito)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.esito_intervento)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.note_intervento)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.nuovo_contratto)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.ore_lavoro)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.causale)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.materiale)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.diritto_chiamata)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.manodopera)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.spese_viaggio)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.pagamento)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.anticipo)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.totale)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.note_pagamento)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.tipo_intervento)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.rafoto)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.rafoto2)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.rafoto3)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.rafoto4)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.rafoto5)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.rafoto6)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.rafoto7)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.rafoto8)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.rafoto9)
</td>
<td hidden>
@Html.DisplayFor(modelItem => item.rafoto10)
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id=item.seriale_rapportino }) |
@Html.ActionLink("Details", "Details", new { id=item.seriale_rapportino }) |
@Html.ActionLink("Delete", "Delete", new { id=item.seriale_rapportino })
</td>
</tr>
}
</tbody>
</table>
<br />
<nav>
@Html.PagedListPager(Model, page => Url.Action("index", new { page = page, searchString=@ViewData["CurrentFilter"] }), new PagedListRenderOptions()
{
ActiveLiElementClass = "active",
PageClasses = new[]{ "page-link"},
LiElementClasses=new[] { "page-item" },
UlElementClasses = new[] { "pagination","justify-content-center", "mt-3" },
LinkToNextPageFormat = "Next",
LinkToPreviousPageFormat = "Previous",
MaximumPageNumbersToDisplay = 5,
DisplayLinkToPreviousPage = PagedListDisplayMode.Always,
DisplayLinkToNextPage = PagedListDisplayMode.Always
})
</nav>

View File

@ -31,6 +31,9 @@
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Impianti" asp-action="Index">IMPIANTI</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-controller="Rapp_New" asp-action="Index">RAPP NEW</a>
</li>
</ul>
</div>
</div>

View File

@ -1,4 +1,12 @@
@model IEnumerable<VirtualTask.Models.Tecnici>
@* @model IEnumerable<VirtualTask.Models.Tecnici> *@
@model IPagedList<VirtualTask.Models.Tecnici>
@using X.PagedList;
@using X.PagedList.Mvc.Core;
@using X.PagedList.Web.Common;
<link href="~/Content/PagedList.css" rel="stylesheet" type="text/css" />
@{
ViewData["Title"] = "Index";
@ -9,38 +17,55 @@
<p>
<a asp-action="Create">Create New</a>
</p>
@using (Html.BeginForm())
{
<p>
Find by name: @Html.TextBox("SearchString")
<input type="submit" value="Search" />
</p>
}
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.tccodazi)
@* @Html.DisplayNameFor(model => model.tccodazi) *@
AZIENDA
</th>
<th>
@Html.DisplayNameFor(model => model.tccodice)
@* @Html.DisplayNameFor(model => model.tccodice) *@
CODICE
</th>
<th>
@Html.DisplayNameFor(model => model.tcdescri)
@* @Html.DisplayNameFor(model => model.tcdescri) *@
DESCRIZIONE
</th>
<th>
@Html.DisplayNameFor(model => model.tctelef1)
@* @Html.DisplayNameFor(model => model.tctelef1) *@
TEL.
</th>
<th>
@Html.DisplayNameFor(model => model.tcuser)
@* @Html.DisplayNameFor(model => model.tcuser) *@
UTENTE
</th>
<th>
@Html.DisplayNameFor(model => model.tcpwd)
@* @Html.DisplayNameFor(model => model.tcpwd) *@
PASSWORD
</th>
<th>
@Html.DisplayNameFor(model => model.tccoor)
<th hidden>
@* @Html.DisplayNameFor(model => model.tccoor) *@
COSTO ORDINARIO
</th>
<th>
@Html.DisplayNameFor(model => model.tccono)
<th hidden>
@* @Html.DisplayNameFor(model => model.tccono) *@
COSTO NOTTURNO
</th>
<th>
@Html.DisplayNameFor(model => model.tccost)
<th hidden>
@* @Html.DisplayNameFor(model => model.tccost) *@
COSTO STRAORDINARIO
</th>
<th>
@Html.DisplayNameFor(model => model.tccofe)
<th hidden>
@* @Html.DisplayNameFor(model => model.tccofe) *@
COSTO FESTIVO
</th>
<th></th>
</tr>
@ -66,16 +91,16 @@
<td>
@Html.DisplayFor(modelItem => item.tcpwd)
</td>
<td>
<td hidden>
@Html.DisplayFor(modelItem => item.tccoor)
</td>
<td>
<td hidden>
@Html.DisplayFor(modelItem => item.tccono)
</td>
<td>
<td hidden>
@Html.DisplayFor(modelItem => item.tccost)
</td>
<td>
<td hidden>
@Html.DisplayFor(modelItem => item.tccofe)
</td>
<td>
@ -87,3 +112,18 @@
}
</tbody>
</table>
<nav>
@Html.PagedListPager(Model, page => Url.Action("index", new { page = page, searchString=@ViewData["CurrentFilter"] }), new PagedListRenderOptions()
{
ActiveLiElementClass = "active",
PageClasses = new[]{ "page-link"},
LiElementClasses=new[] { "page-item" },
UlElementClasses = new[] { "pagination","justify-content-center", "mt-3" },
LinkToNextPageFormat = "Next",
LinkToPreviousPageFormat = "Previous",
MaximumPageNumbersToDisplay = 5,
DisplayLinkToPreviousPage = PagedListDisplayMode.Always,
DisplayLinkToNextPage = PagedListDisplayMode.Always
})
</nav>