diff --git a/SiteSelector/bin/SiteSelector.dll b/SiteSelector/bin/SiteSelector.dll index f940e61..a7c9bfb 100644 Binary files a/SiteSelector/bin/SiteSelector.dll and b/SiteSelector/bin/SiteSelector.dll differ diff --git a/StockManMVC/Controllers/ItemFluxesController.cs b/StockManMVC/Controllers/ItemFluxesController.cs index ece9b98..a078c1a 100644 --- a/StockManMVC/Controllers/ItemFluxesController.cs +++ b/StockManMVC/Controllers/ItemFluxesController.cs @@ -368,8 +368,11 @@ namespace StockManMVC.Controllers // more details see http://go.microsoft.com/fwlink/?LinkId=317598. [HttpPost] [ValidateAntiForgeryToken] - public ActionResult Edit([Bind(Include = "ID,ItemID,LocationID,MovTypeID,ExtLocationID,dtMov,Qta,TotValue,UnitVal,CodDoc,Note,dtExport,OperatorID")] ItemFlux itemFlux) + public ActionResult Edit([Bind(Include = "ID,LocationID,ExtLocationID,dtMov,Qta,TotValue,UnitVal,CodDoc,Note,dtExport")] ItemFlux itemFlux) + //public ActionResult Edit([Bind(Include = "ID,ItemID,LocationID,MovTypeID,ExtLocationID,dtMov,Qta,TotValue,UnitVal,CodDoc,Note,dtExport,OperatorID")] ItemFlux itemFlux) { + // recupero vecchi valori... + ItemFlux itemFluxOld = db.ItemFlux.Find(itemFlux.ID); // fix operatore modifica string currOpIDMod = "ND"; // default try @@ -382,6 +385,10 @@ namespace StockManMVC.Controllers { } itemFlux.ModOperatorID = currOpIDMod; + // imposto valori vecchi x campi "bloccati" (articolo, tipo movimento, operatore iniziale...) + itemFlux.ItemID = itemFluxOld.ItemID; + itemFlux.MovTypeID = itemFluxOld.MovTypeID; + if (itemFlux.OperatorID == null) itemFlux.OperatorID = itemFluxOld.OperatorID; // continuo if (ModelState.IsValid) { @@ -397,7 +404,9 @@ namespace StockManMVC.Controllers default: break; } - // indico che devo salvare! + // sblocco vecchio item x non fare conflitto + db.Entry(itemFluxOld).State = EntityState.Detached; + // indico che devo salvare nuovo! db.Entry(itemFlux).State = EntityState.Modified; db.SaveChanges(); diff --git a/StockManMVC/Models/Metadata.cs b/StockManMVC/Models/Metadata.cs index ff1db94..644ebe3 100644 --- a/StockManMVC/Models/Metadata.cs +++ b/StockManMVC/Models/Metadata.cs @@ -72,7 +72,7 @@ namespace StockManMVC.Models public string LocationID; [Display(Name = "Operazione")] - [Required] + //[Required] public string MovTypeID; [Display(Name = "Riferimento")] diff --git a/StockManMVC/Models/PartialClasses.cs b/StockManMVC/Models/PartialClasses.cs index 7cc1a8c..3195c7a 100644 --- a/StockManMVC/Models/PartialClasses.cs +++ b/StockManMVC/Models/PartialClasses.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; +using System.Data.Entity.Infrastructure; using System.Linq; using System.Web; diff --git a/StockManMVC/Views/ItemFluxes/Edit.cshtml b/StockManMVC/Views/ItemFluxes/Edit.cshtml index 03f2d5b..6c7c351 100644 --- a/StockManMVC/Views/ItemFluxes/Edit.cshtml +++ b/StockManMVC/Views/ItemFluxes/Edit.cshtml @@ -15,6 +15,8 @@
@Html.ValidationSummary(true, "", new { @class = "text-danger" }) @Html.HiddenFor(model => model.ID) + @*@Html.DropDownList("ItemID", null, htmlAttributes: new { @class = "form-control", disabled = "disabled", @readonly = "readonly" })*@ + @*@Html.DropDownList("MovTypeID", null, htmlAttributes: new { @class = "form-control", disabled = "disabled", @readonly = "readonly" })*@
@Html.LabelFor(model => model.ItemID, htmlAttributes: new { @class = "control-label col-md-2" }) @@ -24,14 +26,6 @@
-
- @Html.LabelFor(model => model.LocationID, htmlAttributes: new { @class = "control-label col-md-2" }) -
- @Html.DropDownList("LocationID", null, htmlAttributes: new { @class = "form-control" }) - @Html.ValidationMessageFor(model => model.LocationID, "", new { @class = "text-danger" }) -
-
-
@Html.LabelFor(model => model.MovTypeID, htmlAttributes: new { @class = "control-label col-md-2" })
@@ -40,6 +34,14 @@
+
+ @Html.LabelFor(model => model.LocationID, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.DropDownList("LocationID", null, htmlAttributes: new { @class = "form-control" }) + @Html.ValidationMessageFor(model => model.LocationID, "", new { @class = "text-danger" }) +
+
+
@Html.LabelFor(model => model.ExtLocationID, htmlAttributes: new { @class = "control-label col-md-2" })
@@ -89,13 +91,13 @@
-
- @Html.LabelFor(model => model.OperatorID, htmlAttributes: new { @class = "control-label col-md-2" }) -
- @Html.DropDownList("OperatorID", null, htmlAttributes: new { @class = "form-control", disabled = "disabled", @readonly = "readonly" }) - @Html.ValidationMessageFor(model => model.OperatorID, "", new { @class = "text-danger" }) -
-
+ @*
+ @Html.LabelFor(model => model.OperatorID, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.DropDownList("OperatorID", null, htmlAttributes: new { @class = "form-control", disabled = "disabled", @readonly = "readonly" }) + @Html.ValidationMessageFor(model => model.OperatorID, "", new { @class = "text-danger" }) +
+
*@
diff --git a/StockManMVC/bin/StockManMVC.dll b/StockManMVC/bin/StockManMVC.dll index c24a157..719d560 100644 Binary files a/StockManMVC/bin/StockManMVC.dll and b/StockManMVC/bin/StockManMVC.dll differ diff --git a/VersGen/VersGen.cs b/VersGen/VersGen.cs index 726e018..db1a163 100644 --- a/VersGen/VersGen.cs +++ b/VersGen/VersGen.cs @@ -5,7 +5,7 @@ using System.Reflection; -[assembly: AssemblyVersion("1.1.46.563")] -[assembly: AssemblyFileVersion("1.1.46.563")] +[assembly: AssemblyVersion("1.1.49.563")] +[assembly: AssemblyFileVersion("1.1.49.563")] [assembly: AssemblyCopyright("Steamware © 2006-2016")] [assembly: AssemblyCompany("Steamware")] diff --git a/VersGen/VersGen.tt b/VersGen/VersGen.tt index fc1148e..26d4cc7 100644 --- a/VersGen/VersGen.tt +++ b/VersGen/VersGen.tt @@ -6,8 +6,8 @@ using System.Reflection; -[assembly: AssemblyVersion("1.1.46.<#= this.RevisionNumber #>")] -[assembly: AssemblyFileVersion("1.1.46.<#= this.RevisionNumber #>")] +[assembly: AssemblyVersion("1.1.49.<#= this.RevisionNumber #>")] +[assembly: AssemblyFileVersion("1.1.49.<#= this.RevisionNumber #>")] [assembly: AssemblyCopyright("Steamware © 2006-<#= DateTime.Now.Year #>")] [assembly: AssemblyCompany("Steamware")] <#+ diff --git a/VersGen/bin/Debug/VersGen.dll b/VersGen/bin/Debug/VersGen.dll index fbefc14..67df9ba 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 dad048d..44768be 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 fbefc14..67df9ba 100644 Binary files a/VersGen/obj/Debug/VersGen.dll and b/VersGen/obj/Debug/VersGen.dll differ diff --git a/VersGen/obj/Release/TempPE/VersGen.cs.dll b/VersGen/obj/Release/TempPE/VersGen.cs.dll index 754c15a..b739aff 100644 Binary files a/VersGen/obj/Release/TempPE/VersGen.cs.dll and b/VersGen/obj/Release/TempPE/VersGen.cs.dll differ