diff --git a/StockManMVC/Content/Site.css b/StockManMVC/Content/Site.css index 5cb3ddf..27533ce 100644 --- a/StockManMVC/Content/Site.css +++ b/StockManMVC/Content/Site.css @@ -21,4 +21,14 @@ textarea { } .deleted { text-decoration: line-through; +} +.padZL { + padding-left: 0.2em; +} +.padZR { + padding-right: 0.2em; +} +.padZRL { + padding-left: 0.2em; + padding-right: 0.2em; } \ No newline at end of file diff --git a/StockManMVC/Content/Site.less b/StockManMVC/Content/Site.less index eae161b..30f24e9 100644 --- a/StockManMVC/Content/Site.less +++ b/StockManMVC/Content/Site.less @@ -26,3 +26,14 @@ textarea { .deleted { text-decoration: line-through; } + +.padZL{ + padding-left: 0.2em; +} +.padZR{ + padding-right: 0.2em; +} +.padZRL{ + .padZL; + .padZR; +} \ No newline at end of file diff --git a/StockManMVC/Content/Site.min.css b/StockManMVC/Content/Site.min.css index c57af75..f39479d 100644 --- a/StockManMVC/Content/Site.min.css +++ b/StockManMVC/Content/Site.min.css @@ -1 +1 @@ -body{padding-top:50px;padding-bottom:20px;}.body-content{padding-left:15px;padding-right:15px;}.dl-horizontal dt{white-space:normal;}input,select,textarea{max-width:280px;}.deleted{text-decoration:line-through;} \ No newline at end of file +body{padding-top:50px;padding-bottom:20px;}.body-content{padding-left:15px;padding-right:15px;}.dl-horizontal dt{white-space:normal;}input,select,textarea{max-width:280px;}.deleted{text-decoration:line-through;}.padZL{padding-left:.2em;}.padZR{padding-right:.2em;}.padZRL{padding-left:.2em;padding-right:.2em;} \ No newline at end of file diff --git a/StockManMVC/Controllers/MagStatusController.cs b/StockManMVC/Controllers/MagStatusController.cs new file mode 100644 index 0000000..08b5b3f --- /dev/null +++ b/StockManMVC/Controllers/MagStatusController.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.Entity; +using System.Linq; +using System.Net; +using System.Web; +using System.Web.Mvc; +using StockManMVC.Models; + +namespace StockManMVC.Controllers +{ + public class MagStatusController : Controller + { + private StockManEntities db = new StockManEntities(); + + // GET: MagStatus + public ActionResult Index() + { + var vLocationVal = db.vLocationVal.Include(v => v.Location); + return View(vLocationVal.ToList()); + } + + protected override void Dispose(bool disposing) + { + if (disposing) + { + db.Dispose(); + } + base.Dispose(disposing); + } + } +} diff --git a/StockManMVC/Models/Location.cs b/StockManMVC/Models/Location.cs index d7c30b1..e8788ec 100644 --- a/StockManMVC/Models/Location.cs +++ b/StockManMVC/Models/Location.cs @@ -33,5 +33,6 @@ namespace StockManMVC.Models public virtual LocType LocType { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection ItemFlux1 { get; set; } + public virtual vLocationVal vLocationVal { get; set; } } } diff --git a/StockManMVC/Models/Metadata.cs b/StockManMVC/Models/Metadata.cs index 3c66939..d12b733 100644 --- a/StockManMVC/Models/Metadata.cs +++ b/StockManMVC/Models/Metadata.cs @@ -84,10 +84,25 @@ namespace StockManMVC.Models // public Nullable dtLastUpd; //} + public class vLocationMetadata + { + [Display(Name = "Posizione")] + public String Desc; + } - //public class EnrollmentMetadata - //{ - // [Range(0, 4)] - // public Nullable Grade; - //} + public class vLocationValMetadata + { + //[Display(Name = "Posizione")] + //public String Desc; + + [Display(Name = "Valore Articoli")] + [DataType(DataType.Currency)] + public String TotVal; + + [Display(Name = "Tot num Articoli")] + public String TotCurr; + + [Display(Name = "Mov. aperti")] + public String TotPend; + } } diff --git a/StockManMVC/Models/PartialClasses.cs b/StockManMVC/Models/PartialClasses.cs deleted file mode 100644 index c131f94..0000000 --- a/StockManMVC/Models/PartialClasses.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using System.Web; - -namespace StockManMVC.Models -{ - [MetadataType(typeof(MovTypeMetadata))] - public partial class MovType - { - } - [MetadataType(typeof(LocTypeMetadata))] - public partial class LocType - { - } - - [MetadataType(typeof(ItemFluxesMetadata))] - public partial class ItemFluxes - { - } - - //[MetadataType(typeof(ItemsMetadata))] - //public partial class Items - //{ - //} - //[MetadataType(typeof(StocksMetadata))] - //public partial class Stocks - //{ - //} - - //[MetadataType(typeof(EnrollmentMetadata))] - //public partial class Enrollment - //{ - //} -} \ No newline at end of file diff --git a/StockManMVC/Models/SMModel.Context.cs b/StockManMVC/Models/SMModel.Context.cs index d71c41c..a25b38a 100644 --- a/StockManMVC/Models/SMModel.Context.cs +++ b/StockManMVC/Models/SMModel.Context.cs @@ -36,6 +36,7 @@ namespace StockManMVC.Models public virtual DbSet Item { get; set; } public virtual DbSet Operator { get; set; } public virtual DbSet vItemFlux2Save { get; set; } + public virtual DbSet vLocationVal { get; set; } public virtual int stp_ItemConsolidate(Nullable itemID) { diff --git a/StockManMVC/Models/SMModel.edmx b/StockManMVC/Models/SMModel.edmx index 47a6540..8e1caf3 100644 --- a/StockManMVC/Models/SMModel.edmx +++ b/StockManMVC/Models/SMModel.edmx @@ -104,6 +104,17 @@ avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'St + + + + + + + + + + @@ -235,6 +246,14 @@ avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'St [vItemFlux2Save].[TotValCar] AS [TotValCar], [vItemFlux2Save].[TotQtaCar] AS [TotQtaCar] FROM [dbo].[vItemFlux2Save] AS [vItemFlux2Save] + + + SELECT + [vLocationVal].[LocationID] AS [LocationID], + [vLocationVal].[TotVal] AS [TotVal], + [vLocationVal].[TotCurr] AS [TotCurr], + [vLocationVal].[TotPend] AS [TotPend] + FROM [dbo].[vLocationVal] AS [vLocationVal] @@ -324,6 +343,7 @@ avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'St + @@ -447,8 +467,13 @@ avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'St - + + + + + + @@ -584,6 +609,28 @@ avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'St + + + + + + + + + + + + + + + + + + + + + + @@ -698,6 +745,16 @@ avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'St + + + + + + + + + + diff --git a/StockManMVC/Models/SMModel.edmx.diagram b/StockManMVC/Models/SMModel.edmx.diagram index 0dd0627..64c4b25 100644 --- a/StockManMVC/Models/SMModel.edmx.diagram +++ b/StockManMVC/Models/SMModel.edmx.diagram @@ -24,6 +24,8 @@ + + diff --git a/StockManMVC/Models/vLocationVal.cs b/StockManMVC/Models/vLocationVal.cs new file mode 100644 index 0000000..8fa1e77 --- /dev/null +++ b/StockManMVC/Models/vLocationVal.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da un modello. +// +// Le modifiche manuali a questo file potrebbero causare un comportamento imprevisto dell'applicazione. +// Se il codice viene rigenerato, le modifiche manuali al file verranno sovrascritte. +// +//------------------------------------------------------------------------------ + +namespace StockManMVC.Models +{ + using System; + using System.Collections.Generic; + + public partial class vLocationVal + { + public string LocationID { get; set; } + public Nullable TotVal { get; set; } + public Nullable TotCurr { get; set; } + public Nullable TotPend { get; set; } + + public virtual Location Location { get; set; } + } +} diff --git a/StockManMVC/StockManMVC.csproj b/StockManMVC/StockManMVC.csproj index 7b5fdb7..08fb9be 100644 --- a/StockManMVC/StockManMVC.csproj +++ b/StockManMVC/StockManMVC.csproj @@ -180,6 +180,7 @@ + @@ -213,7 +214,6 @@ SMModel.tt - True True @@ -235,6 +235,9 @@ SMModel.tt + + SMModel.tt + @@ -439,6 +442,7 @@ + diff --git a/StockManMVC/Views/Items/Details.cshtml b/StockManMVC/Views/Items/Details.cshtml index ddc43be..321b92d 100644 --- a/StockManMVC/Views/Items/Details.cshtml +++ b/StockManMVC/Views/Items/Details.cshtml @@ -101,30 +101,30 @@
- diff --git a/StockManMVC/Views/MagStatus/Index.cshtml b/StockManMVC/Views/MagStatus/Index.cshtml new file mode 100644 index 0000000..3111b00 --- /dev/null +++ b/StockManMVC/Views/MagStatus/Index.cshtml @@ -0,0 +1,52 @@ +@model IEnumerable + +@{ + ViewBag.Title = "Valorizzazione Stock Giacenze"; +} + +
+
+
+
+ Valorizzazione Stock Giacenze +
+
+ + + + + + + + + @foreach (var item in Model) + { + + + + + + + } + +
+ @Html.DisplayNameFor(model => model.Location.Descr) + + @Html.DisplayNameFor(model => model.TotCurr) + + @Html.DisplayNameFor(model => model.TotPend) + + @Html.DisplayNameFor(model => model.TotVal) +
+ @Html.DisplayFor(modelItem => item.Location.Descr) + + @Html.DisplayFor(modelItem => item.TotCurr) + + @Html.DisplayFor(modelItem => item.TotPend) + + @Html.DisplayFor(modelItem => item.TotVal) +
+
+
+
+
diff --git a/StockManMVC/Views/Shared/_Layout.cshtml b/StockManMVC/Views/Shared/_Layout.cshtml index ec12d48..2e7b831 100644 --- a/StockManMVC/Views/Shared/_Layout.cshtml +++ b/StockManMVC/Views/Shared/_Layout.cshtml @@ -41,7 +41,7 @@ diff --git a/StockManMVC/bin/StockManMVC.dll b/StockManMVC/bin/StockManMVC.dll index 661d9fc..541bb4c 100644 Binary files a/StockManMVC/bin/StockManMVC.dll and b/StockManMVC/bin/StockManMVC.dll differ