progressivo anagrafiche

This commit is contained in:
Marco Audiffredi 2023-10-16 13:03:08 +02:00
parent 0533a6678e
commit 4234c6b4f1
5 changed files with 39 additions and 15 deletions

View File

@ -6,7 +6,9 @@ using NuGet.Common;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.Intrinsics.Arm;
using System.Security.Policy;
using System.Text;
using System.Text.Json.Nodes;
using VirtualTask.Models;
using X.PagedList;
@ -339,10 +341,32 @@ namespace VirtualTask.Controllers
p++;
seriale=Convert.ToString(p);
seriale = seriale.PadLeft(10, '0');
Progressivo upd=new Progressivo();
upd.val_prog = p;
upd.tipo_prog = _serchiam;
upd.azienda = tenant;
updateSeriale(upd );
}
//todo AGGIORNO IL VALORE DEL PROGRESSIVO
return seriale;
}
private async void updateSeriale(Progressivo p)
{
SessionHelper helper = new SessionHelper(this);
token = helper.GetStringValue("tok");
apiUrl = helper.GetStringValue("apiUrl");
tenant = helper.GetStringValue("tenant");
urlBase = apiUrl + "progressivo/mod";
urlBase = urlBase + "?token=" + token;
//Uri baseAddress = new Uri(urlBase);
client = new HttpClient();
var stringPayload = JsonConvert.SerializeObject(p);
var httpContent = new StringContent(stringPayload, Encoding.UTF8, "application/json");
var httpResponse = await client.PostAsync(urlBase, httpContent);
if (httpResponse.Content != null)
{
var responseContent = await httpResponse.Content.ReadAsStringAsync();
}
}
}
}

View File

@ -15,12 +15,8 @@
<input type="hidden" id="antipcon" value="C" name="antipcon" />
@Html.HiddenFor(x => x.andtobso)
@Html.HiddenFor(x => x.annumlis)
@Html.HiddenFor(x => x.ancodice)
<div class="form-group">
<label asp-for="ancodice" class="control-label"></label>
<input asp-for="ancodice" class="form-control" />
<span asp-validation-for="ancodice" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="andescri" class="control-label"></label>
<input asp-for="andescri" class="form-control" />

View File

@ -71,6 +71,6 @@
</dl>
</div>
<div>
@Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) |
@Html.ActionLink("Edit", "Edit", new { id = Model.ancodice }) |
<a asp-action="Index">Back to List</a>
</div>

View File

@ -16,10 +16,14 @@
@Html.HiddenFor(x => x.antipcon)
@Html.HiddenFor(x => x.andtobso)
@Html.HiddenFor(x => x.annumlis)
<div class="form-group">
<label asp-for="ancodice" class="control-label"></label>
<input asp-for="ancodice" class="form-control" />
<span asp-validation-for="ancodice" class="text-danger"></span>
@Html.HiddenFor(x => x.ancodice)
@Html.DisplayFor(model => model.ancodice)
<span asp-validation-for="andescri" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="andescri" class="control-label"></label>

View File

@ -9,15 +9,15 @@
ViewData["Title"] = "Index";
}
<h1>Index</h1>
<h1>Anagrafiche</h1>
<p>
<a asp-action="Create">Create New</a>
<a asp-action="Create">Crea nuova anagrafica</a>
</p>
@using (Html.BeginForm())
{
<p>
Find by Rag. Sociale: @Html.TextBox("SearchString")
Cerca per Rag. Sociale: @Html.TextBox("SearchString")
<input type="submit" value="Search" />
</p>
}
@ -122,8 +122,8 @@
PageClasses = new[]{ "page-link"},
LiElementClasses=new[] { "page-item" },
UlElementClasses = new[] { "pagination","justify-content-center", "mt-3" },
LinkToNextPageFormat = "Next",
LinkToPreviousPageFormat = "Previous",
LinkToNextPageFormat = "Successiva",
LinkToPreviousPageFormat = "Precedente",
MaximumPageNumbersToDisplay = 5,
DisplayLinkToPreviousPage = PagedListDisplayMode.Always,
DisplayLinkToNextPage = PagedListDisplayMode.Always