155ae2fb92
X correggere visualizzazione giacenze magazzino + grafica migliorata
91 lines
3.7 KiB
Plaintext
91 lines
3.7 KiB
Plaintext
@model IEnumerable<StockManMVC.Models.Operator>
|
|
|
|
@{
|
|
ViewBag.Title = "COnfigurazione Operatori";
|
|
}
|
|
|
|
|
|
<div class="row" style="margin-top: 0.5em;">
|
|
<div class="col-xs-12">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
<div class="row">
|
|
<div class="col-xs-8">
|
|
<strong>Configurazione Operatori</strong>
|
|
</div>
|
|
<div class="col-xs-4 text-right">
|
|
<button class="btn btn-sm btn-success" title="Aggiunta nuovo Operatore" onclick="LoadCreateNew();"><i class="glyphicon glyphicon-plus" aria-hidden="true"></i> Aggiunta Operatore</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="panel-body small">
|
|
<div id="mainDiv" class="col-xs-12">
|
|
<table class="table table-condensed table-responsive table-striped table-hover table-bordered">
|
|
<tr>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.CodExt)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.LastName)
|
|
</th>
|
|
<th>
|
|
@Html.DisplayNameFor(model => model.FirstName)
|
|
</th>
|
|
<th></th>
|
|
</tr>
|
|
|
|
@foreach (var item in Model)
|
|
{
|
|
var delStyle = "";
|
|
if (item.ItemFlux.Count > 0 || item.ID == "ND") { delStyle = "disabled invisible"; }
|
|
<tr>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.CodExt)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.LastName)
|
|
</td>
|
|
<td>
|
|
@Html.DisplayFor(modelItem => item.FirstName)
|
|
</td>
|
|
<td>
|
|
<button class="btn btn-xs btn-primary" title="Modifica" onclick="LoadCurrEdit('@item.ID');"><i class="glyphicon glyphicon-edit"></i></button>
|
|
<button class="btn btn-xs btn-danger @delStyle" title="Elimina" onclick="LoadCurrDelete('@item.ID');"><i class="glyphicon glyphicon-trash"></i></button>
|
|
</td>
|
|
</tr>
|
|
}
|
|
|
|
</table>
|
|
</div>
|
|
<div class="col-xs-6">
|
|
<div class="" id="divChild">
|
|
@*qui inserisco la partial view...*@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
|
|
function LoadCreateNew() {
|
|
reduceMainDiv();
|
|
$("#divChild").load('@(Url.Action("Create", "Operators", null, Request.Url.Scheme))?mode=std');
|
|
}
|
|
|
|
function LoadCurrEdit(ID) {
|
|
reduceMainDiv();
|
|
$("#divChild").load('@(Url.Action("Edit", "Operators", null, Request.Url.Scheme))/' + ID + '?mode=std');
|
|
}
|
|
function LoadCurrDelete(ID) {
|
|
reduceMainDiv();
|
|
$("#divChild").load('@(Url.Action("Delete", "Operators", null, Request.Url.Scheme))/' + ID + '?mode=std');
|
|
}
|
|
|
|
function reduceMainDiv() {
|
|
$("#mainDiv").removeClass("col-xs-12");
|
|
$("#mainDiv").addClass("col-xs-6");
|
|
}
|
|
|
|
</script> |