diff --git a/StockManMVC/App_Start/MVCGridConfig.cs b/StockManMVC/App_Start/MVCGridConfig.cs
index 7aa974b..b0bf0eb 100644
--- a/StockManMVC/App_Start/MVCGridConfig.cs
+++ b/StockManMVC/App_Start/MVCGridConfig.cs
@@ -85,16 +85,16 @@ namespace StockManMVC
.WithVisibility(false, true)
.WithHeaderText("Lotto")
.WithValueExpression(i => i.QtaBatch.ToString());
- cols.Add("QtaCurr").WithColumnName("QtaCurr")
+ cols.Add("QtaPend").WithColumnName("QtaPend")
.WithHeaderText("Stock")
- .WithCellCssClassExpression(p => p.QtaCurr >= p.QtaMin ? "success" : "danger")
- .WithValueExpression(i => i.QtaCurr.ToString());
+ .WithCellCssClassExpression(p => p.QtaPend >= p.QtaMin ? "success" : "danger")
+ .WithValueExpression(i => i.QtaPend.ToString());
cols.Add("CurrValue").WithColumnName("CurrValue")
.WithHeaderText("€/pz")
- .WithValueExpression(i => i.CurrValue.ToString("N2"));
+ .WithValueExpression(i => i.CurrValue.ToString("C2"));
cols.Add("TotVal").WithColumnName("TotVal")
.WithHeaderText("Valore")
- .WithValueExpression(i => Convert.ToDecimal(i.CurrValue * i.QtaCurr).ToString("N2"));
+ .WithValueExpression(i => Convert.ToDecimal(i.CurrValue * i.QtaCurr).ToString("C2"));
cols.Add("EditLink").WithColumnName("EditLink")
.WithSorting(false)
.WithVisibility(true, false)
@@ -171,7 +171,7 @@ namespace StockManMVC
.WithHeaderText("Posizione")
.WithValueExpression(i => i.Location.Descr);
cols.Add("Tipo").WithColumnName("Tipo")
- .WithVisibility(true, false)
+ .WithVisibility(false, true)
.WithHeaderText("Tipo")
.WithValueExpression(i => i.MovType.Descr);
cols.Add("Qta").WithColumnName("Qta")
@@ -179,12 +179,21 @@ namespace StockManMVC
.WithHeaderText("Qta")
.WithCellCssClassExpression(p => p.MovType.CssClass + " text-right")
.WithValueExpression(i => i.Qta.ToString());
+ cols.Add("UnitVal").WithColumnName("UnitVal")
+ .WithVisibility(false, true)
+ .WithHeaderText("Val/cad")
+ .WithCellCssClassExpression(p => " text-right")
+ .WithValueExpression(i => i.UnitVal.ToString("C2"));
+ cols.Add("TotValue").WithColumnName("TotValue")
+ .WithHeaderText("Importo")
+ .WithCellCssClassExpression(p => " text-right")
+ .WithValueExpression(i => i.TotValue.ToString("C2"));
cols.Add("Riferimento").WithColumnName("Riferimento")
.WithVisibility(true, false)
.WithHeaderText("Riferimento")
.WithValueExpression(i => i.ExtLocationID);
cols.Add("Operatore").WithColumnName("Operatore")
- .WithVisibility(true, false)
+ .WithVisibility(false, true)
.WithHeaderText("Operatore")
.WithValueExpression(i => i.Operator.LastName + ", " + i.Operator.FirstName);
cols.Add("Note").WithColumnName("Note")
diff --git a/StockManMVC/Controllers/ItemFluxesController.cs b/StockManMVC/Controllers/ItemFluxesController.cs
index bf4c715..93da315 100644
--- a/StockManMVC/Controllers/ItemFluxesController.cs
+++ b/StockManMVC/Controllers/ItemFluxesController.cs
@@ -226,13 +226,19 @@ namespace StockManMVC.Controllers
{
db.Entry(itemFlux).State = EntityState.Modified;
db.SaveChanges();
- return RedirectToAction("Index");
+
+ // rimando ad azione differente...
+ return RedirectToAction("Details", "Items", new { ID = itemFlux.ItemID, StockItemID = itemFlux.ItemID, FluxItemID = itemFlux.ItemID });
+ //return RedirectToAction("Index");
}
ViewBag.LocationID = new SelectList(db.Location, "ID", "Descr", itemFlux.LocationID);
ViewBag.MovTypeID = new SelectList(db.MovType, "ID", "Descr", itemFlux.MovTypeID);
ViewBag.ItemID = new SelectList(db.Item, "ID", "Descr", itemFlux.ItemID);
ViewBag.OperatorID = new SelectList(db.Operator, "ID", "CodExt", itemFlux.OperatorID);
ViewBag.ExtLocationID = new SelectList(db.Location, "ID", "Descr", itemFlux.ExtLocationID);
+
+ //// rimando ad azione differente...
+ //return RedirectToAction("Details", "Items", new { ID = itemFlux.ItemID, StockItemID = itemFlux.ItemID, FluxItemID = itemFlux.ItemID });
return View(itemFlux);
}
diff --git a/StockManMVC/Models/Item.cs b/StockManMVC/Models/Item.cs
index 3e6220f..0065113 100644
--- a/StockManMVC/Models/Item.cs
+++ b/StockManMVC/Models/Item.cs
@@ -1,9 +1,9 @@
//------------------------------------------------------------------------------
//
-// This code was generated from a template.
+// Codice generato da un modello.
//
-// Manual changes to this file may cause unexpected behavior in your application.
-// Manual changes to this file will be overwritten if the code is regenerated.
+// 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.
//
//------------------------------------------------------------------------------
@@ -31,6 +31,7 @@ namespace StockManMVC.Models
public int QtaBatch { get; set; }
public decimal CurrValue { get; set; }
public Nullable QtaCurr { get; set; }
+ public Nullable QtaPend { get; set; }
public virtual ItemFamily ItemFamily { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
diff --git a/StockManMVC/Models/ItemFamily.cs b/StockManMVC/Models/ItemFamily.cs
index 0eab266..9d7a97c 100644
--- a/StockManMVC/Models/ItemFamily.cs
+++ b/StockManMVC/Models/ItemFamily.cs
@@ -1,9 +1,9 @@
//------------------------------------------------------------------------------
//
-// This code was generated from a template.
+// Codice generato da un modello.
//
-// Manual changes to this file may cause unexpected behavior in your application.
-// Manual changes to this file will be overwritten if the code is regenerated.
+// 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.
//
//------------------------------------------------------------------------------
diff --git a/StockManMVC/Models/ItemFlux.cs b/StockManMVC/Models/ItemFlux.cs
index 1149a02..91a3390 100644
--- a/StockManMVC/Models/ItemFlux.cs
+++ b/StockManMVC/Models/ItemFlux.cs
@@ -1,9 +1,9 @@
//------------------------------------------------------------------------------
//
-// This code was generated from a template.
+// Codice generato da un modello.
//
-// Manual changes to this file may cause unexpected behavior in your application.
-// Manual changes to this file will be overwritten if the code is regenerated.
+// 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.
//
//------------------------------------------------------------------------------
@@ -22,7 +22,7 @@ namespace StockManMVC.Models
public System.DateTime dtMov { get; set; }
public int Qta { get; set; }
public decimal TotValue { get; set; }
- public Nullable UnitVal { get; set; }
+ public decimal UnitVal { get; set; }
public string Note { get; set; }
public Nullable dtExport { get; set; }
public string OperatorID { get; set; }
diff --git a/StockManMVC/Models/ItemStock.cs b/StockManMVC/Models/ItemStock.cs
index 086c56e..3fc7222 100644
--- a/StockManMVC/Models/ItemStock.cs
+++ b/StockManMVC/Models/ItemStock.cs
@@ -1,9 +1,9 @@
//------------------------------------------------------------------------------
//
-// This code was generated from a template.
+// Codice generato da un modello.
//
-// Manual changes to this file may cause unexpected behavior in your application.
-// Manual changes to this file will be overwritten if the code is regenerated.
+// 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.
//
//------------------------------------------------------------------------------
diff --git a/StockManMVC/Models/ItemStockStatus.cs b/StockManMVC/Models/ItemStockStatus.cs
index 7e60f39..05ad903 100644
--- a/StockManMVC/Models/ItemStockStatus.cs
+++ b/StockManMVC/Models/ItemStockStatus.cs
@@ -1,9 +1,9 @@
//------------------------------------------------------------------------------
//
-// This code was generated from a template.
+// Codice generato da un modello.
//
-// Manual changes to this file may cause unexpected behavior in your application.
-// Manual changes to this file will be overwritten if the code is regenerated.
+// 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.
//
//------------------------------------------------------------------------------
diff --git a/StockManMVC/Models/LocType.cs b/StockManMVC/Models/LocType.cs
index e2c13d7..52c076e 100644
--- a/StockManMVC/Models/LocType.cs
+++ b/StockManMVC/Models/LocType.cs
@@ -1,9 +1,9 @@
//------------------------------------------------------------------------------
//
-// This code was generated from a template.
+// Codice generato da un modello.
//
-// Manual changes to this file may cause unexpected behavior in your application.
-// Manual changes to this file will be overwritten if the code is regenerated.
+// 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.
//
//------------------------------------------------------------------------------
diff --git a/StockManMVC/Models/Location.cs b/StockManMVC/Models/Location.cs
index 033eb5c..d7c30b1 100644
--- a/StockManMVC/Models/Location.cs
+++ b/StockManMVC/Models/Location.cs
@@ -1,9 +1,9 @@
//------------------------------------------------------------------------------
//
-// This code was generated from a template.
+// Codice generato da un modello.
//
-// Manual changes to this file may cause unexpected behavior in your application.
-// Manual changes to this file will be overwritten if the code is regenerated.
+// 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.
//
//------------------------------------------------------------------------------
diff --git a/StockManMVC/Models/MovType.cs b/StockManMVC/Models/MovType.cs
index 47f4e71..c7d2b08 100644
--- a/StockManMVC/Models/MovType.cs
+++ b/StockManMVC/Models/MovType.cs
@@ -1,9 +1,9 @@
//------------------------------------------------------------------------------
//
-// This code was generated from a template.
+// Codice generato da un modello.
//
-// Manual changes to this file may cause unexpected behavior in your application.
-// Manual changes to this file will be overwritten if the code is regenerated.
+// 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.
//
//------------------------------------------------------------------------------
diff --git a/StockManMVC/Models/Operator.cs b/StockManMVC/Models/Operator.cs
index 89bafd0..228454e 100644
--- a/StockManMVC/Models/Operator.cs
+++ b/StockManMVC/Models/Operator.cs
@@ -1,9 +1,9 @@
//------------------------------------------------------------------------------
//
-// This code was generated from a template.
+// Codice generato da un modello.
//
-// Manual changes to this file may cause unexpected behavior in your application.
-// Manual changes to this file will be overwritten if the code is regenerated.
+// 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.
//
//------------------------------------------------------------------------------
diff --git a/StockManMVC/Models/SMModel.Context.cs b/StockManMVC/Models/SMModel.Context.cs
index f21982e..fe85943 100644
--- a/StockManMVC/Models/SMModel.Context.cs
+++ b/StockManMVC/Models/SMModel.Context.cs
@@ -1,9 +1,9 @@
//------------------------------------------------------------------------------
//
-// This code was generated from a template.
+// Codice generato da un modello.
//
-// Manual changes to this file may cause unexpected behavior in your application.
-// Manual changes to this file will be overwritten if the code is regenerated.
+// 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.
//
//------------------------------------------------------------------------------
diff --git a/StockManMVC/Models/SMModel.Designer.cs b/StockManMVC/Models/SMModel.Designer.cs
index 61b7291..55e23f2 100644
--- a/StockManMVC/Models/SMModel.Designer.cs
+++ b/StockManMVC/Models/SMModel.Designer.cs
@@ -1,10 +1,10 @@
-// T4 code generation is enabled for model 'C:\Users\samuele\Documents\Visual Studio 2015\Projects\StockMan\StockManMVC\Models\SMModel.edmx'.
-// To enable legacy code generation, change the value of the 'Code Generation Strategy' designer
-// property to 'Legacy ObjectContext'. This property is available in the Properties Window when the model
-// is open in the designer.
+// Generazione del codice predefinita abilitata per il modello 'C:\Users\samuele.STEAMWAREWIN\Documents\VisualStudioProjects\StockMan\StockManMVC\Models\SMModel.edmx'.
+// Per abilitare la generazione del codice legacy, modificare il valore della proprietà della finestra di progettazione 'Strategia di generazione del codice
+// su 'Legacy ObjectContext'. Questa proprietà è disponibile nella finestra Proprietà quando il modello è
+// aperto nella finestra di progettazione.
-// If no context and entity classes have been generated, it may be because you created an empty model but
-// have not yet chosen which version of Entity Framework to use. To generate a context class and entity
-// classes for your model, open the model in the designer, right-click on the designer surface, and
-// select 'Update Model from Database...', 'Generate Database from Model...', or 'Add Code Generation
-// Item...'.
\ No newline at end of file
+// La mancata generazione di classi contesto ed entità può essere dovuta al fatto che è stato creato un modello vuoto, ma
+// non è ancora stata scelta la versione di Entity Framework da utilizzare. Per generare una classe contesto e classi entitÃ
+// per il modello, aprire il modello nella finestra di progettazione, fare clic con il pulsante destro del mouse nell'area di progettazione e
+// selezionare 'Aggiorna modello da database...', 'Genera database da modello...' o 'Aggiungi elemento di generazione
+// codice...'.
\ No newline at end of file
diff --git a/StockManMVC/Models/SMModel.cs b/StockManMVC/Models/SMModel.cs
index 7cc0662..d6f4df2 100644
--- a/StockManMVC/Models/SMModel.cs
+++ b/StockManMVC/Models/SMModel.cs
@@ -1,9 +1,9 @@
//------------------------------------------------------------------------------
//
-// This code was generated from a template.
+// Codice generato da un modello.
//
-// Manual changes to this file may cause unexpected behavior in your application.
-// Manual changes to this file will be overwritten if the code is regenerated.
+// 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.
//
//------------------------------------------------------------------------------
diff --git a/StockManMVC/Models/SMModel.edmx b/StockManMVC/Models/SMModel.edmx
index edf100e..dfa8daa 100644
--- a/StockManMVC/Models/SMModel.edmx
+++ b/StockManMVC/Models/SMModel.edmx
@@ -19,6 +19,7 @@
+
@@ -39,7 +40,7 @@
-
+
@@ -90,8 +91,8 @@
-
+
@@ -321,7 +322,7 @@ warning 6002: The table/view 'StockMan.dbo.vItemStockStatus' does not have a pri
-
+
@@ -499,6 +500,7 @@ warning 6002: The table/view 'StockMan.dbo.vItemStockStatus' does not have a pri
+
@@ -669,6 +671,7 @@ warning 6002: The table/view 'StockMan.dbo.vItemStockStatus' does not have a pri
+
@@ -685,9 +688,9 @@ warning 6002: The table/view 'StockMan.dbo.vItemStockStatus' does not have a pri
+
-
diff --git a/StockManMVC/Views/Items/Details.cshtml b/StockManMVC/Views/Items/Details.cshtml
index 79211fa..0e5f87a 100644
--- a/StockManMVC/Views/Items/Details.cshtml
+++ b/StockManMVC/Views/Items/Details.cshtml
@@ -140,7 +140,7 @@
{
MVCGridName = "FluxItemsGrid",
PageSize = true,
- ColumnVisibility = false,
+ ColumnVisibility = true,
Export = false,
GlobalSearch = true
})
diff --git a/StockManMVC/bin/StockManMVC.dll b/StockManMVC/bin/StockManMVC.dll
index 3b91f0f..95d4849 100644
Binary files a/StockManMVC/bin/StockManMVC.dll and b/StockManMVC/bin/StockManMVC.dll differ
diff --git a/StockManMVC/bin/StockManMVC.dll.config b/StockManMVC/bin/StockManMVC.dll.config
index 2fb39b4..da86a20 100644
--- a/StockManMVC/bin/StockManMVC.dll.config
+++ b/StockManMVC/bin/StockManMVC.dll.config
@@ -84,9 +84,9 @@
-
+
-
+