From 24252081dddb7f7e67b116a19b045627c8351955 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Mon, 26 Sep 2016 19:08:21 +0200 Subject: [PATCH] modifiche x gestione rivista controller flusso --- .../Controllers/ItemFluxesController.cs | 2 +- StockManMVC/Models/Metadata.cs | 8 +++++++ StockManMVC/StockManMVC.csproj | 10 -------- .../Views/ItemFluxes/CreatePrecompiled.cshtml | 24 ++++++++++++------- 4 files changed, 25 insertions(+), 19 deletions(-) diff --git a/StockManMVC/Controllers/ItemFluxesController.cs b/StockManMVC/Controllers/ItemFluxesController.cs index d19a197..04967e6 100644 --- a/StockManMVC/Controllers/ItemFluxesController.cs +++ b/StockManMVC/Controllers/ItemFluxesController.cs @@ -231,7 +231,7 @@ namespace StockManMVC.Controllers public ActionResult CreatePrecompiled([Bind(Include = "ID,ItemID,LocationID,MovTypeID,ExtLocationID,Qta,TotValue,UnitVal,Note")] ItemFlux itemFlux) { // aggiungo campi mancanti... - itemFlux.dtMov = DateTime.Now; + if (itemFlux.dtMov == null) itemFlux.dtMov = DateTime.Now; itemFlux.dtExport = null; string currOpID = "ND"; // default try diff --git a/StockManMVC/Models/Metadata.cs b/StockManMVC/Models/Metadata.cs index d7bfe07..a522727 100644 --- a/StockManMVC/Models/Metadata.cs +++ b/StockManMVC/Models/Metadata.cs @@ -41,6 +41,14 @@ namespace StockManMVC.Models [Display(Name = "Importo")] [Range(0.1D, 99.9D)] public string TotValue; + + [Display(Name = "Data Documento")] + [DataType(DataType.Date)] + public DateTime dtMov; + + [Display(Name = "Data Exp")] + [DataType(DataType.Date)] + public DateTime dtExport; } //public class ItemsMetadata diff --git a/StockManMVC/StockManMVC.csproj b/StockManMVC/StockManMVC.csproj index 0dbdfed..cf6cdf0 100644 --- a/StockManMVC/StockManMVC.csproj +++ b/StockManMVC/StockManMVC.csproj @@ -178,7 +178,6 @@ - @@ -199,9 +198,6 @@ SMModel.tt - - SMModel.tt - SMModel.tt @@ -415,12 +411,6 @@ - - - - - - diff --git a/StockManMVC/Views/ItemFluxes/CreatePrecompiled.cshtml b/StockManMVC/Views/ItemFluxes/CreatePrecompiled.cshtml index db69430..d36a9bf 100644 --- a/StockManMVC/Views/ItemFluxes/CreatePrecompiled.cshtml +++ b/StockManMVC/Views/ItemFluxes/CreatePrecompiled.cshtml @@ -17,14 +17,6 @@
@Html.ValidationSummary(true, "", new { @class = "text-danger" }) -
- @Html.LabelFor(model => model.LocationID, "Posizione", 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, "Riferimento", htmlAttributes: new { @class = "control-label col-md-2" })
@@ -33,6 +25,14 @@
+
+ @Html.LabelFor(model => model.dtMov, "Data documento", htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.dtMov, new { htmlAttributes = new { @class = "form-control date-picker", type = "date" } }) + @Html.ValidationMessageFor(model => model.dtMov, "", new { @class = "text-danger" }) +
+
+
@Html.LabelFor(model => model.Qta, "Quantità", htmlAttributes: new { @class = "control-label col-md-2" })
@@ -49,6 +49,14 @@
+
+ @Html.LabelFor(model => model.LocationID, "Posizione", 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.Note, htmlAttributes: new { @class = "control-label col-md-2" })