iniziato a popolare partial view x elenco item in stock (da spostare)
This commit is contained in:
@@ -20,7 +20,19 @@ namespace StockManMVC.Controllers
|
||||
var vLocationVal = db.vLocationVal.Include(v => v.Location);
|
||||
return View(vLocationVal.ToList());
|
||||
}
|
||||
|
||||
|
||||
|
||||
// GET: MagStatus
|
||||
public ActionResult StockByLocation(string LocationID)
|
||||
{
|
||||
var CurrStock = db.ItemStock
|
||||
.Where(s => s.QtyConf > 0 && s.LocationID == LocationID)
|
||||
.Include(v => v.Location)
|
||||
.Include(s => s.Item);
|
||||
return PartialView("_StockByLocation",CurrStock.ToList());
|
||||
}
|
||||
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
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(ItemStocksMetadata))]
|
||||
public partial class ItemStocks
|
||||
{
|
||||
}
|
||||
|
||||
//[MetadataType(typeof(ItemsMetadata))]
|
||||
//public partial class Items
|
||||
//{
|
||||
//}
|
||||
|
||||
//[MetadataType(typeof(EnrollmentMetadata))]
|
||||
//public partial class Enrollment
|
||||
//{
|
||||
//}
|
||||
}
|
||||
@@ -77,12 +77,19 @@ namespace StockManMVC.Models
|
||||
|
||||
//}
|
||||
|
||||
//public class StocksMetadata
|
||||
//{
|
||||
// [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
|
||||
// [DataType(DataType.Date)]
|
||||
// public Nullable<System.DateTime> dtLastUpd;
|
||||
//}
|
||||
public class ItemStocksMetadata
|
||||
{
|
||||
[Display(Name = "Giacenza (conf)")]
|
||||
public string QtyConf;
|
||||
|
||||
[Display(Name = "Note")]
|
||||
public string Note;
|
||||
|
||||
[DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
|
||||
[DataType(DataType.Date)]
|
||||
[Display(Name = "Data mod.")]
|
||||
public Nullable<System.DateTime> dtLastUpd;
|
||||
}
|
||||
|
||||
public class vLocationMetadata
|
||||
{
|
||||
|
||||
@@ -183,6 +183,7 @@
|
||||
<Compile Include="Controllers\MagStatusController.cs" />
|
||||
<Compile Include="Controllers\MovTypesController.cs" />
|
||||
<Compile Include="Controllers\OperatorsController.cs" />
|
||||
<Compile Include="Controllers\PartialClasses.cs" />
|
||||
<Compile Include="Controllers\vItemFlux2SaveController.cs" />
|
||||
<Compile Include="GlimpseSecurityPolicy.cs" />
|
||||
<Compile Include="Global.asax.cs">
|
||||
@@ -443,6 +444,7 @@
|
||||
<Content Include="Views\vItemFlux2Save\Edit.cshtml" />
|
||||
<Content Include="Views\vItemFlux2Save\Index.cshtml" />
|
||||
<Content Include="Views\MagStatus\Index.cshtml" />
|
||||
<Content Include="Views\MagStatus\_StockByLocation.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<IISExpressWindowsAuthentication>enabled</IISExpressWindowsAuthentication>
|
||||
<WebStackScaffolding_ControllerDialogWidth>600</WebStackScaffolding_ControllerDialogWidth>
|
||||
<WebStackScaffolding_IsLayoutPageSelected>True</WebStackScaffolding_IsLayoutPageSelected>
|
||||
<WebStackScaffolding_IsPartialViewSelected>False</WebStackScaffolding_IsPartialViewSelected>
|
||||
<WebStackScaffolding_IsPartialViewSelected>True</WebStackScaffolding_IsPartialViewSelected>
|
||||
<WebStackScaffolding_IsReferencingScriptLibrariesSelected>False</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
|
||||
<WebStackScaffolding_LayoutPageFile />
|
||||
<WebStackScaffolding_DbContextTypeFullName>StockManMVC.Models.StockManEntities</WebStackScaffolding_DbContextTypeFullName>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Location.Descr)
|
||||
@@ -44,9 +44,28 @@
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-1 small">
|
||||
<div class="panel panel-info">
|
||||
<div class="panel-heading">
|
||||
<strong>Locazione</strong> - selettore tendina
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
@Html.Action("StockByLocation", new { LocationID = "S01" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-5 small">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<strong>Locazione</strong> - selettore tendina
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
@Html.Action("StockByLocation", new { LocationID = "S02" })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
@model IEnumerable<StockManMVC.Models.ItemStock>
|
||||
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
@*<th>
|
||||
@Html.DisplayNameFor(model => model.Location.Descr)
|
||||
</th>*@
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Item.Descr)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.QtyConf)
|
||||
</th>
|
||||
@*<th>
|
||||
@Html.DisplayNameFor(model => model.Note)
|
||||
</th>*@
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.dtLastUpd)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
@*<td>
|
||||
@Html.DisplayFor(modelItem => item.Location.Descr)
|
||||
</td>*@
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Item.Descr)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.QtyConf)
|
||||
</td>
|
||||
@*<td>
|
||||
@Html.DisplayFor(modelItem => item.Note)
|
||||
</td>*@
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.dtLastUpd)
|
||||
</td>
|
||||
<td>
|
||||
@*@Html.ActionLink("Edit", "Edit", new { id=item.ID }) |
|
||||
@Html.ActionLink("Details", "Details", new { id=item.ID }) |
|
||||
@Html.ActionLink("Delete", "Delete", new { id = item.ID })*@
|
||||
@Html.ActionLink("Sposta", "Move", new { id = item.ID })
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
</table>
|
||||
Binary file not shown.
Reference in New Issue
Block a user