merge 1
This commit is contained in:
commit
f5af555098
@ -27,9 +27,8 @@ namespace SoftwayWeb.Controllers
|
||||
apiUrl = key;
|
||||
}
|
||||
|
||||
public IActionResult AddDestinazione(string serialeGiro)
|
||||
public IActionResult AddDestinazione(string serialeGiro, string? codAutista, string? nomeAutista, string? codMezzo, string? desMezzo, DateTime dataGiro)
|
||||
{
|
||||
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
|
||||
token = helper.GetStringValue("tok");
|
||||
@ -43,13 +42,19 @@ namespace SoftwayWeb.Controllers
|
||||
ViewBag.serialeGiro = serialeGiro;
|
||||
model.Pisergir = serialeGiro;
|
||||
ViewBag.Commit = getCommittenti();
|
||||
ViewBag.CodAutista = getAutisti();
|
||||
ViewBag.Mezzi = getMezzi();
|
||||
ViewBag.CodAutista = codAutista;
|
||||
model.Piautist = codAutista;
|
||||
ViewBag.Autista = nomeAutista;
|
||||
ViewBag.CodMezzo = codMezzo;
|
||||
model.Pitarga = codMezzo;
|
||||
ViewBag.Automezzo = desMezzo;
|
||||
ViewBag.dataGiro = dataGiro.ToString("dd/MM/yyyy");
|
||||
model.Pidata = dataGiro;
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
public IActionResult NewDestinazione(Modgir modgir, string? autista, string? mezzo, string id)
|
||||
public IActionResult NewDestinazione(Modgir modgir /*,string? codAutista, string? codMezzo, DateTime dataGiro, string serGiro*/)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
|
||||
@ -63,16 +68,15 @@ namespace SoftwayWeb.Controllers
|
||||
//qui metodo post per scrivere su pimodgir
|
||||
Modgir mg = new Modgir();
|
||||
|
||||
//mg.Piprogre = modgir.Piprogre;
|
||||
mg.Piserial = string.Empty;
|
||||
mg.Pidata = modgir.Pidata;
|
||||
mg.Picommit = modgir.Picommit;
|
||||
mg.Pidesdiv = modgir.Pidesdiv;
|
||||
mg.Pitarga = mezzo.TrimEnd();
|
||||
mg.Piautist = autista.TrimEnd();
|
||||
mg.Pitarga = modgir.Pitarga;
|
||||
mg.Piautist = modgir.Piautist.TrimEnd();
|
||||
mg.Pitiprec = "A";
|
||||
mg.Pirigele = string.Empty;
|
||||
mg.Pisergir = id;
|
||||
mg.Pisergir = modgir.Pisergir;
|
||||
mg.Picasse = modgir.Picasse;
|
||||
mg.Pitrasf = modgir.Pitrasf;
|
||||
mg.Picolli = modgir.Picolli;
|
||||
@ -102,7 +106,6 @@ namespace SoftwayWeb.Controllers
|
||||
helper.SetStringValue("errMsg", errMes);
|
||||
return RedirectToAction("Error");
|
||||
}
|
||||
//return View();
|
||||
}
|
||||
|
||||
public IActionResult Index()
|
||||
@ -249,7 +252,7 @@ namespace SoftwayWeb.Controllers
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public IActionResult Cascading(string Picommit/*ancodice*/)
|
||||
public IActionResult Cascading(string Picommit)
|
||||
{
|
||||
SessionHelper helper = new SessionHelper(this);
|
||||
Cascading model = new Cascading();
|
||||
@ -289,11 +292,9 @@ namespace SoftwayWeb.Controllers
|
||||
listItem.Value = sede.Pccodsed;
|
||||
listItem.Text = s;
|
||||
selectItems.Add(listItem);
|
||||
//model.SediCons.Add(listItem);
|
||||
model.SediCons.Add(listItem);
|
||||
}
|
||||
//model.SediCons.AddRange(selectItems);
|
||||
// ViewBag.SediCons = sediCons;
|
||||
|
||||
}
|
||||
}
|
||||
return Json(new SelectList(selectItems, "Value", "Text"));
|
||||
|
||||
@ -104,7 +104,7 @@ namespace SoftwayWeb.Controllers
|
||||
{
|
||||
string dato = response.Content.ReadAsStringAsync().Result;
|
||||
modelList = JsonConvert.DeserializeObject<List<Destinazioni_Out>>(dato);
|
||||
modelList = modelList.Where(x => x.serialeGiro == id).ToList();
|
||||
modelList = modelList.Where(x => x.serialeGiro == id).OrderBy(x=> x.Seq).ThenBy(x => x.Committente).ToList();
|
||||
|
||||
if (page != null && page < 1)
|
||||
{
|
||||
|
||||
@ -41,8 +41,6 @@ namespace SoftwayWeb.Controllers
|
||||
}
|
||||
|
||||
urlBase = apiUrl + "Giri/listaGiri?aperto="+ aperto;
|
||||
//string url = apiUrl + "Giri/listaGiri";
|
||||
//urlBase = url + "?token=" + token;
|
||||
Uri baseAddress = new Uri(urlBase);
|
||||
client = new HttpClient();
|
||||
client.BaseAddress = baseAddress;
|
||||
@ -155,7 +153,6 @@ namespace SoftwayWeb.Controllers
|
||||
{
|
||||
if(g.IsSelected==true)
|
||||
{
|
||||
//ViewBag.Autisti = getAutisti();
|
||||
apiUrl = helper.GetStringValue("apiUrl");
|
||||
urlBase = apiUrl + "Giri/addGiro2";
|
||||
|
||||
@ -299,7 +296,7 @@ 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())).ToList();
|
||||
modelList = modelList.Where(x => x.serialeGiro.Equals(id.TrimEnd())).OrderBy(x => x.Seq).ThenBy(x => x.Committente).ToList();
|
||||
|
||||
//if (page != null && page < 1)
|
||||
//{
|
||||
@ -308,9 +305,10 @@ namespace SoftwayWeb.Controllers
|
||||
|
||||
//var pageSize = 10;
|
||||
|
||||
//var shortList = modelList.ToPagedList(/*page ?? 1, pageSize*/);
|
||||
//var shortList = modelList.ToPagedList(page ?? 1, pageSize);
|
||||
|
||||
return View(modelList);
|
||||
//return View(shortList);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -318,7 +316,6 @@ namespace SoftwayWeb.Controllers
|
||||
helper.SetStringValue("errMsg", errMes);
|
||||
return RedirectToAction("Error");
|
||||
}
|
||||
//return View(modelList);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@Html.CheckBox("aperto", new { placeholder ="aperto", @checked = true, })
|
||||
@Html.CheckBox("aperto", new { placeholder ="aperto" , @checked = true})
|
||||
@Html.Label("aperto", "aperto")
|
||||
|
||||
</td>
|
||||
@ -81,8 +81,8 @@
|
||||
</thead>
|
||||
<tbody class="table-border-bottom-0">
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
string totBancaliCaricati = "-";
|
||||
{
|
||||
string totBancaliCaricati = "-";
|
||||
if (item.BancaliCaricati!=null)
|
||||
{
|
||||
totBancaliCaricati = Convert.ToString(item.BancaliCaricati.Value);
|
||||
@ -112,21 +112,34 @@
|
||||
|
||||
<td>
|
||||
<a href="@Url.ActionLink("Index", "Destinazioni", new { id=item.SerialeGiro,
|
||||
codAutista=item.CodAutista,
|
||||
nomeAutista=item.Autista,
|
||||
dataGiro=item.DataGiro,
|
||||
codMezzo=item.CodMezzo,
|
||||
desMezzo=item.Automezzo})" title="Destinazioni" class="links"><img alt="Destinazioni" src="@Url.Content("~/images/icons8-oggetti-puntiforme-30.png")" style="width:24px;height:24px;"></a>
|
||||
<a href="@Url.ActionLink("Bancali", "Giri", new { id=item.SerialeGiro })" title="Bancali" class="links"><img alt="Bancali" src="@Url.Content("~/images/icons8-bancale-24.png")" style="width:24px;height:24px;"></a>
|
||||
codAutista=item.CodAutista,
|
||||
nomeAutista=item.Autista,
|
||||
dataGiro=item.DataGiro,
|
||||
codMezzo=item.CodMezzo,
|
||||
desMezzo=item.Automezzo})" title="Destinazioni" class="links"><img alt="Destinazioni" src="@Url.Content("~/images/icons8-oggetti-puntiforme-30.png")" style="width:24px;height:24px;">
|
||||
</a>
|
||||
@if(item.DestinazioniFatte == 0)
|
||||
{
|
||||
<a href="@Url.ActionLink("Bancali", "Giri", new { id=item.SerialeGiro })" title="Bancali" class="links"><img alt="Bancali" src="@Url.Content("~/images/icons8-bancale-24.png")" style="width:24px;height:24px;"></a>
|
||||
}
|
||||
<a href="@Url.ActionLink("Chiudi", "GiriChiudi", new { id=item.SerialeGiro,nbanc=item.parzialeBanRec,imp=item.parzialeImpRec })" title="Chiudi" class="links"><img alt="Chiudi" src="@Url.Content("~/images/icons8-bandiera-a-scacchi-64.png")" style="width:24px;height:24px;"></a>
|
||||
<a href="@Url.ActionLink("ModificaTutteDestinazioni", "Giri", new { id = item.SerialeGiro,
|
||||
@if (item.DestinazioniFatte == 0)
|
||||
{
|
||||
<a href="@Url.ActionLink("ModificaTutteDestinazioni", "Giri", new { id = item.SerialeGiro,
|
||||
codAutista = item.CodAutista,
|
||||
nomeAutista = item.Autista,
|
||||
codMezzo= item.CodMezzo,
|
||||
nomeMezzo = item.Automezzo,
|
||||
dataGiroCons = item.DataGiro@* id=item.SerialeGiro,nbanc=item.parzialeBanRec,imp=item.parzialeImpRec *@ })" title="Modifica tutte le destinazioni" class="links"><img alt="Modifica Tutte" src="@Url.Content("~/images/system.png")" style="width:24px;height:24px;">
|
||||
</a>
|
||||
<a href="@Url.ActionLink("AddDestinazione", "AddDestinazione", new{serialeGiro = item.SerialeGiro})" title="Aggiungi nuova destinazione" class="links"><img alt="Aggiungi nuova destinazione" src="@Url.Content("~/images/addBtn.png")" style="width:25px;height:25px;"></a>
|
||||
dataGiroCons = item.DataGiro @* id=item.SerialeGiro,nbanc=item.parzialeBanRec,imp=item.parzialeImpRec *@})" title="Modifica tutte le destinazioni" class="links">
|
||||
<img alt="Modifica Tutte" src="@Url.Content("~/images/system.png")" style="width:24px;height:24px;">
|
||||
</a>
|
||||
}
|
||||
<a href="@Url.ActionLink("AddDestinazione", "AddDestinazione", new{serialeGiro = item.SerialeGiro,
|
||||
codAutista=item.CodAutista,
|
||||
nomeAutista=item.Autista,
|
||||
dataGiro=item.DataGiro,
|
||||
codMezzo=item.CodMezzo,
|
||||
desMezzo=item.Automezzo})" title="Aggiungi nuova destinazione" class="links"><img alt="Aggiungi nuova destinazione" src="@Url.Content("~/images/addBtn.png")" style="width:25px;height:25px;"></a>
|
||||
@if (item.BancaliCaricati == null)
|
||||
{
|
||||
<img alt="noBancali" src="@Url.Content("~/images/alert.png")" style="width:23px;height:23px;">
|
||||
@ -150,7 +163,9 @@
|
||||
<span><img alt="Bancali" src="@Url.Content("~/images/pallet.png")" style="width:24px;height:24px;"></span>
|
||||
<span style="color:blue;">Bancali caricati</span> /<span style="color:green;">parziale bancali caricati</span> /<span style="color:brown;">parziale bancali scaricati</span> /
|
||||
<span><img alt="nocons" src="@Url.Content("~/images/alert.png")" style="width:16px;height:16px;"></span>
|
||||
<span> Giro NON visibile su app (caricare i bancali iniziali)</span>
|
||||
<span> Giro NON visibile su app (caricare i bancali iniziali)</span> /
|
||||
<span><img alt="nocons" src="@Url.Content("~/images/warning.png")" style="width:16px;height:16px;"></span>
|
||||
<span> Destinazioni modificate</span>
|
||||
|
||||
<!--/ Striped Rows -->
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user