1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
| @model PagedList.IPagedList<Logsys.Geolie.Anima.Mvc.Models.ProductProductLine>
@using PagedList.Mvc;
@Styles.Render("~/Content/PagedList.css")
@section Scripts{
<script type="text/javascript">
$(function () {
$('#SelectCustomer').change(function () {
var customerId = $(this).val();
$.ajax({
url: '@Url.Action("FillDependantDropDown", "Product")',
type: 'GET',
cache: false,
data: { CustomerId: customerId }//,
//error: alert("Impossible de récupérer une partie des données de filtrage")
}).done(function (result) {
$('#PartialDependantDropDowns').html(result);
});
});
});
@*$(function () {
$('#SelectCustomerStock').change(function () {
var customerStockID = $(this).val();
$.ajax({
url: '@Url.Action("FillDependantProductLineDropDown", "Product")',
type: 'GET',
cache: false,
data: { customerStockID: customerStockID },
error: alert("Ca marche pas !")
}).done(function (result) {
$('#PartialProductLineDropDowns').html(result);
});
});
});*@
</script>
}
@{
ViewBag.Title = "Articles";
}
@using (Html.BeginForm("Index", "Product", new
{
page = ViewBag.CurrentPage,
sortOrder = ViewBag.CurrentOrder,
customerId = ((SelectList)ViewBag.CustomerId).SelectedValue,
providerId = ((SelectList)ViewBag.ProviderId).SelectedValue,
withPhoto = ViewBag.WithPhoto,
operationId = ((SelectList)ViewBag.OperationId).SelectedValue,
productTypeId = ((SelectList)ViewBag.ProductTypeId).SelectedValue,
customerStockID = ((SelectList)ViewBag.CustomerStockID).SelectedValue,
productLineID = ((SelectList)ViewBag.ProductLineID).SelectedValue,
product = ViewBag.Product,
familyID = ((SelectList)ViewBag.FamilyID).SelectedValue,
isActiv = ViewBag.IsActiv,
buyerId = ((SelectList)ViewBag.BuyerId).SelectedValue
}, FormMethod.Get))
{
<div class="form-horizontal">
<div class="form-group">
<div class="col-md-11">
<h2>Liste des Articles</h2>
</div>
<div class="col-md-1">
<br />
<br />
@Html.ActionLink(" ", "Create", "Product", null, new { @class = "glyphicon glyphicon-plus btn btn-primary", @title = "Ajouter un article" })
</div>
</div>
<hr />
</div>
<div class="form-horizontal">
<div class="form-group">
<div class="col-md-10 col-md-offset-1">
<h3>Filtrer les articles sur :</h3>
</div>
<div class="col-md-1">
<button type="submit" class="btn btn-primary" title="Rechercher">
<span class="glyphicon glyphicon-search"></span>
</button>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="form-group">
<div class="col-md-2">
@Html.LabelFor(model => model.FirstOrDefault().Product.ProductLine.CustomerStock.Customer.Name, new { @class = "control-label" })
</div>
<div class="col-md-4">
@Html.DropDownList("CustomerID", (SelectList)ViewBag.CustomerId, "<Tous>", new { @id = "SelectCustomer", @class = "btn btn-default dropdown-toggle" })
</div>
<div class="col-md-2">
@Html.LabelFor(model => model.FirstOrDefault().Product.ProductType.Label, new { @class = "control-label" })
</div>
<div class="col-md-4">
@Html.DropDownList("ProductTypeID", (SelectList)ViewBag.ProductTypeID, "<Tous>", new { @id = "selectedType", @class = "btn btn-default dropdown-toggle" })
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-md-2">
@Html.LabelFor(model => model.FirstOrDefault().Product.Family.Label, new { @class = "control-label" })
</div>
<div class="col-md-4">
@Html.DropDownList("FamilyID", (SelectList)ViewBag.FamilyID, "<Toutes>", new { @id = "selectedType", @class = "btn btn-default dropdown-toggle" })
</div>
<div class="col-md-2">
@Html.LabelFor(model => model.FirstOrDefault().Product.Label, new { @class = "control-label" })
</div>
<div class="col-md-4">
@Html.Editor("product", new { htmlAttributes = new { @class = "form-control" } })
</div>
</div>
</div>
<div class="row">
<div class="form-group">
<div class="col-md-2">
@Html.LabelFor(model => model.FirstOrDefault().Product.PhotoPath, new { @class = "control-label" })
</div>
<div class="col-md-4">
<label class="radio-inline">@Html.RadioButton("withPhoto", "true") Oui</label>
<label class="radio-inline">@Html.RadioButton("withPhoto", "false") Non</label>
<label class="radio-inline">@Html.RadioButton("withPhoto", "null", true) Indif</label>
</div>
<div class="col-md-2">
@Html.Label("Produits actifs", new { @class = "control-label" })
</div>
<div class="col-md-4">
<label class="radio-inline">@Html.RadioButton("isActiv", "true", true) Oui</label>
<label class="radio-inline">@Html.RadioButton("isActiv", "false") Non</label>
<label class="radio-inline">@Html.RadioButton("isActiv", "null") Indif</label>
</div>
</div>
</div>
</div>
<div class="col-md-6">
@Html.Partial("PartialDependantDropDowns", new Logsys.Geolie.Anima.Mvc.Models.ProductProductLine())
</div>
</div>
</div>
} |
Partager