diff --git a/StockManMVC/Controllers/ItemFluxesController.cs b/StockManMVC/Controllers/ItemFluxesController.cs index 04967e6..cd51679 100644 --- a/StockManMVC/Controllers/ItemFluxesController.cs +++ b/StockManMVC/Controllers/ItemFluxesController.cs @@ -228,7 +228,7 @@ namespace StockManMVC.Controllers // more details see http://go.microsoft.com/fwlink/?LinkId=317598. [HttpPost] [ValidateAntiForgeryToken] - public ActionResult CreatePrecompiled([Bind(Include = "ID,ItemID,LocationID,MovTypeID,ExtLocationID,Qta,TotValue,UnitVal,Note")] ItemFlux itemFlux) + public ActionResult CreatePrecompiled([Bind(Include = "ID,ItemID,LocationID,MovTypeID,ExtLocationID,dtMov,Qta,TotValue,UnitVal,Note")] ItemFlux itemFlux) { // aggiungo campi mancanti... if (itemFlux.dtMov == null) itemFlux.dtMov = DateTime.Now; @@ -236,7 +236,7 @@ namespace StockManMVC.Controllers string currOpID = "ND"; // default try { - Operator currOp = (Operator)db.Operator.Where(o => o.CodExt == User.Identity.Name); + Operator currOp = (Operator)db.Operator.Where(o => o.CodExt == User.Identity.Name || o.CodExt.Contains(User.Identity.Name) || o.ID== User.Identity.Name); currOpID = currOp.ID; } catch diff --git a/StockManMVC/Models/Metadata.cs b/StockManMVC/Models/Metadata.cs index a522727..3c66939 100644 --- a/StockManMVC/Models/Metadata.cs +++ b/StockManMVC/Models/Metadata.cs @@ -43,12 +43,14 @@ namespace StockManMVC.Models public string TotValue; [Display(Name = "Data Documento")] + [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)] [DataType(DataType.Date)] public DateTime dtMov; - [Display(Name = "Data Exp")] + [Display(Name = "Data Conferma")] + [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)] [DataType(DataType.Date)] - public DateTime dtExport; + public Nullable dtExport; } //public class ItemsMetadata diff --git a/StockManMVC/Views/ItemFluxes/Edit.cshtml b/StockManMVC/Views/ItemFluxes/Edit.cshtml index a351e34..1ff66de 100644 --- a/StockManMVC/Views/ItemFluxes/Edit.cshtml +++ b/StockManMVC/Views/ItemFluxes/Edit.cshtml @@ -10,7 +10,7 @@ @using (Html.BeginForm()) { @Html.AntiForgeryToken() - +

ItemFlux


@@ -52,7 +52,8 @@
@Html.LabelFor(model => model.dtMov, htmlAttributes: new { @class = "control-label col-md-2" })
- @Html.EditorFor(model => model.dtMov, "DateTime", new { htmlAttributes = new { @class = "form-control date-picker", type="date" } }) + @Html.TextBoxFor(model => model.dtMov, new { @Value = Model.dtMov.ToString("yyyy-MM-dd"), @class = "form-control date-picker", type = "date" }) + @*@Html.EditorFor(model => model.dtMov, "DateTime", new { htmlAttributes = new { @class = "form-control date-picker", type="date" } })*@ @Html.ValidationMessageFor(model => model.dtMov, "", new { @class = "text-danger" })
@@ -92,7 +93,8 @@
@Html.LabelFor(model => model.dtExport, htmlAttributes: new { @class = "control-label col-md-2" })
- @Html.EditorFor(model => model.dtExport, new { htmlAttributes = new { @class = "form-control date-picker", type = "date" } }) + @Html.TextBoxFor(model => model.dtExport, new { @Value = Convert.ToDateTime(Model.dtExport).ToString("yyyy-MM-dd"), @class = "form-control date-picker", type = "date" }) + @*@Html.EditorFor(model => model.dtExport, new { htmlAttributes = new { @class = "form-control date-picker", type = "date" } })*@ @Html.ValidationMessageFor(model => model.dtExport, "", new { @class = "text-danger" })
@@ -114,9 +116,9 @@ }
- @*@Html.ActionLink("Back to List", "Index")*@ - @*@Html.ActionLink("Torna ad elenco", "Details", "Items")*@ - @Html.ActionLink("Torna ad elenco", "Details", "Items", new { id = Model.ItemID, StockItemID = Model.ItemID, FluxItemID = Model.ItemID }, null) + @*@Html.ActionLink("Back to List", "Index")*@ + @*@Html.ActionLink("Torna ad elenco", "Details", "Items")*@ + @Html.ActionLink("Torna ad elenco", "Details", "Items", new { id = Model.ItemID, StockItemID = Model.ItemID, FluxItemID = Model.ItemID }, null)
@section Scripts { diff --git a/StockManMVC/Views/Shared/_Layout.cshtml b/StockManMVC/Views/Shared/_Layout.cshtml index 41646e3..66057df 100644 --- a/StockManMVC/Views/Shared/_Layout.cshtml +++ b/StockManMVC/Views/Shared/_Layout.cshtml @@ -73,12 +73,18 @@ @Scripts.Render("~/bundles/jqueryui") @Scripts.Render("~/bundles/bootstrap") - @**@ + diff --git a/StockManMVC/bin/StockManMVC.dll b/StockManMVC/bin/StockManMVC.dll index ce38b00..bbede71 100644 Binary files a/StockManMVC/bin/StockManMVC.dll and b/StockManMVC/bin/StockManMVC.dll differ