Varie
This commit is contained in:
parent
5a7e04ae1d
commit
47851907a7
@ -27,6 +27,7 @@ namespace SoftwayWeb.Controllers
|
||||
apiUrl = key;
|
||||
}
|
||||
|
||||
|
||||
public IActionResult AddDestinazione(string serialeGiro, string? codAutista, string? nomeAutista, string? codMezzo, string? desMezzo, DateTime dataGiro)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
@ -43,19 +44,86 @@ namespace SoftwayWeb.Controllers
|
||||
model.Pisergir = serialeGiro;
|
||||
ViewBag.Commit = getCommittenti();
|
||||
ViewBag.Mezzi=getMezzi();
|
||||
ViewBag.CodAutista=getAutisti();
|
||||
//ViewBag.CodAutista = codAutista;
|
||||
string autista = string.Empty;
|
||||
autista = codAutista + " - " + nomeAutista;
|
||||
ViewBag.CodAutista=autista;
|
||||
|
||||
string mezzo = string.Empty;
|
||||
mezzo = codMezzo + " - " + desMezzo;
|
||||
ViewBag.Mezzi = mezzo;
|
||||
|
||||
|
||||
model.Piautist = codAutista;
|
||||
ViewBag.Autista = nomeAutista;
|
||||
ViewBag.CodMezzo = codMezzo;
|
||||
model.Pitarga = codMezzo;
|
||||
ViewBag.Automezzo = desMezzo;
|
||||
ViewBag.dataGiro = dataGiro.ToString("dd/MM/yyyy");
|
||||
ViewBag.dateTimeGiro = dataGiro;
|
||||
model.Pidata = dataGiro;
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public IActionResult NewDestinazioneStep1(Modgir modgir, string nomeAutista, string automezzo, DateTime dataGiro)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
|
||||
token = helper.GetStringValue("tok");
|
||||
|
||||
if (string.IsNullOrEmpty(token))
|
||||
{
|
||||
return RedirectToAction("Login", "Login");
|
||||
}
|
||||
ViewBag.Automezzo = automezzo;
|
||||
ViewBag.Autista = nomeAutista;
|
||||
ViewBag.datetimeGiro = modgir.Pidata;
|
||||
|
||||
apiUrl = helper.GetStringValue("apiUrl");
|
||||
|
||||
urlBase = apiUrl + "Giri/brogliaccio";
|
||||
Uri baseAddress = new Uri(urlBase);
|
||||
client = new HttpClient();
|
||||
client.BaseAddress = baseAddress;
|
||||
|
||||
|
||||
List<Sbr_ord> modelList = new List<Sbr_ord>();
|
||||
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
|
||||
ViewBag.controllo = string.Empty;
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
string data = response.Content.ReadAsStringAsync().Result;
|
||||
modelList = JsonConvert.DeserializeObject<List<Sbr_ord>>(data);
|
||||
var filtro = modelList.Where(t => t.Brdatcar == modgir.Pidata && t.Brcodcom!=null && t.Brcodcom.Equals(modgir.Picommit) && t.Brcodsed != null && t.Brcodsed.Equals(modgir.Pidesdiv));
|
||||
if(filtro!=null && filtro.Count()>0)
|
||||
{
|
||||
stringBuilder.AppendLine( "Sede di consegna già prevista.");
|
||||
foreach(Sbr_ord s in filtro)
|
||||
{
|
||||
stringBuilder.AppendLine("Autista: " +s.Catnome);
|
||||
stringBuilder.AppendLine("Mezzo: " + s.Caudesc);
|
||||
}
|
||||
stringBuilder.AppendLine("Impossibile aggiungere la consegna.");
|
||||
ViewBag.controllo = stringBuilder.ToString();
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errMes = response.Content.ReadAsStringAsync().Result;
|
||||
helper.SetStringValue("errMsg", errMes);
|
||||
return RedirectToAction("Error");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return View(modgir);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public IActionResult NewDestinazione(Modgir modgir /*,string? codAutista, string? codMezzo, DateTime dataGiro, string serGiro*/)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
@ -77,8 +145,9 @@ namespace SoftwayWeb.Controllers
|
||||
mg.Pitarga = modgir.Pitarga;
|
||||
mg.Piautist = modgir.Piautist.TrimEnd();
|
||||
mg.Pitiprec = "A";
|
||||
mg.Pirigele = string.Empty;
|
||||
//mg.Pirigele = string.Empty;
|
||||
mg.Pisergir = modgir.Pisergir;
|
||||
|
||||
mg.Picasse = modgir.Picasse;
|
||||
mg.Pitrasf = modgir.Pitrasf;
|
||||
mg.Picolli = modgir.Picolli;
|
||||
@ -87,6 +156,14 @@ namespace SoftwayWeb.Controllers
|
||||
mg.Picist = modgir.Picist;
|
||||
mg.Piseq = modgir.Piseq;
|
||||
mg.Pinote = modgir.Pinote;
|
||||
//per vederla una delle voci DEVE essere diversa da 0.
|
||||
//se nessuna lo è imposto num cons a UNO
|
||||
if(mg.Picasse==0 && mg.Pitrasf==0 && mg.Picolli == 0 && mg.Pinumcons == 0 && mg.Piuova == 0 && mg.Picist == 0 && mg.Piseq == 0 && string.IsNullOrEmpty(mg.Pinote))
|
||||
{
|
||||
mg.Pinumcons = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
apiUrl = helper.GetStringValue("apiUrl");
|
||||
|
||||
@ -149,7 +226,8 @@ namespace SoftwayWeb.Controllers
|
||||
{
|
||||
SelectListItem listItem = new SelectListItem();
|
||||
|
||||
string s = item.Ancodice + " - " + item.Andescri;
|
||||
string s = item.Andescri + " - " + item.Ancodice;
|
||||
//string s = item.Andescri;
|
||||
listItem.Value = item.Ancodice;
|
||||
listItem.Text = s;
|
||||
selectItems.Add(listItem);
|
||||
@ -291,7 +369,7 @@ namespace SoftwayWeb.Controllers
|
||||
{
|
||||
|
||||
SelectListItem listItem = new SelectListItem();
|
||||
string s = sede.Pccodsed + " - " + sede.Pcdescri;
|
||||
string s = sede.Pcdescri + " - " + sede.Pccodsed;
|
||||
listItem.Value = sede.Pccodsed;
|
||||
listItem.Text = s;
|
||||
selectItems.Add(listItem);
|
||||
|
||||
@ -256,38 +256,54 @@ namespace SoftwayWeb.Controllers
|
||||
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
Modgir mg = new Modgir();
|
||||
string dato = response.Content.ReadAsStringAsync().Result;
|
||||
model = JsonConvert.DeserializeObject<Destinazioni_Out>(dato);
|
||||
|
||||
//qui metodo post per scrivere su pimodgir
|
||||
Modgir mg=new Modgir();
|
||||
mg.Piserial = model.Brserial;
|
||||
mg.Pidata = model.DataCarico;
|
||||
mg.Picommit = model.CodCommittente;
|
||||
mg.Pidesdiv = model.CodSede;
|
||||
mg.Pitarga = model.CodAutomezzo;
|
||||
mg.Piautist = model.CodAutista;
|
||||
mg.Pitiprec = "D";
|
||||
mg.Pisergir = model.serialeGiro;
|
||||
|
||||
urlBase = apiUrl + "ModificaGiro/addModgir";
|
||||
baseAddress = new Uri(urlBase);
|
||||
client = new HttpClient();
|
||||
client.BaseAddress = baseAddress;
|
||||
|
||||
string data = JsonConvert.SerializeObject(mg);
|
||||
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
|
||||
HttpResponseMessage response2 = client.PostAsync(baseAddress, content).Result;
|
||||
if (response2.IsSuccessStatusCode)
|
||||
if (!string.IsNullOrEmpty(model.Brserial))
|
||||
{
|
||||
//qui metodo post per scrivere su pimodgir
|
||||
|
||||
mg.Piserial = model.Brserial;
|
||||
mg.Pidata = model.DataCarico;
|
||||
mg.Picommit = model.CodCommittente;
|
||||
mg.Pidesdiv = model.CodSede;
|
||||
mg.Pitarga = model.CodAutomezzo;
|
||||
mg.Piautist = model.CodAutista;
|
||||
mg.Pitiprec = "D";
|
||||
mg.Pisergir = model.serialeGiro;
|
||||
|
||||
urlBase = apiUrl + "ModificaGiro/addModgir";
|
||||
baseAddress = new Uri(urlBase);
|
||||
client = new HttpClient();
|
||||
client.BaseAddress = baseAddress;
|
||||
|
||||
string data = JsonConvert.SerializeObject(mg);
|
||||
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
|
||||
HttpResponseMessage response2 = client.PostAsync(baseAddress, content).Result;
|
||||
if (response2.IsSuccessStatusCode)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
errMes = response.Content.ReadAsStringAsync().Result;
|
||||
helper.SetStringValue("errMsg", errMes);
|
||||
return RedirectToAction("Error");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
errMes = response.Content.ReadAsStringAsync().Result;
|
||||
string referer = Request.Headers["Referer"].ToString();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("Impossibile eliminare la destinazione. Giro non inizializzato (inserire i bancali)");
|
||||
errMes = sb.ToString();
|
||||
helper.SetStringValue("errMsg", errMes);
|
||||
return RedirectToAction("Error");
|
||||
helper.SetStringValue("field1", serial);
|
||||
helper.SetStringValue("backPage", referer);
|
||||
sb = null;
|
||||
return RedirectToAction("Alert");
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -311,6 +327,8 @@ namespace SoftwayWeb.Controllers
|
||||
public IActionResult ModificaDestinazione(string serial)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
|
||||
var requestUrl = $"{Request.Scheme}://{Request.Host.Value}/";
|
||||
|
||||
|
||||
apiUrl = helper.GetStringValue("apiUrl");
|
||||
@ -327,27 +345,45 @@ namespace SoftwayWeb.Controllers
|
||||
{
|
||||
string dato = response.Content.ReadAsStringAsync().Result;
|
||||
model = JsonConvert.DeserializeObject<Destinazioni_Out>(dato);
|
||||
if(!string.IsNullOrEmpty( model.Brserial))
|
||||
{
|
||||
List<SelectListItem> autisti = new List<SelectListItem>();
|
||||
autisti = getAutisti();
|
||||
autisti.Find(c => c.Value.Trim().Equals(model.CodAutista)).Selected = true;
|
||||
ViewBag.Autisti = autisti;
|
||||
|
||||
List < SelectListItem > autisti = new List < SelectListItem>();
|
||||
autisti = getAutisti();
|
||||
autisti.Find(c => c.Value.Trim().Equals(model.CodAutista)).Selected = true;
|
||||
ViewBag.Autisti = autisti;
|
||||
List<SelectListItem> mezzi = new List<SelectListItem>();
|
||||
mezzi = getMezzi();
|
||||
mezzi.Find(c => c.Value.Equals(model.CodAutomezzo)).Selected = true;
|
||||
ViewBag.CodMezzo = mezzi;
|
||||
|
||||
List<SelectListItem> mezzi = new List<SelectListItem>();
|
||||
mezzi = getMezzi();
|
||||
mezzi.Find(c => c.Value.Equals(model.CodAutomezzo)).Selected = true;
|
||||
ViewBag.CodMezzo = mezzi;
|
||||
model.CodAutistaOld = model.CodAutista;
|
||||
model.CodAutomezzoOld = model.CodAutomezzo;
|
||||
model.AutistaOld = model.Autista;
|
||||
model.DescAutomezzoOld = model.DescAutomezzo;
|
||||
return View(model);
|
||||
}
|
||||
else
|
||||
{
|
||||
string referer = Request.Headers["Referer"].ToString();
|
||||
|
||||
model.CodAutistaOld = model.CodAutista;
|
||||
model.CodAutomezzoOld = model.CodAutomezzo;
|
||||
model.AutistaOld = model.Autista;
|
||||
model.DescAutomezzoOld = model.DescAutomezzo;
|
||||
return View(model);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("Impossibile modificare la destinazione. Giro non inizializzato (inserire i bancali)");
|
||||
errMes = sb.ToString();
|
||||
helper.SetStringValue("errMsg", errMes);
|
||||
helper.SetStringValue("field1", serial);
|
||||
helper.SetStringValue("field2", "");
|
||||
helper.SetStringValue("field3", "");
|
||||
helper.SetStringValue("backPage", referer);
|
||||
sb = null;
|
||||
return RedirectToAction("Alert");
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
errMes = response.Content.ReadAsStringAsync().Result;
|
||||
errMes = errMes + "seriale: " + serial;
|
||||
helper.SetStringValue("errMsg", errMes);
|
||||
return RedirectToAction("Error");
|
||||
}
|
||||
@ -368,23 +404,25 @@ namespace SoftwayWeb.Controllers
|
||||
//prima controllo se è un giro nuovo o devo accodare le destinazioni ad un altro utente
|
||||
string dataGi = string.Empty;
|
||||
dataGi = model.DataCarico.Value.ToString("yyyy-MM-dd'T'HH:mm:ss.fff'Z'");
|
||||
urlBase = apiUrl + "Giri/listaDestinazioniByAutistaDataMezzoWeb";
|
||||
//urlBase = apiUrl + "Giri/listaDestinazioniByAutistaDataMezzoWeb";
|
||||
urlBase = apiUrl + "Giri/listaGiriTestataByAutistaDataMezzo";
|
||||
urlBase = urlBase + "?autista=" + model.CodAutista + "&dataGiro=" + dataGi + "&mezzo=" + model.CodAutomezzo;
|
||||
Uri baseAddress = new Uri(urlBase);
|
||||
client = new HttpClient();
|
||||
client.BaseAddress = baseAddress;
|
||||
|
||||
List<Destinazioni_Out> modelList = new List<Destinazioni_Out>();
|
||||
List<Pigircon> modelList2 = new List<Pigircon>();
|
||||
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
string dato = response.Content.ReadAsStringAsync().Result;
|
||||
modelList = JsonConvert.DeserializeObject<List<Destinazioni_Out>>(dato);
|
||||
var presenti = modelList.OrderByDescending(t => t.Prog);
|
||||
modelList2 = JsonConvert.DeserializeObject<List<Pigircon>>(dato);
|
||||
//var presenti = modelList2.OrderByDescending(t => t.);
|
||||
string mex = string.Empty;
|
||||
|
||||
if (presenti != null && presenti.Count() > 0)
|
||||
if (modelList2 != null && modelList2.Count() > 0)
|
||||
{
|
||||
//giro già esistente.. accodo
|
||||
mex = messAcc;
|
||||
@ -395,6 +433,31 @@ namespace SoftwayWeb.Controllers
|
||||
mex = messNew;
|
||||
}
|
||||
ViewBag.Messaggio = mex;
|
||||
|
||||
|
||||
|
||||
//devo trovare la descrizione del nuovo autista e quella del nuovo automezzo
|
||||
string nomeAutista=string.Empty;
|
||||
List<SelectListItem> list = new List<SelectListItem>();
|
||||
list = getAutisti();
|
||||
foreach(SelectListItem i in list)
|
||||
{
|
||||
if(i.Value.Equals(model.CodAutista))
|
||||
{
|
||||
nomeAutista = i.Text;
|
||||
}
|
||||
}
|
||||
model.Autista=nomeAutista;
|
||||
string nomeMezzo = string.Empty;
|
||||
list = getMezzi();
|
||||
foreach (SelectListItem i in list)
|
||||
{
|
||||
if (i.Value.Equals(model.CodAutomezzo))
|
||||
{
|
||||
nomeMezzo = i.Text;
|
||||
}
|
||||
}
|
||||
model.DescAutomezzo = nomeMezzo;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -404,7 +467,6 @@ namespace SoftwayWeb.Controllers
|
||||
}
|
||||
return View(model);
|
||||
|
||||
//apiUrl = helper.GetStringValue("apiUrl");
|
||||
|
||||
}
|
||||
|
||||
@ -421,7 +483,7 @@ namespace SoftwayWeb.Controllers
|
||||
}
|
||||
//prima controllo se è un giro nuovo o devo accodare le destinazioni ad un altro utente
|
||||
string dataGi = string.Empty;
|
||||
dataGi = model.DataCarico.Value.ToString("yyyy-MM-dd'T'HH:mm:ss.fff'Z'");
|
||||
dataGi = model.DataCarico !=null ? model.DataCarico.Value.ToString("yyyy-MM-dd'T'HH:mm:ss.fff'Z'"):string.Empty;
|
||||
urlBase = apiUrl + "Giri/listaDestinazioniByAutistaDataMezzoWeb";
|
||||
urlBase = urlBase + "?autista=" + model.CodAutista + "&dataGiro=" + dataGi + "&mezzo=" + model.CodAutomezzo;
|
||||
Uri baseAddress = new Uri(urlBase);
|
||||
@ -461,7 +523,7 @@ namespace SoftwayWeb.Controllers
|
||||
{
|
||||
// giro non esistente.. ne creo uno nuovo
|
||||
mg.Pitiprec = "N";
|
||||
mg.Pisergir = model.serialeGiro;
|
||||
mg.Pisergirold = model.serialeGiro;
|
||||
}
|
||||
|
||||
}
|
||||
@ -608,5 +670,26 @@ namespace SoftwayWeb.Controllers
|
||||
string e = helper.GetStringValue("errMsg");
|
||||
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier, ErrMsg = e });
|
||||
}
|
||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||
public IActionResult Alert()
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
string e = helper.GetStringValue("errMsg");
|
||||
string referer= helper.GetStringValue("backPage");
|
||||
string _field1= helper.GetStringValue("field1");
|
||||
string _field2 = helper.GetStringValue("field2");
|
||||
string _field3 = helper.GetStringValue("field3");
|
||||
return View(new ErrorViewModel {
|
||||
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier,
|
||||
ErrMsg = e,
|
||||
BackPage= referer,
|
||||
Field1=_field1,
|
||||
Field1_lbl = "Serial",
|
||||
Field2 =_field2,
|
||||
Field2_lbl = "Back Page",
|
||||
Field3 = null,
|
||||
Field3_lbl = null,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -270,7 +270,7 @@ namespace SoftwayWeb.Controllers
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult ModificaTutteDestinazioni(string id, string? codAutista, string? nomeAutista, string? codMezzo, string? nomeMezzo, DateTime dataGiroCons, int? page = 1)
|
||||
public IActionResult ModificaTutteDestinazioni(string id, string? codAutista, string? nomeAutista, string? codMezzo, string? nomeMezzo, DateTime dataGiroCons/*, int? page = 1*/)
|
||||
{
|
||||
helper = new SessionHelper(this);
|
||||
|
||||
@ -282,10 +282,12 @@ namespace SoftwayWeb.Controllers
|
||||
}
|
||||
|
||||
ViewBag.CodAutista = codAutista;
|
||||
ViewBag.Autista = nomeAutista;
|
||||
ViewBag.NomeAutista = nomeAutista;
|
||||
ViewBag.CodMezzo = codMezzo;
|
||||
ViewBag.Mezzo = nomeMezzo;
|
||||
ViewBag.NomeMezzo = nomeMezzo;
|
||||
ViewBag.DataGiroCons = dataGiroCons;
|
||||
ViewBag.SerialeGiro = id;
|
||||
|
||||
|
||||
string dataGiroString = dataGiroCons.ToString("yyyy-MM-dd'T'HH:mm:ss.fff'Z'");
|
||||
|
||||
@ -311,19 +313,9 @@ namespace SoftwayWeb.Controllers
|
||||
{
|
||||
string dato = response.Content.ReadAsStringAsync().Result;
|
||||
modelList = JsonConvert.DeserializeObject<List<Destinazioni_Out>>(dato);
|
||||
modelList = modelList.Where(x => x.serialeGiro.Equals(id.TrimEnd())).OrderBy(x => x.Seq).ThenBy(x => x.Committente).ToList();
|
||||
modelList = modelList.Where(x => x.serialeGiro!=null && x.serialeGiro.Equals(id.TrimEnd())).OrderBy(x => x.Seq).ThenBy(x => x.Committente).ToList();
|
||||
|
||||
//if (page != null && page < 1)
|
||||
//{
|
||||
// page = 1;
|
||||
//}
|
||||
|
||||
//var pageSize = 10;
|
||||
|
||||
//var shortList = modelList.ToPagedList(page ?? 1, pageSize);
|
||||
|
||||
return View(modelList);
|
||||
//return View(shortList);
|
||||
return View(modelList);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -334,11 +326,8 @@ namespace SoftwayWeb.Controllers
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public IActionResult ModificaTutteDestinazioniStep1(List<Destinazioni_Out> modelList, string? autisti, string? nomeAutista, string? mezzi, string? nomeMezzo)
|
||||
public IActionResult ModificaTutteDestinazioniStep1(string SerialeGiro, string? CodAutista, string? NomeAutista, string? CodMezzo, string? NomeMezzo, DateTime DataGiroCons,string CodAutistaOld,string CodMezzoOld)
|
||||
{
|
||||
ViewBag.CodMezzo = mezzi;
|
||||
ViewBag.CodAutista = autisti;
|
||||
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
|
||||
token = helper.GetStringValue("tok");
|
||||
@ -347,47 +336,71 @@ namespace SoftwayWeb.Controllers
|
||||
{
|
||||
return RedirectToAction("Login", "Login");
|
||||
}
|
||||
ViewBag.CodAutista = CodAutista;
|
||||
ViewBag.NomeAutista = NomeAutista;
|
||||
ViewBag.CodMezzo = CodMezzo;
|
||||
ViewBag.NomeMezzo = NomeMezzo;
|
||||
ViewBag.DataGiroCons = DataGiroCons;
|
||||
ViewBag.SerialeGiro = SerialeGiro;
|
||||
|
||||
foreach (var item in modelList)
|
||||
ViewBag.CodAutistaOld = CodAutistaOld;
|
||||
ViewBag.CodMezzoOld = CodMezzoOld;
|
||||
|
||||
|
||||
|
||||
string dataGi = string.Empty;
|
||||
dataGi = DataGiroCons.ToString("yyyy-MM-dd'T'HH:mm:ss.fff'Z'");
|
||||
//urlBase = apiUrl + "Giri/listaDestinazioniByAutistaDataMezzoWeb";
|
||||
urlBase = apiUrl + "Giri/listaGiriTestataByAutistaDataMezzo";
|
||||
urlBase = urlBase + "?autista=" + CodAutista + "&dataGiro=" + dataGi + "&mezzo=" + CodMezzo;
|
||||
Uri baseAddress = new Uri(urlBase);
|
||||
client = new HttpClient();
|
||||
client.BaseAddress = baseAddress;
|
||||
List<Destinazioni_Out> modelList1 = new List<Destinazioni_Out>();
|
||||
List<Pigircon> modelList2 = new List<Pigircon>();
|
||||
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
string dataGi = string.Empty;
|
||||
dataGi = item.DataCarico.Value.ToString("yyyy-MM-dd'T'HH:mm:ss.fff'Z'");
|
||||
string dato = response.Content.ReadAsStringAsync().Result;
|
||||
modelList2 = JsonConvert.DeserializeObject<List<Pigircon>>(dato);
|
||||
var presenti = modelList2.OrderByDescending(t => t.Pisergir);
|
||||
|
||||
string mex = string.Empty;
|
||||
//var nomeA = item.Autista;
|
||||
//var nomeM = item.DescAutomezzo;
|
||||
|
||||
if (presenti != null && presenti.Count() > 0)
|
||||
{
|
||||
//giro già esistente.. accodo
|
||||
mex = messAcc;
|
||||
ViewBag.TipoOperazione = "M";
|
||||
string serialeGiroDestinazione = string.Empty;
|
||||
foreach(Pigircon dd in presenti)
|
||||
{
|
||||
serialeGiroDestinazione = dd.Pisergir;
|
||||
}
|
||||
ViewBag.SerialeGiroDestinazione = serialeGiroDestinazione;
|
||||
}
|
||||
else
|
||||
{
|
||||
// giro non esistente.. ne creo uno nuovo
|
||||
mex = messNew;
|
||||
ViewBag.TipoOperazione = "N";
|
||||
}
|
||||
ViewBag.Messaggio = mex;
|
||||
|
||||
//qui devo ricaricare la lista delle destinazioni che sto cambiando passando
|
||||
//mezzo e autista OLD
|
||||
urlBase = apiUrl + "Giri/listaDestinazioniByAutistaDataMezzoWeb";
|
||||
//urlBase = urlBase + "?autista=" + item.CodAutista + "&dataGiro=" + dataGi + "&mezzo=" + item.CodAutomezzo;
|
||||
urlBase = urlBase + "?autista=" + autisti + "&dataGiro=" + dataGi + "&mezzo=" + mezzi;
|
||||
Uri baseAddress = new Uri(urlBase);
|
||||
urlBase = urlBase + "?autista=" + CodAutistaOld + "&dataGiro=" + dataGi + "&mezzo=" + CodMezzoOld;
|
||||
baseAddress = new Uri(urlBase);
|
||||
client = new HttpClient();
|
||||
client.BaseAddress = baseAddress;
|
||||
|
||||
List<Destinazioni_Out> modelList2 = new List<Destinazioni_Out>();
|
||||
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
|
||||
response = client.GetAsync(baseAddress).Result;
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
string dato = response.Content.ReadAsStringAsync().Result;
|
||||
modelList2 = JsonConvert.DeserializeObject<List<Destinazioni_Out>>(dato);
|
||||
var presenti = modelList2.OrderByDescending(t => t.Prog);
|
||||
|
||||
string mex = string.Empty;
|
||||
//var nomeA = item.Autista;
|
||||
//var nomeM = item.DescAutomezzo;
|
||||
|
||||
if (presenti != null && presenti.Count() > 0)
|
||||
{
|
||||
//giro già esistente.. accodo
|
||||
mex = messAcc;
|
||||
}
|
||||
else
|
||||
{
|
||||
// giro non esistente.. ne creo uno nuovo
|
||||
mex = messNew;
|
||||
}
|
||||
|
||||
item.CodAutistaOld = item.CodAutista;
|
||||
item.AutistaOld = item.Autista;
|
||||
item.CodAutomezzoOld = item.CodAutomezzo;
|
||||
item.DescAutomezzoOld = item.DescAutomezzoOld;
|
||||
|
||||
ViewBag.Messaggio = mex;
|
||||
string dato2 = response.Content.ReadAsStringAsync().Result;
|
||||
modelList1 = JsonConvert.DeserializeObject<List<Destinazioni_Out>>(dato2);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -396,12 +409,17 @@ namespace SoftwayWeb.Controllers
|
||||
return RedirectToAction("Error");
|
||||
}
|
||||
}
|
||||
|
||||
return View(modelList);
|
||||
else
|
||||
{
|
||||
errMes = response.Content.ReadAsStringAsync().Result;
|
||||
helper.SetStringValue("errMsg", errMes);
|
||||
return RedirectToAction("Error");
|
||||
}
|
||||
return View(modelList1);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public IActionResult ModificaTutteDestinazioniPost(List<Destinazioni_Out> modelList, string? CodAutista, string? CodMezzo/*, string? autisti,*/ /*string? nomeAutista,*/ /*string? mezzi*/)
|
||||
public IActionResult ModificaTutteDestinazioniPost(List<Destinazioni_Out> modelList, string? CodAutista, string? CodMezzo, DateTime DataGiroCons,string SerialeGiro,string TipoOperazione,string SerialeGiroDestinazione)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
|
||||
@ -412,61 +430,33 @@ namespace SoftwayWeb.Controllers
|
||||
return RedirectToAction("Login", "Login");
|
||||
}
|
||||
|
||||
string dataGi = string.Empty;
|
||||
dataGi = DataGiroCons.ToString("yyyy-MM-dd'T'HH:mm:ss.fff'Z'");
|
||||
foreach (var model in modelList)
|
||||
{
|
||||
string dataGi = string.Empty;
|
||||
dataGi = model.DataCarico.Value.ToString("yyyy-MM-dd'T'HH:mm:ss.fff'Z'");
|
||||
urlBase = apiUrl + "Giri/listaDestinazioniByAutistaDataMezzoWeb";
|
||||
urlBase = urlBase + "?autista=" + model.CodAutista + "&dataGiro=" + dataGi + "&mezzo=" + model.CodAutomezzo;
|
||||
Uri baseAddress = new Uri(urlBase);
|
||||
client = new HttpClient();
|
||||
client.BaseAddress = baseAddress;
|
||||
|
||||
List<Destinazioni_Out> modelList2 = new List<Destinazioni_Out>();
|
||||
HttpResponseMessage response = client.GetAsync(baseAddress).Result;
|
||||
|
||||
Modgir mg = new Modgir();
|
||||
|
||||
mg.Piserial = model.Brserial;
|
||||
mg.Pidata = model.DataCarico;
|
||||
mg.Pidata = DataGiroCons;
|
||||
mg.Picommit = model.CodCommittente;
|
||||
mg.Pidesdiv = model.CodSede;
|
||||
mg.Pitarga = CodAutista;
|
||||
mg.Piautist = CodMezzo;
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
string dato = response.Content.ReadAsStringAsync().Result;
|
||||
modelList = JsonConvert.DeserializeObject<List<Destinazioni_Out>>(dato);
|
||||
var presenti = modelList.OrderByDescending(t => t.Prog);
|
||||
|
||||
if (presenti != null && presenti.Count() > 0)
|
||||
{
|
||||
//giro già esistente.. accodo
|
||||
mg.Pitiprec = "M";
|
||||
mg.Pisergirold = model.serialeGiro;
|
||||
foreach (Destinazioni_Out d in presenti)
|
||||
{
|
||||
mg.Pisergir = d.serialeGiro;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// giro non esistente.. ne creo uno nuovo
|
||||
mg.Pitiprec = "N";
|
||||
mg.Pisergir = model.serialeGiro;
|
||||
}
|
||||
mg.Pitarga = CodMezzo;
|
||||
mg.Piautist = CodAutista;
|
||||
mg.Pitiprec = TipoOperazione;
|
||||
if (!string.IsNullOrEmpty(TipoOperazione) && TipoOperazione.Equals("M"))
|
||||
{
|
||||
mg.Pisergirold = SerialeGiro;
|
||||
mg.Pisergir = SerialeGiroDestinazione;
|
||||
}
|
||||
else
|
||||
{
|
||||
errMes = response.Content.ReadAsStringAsync().Result;
|
||||
helper.SetStringValue("errMsg", errMes);
|
||||
return RedirectToAction("Error");
|
||||
mg.Pisergirold = SerialeGiro;
|
||||
}
|
||||
|
||||
apiUrl = helper.GetStringValue("apiUrl");
|
||||
|
||||
apiUrl = helper.GetStringValue("apiUrl");
|
||||
urlBase = apiUrl + "ModificaGiro/addModgir";
|
||||
Uri baseAddress = new Uri(urlBase);
|
||||
baseAddress = new Uri(urlBase);
|
||||
client = new HttpClient();
|
||||
client.BaseAddress = baseAddress;
|
||||
@ -475,19 +465,7 @@ namespace SoftwayWeb.Controllers
|
||||
StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
|
||||
HttpResponseMessage response2 = client.PostAsync(baseAddress, content).Result;
|
||||
|
||||
if (response2.IsSuccessStatusCode)
|
||||
{
|
||||
return RedirectToAction("IndexValidate", "Destinazioni", new
|
||||
{
|
||||
id = model.serialeGiro,
|
||||
codAutista = model.CodAutistaOld,
|
||||
nomeAutista = model.AutistaOld,
|
||||
dataGiro = model.DataCarico,
|
||||
codMezzo = model.CodAutomezzoOld,
|
||||
desMezzo = model.DescAutomezzoOld
|
||||
});
|
||||
}
|
||||
else
|
||||
if (!response2.IsSuccessStatusCode)
|
||||
{
|
||||
errMes = response2.Content.ReadAsStringAsync().Result;
|
||||
helper.SetStringValue("errMsg", errMes);
|
||||
@ -495,92 +473,20 @@ namespace SoftwayWeb.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
//return RedirectToAction("IndexValidate", "Destinazioni", new
|
||||
//{
|
||||
// id = model.serialeGiro,
|
||||
// codAutista = model.CodAutistaOld,
|
||||
// nomeAutista = model.AutistaOld,
|
||||
// dataGiro = model.DataCarico,
|
||||
// codMezzo = model.CodAutomezzoOld,
|
||||
// desMezzo = model.DescAutomezzoOld
|
||||
//});
|
||||
return RedirectToAction("Index", "Giri");
|
||||
}
|
||||
|
||||
|
||||
//[HttpPost]
|
||||
//public IActionResult ModificaTutteDestinazioniPost(List<Destinazioni_Out> modelList, string? autisti, /*string? nomeAutista,*/ string? mezzi)
|
||||
//{
|
||||
// SessionHelper helper = new SessionHelper(this);
|
||||
|
||||
// token = helper.GetStringValue("tok");
|
||||
|
||||
// if (string.IsNullOrEmpty(token))
|
||||
// {
|
||||
// return RedirectToAction("Login", "Login");
|
||||
// }
|
||||
|
||||
// foreach (var destinazione in modelList)
|
||||
// {
|
||||
// Modgir mg = new Modgir();
|
||||
|
||||
// mg.Piserial = destinazione.Brserial;
|
||||
// mg.Pidata = destinazione.DataCarico;
|
||||
// mg.Picommit = destinazione.CodCommittente;
|
||||
// mg.Pidesdiv = destinazione.CodSede;
|
||||
// mg.Pitarga = mezzi.TrimEnd();
|
||||
// mg.Piautist = autisti.TrimEnd();
|
||||
// mg.Pitiprec = "M";
|
||||
// mg.Pisergir = destinazione.serialeGiro;
|
||||
|
||||
// apiUrl = helper.GetStringValue("apiUrl");
|
||||
|
||||
// urlBase = apiUrl + "ModificaGiro/addModgir";
|
||||
|
||||
// Uri baseAddress = new Uri(urlBase);
|
||||
// client = new HttpClient();
|
||||
// client.BaseAddress = baseAddress;
|
||||
|
||||
// string data = JsonConvert.SerializeObject(mg);
|
||||
// StringContent content = new StringContent(data, Encoding.UTF8, "application/json");
|
||||
|
||||
// HttpResponseMessage response2 = client.PostAsync(baseAddress, content).Result;
|
||||
|
||||
// //if (response2.IsSuccessStatusCode)
|
||||
// //{
|
||||
// // //Destinazioni_Out destMod = new Destinazioni_Out();
|
||||
// // //destMod.serialeGiro = destinazione.Brserial;
|
||||
// // //destMod.CodAutista = destinazione.CodAutista;
|
||||
// // //destMod.CodAutomezzo = destinazione.CodAutomezzo;
|
||||
// // //new
|
||||
// // //{
|
||||
// // // id = destinazione.serialeGiro,
|
||||
// // // codAutista = destinazione.CodAutista,
|
||||
// // // dataGiro = destinazione.DataCarico,
|
||||
// // // codMezzo = destinazione.CodAutomezzo
|
||||
// // //},;
|
||||
// //}
|
||||
// }
|
||||
|
||||
// return RedirectToAction("Index", "Giri");
|
||||
//}
|
||||
|
||||
//[HttpPost]
|
||||
//public IActionResult Create(GiriConsegnaView model)
|
||||
//{
|
||||
// SessionHelper helper = new SessionHelper(this);
|
||||
// ViewBag.Autisti = getAutisti();
|
||||
// apiUrl = helper.GetStringValue("apiUrl");
|
||||
// urlBase = apiUrl + "Giri/addGiro2";
|
||||
|
||||
// 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", "Giri");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// errMes = response.Content.ReadAsStringAsync().Result;
|
||||
// helper.SetStringValue("errMsg", errMes);
|
||||
// return RedirectToAction("Error");
|
||||
// }
|
||||
//}
|
||||
|
||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||
public IActionResult Error()
|
||||
|
||||
@ -85,7 +85,7 @@ namespace SoftwayWeb.Controllers
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public IActionResult PostIndex(IList<GiriConsegnaDaCreare> lst)
|
||||
public IActionResult PostIndex(IList<GiriConsegnaDaCreare> lst, string valida, string valida0)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
|
||||
@ -109,6 +109,11 @@ namespace SoftwayWeb.Controllers
|
||||
gcv.DataGiro = g.DataGiro;
|
||||
gcv.CodMezzo = g.CodMezzo;
|
||||
gcv.DataChiusura = DateTime.MinValue;
|
||||
if(!string.IsNullOrEmpty(valida0))
|
||||
{
|
||||
gcv.BancaliCaricati = 0;
|
||||
}
|
||||
|
||||
|
||||
Uri baseAddress = new Uri(urlBase);
|
||||
client = new HttpClient();
|
||||
|
||||
@ -48,6 +48,7 @@ namespace SoftwayWeb.Models
|
||||
[System.ComponentModel.DataAnnotations.Schema.Column(TypeName = "decimal(18, 4)")]
|
||||
public decimal? Trasf { get; set; }
|
||||
|
||||
[Display(Name = "Bancali")]
|
||||
[System.ComponentModel.DataAnnotations.Schema.Column(TypeName = "decimal(18, 4)")]
|
||||
public decimal? Colli { get; set; }
|
||||
public int? num_cons { get; set; }
|
||||
|
||||
@ -7,5 +7,20 @@ namespace SoftwayWeb.Models
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
|
||||
public string? ErrMsg { get; set; }
|
||||
|
||||
public string? BackPage { get; set; }
|
||||
|
||||
public string? Field1 { get; set; }
|
||||
|
||||
public string? Field2 { get; set; }
|
||||
|
||||
public string? Field3 { get; set; }
|
||||
|
||||
public string? Field1_lbl { get; set; }
|
||||
|
||||
public string? Field2_lbl { get; set; }
|
||||
|
||||
public string? Field3_lbl { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@ -6,14 +6,20 @@ namespace SoftwayWeb.Models
|
||||
{
|
||||
[Display(Name = "Progressivo")]
|
||||
public string? Piprogre { get; set; }
|
||||
|
||||
[Display(Name = "Seriale destinazione")]
|
||||
public string? Piserial { get; set; }
|
||||
|
||||
[Display(Name = "Data")]
|
||||
public DateTime? Pidata { get; set; }
|
||||
[Display(Name = "Committente")]
|
||||
|
||||
|
||||
[Display(Name = "Committente"), Required(ErrorMessage = "Committente obbligatorio")]
|
||||
public string? Picommit { get; set; }
|
||||
[Display(Name = "Sede")]
|
||||
|
||||
[Display(Name = "Sede"), Required(ErrorMessage = "Sede obbligatoria")]
|
||||
public string? Pidesdiv { get; set; }
|
||||
|
||||
[Display(Name = "Cod. Automezzo")]
|
||||
public string? Pitarga { get; set; }
|
||||
[Display(Name = "Autitsta")]
|
||||
|
||||
21
Models/Pigircon.cs
Normal file
21
Models/Pigircon.cs
Normal file
@ -0,0 +1,21 @@
|
||||
namespace SoftwayWeb.Models
|
||||
{
|
||||
public class Pigircon
|
||||
{
|
||||
public string? Pisergir { get; set; }
|
||||
public DateTime? Pidata { get; set; }
|
||||
public string? Piautist { get; set; }
|
||||
public int? Pitbancar { get; set; }
|
||||
public int? Pitbanrec { get; set; }
|
||||
|
||||
[System.ComponentModel.DataAnnotations.Schema.Column(TypeName = "decimal(18, 5)")]
|
||||
public decimal? Pidarecu { get; set; }
|
||||
|
||||
[System.ComponentModel.DataAnnotations.Schema.Column(TypeName = "decimal(18, 5)")]
|
||||
public decimal? Pirecupe { get; set; }
|
||||
|
||||
public DateTime? Pidatchi { get; set; }
|
||||
public string? Pinote { get; set; }
|
||||
public string? Pimezzo { get; set; }
|
||||
}
|
||||
}
|
||||
37
Models/Sbr_ord.cs
Normal file
37
Models/Sbr_ord.cs
Normal file
@ -0,0 +1,37 @@
|
||||
namespace SoftwayWeb.Models
|
||||
{
|
||||
public class Sbr_ord
|
||||
{
|
||||
public string? Brserial { get; set; }
|
||||
public string? Brcodcom { get; set; }
|
||||
public string? Brclifat { get; set; }
|
||||
public int? Brnumseq { get; set; }
|
||||
public string? Brcodsed { get; set; }
|
||||
public DateTime? Brdatcar { get; set; }
|
||||
|
||||
|
||||
[System.ComponentModel.DataAnnotations.Schema.Column(TypeName = "decimal(18, 4)")]
|
||||
public decimal? Brqtacol { get; set; }
|
||||
|
||||
[System.ComponentModel.DataAnnotations.Schema.Column(TypeName = "decimal(18, 4)")]
|
||||
public decimal? Brqtavol { get; set; }
|
||||
|
||||
[System.ComponentModel.DataAnnotations.Schema.Column(TypeName = "decimal(18, 4)")]
|
||||
public decimal? Brcolprev { get; set; }
|
||||
public int? Brconspr { get; set; }
|
||||
public int? Bruovapr { get; set; }
|
||||
public int? Brcistpr { get; set; }
|
||||
public string? Brnote { get; set; }
|
||||
|
||||
//BRTARTRA,BRAUTIST, CATNOME, CAUDESC
|
||||
public string? Brtartra { get; set; }
|
||||
public string? Brautist { get; set; }
|
||||
//Autista
|
||||
public string? Catnome { get; set; }
|
||||
//Mezzo
|
||||
public string? Caudesc { get; set; }
|
||||
|
||||
//non usata
|
||||
public string? Pisergir { get; set; }
|
||||
}
|
||||
}
|
||||
@ -7,13 +7,17 @@
|
||||
listItems = ViewBag.Commit;
|
||||
List<SelectListItem> listItems2 = new List<SelectListItem>();
|
||||
listItems2 = ViewBag.SediCons;
|
||||
|
||||
|
||||
string dataStr = string.Empty;
|
||||
if (Model.Pidata.HasValue)
|
||||
{
|
||||
dataStr = Model.Pidata.Value.ToString("dd/MM/yyyy");
|
||||
}
|
||||
string pnomeAutista = ViewBag.Autista;
|
||||
string pautimezzo = ViewBag.Automezzo;
|
||||
DateTime dateTimeGiro = ViewBag.dateTimeGiro;
|
||||
}
|
||||
|
||||
<h1>Aggiungi una nuova destinazione</h1>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl">
|
||||
<div class="card mb-4">
|
||||
@ -28,23 +32,11 @@
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
|
||||
|
||||
<div class="mb-0" style="width:49%;float:left;">
|
||||
<b><label asp-for="Picommit" class="control-label"></label></b>
|
||||
<div>
|
||||
@Html.DropDownListFor(x => x.Picommit, (IEnumerable<SelectListItem>)ViewBag.Commit, new { @id = "ddlCommittenti", @class = "agy-form-field require" })
|
||||
</div><span asp-validation-for="Picommit" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="mb-0" style="width:49%;float:left;">
|
||||
<b><label asp-for="Pidesdiv" class="control-label"></label></b>
|
||||
<div id="District">
|
||||
@Html.DropDownListFor(x => x.Pidesdiv, new List<SelectListItem>(), "- Seleziona sede", new { @id = "ddlSediCons", @class = "agy-form-field require" })
|
||||
</div>
|
||||
<span asp-validation-for="Pidesdiv" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="mb-3" style="width:25%;float:left;">
|
||||
<b><label asp-for="Piautist" class="control-label"></label></b>
|
||||
<div>
|
||||
@Html.DropDownList("Piautist",ViewBag.CodAutista, null, new { @class = "agy-form-field require" })
|
||||
<div class="form-text">@ViewBag.CodAutista</div>
|
||||
@Html.HiddenFor(x => x.Piautist)
|
||||
</div>
|
||||
<span asp-validation-for="Piautist" class="text-danger"></span>
|
||||
</div>
|
||||
@ -52,7 +44,8 @@
|
||||
<div class="mb-3" style="width:40%;float:left;">
|
||||
<b><label asp-for="Pitarga" class="control-label"></label></b>
|
||||
<div>
|
||||
@Html.DropDownList("Pitarga",ViewBag.Mezzi, null, new { @class = "agy-form-field require" })
|
||||
<div class="form-text">@ViewBag.Mezzi</div>
|
||||
@Html.HiddenFor(x => x.Pitarga)
|
||||
</div>
|
||||
<span asp-validation-for="Pitarga" class="text-danger"></span>
|
||||
</div>
|
||||
@ -60,10 +53,26 @@
|
||||
|
||||
<div class="mb-3" style="width:20%;float:left;">
|
||||
<b><label asp-for="Pidata" class="control-label"></label></b>
|
||||
<input asp-for="Pidata" class="form-control" />
|
||||
<span asp-validation-for="Pidata" class="text-danger"></span>
|
||||
<div class="form-text">@dataStr</div>
|
||||
@Html.HiddenFor(x => x.Pidata)
|
||||
</div>
|
||||
<div style="width:8%;float:left;"> </div>
|
||||
|
||||
|
||||
<div class="mb-0" style="width:49%;float:left;">
|
||||
<b><label asp-for="Picommit" class="control-label"></label></b>
|
||||
<div>
|
||||
@Html.DropDownListFor(x => x.Picommit, (IEnumerable<SelectListItem>)ViewBag.Commit, new { @id = "ddlCommittenti", @class = "agy-form-field require" })
|
||||
</div><span asp-validation-for="Picommit" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="mb-0" style="width:49%;float:left;">
|
||||
<b><label asp-for="Pidesdiv" class="control-label"></label></b>
|
||||
<div id="District">
|
||||
@Html.DropDownListFor(x => x.Pidesdiv, new List<SelectListItem>(), "- Seleziona sede", new { @id = "ddlSediCons", @class = "agy-form-field require" })
|
||||
</div>
|
||||
<span asp-validation-for="Pidesdiv" class="text-danger"></span>
|
||||
</div>
|
||||
|
||||
<div class="mb-3" style="width:10%;float:left;">
|
||||
<b><label asp-for="Picasse" class="control-label"></label></b>
|
||||
<input asp-for="Picasse" value="0" class="form-control" />
|
||||
@ -113,7 +122,11 @@
|
||||
</div>
|
||||
<div style="width:35%;float:left;"> </div>
|
||||
<div style="width:10%;float:left;">
|
||||
<input type="submit" asp-action="NewDestinazione" asp-controller="AddDestinazione" asp-route-id="@Model.Pisergir" value="Salva modifiche" class="btn btn-primary" />
|
||||
<input type="submit" asp-action="NewDestinazioneStep1" asp-controller="AddDestinazione"
|
||||
asp-route-nomeAutista="@pnomeAutista"
|
||||
asp-route-automezzo="@pautimezzo"
|
||||
asp-route-dataGiro="@dateTimeGiro"
|
||||
value="Avanti" class="btn btn-primary" />
|
||||
</div>
|
||||
<div style="width:2%;float:left;"> </div>
|
||||
<div style="width:10%;float:left;">
|
||||
|
||||
208
Views/AddDestinazione/NewDestinazioneStep1.cshtml
Normal file
208
Views/AddDestinazione/NewDestinazioneStep1.cshtml
Normal file
@ -0,0 +1,208 @@
|
||||
@model SoftwayWeb.Models.Modgir
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "NewDestinazioneStep1";
|
||||
string dataStr = string.Empty;
|
||||
bool btnVisible = false;
|
||||
if (Model.Pidata.HasValue)
|
||||
{
|
||||
dataStr = Model.Pidata.Value.ToString("dd/MM/yyyy");
|
||||
}
|
||||
string mex = ViewBag.controllo;
|
||||
if(string.IsNullOrEmpty(mex))
|
||||
{
|
||||
btnVisible = true;
|
||||
}
|
||||
string pserialeGiro = Model.Pisergir;
|
||||
string pcodAutista = Model.Piautist;
|
||||
string pnomeAutista = ViewBag.Autista;
|
||||
string pautomezzo = ViewBag.Automezzo;
|
||||
string pcodmezzo = Model.Pitarga;
|
||||
DateTime datagiro = ViewBag.datetimeGiro;
|
||||
}
|
||||
|
||||
<h1>Aggiungi una nuova destinazione</h1>
|
||||
<form asp-action="NewDestinazione">
|
||||
<div class="row">
|
||||
<div class="col-xl">
|
||||
<div class="card mb-4">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<h5 class="mb-0">Nuova destinazione</h5> <small class="text-muted float-end"></small>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card-body">
|
||||
<form asp-action="NewDestinazione">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
|
||||
|
||||
<div class="mb-3" style="width:25%;float:left;">
|
||||
<b><label asp-for="Piautist" class="control-label"></label></b>
|
||||
<div>
|
||||
<div class="form-text">@Html.DisplayFor(model => model.Piautist)</div>
|
||||
@Html.HiddenFor(x => x.Piautist)
|
||||
</div>
|
||||
<span asp-validation-for="Piautist" class="text-danger"></span>
|
||||
</div>
|
||||
<div style="width:3%;float:left;"> </div>
|
||||
<div class="mb-3" style="width:40%;float:left;">
|
||||
<b><label asp-for="Pitarga" class="control-label"></label></b>
|
||||
<div>
|
||||
<div class="form-text">@Html.DisplayFor(model => model.Pitarga)</div>
|
||||
@Html.HiddenFor(x => x.Pitarga)
|
||||
</div>
|
||||
<span asp-validation-for="Pitarga" class="text-danger"></span>
|
||||
</div>
|
||||
<div style="width:3%;height:40px;float:left;"> </div>
|
||||
|
||||
<div class="mb-3" style="width:20%;float:left;">
|
||||
<b><label asp-for="Pidata" class="control-label"></label></b>
|
||||
<div class="form-text">@dataStr</div>
|
||||
@Html.HiddenFor(x => x.Pidata)
|
||||
</div>
|
||||
<div style="width:8%;float:left;"> </div>
|
||||
|
||||
|
||||
<div class="mb-0" style="width:49%;float:left;">
|
||||
<b><label asp-for="Picommit" class="control-label"></label></b>
|
||||
<div>
|
||||
@Html.DisplayFor(model => model.Picommit)
|
||||
</div>
|
||||
<span asp-validation-for="Picommit" class="text-danger"></span>
|
||||
@Html.HiddenFor(x => x.Picommit)
|
||||
</div>
|
||||
<div class="mb-0" style="width:49%;float:left;">
|
||||
<b><label asp-for="Pidesdiv" class="control-label"></label></b>
|
||||
<div>
|
||||
@Html.DisplayFor(model => model.Pidesdiv)
|
||||
</div>
|
||||
<span asp-validation-for="Pidesdiv" class="text-danger"></span>
|
||||
@Html.HiddenFor(x => x.Pidesdiv)
|
||||
</div>
|
||||
|
||||
<div class="mb-3" style="width:10%;float:left;">
|
||||
<b><label asp-for="Picasse" class="control-label"></label></b>
|
||||
<div>
|
||||
@Html.DisplayFor(model => model.Picasse)
|
||||
<span asp-validation-for="Picasse" class="text-danger"></span>
|
||||
@Html.HiddenFor(x => x.Picasse)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="width:2%;float:left;"> </div>
|
||||
<div class="mb-3" style="width:10%;float:left;">
|
||||
<b><label asp-for="Pitrasf" class="control-label"></label></b>
|
||||
<div>
|
||||
@Html.DisplayFor(model => model.Pitrasf)
|
||||
<span asp-validation-for="Pitrasf" class="text-danger"></span>
|
||||
@Html.HiddenFor(x => x.Pitrasf)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="width:2%;float:left;"> </div>
|
||||
<div class="mb-3" style="width:10%;float:left;">
|
||||
<b><label asp-for="Picolli" class="control-label"></label></b>
|
||||
<div>
|
||||
@Html.DisplayFor(model => model.Picolli)
|
||||
<span asp-validation-for="Picolli" class="text-danger"></span>
|
||||
@Html.HiddenFor(x => x.Picolli)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="width:2%;float:left;"> </div>
|
||||
<div class="mb-3" style="width:10%;float:left;">
|
||||
<b><label asp-for="Pinumcons" class="control-label"></label></b>
|
||||
<div>
|
||||
@Html.DisplayFor(model => model.Pinumcons)
|
||||
<span asp-validation-for="Pinumcons" class="text-danger"></span>
|
||||
@Html.HiddenFor(x => x.Pinumcons)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="width:2%;float:left;"> </div>
|
||||
<div class="mb-3" style="width:10%;float:left;">
|
||||
<b><label asp-for="Piuova" class="control-label"></label></b>
|
||||
<div>
|
||||
@Html.DisplayFor(model => model.Piuova)
|
||||
<span asp-validation-for="Piuova" class="text-danger"></span>
|
||||
@Html.HiddenFor(x => x.Piuova)
|
||||
</div>
|
||||
</div>
|
||||
<div style="width:2%;float:left;"> </div>
|
||||
<div class="mb-3" style="width:10%;float:left;">
|
||||
<b><label asp-for="Picist" class="control-label"></label></b>
|
||||
<div>
|
||||
@Html.DisplayFor(model => model.Picist)
|
||||
<span asp-validation-for="Picist" class="text-danger"></span>
|
||||
@Html.HiddenFor(x => x.Picist)
|
||||
</div>
|
||||
</div>
|
||||
<div style="width:2%;float:left;"> </div>
|
||||
<div class="mb-3" style="width:10%;float:left;">
|
||||
<b><label asp-for="Piseq" class="control-label"></label></b>
|
||||
<div>
|
||||
@Html.DisplayFor(model => model.Piseq)
|
||||
<span asp-validation-for="Piseq" class="text-danger"></span>
|
||||
@Html.HiddenFor(x => x.Piseq)
|
||||
</div>
|
||||
</div>
|
||||
<div style="width:2%;float:left;"> </div>
|
||||
<div class="mb-3" style="width:16%;float:left;">
|
||||
<b><label asp-for="Pinote" class="control-label"></label></b>
|
||||
<div>
|
||||
@Html.DisplayFor(model => model.Pinote)
|
||||
<span asp-validation-for="Pinote" class="text-danger"></span>
|
||||
@Html.HiddenFor(x => x.Pinote)
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style="width:35%;float:left;"> </div>
|
||||
<div style="width:10%;float:left;">
|
||||
@if(btnVisible)
|
||||
{
|
||||
<input type="submit" value="Salva" class="btn btn-primary" />
|
||||
}
|
||||
|
||||
</div>
|
||||
<div style="width:2%;float:left;"> </div>
|
||||
<div style="width:10%;float:left;">
|
||||
@* <a asp-action="AddDestinazione"
|
||||
asp-controller="AddDestinazione"
|
||||
|
||||
asp-route-serialeGiro="@pserialeGiro"
|
||||
asp-route-codAutista="@pcodAutista"
|
||||
asp-route-nomeAutista="@pnomeAutista"
|
||||
asp-route-dataGiro="@datagiro"
|
||||
asp-route-codMezzo="@pcodmezzo"
|
||||
asp-route-desMezzo="@pautomezzo"
|
||||
|
||||
class="btn btn-primary">Indietro</a>*@
|
||||
|
||||
|
||||
<a href="@Url.ActionLink("AddDestinazione", "AddDestinazione", new{serialeGiro = Model.Pisergir,
|
||||
codAutista=Model.Piautist,
|
||||
nomeAutista=pnomeAutista,
|
||||
dataGiro=Model.Pidata,
|
||||
codMezzo=Model.Pitarga,
|
||||
desMezzo=pautomezzo})" title="Aggiungi nuova destinazione" class="btn btn-primary" >
|
||||
Indietro
|
||||
</a>
|
||||
|
||||
</div>
|
||||
<div style="width:100%;float:left;"> </div>
|
||||
@Html.HiddenFor(x => x.Piprogre)
|
||||
@Html.HiddenFor(x => x.Piserial)
|
||||
@Html.HiddenFor(x => x.Pitiprec)
|
||||
@Html.HiddenFor(x => x.Pisergir)
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div><h4 style="color:red">@mex</h4></div>
|
||||
|
||||
</form>
|
||||
|
||||
@ -33,21 +33,37 @@
|
||||
<div class="form-text">@Html.DisplayFor(model => model.IndirizzoSede)</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="basic-default-phone"><b>@Html.DisplayNameFor(model => model.DescAutomezzo)</b></label>
|
||||
@Html.DropDownList("CodAutomezzo", ViewBag.CodMezzo, null, new { @class = "agy-form-field require" })
|
||||
<label class="form-label" for="basic-default-fullname"><b>Attuale Automezzo</b> </label>
|
||||
<div class="form-text">@Html.DisplayFor(model => model.CodAutomezzoOld) - @Html.DisplayFor(model => model.DescAutomezzoOld)</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="basic-default-phone"><b>@Html.DisplayNameFor(model => model.Autista)</b></label>
|
||||
<label class="form-label" for="basic-default-phone"><b>Seleziona il nuovo automezzo</b></label>
|
||||
@Html.DropDownList("CodAutomezzo", ViewBag.CodMezzo, null, new { @class = "agy-form-field require" })
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="basic-default-fullname"><b>Attuale Autista</b> </label>
|
||||
<div class="form-text">@Html.DisplayFor(model => model.CodAutistaOld) - @Html.DisplayFor(model => model.AutistaOld)</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="basic-default-phone"><b><b>Seleziona il nuovo autista</b></b></label>
|
||||
@Html.DropDownList("codAutista", ViewBag.Autisti, null, new { @class = "agy-form-field require" })
|
||||
</div>
|
||||
|
||||
|
||||
@Html.HiddenFor(model => model.DescAutomezzo)
|
||||
@Html.HiddenFor(model => model.Autista)
|
||||
@Html.HiddenFor(model => model.CodAutistaOld)
|
||||
@Html.HiddenFor(model => model.CodAutomezzoOld)
|
||||
@Html.HiddenFor(model => model.AutistaOld)
|
||||
@Html.HiddenFor(model => model.DescAutomezzoOld)
|
||||
|
||||
|
||||
@Html.HiddenFor(model => model.Brserial)
|
||||
@Html.HiddenFor(model => model.DataCarico)
|
||||
@Html.HiddenFor(model => model.CodCommittente)
|
||||
@Html.HiddenFor(model => model.Committente)
|
||||
@Html.HiddenFor(model => model.Autista)
|
||||
|
||||
|
||||
@Html.HiddenFor(model => model.CodSede)
|
||||
@Html.HiddenFor(model => model.Sede)
|
||||
@ -69,10 +85,7 @@
|
||||
@Html.HiddenFor(model => model.Seq)
|
||||
@Html.HiddenFor(model => model.Prog)
|
||||
|
||||
@Html.HiddenFor(model => model.CodAutistaOld)
|
||||
@Html.HiddenFor(model => model.CodAutomezzoOld)
|
||||
@Html.HiddenFor(model => model.AutistaOld)
|
||||
@Html.HiddenFor(model => model.DescAutomezzoOld)
|
||||
|
||||
@*
|
||||
<button type="submit" class="btn btn-primary" onclick="javascript: return checkValidId();">Salva</button>*@
|
||||
<button type="submit" class="btn btn-primary" >Avanti</button>
|
||||
|
||||
@ -35,11 +35,13 @@
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.DescAutomezzo)</b> </label>
|
||||
<div class="form-text">@Html.DisplayFor(model => model.CodAutomezzo) - @Html.DisplayFor(model => model.DescAutomezzo)</div>
|
||||
<div class="form-text">@Html.DisplayFor(model => model.CodAutomezzoOld) - @Html.DisplayFor(model => model.DescAutomezzoOld) <img src="~/images/right-arrow-icon-5.png" style="width:32px;height:32px;" /> <b>@Html.DisplayFor(model => model.DescAutomezzo)</b></div>
|
||||
@Html.HiddenFor(model => model.CodAutomezzo)
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="basic-default-fullname"><b>@Html.DisplayNameFor(model => model.Autista)</b> </label>
|
||||
<div class="form-text">@Html.DisplayFor(model => model.CodAutista) - @Html.DisplayFor(model => model.Autista)</div>
|
||||
<div class="form-text">@Html.DisplayFor(model => model.CodAutistaOld) - @Html.DisplayFor(model => model.AutistaOld) <img src="~/images/right-arrow-icon-5.png" style="width:32px;height:32px;" /> <b>@Html.DisplayFor(model => model.Autista)</b></div>
|
||||
@Html.HiddenFor(model => model.CodAutista)
|
||||
</div>
|
||||
|
||||
@Html.HiddenFor(model => model.DescAutomezzo)
|
||||
|
||||
@ -18,57 +18,60 @@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="mb-3">
|
||||
<b>Autista da sostituire:</b> @ViewBag.CodAutista - @ViewBag.Autista
|
||||
<b>Autista da sostituire:</b> @ViewBag.CodAutista - @ViewBag.NomeAutista
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<b>Automezzo da sostituire:</b> @ViewBag.CodMezzo - @ViewBag.Mezzo
|
||||
<b>Automezzo da sostituire:</b> @ViewBag.CodMezzo - @ViewBag.nomeMezzo
|
||||
</div>
|
||||
@using (Html.BeginForm(@* "ModificaTutteDestinazioniPost" *@"ModificaTutteDestinazioniStep1", "Giri", FormMethod.Post))
|
||||
@using (Html.BeginForm("ModificaTutteDestinazioniStep1", "Giri", FormMethod.Post))
|
||||
{
|
||||
|
||||
<input type="hidden" name="DataGiroCons" id="DataGiroCons" value="@ViewBag.DataGiroCons" />
|
||||
<input type="hidden" name="SerialeGiro" id="SerialeGiro" value="@ViewBag.SerialeGiro" />
|
||||
<input type="hidden" name="NomeMezzo" id="NomeMezzo" value="@ViewBag.NomeMezzo" />
|
||||
<input type="hidden" name="NomeAutista" id="NomeAutista" value="@ViewBag.NomeAutista" />
|
||||
|
||||
<input type="hidden" name="CodAutistaOld" id="CodAutistaOld" value="@ViewBag.CodAutista" />
|
||||
<input type="hidden" name="CodMezzoOld" id="CodMezzoOld" value="@ViewBag.CodMezzo" />
|
||||
|
||||
<div class="mb-3">
|
||||
<b>Seleziona il nuovo autista:</b> @Html.DropDownList("autisti", ViewBag.Autisti, null, new { @class = "agy-form-field require" })
|
||||
<b>Seleziona il nuovo autista:</b> @Html.DropDownList("codAutista", ViewBag.Autisti, null, new { @class = "agy-form-field require" })
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<b>Seleziona il nuovo Automezzo:</b> @Html.DropDownList("mezzi", ViewBag.Mezzi, null, new { @class = "agy-form-field require" })
|
||||
<b>Seleziona il nuovo Automezzo:</b> @Html.DropDownList("codMezzo", ViewBag.Mezzi, null, new { @class = "agy-form-field require" })
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
@* <input type="submit" value="Salva modifiche" class="btn btn-primary" /> *@
|
||||
<input type="submit" value="Avanti" class="btn btn-primary" />
|
||||
|
||||
@* <a asp-action="ModificaTutteDestinazioniStep1" asp-controller="Giri" asp-route-modelList="@modelList" class="btn btn-primary">avanti</a> *@
|
||||
@* <a asp-action="ModificaTutteDestinazioniStep1"
|
||||
asp-controller="Giri"
|
||||
asp-route-id="@ViewBag.SerialeGiro"
|
||||
asp-route-codAutista="@ViewBag.CodAutista"
|
||||
asp-route-nomeAutista="@ViewBag.NomeAutista"
|
||||
asp-route-codMezzo="@ViewBag.CodMezzo"
|
||||
asp-route-nomeMezzo="@ViewBag.NomeMezzo"
|
||||
asp-route-dataGiroCons="@ViewBag.DataGiroCons"
|
||||
|
||||
|
||||
value="Torna alla lista"
|
||||
class="btn btn-primary">Avanti2</a>
|
||||
|
||||
|
||||
<a href="@Url.ActionLink("ModificaTutteDestinazioniStep1", "Giri",
|
||||
new{serialeGiro = ViewBag.SerialeGiro,
|
||||
codAutista=ViewBag.CodAutista,
|
||||
nomeAutista=ViewBag.NomeAutista,
|
||||
codMezzo=ViewBag.CodMezzo,
|
||||
nomeMezzo=ViewBag.NomeMezzo,
|
||||
dataGiroCons=ViewBag.DataGiroCons
|
||||
})" title="Aggiungi nuova destinazione" class="btn btn-primary">Avanti3
|
||||
</a>*@
|
||||
|
||||
|
||||
|
||||
<a asp-action="Index" asp-controller="Giri" asp-route-oldAuti="@ViewBag.Autista" asp-route-oldMezzo="@ViewBag.Mezzo" value="Torna alla lista" class="btn btn-primary">Torna alla lista</a>
|
||||
</div>
|
||||
@for (var i = 0; i < modelList.Count(); i++)
|
||||
{
|
||||
@Html.HiddenFor(modelItem => modelList[i].CodAutomezzo);
|
||||
@Html.HiddenFor(modelItem => modelList[i].DescAutomezzo)
|
||||
@Html.HiddenFor(modelItem => modelList[i].Brserial)
|
||||
@Html.HiddenFor(modelItem => modelList[i].DataCarico)
|
||||
@Html.HiddenFor(modelItem => modelList[i].CodCommittente)
|
||||
@Html.HiddenFor(modelItem => modelList[i].Committente)
|
||||
@Html.HiddenFor(modelItem => modelList[i].CodAutista)
|
||||
@Html.HiddenFor(modelItem => modelList[i].Autista)
|
||||
@Html.HiddenFor(modelItem => modelList[i].CodSede)
|
||||
@Html.HiddenFor(modelItem => modelList[i].Sede)
|
||||
@Html.HiddenFor(modelItem => modelList[i].IndirizzoSede)
|
||||
@Html.HiddenFor(modelItem => modelList[i].Cproword)
|
||||
@Html.HiddenFor(modelItem => modelList[i].Cprownum)
|
||||
@Html.HiddenFor(modelItem => modelList[i].Brmerce)
|
||||
@Html.HiddenFor(modelItem => modelList[i].Brnote)
|
||||
@Html.HiddenFor(modelItem => modelList[i].ImportoDaRitirare)
|
||||
@Html.HiddenFor(modelItem => modelList[i].ItemList)
|
||||
@Html.HiddenFor(modelItem => modelList[i].serialeGiro)
|
||||
@Html.HiddenFor(modelItem => modelList[i].Casse)
|
||||
@Html.HiddenFor(modelItem => modelList[i].Trasf)
|
||||
@Html.HiddenFor(modelItem => modelList[i].Colli)
|
||||
@Html.HiddenFor(modelItem => modelList[i].num_cons)
|
||||
@Html.HiddenFor(modelItem => modelList[i].Uova)
|
||||
@Html.HiddenFor(modelItem => modelList[i].Cist)
|
||||
@Html.HiddenFor(modelItem => modelList[i].Note)
|
||||
@Html.HiddenFor(modelItem => modelList[i].Seq)
|
||||
@Html.HiddenFor(modelItem => modelList[i].Prog)
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -18,25 +18,30 @@
|
||||
<h5 class="mb-0">Modifica Tutte Destinazioni</h5> <small class="text-muted float-end"></small>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@* <div class="mb-3">
|
||||
<b>Autista da sostituire:</b> @ViewBag.CodAutista - @ViewBag.Autista
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<b>Automezzo da sostituire:</b> @ViewBag.CodMezzo - @ViewBag.Mezzo
|
||||
</div> *@
|
||||
|
||||
@using (Html.BeginForm("ModificaTutteDestinazioniPost", "Giri", FormMethod.Post))
|
||||
{
|
||||
|
||||
<input type="hidden" name="CodAutista" id="CodAutista" value="@ViewBag.CodAutista" />
|
||||
<input type="hidden" name="CodMezzo" id="CodMezzo" value="@ViewBag.CodMezzo" />
|
||||
<input type="hidden" name="DataGiroCons" id="DataGiroCons" value="@ViewBag.DataGiroCons" />
|
||||
<input type="hidden" name="SerialeGiro" id="SerialeGiro" value="@ViewBag.SerialeGiro" />
|
||||
<input type="hidden" name="TipoOperazione" id="TipoOperazione" value="@ViewBag.TipoOperazione" />
|
||||
<input type="hidden" name="SerialeGiroDestinazione" id="SerialeGiroDestinazione" value="@ViewBag.SerialeGiroDestinazione" />
|
||||
|
||||
|
||||
<div class="mb-3">
|
||||
<b>Nuovo autista:</b> @ViewBag.CodAutista - @ViewBag.Autista @* @Html.DropDownList("autisti", ViewBag.Autisti, null, new { @class = "agy-form-field require" }) *@
|
||||
<b>Nuovo autista:</b> @ViewBag.CodAutista - @ViewBag.NomeAutista
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<b>Nuovo automezzo:</b> @ViewBag.CodMezzo - @ViewBag.Mezzo @* @Html.DropDownList("mezzi", ViewBag.Mezzi, null, new { @class = "agy-form-field require" }) *@
|
||||
<b>Nuovo automezzo:</b> @ViewBag.CodMezzo - @ViewBag.NomeMezzo
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<input type="submit" value="Salva" class="btn btn-primary" />
|
||||
|
||||
<a asp-action="ModificaTutteDestinazioni" asp-controller="Giri" value="Torna alla lista" class="btn btn-primary">Torna alla lista</a>
|
||||
</div>
|
||||
|
||||
@for (var i = 0; i < modelList.Count(); i++)
|
||||
{
|
||||
|
||||
|
||||
@ -79,14 +79,14 @@
|
||||
@Html.HiddenFor(a=>lst[i].CodMezzo)
|
||||
</td>
|
||||
<td style="border-right-width:2px">
|
||||
|
||||
<a href="@Url.ActionLink("Index", "Destinazioni", new { id="", codAutista=lst[i].CodAutista, nomeAutista=lst[i].Autista, dataGiro=lst[i].DataGiro, codMezzo=lst[i].CodMezzo, desMezzo=lst[i].Automezzo})" title="Destinazioni" class="links"><img alt="nocons" src="@Url.Content("~/images/icons8-oggetti-puntiforme-30.png")" style="width:24px;height:24px;"></a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
<button type="submit" class="btn btn-primary">Valida</button>
|
||||
<button type="submit" class="btn btn-primary" name="valida" value="valida">Valida</button>
|
||||
<button type="submit" class="btn btn-primary" name="valida0" value="valida0">Valida con bancali a 0</button>
|
||||
@Html.ActionLink("Seleziona tutti", "Index", "GiriDaValidare",new { sel = true }, new { @class = "btn btn-primary" })
|
||||
|
||||
@Html.ActionLink("Deleziona tutti", "Index", "GiriDaValidare",new { sel = false },new { @class = "btn btn-primary" })
|
||||
|
||||
40
Views/Shared/Alert.cshtml
Normal file
40
Views/Shared/Alert.cshtml
Normal file
@ -0,0 +1,40 @@
|
||||
@model ErrorViewModel
|
||||
@{
|
||||
ViewData["Title"] = "Alert";
|
||||
}
|
||||
<h1 class="text-danger">Alert</h1>
|
||||
<h2 class="text-danger">@Model.ErrMsg</h2>
|
||||
|
||||
|
||||
@if (!string.IsNullOrEmpty(Model.Field1))
|
||||
{
|
||||
<p>
|
||||
<strong>@Model.Field1_lbl:</strong> <code>@Model.Field1</code>
|
||||
</p>
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(Model.Field2))
|
||||
{
|
||||
<p>
|
||||
<strong>@Model.Field2_lbl:</strong> <code>@Model.Field2</code>
|
||||
</p>
|
||||
}
|
||||
@if (!string.IsNullOrEmpty(Model.Field3))
|
||||
{
|
||||
<p>
|
||||
<strong>@Model.Field3_lbl:</strong> <code>@Model.Field3</code>
|
||||
</p>
|
||||
}
|
||||
|
||||
@if (!string.IsNullOrEmpty(Model.BackPage))
|
||||
{
|
||||
<p>
|
||||
<strong>Back url:</strong> <code>@Model.BackPage</code>
|
||||
</p>
|
||||
<br />
|
||||
<a href="@Model.BackPage" class="btn btn-primary">Indietro</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<br />
|
||||
<button onclick="window.history.back();" class="btn btn-primary">Indietro</button>
|
||||
}
|
||||
@ -16,7 +16,7 @@
|
||||
</p>
|
||||
}
|
||||
|
||||
<h3>Development Mode</h3>
|
||||
@*<h3>Development Mode</h3>
|
||||
<p>
|
||||
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
|
||||
</p>
|
||||
@ -25,4 +25,4 @@
|
||||
It can result in displaying sensitive information from exceptions to end users.
|
||||
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
|
||||
and restarting the app.
|
||||
</p>
|
||||
</p>*@
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
},
|
||||
"ApplicationInsights": {
|
||||
"rootUrlApi": "https://api.poloinformatico.it:8000/api/",
|
||||
//"rootUrlApi": "https://localhost:7126/api/"
|
||||
//"rootUrlApi": "https://localhost:7126/api/",
|
||||
"messDestAccodo": "La seguente destinazione verrà aggiunta ad un giro esistente",
|
||||
"messDestNew": "Verrà creato un nuovo giro per la seguente destinazione",
|
||||
"messDestiAccodo": "Le seguenti destinazioni verranno aggiunte ad un giro esistente",
|
||||
|
||||
BIN
wwwroot/images/right-arrow-icon-5.png
Normal file
BIN
wwwroot/images/right-arrow-icon-5.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.9 KiB |
Loading…
Reference in New Issue
Block a user