Fix perdita pageSize su selezione ordinamento e/o paginazione...
This commit is contained in:
@@ -54,6 +54,7 @@ namespace StockManMVC.Controllers
|
||||
ViewBag.DescrSortParm = String.IsNullOrEmpty(SortOrd) ? "Descr_desc" : "";
|
||||
ViewBag.LocTypeSortParm = SortOrd == "LocType" ? "LocType_desc" : "LocType";
|
||||
// gestione selettore dim pagina
|
||||
ViewBag.pageSize = pageSize;
|
||||
var pageOptions = new[] { "5", "10", "15", "25", "50", "100" };
|
||||
ViewBag.PageSizeDD = new SelectList(pageOptions, pageSize.ToString());
|
||||
var CurrLocations = db.Location.Where(s => s.ID != "");
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
<tr>
|
||||
<th>
|
||||
@*Html.DisplayNameFor(model => model.Descr).ToString(),*@
|
||||
@Html.ActionLink("Descrizione", "Index", new { LocTypeID = ViewBag.LocTypeID, SearchVal = ViewBag.SearchVal, SortOrd = ViewBag.DescrSortParm, page = 1 })
|
||||
@Html.ActionLink("Descrizione", "Index", new { LocTypeID = ViewBag.LocTypeID, SearchVal = ViewBag.SearchVal, SortOrd = ViewBag.DescrSortParm, page = 1, pageSize = ViewBag.pageSize })
|
||||
</th>
|
||||
<th>
|
||||
@*Html.DisplayNameFor(model => model.LocType.Descr).ToString()*@
|
||||
@Html.ActionLink("Tipo", "Index", new { LocTypeID = ViewBag.LocTypeID, SearchVal = ViewBag.SearchVal, SortOrd = ViewBag.LocTypeSortParm, page = 1 })
|
||||
@Html.ActionLink("Tipo", "Index", new { LocTypeID = ViewBag.LocTypeID, SearchVal = ViewBag.SearchVal, SortOrd = ViewBag.LocTypeSortParm, page = 1, pageSize = ViewBag.pageSize })
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-11">
|
||||
@Html.PagedListPager(Model, page => Url.Action("Index", new { LocTypeID = ViewBag.LocTypeID, SearchVal = ViewBag.SearchVal, SortOrd = ViewBag.SortOrd, page }))
|
||||
@Html.PagedListPager(Model, page => Url.Action("Index", new { LocTypeID = ViewBag.LocTypeID, SearchVal = ViewBag.SearchVal, SortOrd = ViewBag.SortOrd, pageSize = ViewBag.pageSize, page }))
|
||||
</div>
|
||||
<div class="col-sm-1 text-right pagination">
|
||||
@Html.DropDownList("PageSizeDD", null, htmlAttributes: new { @class = "form-control" })
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user