ok redirect post editing flusso
da rivedere controlli i18n x virgole e date...
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -31,6 +31,7 @@ namespace StockManMVC.Models
|
||||
public int QtaBatch { get; set; }
|
||||
public decimal CurrValue { get; set; }
|
||||
public Nullable<int> QtaCurr { get; set; }
|
||||
public Nullable<int> QtaPend { get; set; }
|
||||
|
||||
public virtual ItemFamily ItemFamily { get; set; }
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -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<decimal> UnitVal { get; set; }
|
||||
public decimal UnitVal { get; set; }
|
||||
public string Note { get; set; }
|
||||
public Nullable<System.DateTime> dtExport { get; set; }
|
||||
public string OperatorID { get; set; }
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
Generated
+9
-9
@@ -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...'.
|
||||
// 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...'.
|
||||
@@ -1,9 +1,9 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 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.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<Property Name="QtaBatch" Type="int" Nullable="false" />
|
||||
<Property Name="CurrValue" Type="decimal" Precision="18" Scale="6" Nullable="false" />
|
||||
<Property Name="QtaCurr" Type="int" StoreGeneratedPattern="Computed" />
|
||||
<Property Name="QtaPend" Type="int" StoreGeneratedPattern="Computed" />
|
||||
</EntityType>
|
||||
<EntityType Name="ItemFamily">
|
||||
<Key>
|
||||
@@ -39,7 +40,7 @@
|
||||
<Property Name="dtMov" Type="datetime" Nullable="false" />
|
||||
<Property Name="Qta" Type="int" Nullable="false" />
|
||||
<Property Name="TotValue" Type="decimal" Precision="18" Scale="6" Nullable="false" />
|
||||
<Property Name="UnitVal" Type="decimal" Precision="29" Scale="17" StoreGeneratedPattern="Computed" />
|
||||
<Property Name="UnitVal" Type="decimal" Precision="29" Scale="17" StoreGeneratedPattern="Computed" Nullable="false" />
|
||||
<Property Name="OperatorID" Type="nvarchar" MaxLength="50" Nullable="false" />
|
||||
<Property Name="Note" Type="nvarchar" MaxLength="250" Nullable="false" />
|
||||
<Property Name="dtExport" Type="datetime" />
|
||||
@@ -90,8 +91,8 @@
|
||||
<Property Name="LastName" Type="nvarchar" MaxLength="50" Nullable="false" />
|
||||
<Property Name="FirstName" Type="nvarchar" MaxLength="50" Nullable="false" />
|
||||
</EntityType>
|
||||
<!--Errors Found During Generation:
|
||||
warning 6002: The table/view 'StockMan.dbo.vItemStockStatus' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
|
||||
<!--Errori trovati durante la generazione:
|
||||
avviso 6002: Nessuna chiave primaria definita per la tabella/visualizzazione 'StockMan.dbo.vItemStockStatus'. La chiave è stata dedotta e la definizione è stata creata come tabella/visualizzazione di sola lettura.-->
|
||||
<EntityType Name="vItemStockStatus">
|
||||
<Key>
|
||||
<PropertyRef Name="ID" />
|
||||
@@ -321,7 +322,7 @@ warning 6002: The table/view 'StockMan.dbo.vItemStockStatus' does not have a pri
|
||||
<Property Name="dtMov" Type="DateTime" Nullable="false" Precision="3" />
|
||||
<Property Name="Qta" Type="Int32" Nullable="false" />
|
||||
<Property Name="TotValue" Type="Decimal" Precision="18" Scale="6" Nullable="false" />
|
||||
<Property Name="UnitVal" Type="Decimal" Precision="29" Scale="17" annotation:StoreGeneratedPattern="Computed" />
|
||||
<Property Name="UnitVal" Type="Decimal" Precision="29" Scale="17" annotation:StoreGeneratedPattern="Computed" Nullable="false" />
|
||||
<Property Name="Note" Type="String" MaxLength="250" FixedLength="false" Unicode="true" Nullable="false" />
|
||||
<Property Name="dtExport" Type="DateTime" Precision="3" />
|
||||
<NavigationProperty Name="Location" Relationship="Self.FK_ItemFlux_Location" FromRole="ItemFlux" ToRole="Location" />
|
||||
@@ -499,6 +500,7 @@ warning 6002: The table/view 'StockMan.dbo.vItemStockStatus' does not have a pri
|
||||
<NavigationProperty Name="ItemFlux" Relationship="StockManModel.FK_ItemFlux_Item" FromRole="Item" ToRole="ItemFlux" />
|
||||
<NavigationProperty Name="ItemStock" Relationship="StockManModel.FK_Stock_Items" FromRole="Item" ToRole="ItemStock" />
|
||||
<Property Name="QtaCurr" annotation:StoreGeneratedPattern="Computed" Type="Int32" />
|
||||
<Property Name="QtaPend" Type="Int32" annotation:StoreGeneratedPattern="Computed" />
|
||||
</EntityType>
|
||||
<Association Name="FK_Item_ItemFamily">
|
||||
<End Type="StockManModel.ItemFamily" Role="ItemFamily" Multiplicity="1" />
|
||||
@@ -669,6 +671,7 @@ warning 6002: The table/view 'StockMan.dbo.vItemStockStatus' does not have a pri
|
||||
<EntitySetMapping Name="Item">
|
||||
<EntityTypeMapping TypeName="StockManModel.Item">
|
||||
<MappingFragment StoreEntitySet="Item">
|
||||
<ScalarProperty Name="QtaPend" ColumnName="QtaPend" />
|
||||
<ScalarProperty Name="QtaCurr" ColumnName="QtaCurr" />
|
||||
<ScalarProperty Name="CurrValue" ColumnName="CurrValue" />
|
||||
<ScalarProperty Name="QtaBatch" ColumnName="QtaBatch" />
|
||||
@@ -685,9 +688,9 @@ warning 6002: The table/view 'StockMan.dbo.vItemStockStatus' does not have a pri
|
||||
<EntitySetMapping Name="ItemStockStatus">
|
||||
<EntityTypeMapping TypeName="StockManModel.ItemStockStatus">
|
||||
<MappingFragment StoreEntitySet="vItemStockStatus">
|
||||
<ScalarProperty Name="ValPend" ColumnName="ValPend" />
|
||||
<ScalarProperty Name="ValNew" ColumnName="ValNew" />
|
||||
<ScalarProperty Name="QtaNew" ColumnName="QtaNew" />
|
||||
<ScalarProperty Name="ValPend" ColumnName="ValPend" />
|
||||
<ScalarProperty Name="QtaPend" ColumnName="QtaPend" />
|
||||
<ScalarProperty Name="ValConf" ColumnName="ValConf" />
|
||||
<ScalarProperty Name="QtyConf" ColumnName="QtyConf" />
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
{
|
||||
MVCGridName = "FluxItemsGrid",
|
||||
PageSize = true,
|
||||
ColumnVisibility = false,
|
||||
ColumnVisibility = true,
|
||||
Export = false,
|
||||
GlobalSearch = true
|
||||
})
|
||||
|
||||
Binary file not shown.
@@ -84,9 +84,9 @@
|
||||
</system.webServer>
|
||||
<connectionStrings>
|
||||
<!--Ufficio Seriate-->
|
||||
<!--<add name="StockManEntities" connectionString="metadata=res://*/Models.SMModel.csdl|res://*/Models.SMModel.ssdl|res://*/Models.SMModel.msl;provider=System.Data.SqlClient;provider connection string="data source=SQL-STEAM\SQL2012;initial catalog=StockMan;persist security info=True;user id=sa;password=keyhammer;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />-->
|
||||
<add name="StockManEntities" connectionString="metadata=res://*/Models.SMModel.csdl|res://*/Models.SMModel.ssdl|res://*/Models.SMModel.msl;provider=System.Data.SqlClient;provider connection string="data source=SQL-STEAM\SQL2012;initial catalog=StockMan;persist security info=True;user id=sa;password=keyhammer;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
|
||||
<!--Portatile-->
|
||||
<add name="StockManEntities" connectionString="metadata=res://*/Models.SMModel.csdl|res://*/Models.SMModel.ssdl|res://*/Models.SMModel.msl;provider=System.Data.SqlClient;provider connection string="data source=W10-DEV-WEB;initial catalog=StockMan;persist security info=True;user id=sa;password=keyhammer;multipleactiveresultsets=True;application name=EntityFramework"" providerName="System.Data.EntityClient" />
|
||||
<!--<add name="StockManEntities" connectionString="metadata=res://*/Models.SMModel.csdl|res://*/Models.SMModel.ssdl|res://*/Models.SMModel.msl;provider=System.Data.SqlClient;provider connection string="data source=W10-DEV-WEB;initial catalog=StockMan;persist security info=True;user id=sa;password=keyhammer;multipleactiveresultsets=True;application name=EntityFramework"" providerName="System.Data.EntityClient" />-->
|
||||
</connectionStrings>
|
||||
<entityFramework>
|
||||
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
|
||||
|
||||
Reference in New Issue
Block a user