Files
StockMan/StockManMVC/Views/MagStatus/_StockByLocation.cshtml
T

57 lines
2.3 KiB
Plaintext

@model IEnumerable<StockManMVC.Models.ItemStock>
<div id="MoveConfWrapper">
@* Inject form here *@
</div>
<table class="table table-condensed table-responsive table-striped">
<tr>
<th></th>
<th>
@Html.DisplayNameFor(model => model.Item.Descr)
</th>
<th>
@Html.DisplayNameFor(model => model.QtyConf)
</th>
<th class="text-right">
@Html.DisplayNameFor(model => model.Item.CurrValue)
</th>
<th></th>
</tr>
@foreach (var item in Model)
{
<tr id="@("row_"+item.ID)" class="singleRow">
<td class="text-center" style="width: 4em;">
<a href="@Url.Action("Details", "Items", new { id = item.ItemID, StockItemID = item.ItemID })" class="btn btn-xs btn-info">
<i class="glyphicon glyphicon-search" aria-hidden="true"></i>
</a>
</td>
<td>
@Html.DisplayFor(modelItem => item.Item.Descr)
</td>
<td>
@Html.DisplayFor(modelItem => item.QtyConf)
</td>
<td class="text-right">
@Html.DisplayFor(modelItem => item.Item.CurrValue)
</td>
<td>
@if (ViewBag.ShowMove && ViewBag.LocationIdTo != "")
{
ViewBag.id = item.ID;
@*<a href="@Url.Action("Move", "MagStatus", new { id = item.ID, LocationID = ViewBag.LocationId, LocationIDTo = ViewBag.LocationIdTo, QtyConf = item.QtyConf })" class="btn btn-primary form-control" onClick="return confirm('Sicuro di voler procedere?')">Sposta <i class="glyphicon glyphicon-hand-right"></i></a>*@
<button class="btn btn-xs btn-info" onclick="confirmEdit(@ViewBag.id, '@ViewBag.LocationId', '@ViewBag.LocationIdTo');">Sposta <i class="glyphicon glyphicon-forward"></i></button>
}
</td>
</tr>
}
</table>
<script type="text/javascript">
function confirmEdit(Id, LocationId, LocationIdTo) {
$("#MoveConfWrapper").load('@(Url.Action("MoveConfirm", "MagStatus",null, Request.Url.Scheme))?id=' + Id + '&LocationId=' + LocationId + '&LocationIdTo=' + LocationIdTo);
// fix colore righe tabella
$(".singleRow").removeClass("bg-info");
$("#row_" + Id).addClass("bg-info");
}
</script>