diff --git a/StockManMVC/App_Start/BundleConfig.cs b/StockManMVC/App_Start/BundleConfig.cs index 0055ff6..d3e5bf0 100644 --- a/StockManMVC/App_Start/BundleConfig.cs +++ b/StockManMVC/App_Start/BundleConfig.cs @@ -30,6 +30,7 @@ namespace StockManMVC bundles.Add(new StyleBundle("~/Content/css").Include( "~/Content/bootstrap.css", + "~/Content/font-awesome.css", //"~/Content/jquery.bootgrid.css", "~/Content/site.css")); } diff --git a/StockManMVC/App_Start/MVCGridConfig.cs b/StockManMVC/App_Start/MVCGridConfig.cs index 23eeb9d..74c5557 100644 --- a/StockManMVC/App_Start/MVCGridConfig.cs +++ b/StockManMVC/App_Start/MVCGridConfig.cs @@ -57,7 +57,7 @@ namespace StockManMVC .WithHeaderText("") .WithHtmlEncoding(false) .WithValueExpression((i, c) => c.UrlHelper.Action("Details", "Items", new { id = i.ID })) - .WithValueTemplate("View"); + .WithValueTemplate(""); cols.Add("Family").WithColumnName("Family") .WithVisibility(true, false) .WithHeaderText("Famiglia") diff --git a/StockManMVC/Controllers/ItemsController.cs b/StockManMVC/Controllers/ItemsController.cs index f69ca49..e26b366 100644 --- a/StockManMVC/Controllers/ItemsController.cs +++ b/StockManMVC/Controllers/ItemsController.cs @@ -135,12 +135,7 @@ namespace StockManMVC.Controllers var item = db.Item.Include(i => i.ItemFamily); return View(item.ToList()); } - public ActionResult MVCGrid() - { - var item = db.Item.Include(i => i.ItemFamily); - return View(item.ToList()); - } - + // GET: Items/Details/5 public ActionResult Details(int? id) { diff --git a/StockManMVC/StockManMVC.csproj b/StockManMVC/StockManMVC.csproj index 9cadb7f..c072a58 100644 --- a/StockManMVC/StockManMVC.csproj +++ b/StockManMVC/StockManMVC.csproj @@ -239,9 +239,12 @@ + + + @@ -273,6 +276,11 @@ SMModel.edmx + + + + + @@ -360,7 +368,6 @@ - diff --git a/StockManMVC/Views/Items/Index.cshtml b/StockManMVC/Views/Items/Index.cshtml index aa46af9..2367329 100644 --- a/StockManMVC/Views/Items/Index.cshtml +++ b/StockManMVC/Views/Items/Index.cshtml @@ -4,71 +4,105 @@ ViewBag.Title = "Index"; } -

Index

-

- @Html.ActionLink("Create New", "Create") -

- - - - - - - - - - - - -@foreach (var item in Model) { - - - - - - - - - - - -} +@using MVCGrid.Web +
+
+
+
+
+
+ Anagrafica Articoli +
+
+ @*@Html.ActionLink("Create New", "Create")*@ + + + Aggiunta Nuovo articolo + +
+
+
+
+ @Html.Partial("_MVCGridToolbar", new StockManMVC.Models.MVCGridToolbarModel() + { + MVCGridName = "ItemsGrid", + PageSize = true, + ColumnVisibility = true, + Export = true, + GlobalSearch = true + }) + @Html.MVCGrid("ItemsGrid") +
+
+
+
-
- @Html.DisplayNameFor(model => model.Descr) - - @Html.DisplayNameFor(model => model.CodInt) - - @Html.DisplayNameFor(model => model.CodExt) - - @Html.DisplayNameFor(model => model.DescrExt) - - @Html.DisplayNameFor(model => model.QtaMin) - - @Html.DisplayNameFor(model => model.QtaBatch) - - @Html.DisplayNameFor(model => model.CurrValue) - - @Html.DisplayNameFor(model => model.ItemFamily.Descr) -
- @Html.DisplayFor(modelItem => item.Descr) - - @Html.DisplayFor(modelItem => item.CodInt) - - @Html.DisplayFor(modelItem => item.CodExt) - - @Html.DisplayFor(modelItem => item.DescrExt) - - @Html.DisplayFor(modelItem => item.QtaMin) - - @Html.DisplayFor(modelItem => item.QtaBatch) - - @Html.DisplayFor(modelItem => item.CurrValue) - - @Html.DisplayFor(modelItem => item.ItemFamily.Descr) - - @Html.ActionLink("Edit", "Edit", new { id=item.ID }) | - @Html.ActionLink("Details", "Details", new { id=item.ID }) | - @Html.ActionLink("Delete", "Delete", new { id=item.ID }) -
+ + + + +@* + + + + + + + + + + + + + @foreach (var item in Model) { + + + + + + + + + + + + } + +
+ @Html.DisplayNameFor(model => model.Descr) + + @Html.DisplayNameFor(model => model.CodInt) + + @Html.DisplayNameFor(model => model.CodExt) + + @Html.DisplayNameFor(model => model.DescrExt) + + @Html.DisplayNameFor(model => model.QtaMin) + + @Html.DisplayNameFor(model => model.QtaBatch) + + @Html.DisplayNameFor(model => model.CurrValue) + + @Html.DisplayNameFor(model => model.ItemFamily.Descr) +
+ @Html.DisplayFor(modelItem => item.Descr) + + @Html.DisplayFor(modelItem => item.CodInt) + + @Html.DisplayFor(modelItem => item.CodExt) + + @Html.DisplayFor(modelItem => item.DescrExt) + + @Html.DisplayFor(modelItem => item.QtaMin) + + @Html.DisplayFor(modelItem => item.QtaBatch) + + @Html.DisplayFor(modelItem => item.CurrValue) + + @Html.DisplayFor(modelItem => item.ItemFamily.Descr) + + @Html.ActionLink("Edit", "Edit", new { id=item.ID }) | + @Html.ActionLink("Details", "Details", new { id=item.ID }) | + @Html.ActionLink("Delete", "Delete", new { id=item.ID }) +
*@ diff --git a/StockManMVC/Views/Items/MVCGrid.cshtml b/StockManMVC/Views/Items/MVCGrid.cshtml deleted file mode 100644 index 237abf4..0000000 --- a/StockManMVC/Views/Items/MVCGrid.cshtml +++ /dev/null @@ -1,28 +0,0 @@ -@model IEnumerable - -@{ - ViewBag.Title = "Articoli"; -} - -@using MVCGrid.Web -
-
- -
-
-

Anagrafica Articoli

-
-
- @Html.Partial("_MVCGridToolbar", new StockManMVC.Models.MVCGridToolbarModel() - { - MVCGridName = "ItemsGrid", - PageSize = true, - ColumnVisibility = true, - Export = true, - GlobalSearch = true - }) - @Html.MVCGrid("ItemsGrid") -
-
-
-
diff --git a/StockManMVC/Views/Shared/_Layout.cshtml b/StockManMVC/Views/Shared/_Layout.cshtml index 6ed6436..bc9824e 100644 --- a/StockManMVC/Views/Shared/_Layout.cshtml +++ b/StockManMVC/Views/Shared/_Layout.cshtml @@ -23,7 +23,8 @@
  • @Html.ActionLink("Home", "Index", "Home")
  • @*
  • @Html.ActionLink("About", "About", "Home")
  • @Html.ActionLink("Contact", "Contact", "Home")
  • *@ -
  • @Html.ActionLink("Anagrafica Articoli", "Index", "Items")
  • + @* + *@
  • @Html.ActionLink("Magazzino Articoli", "Index", "ItemStockStatus")
  • @*
  • @Html.ActionLink("Stock", "Index", "ItemStocks")
  • @Html.ActionLink("Flux", "Index", "ItemFluxes")
  • *@ @@ -72,7 +72,7 @@ - @Scripts.Render("~/bundles/jqbootgrid") + @*@Scripts.Render("~/bundles/jqbootgrid")*@ @RenderSection("scripts", required: false) diff --git a/StockManMVC/bin/StockManMVC.dll b/StockManMVC/bin/StockManMVC.dll index 62ac06a..216ff9b 100644 Binary files a/StockManMVC/bin/StockManMVC.dll and b/StockManMVC/bin/StockManMVC.dll differ diff --git a/StockManMVC/packages.config b/StockManMVC/packages.config index 6f84383..f7ff176 100644 --- a/StockManMVC/packages.config +++ b/StockManMVC/packages.config @@ -3,6 +3,7 @@ +