diff --git a/StockManMVC/App_Start/MVCGridConfig.cs b/StockManMVC/App_Start/MVCGridConfig.cs index 47f6faa..1bbecc5 100644 --- a/StockManMVC/App_Start/MVCGridConfig.cs +++ b/StockManMVC/App_Start/MVCGridConfig.cs @@ -55,10 +55,10 @@ namespace StockManMVC .WithSorting(false) .WithVisibility(true, false) .WithAllowChangeVisibility(false) - .WithHeaderText("") + //.WithHeaderText("") .WithHtmlEncoding(false) .WithValueExpression((i, c) => c.UrlHelper.Action("Details", "Items", new { id = i.ID, StockItemID = i.ID, FluxItemID = i.ID })) - .WithValueTemplate(""); + .WithValueTemplate(""); cols.Add("Family").WithColumnName("Family") .WithVisibility(true, false) .WithAllowChangeVisibility(false) @@ -105,14 +105,14 @@ namespace StockManMVC .WithHeaderText("") .WithHtmlEncoding(false) .WithValueExpression((i, c) => c.UrlHelper.Action("Duplicate", "Items", new { id = i.ID })) - .WithValueTemplate(""); + .WithValueTemplate(""); cols.Add("EditLink").WithColumnName("EditLink") .WithSorting(false) .WithVisibility(true, false) .WithHeaderText("") .WithHtmlEncoding(false) .WithValueExpression((i, c) => c.UrlHelper.Action("Edit", "Items", new { id = i.ID, mode="full" })) - .WithValueTemplate(""); + .WithValueTemplate(""); }) .WithRetrieveDataMethod((context) => { diff --git a/StockManMVC/Controllers/ItemsController.cs b/StockManMVC/Controllers/ItemsController.cs index 23f7dd1..bd918ee 100644 --- a/StockManMVC/Controllers/ItemsController.cs +++ b/StockManMVC/Controllers/ItemsController.cs @@ -335,6 +335,7 @@ namespace StockManMVC.Controllers return HttpNotFound(); } ViewBag.ItemFamilyID = new SelectList(db.ItemFamily, "ID", "Descr", item.ItemFamilyID); + ViewBag.mode = mode; if (mode == "std") { return PartialView("_Edit", item); @@ -345,6 +346,7 @@ namespace StockManMVC.Controllers } } +#if false // GET: Items/Edit/5 public ActionResult EditFull(int? id) { @@ -359,7 +361,8 @@ namespace StockManMVC.Controllers } ViewBag.ItemFamilyID = new SelectList(db.ItemFamily, "ID", "Descr", item.ItemFamilyID); return View("Edit", item); - } + } +#endif // POST: Items/Edit/5 // To protect from overposting attacks, please enable the specific properties you want to bind to, for diff --git a/StockManMVC/Views/Items/Edit.cshtml b/StockManMVC/Views/Items/Edit.cshtml index a0bdb44..2ddbde7 100644 --- a/StockManMVC/Views/Items/Edit.cshtml +++ b/StockManMVC/Views/Items/Edit.cshtml @@ -85,7 +85,14 @@