MICHELE: commesse
This commit is contained in:
parent
526e6f7868
commit
31befcc8a5
458
Controllers/CommesseVTController.cs
Normal file
458
Controllers/CommesseVTController.cs
Normal file
@ -0,0 +1,458 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Newtonsoft.Json;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using VirtualTask.Models;
|
||||
using X.PagedList;
|
||||
|
||||
namespace VirtualTask.Controllers
|
||||
{
|
||||
public class CommesseVTController : Controller
|
||||
{
|
||||
string apiUrl = string.Empty;
|
||||
string urlBase = string.Empty;
|
||||
string token = string.Empty;
|
||||
string tenant = string.Empty;
|
||||
string errMes = string.Empty;
|
||||
string admin = string.Empty;
|
||||
|
||||
|
||||
HttpClient client;
|
||||
private readonly IConfiguration _configuration;
|
||||
|
||||
public CommesseVTController(IConfiguration configuration)
|
||||
{
|
||||
client = new HttpClient();
|
||||
_configuration = configuration;
|
||||
var key = _configuration["ApplicationInsights:rootUrlApi"];
|
||||
apiUrl = key;
|
||||
}
|
||||
|
||||
#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");
|
||||
admin = helper.GetStringValue("admin");
|
||||
ViewBag.Admin = admin;
|
||||
urlBase = apiUrl + "commesseList";
|
||||
urlBase = urlBase + "?token=" + token;
|
||||
Uri baseAddress = new Uri(urlBase);
|
||||
|
||||
client = new HttpClient();
|
||||
client.BaseAddress = baseAddress;
|
||||
|
||||
List<CommesseVT> modelList = new List<CommesseVT>();
|
||||
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
string data = response.Content.ReadAsStringAsync().Result;
|
||||
modelList = JsonConvert.DeserializeObject<List<CommesseVT>>(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)
|
||||
{
|
||||
page = 1;
|
||||
}
|
||||
|
||||
var pageSize = 10;
|
||||
|
||||
var shortLinks = modelList
|
||||
.OrderByDescending(s => s.lacodcom)
|
||||
.ToPagedList(page ?? 1, pageSize);
|
||||
|
||||
return View(shortLinks);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
errMes = response.Content.ReadAsStringAsync().Result;
|
||||
helper.SetStringValue("errMsg", errMes);
|
||||
return RedirectToAction("Error");
|
||||
}
|
||||
|
||||
//return View();
|
||||
}
|
||||
|
||||
#endregion INDEX
|
||||
|
||||
#region CREATE
|
||||
|
||||
public IActionResult Create()
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
|
||||
admin = helper.GetStringValue("admin");
|
||||
|
||||
ViewBag.Admin = admin;
|
||||
|
||||
ViewBag.Impianti = getImpianti();
|
||||
ViewBag.Anag = getClienti();
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public IActionResult Create (CommesseVT_Table model)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
|
||||
token = helper.GetStringValue("tok");
|
||||
tenant = helper.GetStringValue("tenant");
|
||||
admin = helper.GetStringValue("admin");
|
||||
ViewBag.Admin = admin;
|
||||
|
||||
if (string.IsNullOrEmpty(token))
|
||||
{
|
||||
return RedirectToAction("Index", "Login");
|
||||
}
|
||||
|
||||
model.lacodazi = tenant;
|
||||
apiUrl = helper.GetStringValue("apiUrl");
|
||||
urlBase = apiUrl + "commesseVT/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");
|
||||
}
|
||||
else
|
||||
{
|
||||
errMes = response.Content.ReadAsStringAsync().Result;
|
||||
helper.SetStringValue("errMsg", errMes);
|
||||
return RedirectToAction("Error");
|
||||
}
|
||||
|
||||
//return View();
|
||||
}
|
||||
|
||||
#endregion CREATE
|
||||
|
||||
#region DETAILS
|
||||
|
||||
public IActionResult Details(string id)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
|
||||
token = helper.GetStringValue("tok");
|
||||
admin = helper.GetStringValue("admin");
|
||||
ViewBag.Admin = admin;
|
||||
apiUrl = helper.GetStringValue("apiUrl");
|
||||
urlBase = apiUrl + "commesseList";
|
||||
urlBase = urlBase + "?token=" + token;
|
||||
Uri baseAddress = new Uri(urlBase);
|
||||
client = new HttpClient();
|
||||
client.BaseAddress = baseAddress;
|
||||
|
||||
CommesseVT_Table commessa = new CommesseVT_Table();
|
||||
List<CommesseVT_Table> modelList = new List<CommesseVT_Table>();
|
||||
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
string data = response.Content.ReadAsStringAsync().Result;
|
||||
modelList = JsonConvert.DeserializeObject<List<CommesseVT_Table>>(data);
|
||||
commessa = modelList.Where(x => x.laserial.Equals(id)).First();
|
||||
}
|
||||
else
|
||||
{
|
||||
errMes = response.Content.ReadAsStringAsync().Result;
|
||||
helper.SetStringValue("Error", errMes);
|
||||
return RedirectToAction("Error");
|
||||
}
|
||||
|
||||
return View(commessa);
|
||||
}
|
||||
|
||||
#endregion DETAILS
|
||||
|
||||
#region EDIT
|
||||
|
||||
public IActionResult Edit(string id)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
token = helper.GetStringValue("tok");
|
||||
admin = helper.GetStringValue("admin");
|
||||
ViewBag.Admin = admin;
|
||||
apiUrl = helper.GetStringValue("apiUrl");
|
||||
urlBase = apiUrl + "commesseList";
|
||||
urlBase = urlBase + "?token=" + token;
|
||||
Uri baseAddress = new Uri(urlBase);
|
||||
client = new HttpClient();
|
||||
client.BaseAddress = baseAddress;
|
||||
|
||||
|
||||
ViewBag.Impianti = getImpianti();
|
||||
ViewBag.Anag = getClienti();
|
||||
//urlBase = "http://10.0.0.187:8000/api/Polo"
|
||||
//Uri baseAddress = new Uri(urlBase);
|
||||
//client = new HttpClient();
|
||||
//client.BaseAddress = baseAddress;
|
||||
|
||||
CommesseVT_Table commessa = new CommesseVT_Table();
|
||||
List<CommesseVT_Table> modelList = new List<CommesseVT_Table>();
|
||||
|
||||
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
string data = response.Content.ReadAsStringAsync().Result;
|
||||
modelList = JsonConvert.DeserializeObject<List<CommesseVT_Table>>(data);
|
||||
commessa = modelList.Where(x => x.laserial.Equals(id)).First();
|
||||
}
|
||||
else
|
||||
{
|
||||
errMes = response.Content.ReadAsStringAsync().Result;
|
||||
helper.SetStringValue("errMsg", errMes);
|
||||
return RedirectToAction("Error");
|
||||
}
|
||||
|
||||
return View(commessa);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public IActionResult Edit(CommesseVT_Table model)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
|
||||
token = helper.GetStringValue("tok");
|
||||
tenant = helper.GetStringValue("tenant");
|
||||
admin = helper.GetStringValue("admin");
|
||||
ViewBag.Admin = admin;
|
||||
|
||||
if (string.IsNullOrEmpty(token))
|
||||
{
|
||||
return RedirectToAction("Index", "Login");
|
||||
}
|
||||
|
||||
model.lacodazi = tenant;
|
||||
|
||||
apiUrl = helper.GetStringValue("apiUrl");
|
||||
urlBase = apiUrl + "commesseVT/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(urlBase, content).Result;
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
else
|
||||
{
|
||||
errMes = response.Content.ReadAsStringAsync().Result;
|
||||
helper.SetStringValue("errMsg", errMes);
|
||||
return RedirectToAction("Error");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion EDIT
|
||||
|
||||
#region DELETE
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult Delete(string id)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
|
||||
token = helper.GetStringValue("tok");
|
||||
apiUrl = helper.GetStringValue("apiUrl");
|
||||
admin = helper.GetStringValue("admin");
|
||||
ViewBag.Admin = admin;
|
||||
urlBase = apiUrl + "commesseList";
|
||||
urlBase = urlBase + "?token=" + token;
|
||||
Uri baseaAddress = new Uri(urlBase);
|
||||
client = new HttpClient();
|
||||
client.BaseAddress = baseaAddress;
|
||||
|
||||
CommesseVT_Table commesse = new CommesseVT_Table();
|
||||
List<CommesseVT_Table> modelList = new List<CommesseVT_Table>();
|
||||
HttpResponseMessage response = client.GetAsync(baseaAddress).Result;
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
string data = response.Content.ReadAsStringAsync().Result;
|
||||
modelList = JsonConvert.DeserializeObject<List<CommesseVT_Table>>(data);
|
||||
commesse = modelList.Where(x => x.laserial.Equals(id)).First();
|
||||
|
||||
return View(commesse);
|
||||
}
|
||||
else
|
||||
{
|
||||
errMes = response.Content.ReadAsStringAsync().Result;
|
||||
helper.SetStringValue("errMsg", errMes);
|
||||
return RedirectToAction("Error");
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost, ActionName("DeleteConfirmed")]
|
||||
public IActionResult DeleteConfirmed(CommesseVT_Table model)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
|
||||
token = helper.GetStringValue("tok");
|
||||
tenant = helper.GetStringValue("tenant");
|
||||
model.lacodazi = tenant;
|
||||
model.ladatchi = DateTime.Now;
|
||||
apiUrl = helper.GetStringValue("apiUrl");
|
||||
urlBase = apiUrl + "commesse/del";
|
||||
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");
|
||||
}
|
||||
else
|
||||
{
|
||||
errMes = response.Content.ReadAsStringAsync().Result;
|
||||
helper.SetStringValue("errMsg", errMes);
|
||||
return RedirectToAction("Error");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion DELETE
|
||||
|
||||
#region METODI INTERNI
|
||||
|
||||
private List<SelectListItem> getImpianti()
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
token = helper.GetStringValue("tok");
|
||||
//apiUrl = helper.GetStringValue("")
|
||||
urlBase = apiUrl + "impiantiListMngr";
|
||||
urlBase = urlBase + "?token=" + token;
|
||||
Uri baseAddress = new Uri(urlBase);
|
||||
client = new HttpClient();
|
||||
client.BaseAddress = baseAddress;
|
||||
|
||||
List<SelectListItem> selectItems = new List<SelectListItem>();
|
||||
List<Impianto> modelList = new List<Impianto>();
|
||||
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
string data = response.Content.ReadAsStringAsync().Result;
|
||||
modelList = JsonConvert.DeserializeObject<List<Impianto>>(data);
|
||||
foreach (var item in modelList)
|
||||
{
|
||||
SelectListItem listItem = new SelectListItem();
|
||||
string s = item.imcodimp + " - " + item.imdescri;
|
||||
listItem.Value = item.imcodimp;
|
||||
listItem.Text = s;
|
||||
selectItems.Add(listItem);
|
||||
}
|
||||
}
|
||||
|
||||
return selectItems;
|
||||
}
|
||||
|
||||
private List<SelectListItem> getClienti()
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
token = helper.GetStringValue("tok");
|
||||
urlBase = apiUrl + "anagraficheList";
|
||||
urlBase = urlBase + "?token=" + token;
|
||||
Uri baseAddress = new Uri(urlBase);
|
||||
client = new HttpClient();
|
||||
client.BaseAddress = baseAddress;
|
||||
List<SelectListItem> selectItems = new List<SelectListItem>();
|
||||
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);
|
||||
|
||||
//per gestire primo elemento tendina (deve essere vuoto)
|
||||
SelectListItem listItemFirst = new SelectListItem();
|
||||
|
||||
listItemFirst.Value = string.Empty;
|
||||
listItemFirst.Text = " - cliente";
|
||||
selectItems.Add(listItemFirst);
|
||||
|
||||
foreach (var item in modelList)
|
||||
{
|
||||
SelectListItem listItem = new SelectListItem();
|
||||
|
||||
string s = item.ancodice + " - " + item.andescri;
|
||||
listItem.Value = item.ancodice;
|
||||
listItem.Text = s;
|
||||
selectItems.Add(listItem);
|
||||
}
|
||||
}
|
||||
|
||||
return selectItems;
|
||||
}
|
||||
|
||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||
public IActionResult Error()
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
string e = helper.GetStringValue("errMsg");
|
||||
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier, ErrMsg = e });
|
||||
}
|
||||
|
||||
//private bool checkAziendaPresente(string azienda)
|
||||
//{
|
||||
// bool trovato = false;
|
||||
// bool bAziPres = false;
|
||||
|
||||
// //urlBase = "http://10.0.0.187:8000/api/Polo/AziendePresentiList";
|
||||
// urlBase = apiUrl + "AziendePresentiList";
|
||||
// Uri baseAddress = new Uri(urlBase);
|
||||
// client = new HttpClient();
|
||||
// client.BaseAddress = baseAddress;
|
||||
|
||||
// List<AziendaPres> modelList = new List<AziendaPres>();
|
||||
// HttpResponseMessage response = client.GetAsync(baseAddress).Result;
|
||||
// if (response.IsSuccessStatusCode)
|
||||
// {
|
||||
// string data = response.Content.ReadAsStringAsync().Result;
|
||||
// modelList = JsonConvert.DeserializeObject<List<AziendaPres>>(data);
|
||||
// foreach (AziendaPres a in modelList)
|
||||
// {
|
||||
// if (!string.IsNullOrEmpty(a.tccodazi) && a.tccodazi.Trim().Equals(azienda))
|
||||
// trovato = true;
|
||||
// }
|
||||
// bAziPres = trovato;
|
||||
// }
|
||||
// return bAziPres;
|
||||
//}
|
||||
|
||||
#endregion ALTRI METODI
|
||||
}
|
||||
}
|
||||
41
Models/CommesseVT.cs
Normal file
41
Models/CommesseVT.cs
Normal file
@ -0,0 +1,41 @@
|
||||
namespace VirtualTask.Models
|
||||
{
|
||||
//CLASSE PER LA LISTA
|
||||
public class CommesseVT
|
||||
{
|
||||
/// <summary>seriale Commessa</summary>
|
||||
public string? laserial { get; set; }
|
||||
/// <summary>Azienda</summary>
|
||||
public string? lacodazi { get; set; }
|
||||
/// <summary>Codice Commessa</summary>
|
||||
public string? lacodcom { get; set; }
|
||||
/// <summary>Fase Commessa </summary>
|
||||
public string? ladeslav { get; set; }
|
||||
/// <summary>data fine validita Commessa</summary>
|
||||
public DateTime? ladatchi { get; set; }
|
||||
/// <summary>tipo </summary>
|
||||
public string? latipcli { get; set; }
|
||||
/// <summary>codice cliente</summary>
|
||||
public string? lacodcli { get; set; }
|
||||
/// <summary>descrizione cliente</summary>
|
||||
public string? andescri { get; set; }
|
||||
/// <summary>impianto</summary>
|
||||
public string? imcodimp { get; set; }
|
||||
/// <summary>tipo ind </summary>
|
||||
public string? imindiri1 { get; set; }
|
||||
/// <summary>indirizzo </summary>
|
||||
public string? imindiri2 { get; set; }
|
||||
/// <summary>numero </summary>
|
||||
public int? imindiri3 { get; set; }
|
||||
/// <summary>lettera</summary>
|
||||
public string? imindiri4 { get; set; }
|
||||
/// <summary>scala</summary>
|
||||
public string? imindiri5 { get; set; }
|
||||
/// <summary>localita</summary>
|
||||
public string? imlocali { get; set; }
|
||||
/// <summary>CAP</summary>
|
||||
public string? imcodcap { get; set; }
|
||||
/// <summary>provincia</summary>
|
||||
public string? improvin { get; set; }
|
||||
}
|
||||
}
|
||||
34
Models/CommesseVT_Table.cs
Normal file
34
Models/CommesseVT_Table.cs
Normal file
@ -0,0 +1,34 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace VirtualTask.Models
|
||||
{
|
||||
//CLASSE PER OPERAZIONI INSERT/EDIT/DELETE
|
||||
public class CommesseVT_Table
|
||||
{
|
||||
/// <summary>seriale Commessa</summary>
|
||||
[Display(Name = "Seriale commessa")]
|
||||
public string? laserial { get; set; }
|
||||
/// <summary>Azienda</summary>
|
||||
[Display(Name = "Azienda")]
|
||||
public string? lacodazi { get; set; }
|
||||
/// <summary>Codice Commessa</summary>
|
||||
[Display(Name = "Codice Commessa")]
|
||||
public string? lacodcom { get; set; }
|
||||
/// <summary>Fase Commessa </summary>
|
||||
[Display(Name = "Fase Commessa")]
|
||||
public string? ladeslav { get; set; }
|
||||
/// <summary>data fine validita Commessa (data obsolescienza)</summary>
|
||||
[Display(Name = "Data fine commessa")]
|
||||
public DateTime? ladatchi { get; set; }
|
||||
/// <summary>tipo </summary>
|
||||
[Display(Name = "Tipo")]
|
||||
public string? latipcli { get; set; }
|
||||
/// <summary>codice cliente</summary>
|
||||
[Display(Name = "Cod. Cliente")]
|
||||
public string? lacodcli { get; set; }
|
||||
/// <summary>codice impianto</summary>
|
||||
[Display(Name = "Cod. Impianto")]
|
||||
public string? lacodimp { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
216
Views/CommesseVT/Create.cshtml
Normal file
216
Views/CommesseVT/Create.cshtml
Normal file
@ -0,0 +1,216 @@
|
||||
@model VirtualTask.Models.CommesseVT_Table
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Nuovo";
|
||||
Layout = "~/Views/Shared/_LayoutAreaRiservata.cshtml";
|
||||
}
|
||||
|
||||
<div class="agy-project-wrapper agy-project-page-wrapper">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<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">
|
||||
<input asp-for="laserial" class="agy-form-field require" placeholder="Seriale commessa" />
|
||||
<span asp-validation-for="laserial" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-12"> </div>
|
||||
<div class="form-group">
|
||||
|
||||
<input asp-for="lacodazi" class="agy-form-field require" placeholder="Azienda" />
|
||||
<span asp-validation-for="lacodazi" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-12"> </div>
|
||||
<div class="form-group">
|
||||
|
||||
<input asp-for="lacodcom" class="agy-form-field require" placeholder="Cod. commessa" />
|
||||
<span asp-validation-for="lacodcom" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-12"> </div>
|
||||
<div class="form-group">
|
||||
|
||||
<input asp-for="ladeslav" class="agy-form-field require" placeholder="Fase Commessa" />
|
||||
<span asp-validation-for="ladeslav" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-12"> </div>
|
||||
<div class="form-group">
|
||||
|
||||
<input asp-for="ladatchi" class="agy-form-field require" placeholder="Data fine commessa" />
|
||||
<span asp-validation-for="ladatchi" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-12"> </div>
|
||||
<div class="form-group">
|
||||
|
||||
<input asp-for="latipcli" class="agy-form-field require" placeholder="Tipo cliente" />
|
||||
<span asp-validation-for="latipcli" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-12"> </div>
|
||||
<div class="form-group">
|
||||
|
||||
@* <input asp-for="lacodcli" class="agy-form-field require" placeholder="Cod. Cliente" /> *@
|
||||
@Html.DropDownListFor(x => x.lacodcli,(IEnumerable<SelectListItem>)ViewBag.Anag, new{@class = "form-control"})
|
||||
<span asp-validation-for="lacodcli" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-12"> </div>
|
||||
<div class="form-group">
|
||||
|
||||
@* <input asp-for="lacodimp" class="agy-form-field require" placeholder="Cod. Impianto" /> *@
|
||||
@Html.DropDownListFor(x => x.lacodimp,(IEnumerable<SelectListItem>)ViewBag.Impianti, new{@class = "form-control"})
|
||||
<span asp-validation-for="lacodimp" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-12"> </div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Salva" class="agy-btn submitForm" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Index">Torna alla lista</a>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{
|
||||
await Html.RenderPartialAsync("_ValidationScriptsPartial");
|
||||
}
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
@* <div class="agy-project-wrapper agy-project-page-wrapper">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Create">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
<input asp-for="laserial" class="agy-form-field require" placeholder="Seriale commessa" />
|
||||
<span asp-validation-for="laserial" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-12"> </div>
|
||||
<div class="form-group">
|
||||
|
||||
<input asp-for="lacodazi" class="agy-form-field require" placeholder="Seriale Azienda" />
|
||||
<span asp-validation-for="lacodazi" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-12"> </div>
|
||||
<div class="form-group">
|
||||
|
||||
<input asp-for="lacodcom" class="agy-form-field require" placeholder="Cod. commessa" />
|
||||
<span asp-validation-for="lacodcom" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-12"> </div>
|
||||
<div class="form-group">
|
||||
|
||||
<input asp-for="ladeslav" class="agy-form-field require" placeholder="Fase commessa" />
|
||||
<span asp-validation-for="ladeslav" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-12"> </div>
|
||||
<div class="form-group">
|
||||
|
||||
<input asp-for="ladatchi" class="agy-form-field require" placeholder="Fine validita Commessa" />
|
||||
<span asp-validation-for="ladatchi" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-12"> </div>
|
||||
<div class="form-group">
|
||||
|
||||
<input asp-for="latipcli" class="agy-form-field require" placeholder="Tipo cliente" />
|
||||
<span asp-validation-for="latipcli" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-12"> </div>
|
||||
<div class="form-group">
|
||||
|
||||
<input asp-for="lacodcli" class="agy-form-field require" placeholder="Cod. Cliente" />
|
||||
<span asp-validation-for="lacodcli" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-12"> </div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Salva" class="agy-btn submitForm" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Torna alla lista</a>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{
|
||||
await Html.RenderPartialAsync("_ValidationScriptsPartial");
|
||||
}
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div> *@
|
||||
@*
|
||||
<h1>Create</h1>
|
||||
|
||||
<h4>CommesseVT_Table</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="laserial" class="control-label"></label>
|
||||
<input asp-for="laserial" class="form-control" />
|
||||
<span asp-validation-for="laserial" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="lacodazi" class="control-label"></label>
|
||||
<input asp-for="lacodazi" class="form-control" />
|
||||
<span asp-validation-for="lacodazi" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="lacodcom" class="control-label"></label>
|
||||
<input asp-for="lacodcom" class="form-control" />
|
||||
<span asp-validation-for="lacodcom" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ladeslav" class="control-label"></label>
|
||||
<input asp-for="ladeslav" class="form-control" />
|
||||
<span asp-validation-for="ladeslav" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ladatchi" class="control-label"></label>
|
||||
<input asp-for="ladatchi" class="form-control" />
|
||||
<span asp-validation-for="ladatchi" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="latipcli" class="control-label"></label>
|
||||
<input asp-for="latipcli" class="form-control" />
|
||||
<span asp-validation-for="latipcli" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="lacodcli" class="control-label"></label>
|
||||
<input asp-for="lacodcli" class="form-control" />
|
||||
<span asp-validation-for="lacodcli" 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");}
|
||||
}
|
||||
*@
|
||||
141
Views/CommesseVT/Delete.cshtml
Normal file
141
Views/CommesseVT/Delete.cshtml
Normal file
@ -0,0 +1,141 @@
|
||||
@model VirtualTask.Models.CommesseVT_Table
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Elimina";
|
||||
Layout = "~/Views/Shared/_LayoutAreaRiservata.cshtml";
|
||||
}
|
||||
|
||||
|
||||
<div class="agy-project-wrapper agy-project-page-wrapper">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.laserial)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.laserial)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.lacodazi)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.lacodazi)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.lacodcom)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.lacodcom)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ladeslav)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ladeslav)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@* @Html.DisplayNameFor(model => model.ladatchi) *@
|
||||
@Html.HiddenFor(model => model.ladatchi)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@* @Html.DisplayFor(model => model.ladatchi) *@
|
||||
@Html.HiddenFor(model => model.ladatchi)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.latipcli)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.latipcli)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.lacodcli)
|
||||
</dt>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayFor(model => model.lacodcli)
|
||||
</dt>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.lacodimp)
|
||||
</dt>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayFor(model => model.lacodimp)
|
||||
</dt>
|
||||
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-12"> </div>
|
||||
<form asp-action="DeleteConfirmed">
|
||||
<input type="submit" value="Elimina" class="agy-btn submitForm" />
|
||||
<input type="hidden" id="id" value=@Html.DisplayFor(model => model.laserial) name="id" />
|
||||
<div>
|
||||
<a asp-action="Index">Torna alla lista</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@*
|
||||
<h1>Delete</h1>
|
||||
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>CommesseVT_Table</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.laserial)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.laserial)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.lacodazi)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.lacodazi)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.lacodcom)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.lacodcom)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ladeslav)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.ladeslav)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ladatchi)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.ladatchi)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.latipcli)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.latipcli)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.lacodcli)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.lacodcli)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ladatobso)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.ladatobso)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<input type="submit" value="Delete" class="btn btn-danger" /> |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</form>
|
||||
</div>
|
||||
*@
|
||||
135
Views/CommesseVT/Details.cshtml
Normal file
135
Views/CommesseVT/Details.cshtml
Normal file
@ -0,0 +1,135 @@
|
||||
@using X.PagedList.Mvc.Core;
|
||||
@using X.PagedList.Web.Common;
|
||||
@using X.PagedList;
|
||||
@model VirtualTask.Models.CommesseVT_Table
|
||||
|
||||
<link href="~/Content/PagedList.css" rel="stylesheet" type="text/css" />
|
||||
@{
|
||||
ViewData["Title"] = "Dettaglio";
|
||||
Layout = "~/Views/Shared/_LayoutAreaRiservata.cshtml";
|
||||
}
|
||||
|
||||
|
||||
<div class="agy-project-wrapper agy-project-page-wrapper">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.laserial)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.laserial)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.lacodazi)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.lacodazi)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.lacodcom)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.lacodcom)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ladeslav)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ladeslav)
|
||||
</dd>
|
||||
@Html.HiddenFor(model => model.ladatchi)
|
||||
@* <dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ladatchi)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ladatchi)
|
||||
</dd> *@
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.latipcli)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.latipcli)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.lacodcli)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.lacodcli)
|
||||
</dd>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.lacodimp)
|
||||
</dd>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index" value="Torna alla lista" class="agy-btn submitForm">Torna alla lista</a>
|
||||
@* <input type="submit" value="Torna alla lista" class="agy-btn submitForm" /> *@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* <h1>Details</h1> *@
|
||||
@*
|
||||
<div>
|
||||
<h4>CommesseVT_Table</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.laserial)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.laserial)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.lacodazi)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.lacodazi)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.lacodcom)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.lacodcom)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ladeslav)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.ladeslav)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ladatchi)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.ladatchi)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.latipcli)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.latipcli)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.lacodcli)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.lacodcli)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ladatobso)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
@Html.DisplayFor(model => model.ladatobso)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
@Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) |
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
*@
|
||||
144
Views/CommesseVT/Edit.cshtml
Normal file
144
Views/CommesseVT/Edit.cshtml
Normal file
@ -0,0 +1,144 @@
|
||||
@model VirtualTask.Models.CommesseVT_Table
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Modifica";
|
||||
Layout = "~/Views/Shared/_LayoutAreaRiservata.cshtml";
|
||||
}
|
||||
|
||||
|
||||
<div class="agy-project-wrapper agy-project-page-wrapper">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<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="laserial" class="control-label"></label>
|
||||
<input asp-for="laserial" class="agy-form-field" class="form-control" />
|
||||
<span asp-validation-for="laserial" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="lacodazi" class="control-label"></label>
|
||||
<input asp-for="lacodazi" class="agy-form-field" class="form-control" />
|
||||
<span asp-validation-for="lacodazi" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="lacodcom" class="control-label"></label>
|
||||
<input asp-for="lacodcom" class="agy-form-field" class="form-control" />
|
||||
<span asp-validation-for="lacodcom" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ladeslav" class="control-label"></label>
|
||||
<input asp-for="ladeslav" class="agy-form-field" class="form-control" />
|
||||
<span asp-validation-for="ladeslav" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@Html.HiddenFor(x => x.ladatchi)
|
||||
@* <label asp-for="ladatchi" class="control-label"></label>
|
||||
<input asp-for="ladatchi" class="agy-form-field" class="form-control" />
|
||||
<span asp-validation-for="ladatchi" class="text-danger"></span> *@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="latipcli" class="control-label"></label>
|
||||
<input asp-for="latipcli" class="agy-form-field" class="form-control" />
|
||||
<span asp-validation-for="latipcli" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="lacodcli" class="control-label"></label>
|
||||
@Html.DropDownListFor(x => x.lacodcli,(IEnumerable<SelectListItem>)ViewBag.Anag, new{@class = "form-control"})
|
||||
@* <input asp-for="lacodcli" class="agy-form-field" class="agy-form-field" class="form-control" /> *@
|
||||
<span asp-validation-for="lacodcli" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="lacodimp" class="control-label"></label>
|
||||
@Html.DropDownListFor(x => x.lacodimp,(IEnumerable<SelectListItem>)ViewBag.Impianti, new{@class = "form-control"})
|
||||
@* <input asp-for="lacodcli" class="agy-form-field" class="agy-form-field" class="form-control" /> *@
|
||||
<span asp-validation-for="lacodimp" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-12"> </div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Salva" class="agy-btn submitForm" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Torna alla lista</a>
|
||||
</div>
|
||||
@section Scripts {
|
||||
@{
|
||||
await Html.RenderPartialAsync("_ValidationScriptsPartial");
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@* <h1>Edit</h1> *@
|
||||
@*
|
||||
<h4>CommesseVT_Table</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="laserial" class="control-label"></label>
|
||||
<input asp-for="laserial" class="form-control" />
|
||||
<span asp-validation-for="laserial" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="lacodazi" class="control-label"></label>
|
||||
<input asp-for="lacodazi" class="form-control" />
|
||||
<span asp-validation-for="lacodazi" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="lacodcom" class="control-label"></label>
|
||||
<input asp-for="lacodcom" class="form-control" />
|
||||
<span asp-validation-for="lacodcom" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ladeslav" class="control-label"></label>
|
||||
<input asp-for="ladeslav" class="form-control" />
|
||||
<span asp-validation-for="ladeslav" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ladatchi" class="control-label"></label>
|
||||
<input asp-for="ladatchi" class="form-control" />
|
||||
<span asp-validation-for="ladatchi" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="latipcli" class="control-label"></label>
|
||||
<input asp-for="latipcli" class="form-control" />
|
||||
<span asp-validation-for="latipcli" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="lacodcli" class="control-label"></label>
|
||||
<input asp-for="lacodcli" class="form-control" />
|
||||
<span asp-validation-for="lacodcli" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ladatobso" class="control-label"></label>
|
||||
<input asp-for="ladatobso" class="form-control" />
|
||||
<span asp-validation-for="ladatobso" 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");}
|
||||
}
|
||||
*@
|
||||
271
Views/CommesseVT/Index.cshtml
Normal file
271
Views/CommesseVT/Index.cshtml
Normal file
@ -0,0 +1,271 @@
|
||||
@using X.PagedList.Mvc.Core;
|
||||
@using X.PagedList.Web.Common;
|
||||
@using X.PagedList;
|
||||
@model IPagedList<VirtualTask.Models.CommesseVT>
|
||||
|
||||
<link href="~/Content/PagedList.css" rel="stylesheet" type="text/css" />
|
||||
@{
|
||||
ViewData["Title"] = "Commesse";
|
||||
Layout = "~/Views/Shared/_LayoutAreaRiservata.cshtml";
|
||||
}
|
||||
|
||||
|
||||
@* <h1>Index</h1> *@
|
||||
<div class="agy-project-wrapper agy-project-page-wrapper">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<p>
|
||||
<a asp-action="Create" class="info-data"><img src="~/assets/images/icons8-nuovo-50.png" alt="Crea nuova commessa" /></a>
|
||||
</p>
|
||||
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
|
||||
<div>
|
||||
<div style="float:left;width:40%;padding:0 20px;">@Html.TextBox("SearchString", null, new { placeholder = "Cerca per commessa", @class = "agy-form-field require" })</div>
|
||||
<div style="float:left;width:2%;"> </div>
|
||||
<div style="float:left;width:57%;"><input type="submit" value="Cerca" class="agy-btn submitForm" /></div>
|
||||
|
||||
</div>
|
||||
|
||||
}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Seriale Commessa</th>
|
||||
<th>Azienda</th>
|
||||
<th>Cod. Commessa</th>
|
||||
<th>Fase Commessa</th>
|
||||
<th hidden>Fine validita Commessa</th>
|
||||
<th>Tipo</th>
|
||||
<th>Cod. Cliente</th>
|
||||
<th>Cliente</th>
|
||||
<th>impianto</th>
|
||||
<th hidden>tipo ind</th>
|
||||
<th hidden>indirizzo</th>
|
||||
<th hidden>numero</th>
|
||||
<th hidden>lettera</th>
|
||||
<th hidden>scala</th>
|
||||
<th hidden>CAP</th>
|
||||
<th hidden>provincia</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.laserial)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.lacodazi)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.lacodcom)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ladeslav)
|
||||
</td>
|
||||
<td hidden>
|
||||
@Html.DisplayFor(modelItem => item.ladatchi)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.latipcli)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.lacodcli)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.andescri)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.imcodimp)
|
||||
</td>
|
||||
<td hidden>
|
||||
@Html.DisplayFor(modelItem => item.imindiri1)
|
||||
</td>
|
||||
<td hidden>
|
||||
@Html.DisplayFor(modelItem => item.imindiri2)
|
||||
</td>
|
||||
<td hidden>
|
||||
@Html.DisplayFor(modelItem => item.imindiri3)
|
||||
</td>
|
||||
<td hidden>
|
||||
@Html.DisplayFor(modelItem => item.imindiri4)
|
||||
</td>
|
||||
<td hidden>
|
||||
@Html.DisplayFor(modelItem => item.imindiri5)
|
||||
</td>
|
||||
<td hidden>
|
||||
@Html.DisplayFor(modelItem => item.imlocali)
|
||||
</td>
|
||||
<td hidden>
|
||||
@Html.DisplayFor(modelItem => item.imcodcap)
|
||||
</td>
|
||||
<td hidden>
|
||||
@Html.DisplayFor(modelItem => item.improvin)
|
||||
</td>
|
||||
<td>
|
||||
<a href="@Url.Action("Edit", "CommesseVT", new { id=item.laserial })" title="Modifica" class="links">
|
||||
<img alt="Modifica" src="@Url.Content("~/assets/images/icons8-modificare-64.png")" style="width:30px;height:30px;">
|
||||
</a>
|
||||
|
|
||||
<a href="@Url.Action("Details", "CommesseVT", new { id=item.laserial })" title="Dettaglio" class="links">
|
||||
<img alt="Dettaglio" src="@Url.Content("~/assets/images/icons8-visualizza-file-64.png")" style="width:30px;height:30px;">
|
||||
</a>
|
||||
|
|
||||
<a href="@Url.Action("Delete", "CommesseVT", new { id=item.laserial })" title="Elimina" class="links">
|
||||
<img alt="Elimina" src="@Url.Content("~/assets/images/icons8-elimina-50.png")" style="width:30px;height:30px;">
|
||||
</a>
|
||||
</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 = "Successiva",
|
||||
LinkToPreviousPageFormat = "Precedente",
|
||||
MaximumPageNumbersToDisplay = 5,
|
||||
DisplayLinkToPreviousPage = PagedListDisplayMode.Always,
|
||||
DisplayLinkToNextPage = PagedListDisplayMode.Always
|
||||
})
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@*
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Create New</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayFor(modelItem => modelItem.laserial)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.lacodazi)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.lacodcom)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ladeslav)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ladatchi)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.latipcli)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.lacodcli)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.andescri)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.imcodimp)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.imindiri1)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.imindiri2)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.imindiri3)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.imindiri4)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.imindiri5)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.imlocali)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.imcodcap)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.improvin)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.laserial)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.lacodazi)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.lacodcom)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ladeslav)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.ladatchi)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.latipcli)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.lacodcli)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.andescri)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.imcodimp)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.imindiri1)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.imindiri2)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.imindiri3)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.imindiri4)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.imindiri5)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.imlocali)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.imcodcap)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.improvin)
|
||||
</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 */ })
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody> *@
|
||||
</table>
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
<div class="col-lg-8 col-md-12 col-sm-12 col-12">
|
||||
<div class="agy-contact-form">
|
||||
<h4 class="agy-sub-heading">@ViewData["Title"]</h4>
|
||||
@* <h4 class="agy-sub-heading">@ViewData["Title"]</h4> *@
|
||||
<form asp-action="Create">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
@Html.ValidationSummary(false, "", new { @class = "text-danger" })
|
||||
|
||||
@ -146,6 +146,8 @@ Purchase:
|
||||
<li><a asp-area="" asp-controller="Chiamate" asp-action="Index">Chiamate</a></li>
|
||||
<li><a asp-area="" asp-controller="Progressivi" asp-action="Index">Progressivi</a></li>
|
||||
<li><a asp-area="" asp-controller="AziendaRif" asp-action="Index">Dati Azienda</a></li>
|
||||
<li><a asp-area="" asp-controller="CommesseVT" asp-action="Index">Commesse</a></li>
|
||||
|
||||
@{
|
||||
if(admin.Equals("S"))
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user