diff --git a/SiteSelector/bin/SiteSelector.dll b/SiteSelector/bin/SiteSelector.dll index 1f020a0..6ee5d51 100644 Binary files a/SiteSelector/bin/SiteSelector.dll and b/SiteSelector/bin/SiteSelector.dll differ diff --git a/StockManMVC/Controllers/ItemFamiliesController.cs b/StockManMVC/Controllers/ItemFamiliesController.cs index ac74191..26fa2ce 100644 --- a/StockManMVC/Controllers/ItemFamiliesController.cs +++ b/StockManMVC/Controllers/ItemFamiliesController.cs @@ -45,6 +45,8 @@ namespace StockManMVC.Controllers [ValidateAntiForgeryToken] public ActionResult Create([Bind(Include = "ID,Descr")] ItemFamily itemFamily) { + // verifico ID: nel caso trimmo spazi... + itemFamily.ID = itemFamily.ID.Trim().Replace(" ", " ").Replace(" ", " ").Replace(" ", " ").Replace(" ","_").ToUpper(); if (ModelState.IsValid) { db.ItemFamily.Add(itemFamily); diff --git a/StockManMVC/Controllers/ItemFluxesController.cs b/StockManMVC/Controllers/ItemFluxesController.cs index 07c963e..840f4d2 100644 --- a/StockManMVC/Controllers/ItemFluxesController.cs +++ b/StockManMVC/Controllers/ItemFluxesController.cs @@ -292,7 +292,7 @@ namespace StockManMVC.Controllers { case "CAR": // per partire scelgo la posizione di default ric ordini - string stdLocationId = "RIC-ORD"; + string stdLocationId = "#RIC-ORD"; // cerco se ci sia una posizione occupata dall'item in stock.. if (db.ItemStock.Where(s => s.ItemID == ItemID).Count() > 0) { @@ -317,7 +317,7 @@ namespace StockManMVC.Controllers CurrStyle = "bg-primary"; break; case "OFOR": - ViewBag.LocationID = new SelectList(db.Location.Where(o => o.LocType.IsStock), "ID", "Descr", "RIC-ORD"); + ViewBag.LocationID = new SelectList(db.Location.Where(o => o.LocType.IsStock), "ID", "Descr", "#RIC-ORD"); ViewBag.ExtLocationID = new SelectList(db.Location.Where(o => o.LocType.IsFor), "ID", "Descr"); CurrStyle = "bg-info"; break; diff --git a/StockManMVC/Controllers/LocTypesController.cs b/StockManMVC/Controllers/LocTypesController.cs index de0a909..dd7edf9 100644 --- a/StockManMVC/Controllers/LocTypesController.cs +++ b/StockManMVC/Controllers/LocTypesController.cs @@ -44,6 +44,8 @@ namespace StockManMVC.Controllers [ValidateAntiForgeryToken] public ActionResult Create([Bind(Include = "ID,Descr,IsStock,IsCli,IsFor")] LocType locType) { + // verifico ID: nel caso trimmo spazi... + locType.ID = locType.ID.Trim().Replace(" ", " ").Replace(" ", " ").Replace(" ", " ").Replace(" ", "_").ToUpper(); if (ModelState.IsValid) { db.LocType.Add(locType); diff --git a/StockManMVC/Controllers/LocationsController.cs b/StockManMVC/Controllers/LocationsController.cs index a9df562..4b707b2 100644 --- a/StockManMVC/Controllers/LocationsController.cs +++ b/StockManMVC/Controllers/LocationsController.cs @@ -111,6 +111,8 @@ namespace StockManMVC.Controllers [ValidateAntiForgeryToken] public ActionResult Create([Bind(Include = "ID,Descr,LocTypeID")] Location location) { + // verifico ID: nel caso trimmo spazi... + location.ID = location.ID.Trim().Replace(" ", " ").Replace(" ", " ").Replace(" ", " ").Replace(" ", "_").ToUpper(); if (ModelState.IsValid) { db.Location.Add(location); diff --git a/StockManMVC/Controllers/MovTypesController.cs b/StockManMVC/Controllers/MovTypesController.cs index 530879c..991dba3 100644 --- a/StockManMVC/Controllers/MovTypesController.cs +++ b/StockManMVC/Controllers/MovTypesController.cs @@ -44,6 +44,8 @@ namespace StockManMVC.Controllers [ValidateAntiForgeryToken] public ActionResult Create([Bind(Include = "ID,Descr,CssClass")] MovType movType) { + // verifico ID: nel caso trimmo spazi... + movType.ID = movType.ID.Trim().Replace(" ", " ").Replace(" ", " ").Replace(" ", " ").Replace(" ", "_").ToUpper(); if (ModelState.IsValid) { db.MovType.Add(movType); diff --git a/StockManMVC/Views/LocTypes/Index.cshtml b/StockManMVC/Views/LocTypes/Index.cshtml index 00d6372..631c604 100644 --- a/StockManMVC/Views/LocTypes/Index.cshtml +++ b/StockManMVC/Views/LocTypes/Index.cshtml @@ -21,6 +21,9 @@
+ @@ -41,6 +44,9 @@ var delStyle = ""; if (item.Location.Count > 0 || item.ID == "ND") { delStyle = "disabled invisible"; } + diff --git a/StockManMVC/Views/Locations/_ListByType.cshtml b/StockManMVC/Views/Locations/_ListByType.cshtml index d588547..b9df769 100644 --- a/StockManMVC/Views/Locations/_ListByType.cshtml +++ b/StockManMVC/Views/Locations/_ListByType.cshtml @@ -6,6 +6,9 @@
+ @Html.DisplayNameFor(model => model.ID) + @Html.DisplayNameFor(model => model.Descr)
+ @Html.DisplayFor(modelItem => item.ID) + @Html.DisplayFor(modelItem => item.Descr)
+ @@ -18,8 +21,14 @@ @foreach (var item in Model) { var delStyle = ""; + var edtStyle = ""; if (item.ItemFlux.Count + item.ItemFlux1.Count > 0) { delStyle = "disabled invisible"; } + // anche i codici "#QUALCOSA#" NON sono modificabili... + if(item.ID.StartsWith("#")) { delStyle = "disabled invisible"; edtStyle = "disabled invisible"; } + @@ -27,7 +36,7 @@ @Html.DisplayFor(modelItem => item.LocType.Descr) @@ -37,13 +46,13 @@
-
+
@Html.DropDownList("PageSizeDD", null, htmlAttributes: new { @class = "form-control pageSelDD" })
-
+
@Html.PagedListPager((IPagedList)Model, page => Url.Action("Index", new { LocTypeID = ViewBag.LocTypeID, SearchVal = ViewBag.SearchVal, SortOrd = ViewBag.SortOrd, pageSize = ViewBag.pageSize, page }), PagedListRenderOptions.ClassicPlusFirstAndLast)
diff --git a/StockManMVC/Views/MovTypes/Index.cshtml b/StockManMVC/Views/MovTypes/Index.cshtml index 6d69a90..2a172be 100644 --- a/StockManMVC/Views/MovTypes/Index.cshtml +++ b/StockManMVC/Views/MovTypes/Index.cshtml @@ -22,6 +22,9 @@
+ @Html.DisplayNameFor(model => model.ID) + @Html.ActionLink(Html.DisplayNameFor(model => model.Descr).ToString(), "Index", new { LocTypeID = ViewBag.LocTypeID, SearchVal = ViewBag.SearchVal, SortOrd = ViewBag.DescrSortParm, page = 1, pageSize = ViewBag.pageSize })
+ @Html.DisplayFor(modelItem => item.ID) + @Html.DisplayFor(modelItem => item.Descr) - +
+ @@ -36,6 +39,9 @@ var delStyle = ""; if (item.ItemFlux.Count > 0 || item.ID == "ND") { delStyle = "disabled invisible"; } + diff --git a/StockManMVC/bin/StockManMVC.dll b/StockManMVC/bin/StockManMVC.dll index b9ce4d2..d1e923a 100644 Binary files a/StockManMVC/bin/StockManMVC.dll and b/StockManMVC/bin/StockManMVC.dll differ diff --git a/VersGen/bin/Debug/VersGen.dll b/VersGen/bin/Debug/VersGen.dll index 2a14336..4b44094 100644 Binary files a/VersGen/bin/Debug/VersGen.dll and b/VersGen/bin/Debug/VersGen.dll differ diff --git a/VersGen/obj/Debug/TempPE/VersGen.cs.dll b/VersGen/obj/Debug/TempPE/VersGen.cs.dll index 8ab727a..cc7c90b 100644 Binary files a/VersGen/obj/Debug/TempPE/VersGen.cs.dll and b/VersGen/obj/Debug/TempPE/VersGen.cs.dll differ diff --git a/VersGen/obj/Debug/VersGen.dll b/VersGen/obj/Debug/VersGen.dll index 2a14336..4b44094 100644 Binary files a/VersGen/obj/Debug/VersGen.dll and b/VersGen/obj/Debug/VersGen.dll differ
+ @Html.DisplayNameFor(model => model.ID) + @Html.DisplayNameFor(model => model.Descr)
+ @Html.DisplayFor(modelItem => item.ID) + @Html.DisplayFor(modelItem => item.Descr)