diff --git a/StockManMVC/Controllers/ItemFluxesController.cs b/StockManMVC/Controllers/ItemFluxesController.cs new file mode 100644 index 0000000..b130c08 --- /dev/null +++ b/StockManMVC/Controllers/ItemFluxesController.cs @@ -0,0 +1,140 @@ +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 ItemFluxesController : Controller + { + private StockManEntities db = new StockManEntities(); + + // GET: ItemFluxes + public ActionResult Index() + { + var itemFlux = db.ItemFlux.Include(i => i.Item).Include(i => i.Location).Include(i => i.MovType); + return View(itemFlux.ToList()); + } + + // GET: ItemFluxes/Details/5 + public ActionResult Details(int? id) + { + if (id == null) + { + return new HttpStatusCodeResult(HttpStatusCode.BadRequest); + } + ItemFlux itemFlux = db.ItemFlux.Find(id); + if (itemFlux == null) + { + return HttpNotFound(); + } + return View(itemFlux); + } + + // GET: ItemFluxes/Create + public ActionResult Create() + { + ViewBag.ItemID = new SelectList(db.Item, "ID", "Descr"); + ViewBag.LocationID = new SelectList(db.Location, "ID", "Descr"); + ViewBag.MovTypeID = new SelectList(db.MovType, "ID", "Descr"); + return View(); + } + + // POST: ItemFluxes/Create + // To protect from overposting attacks, please enable the specific properties you want to bind to, for + // more details see http://go.microsoft.com/fwlink/?LinkId=317598. + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult Create([Bind(Include = "ID,ItemID,LocationID,MovTypeID,ExtLocationID,dtMov,Qta,TotValue,UnitVal,Note,dtExport")] ItemFlux itemFlux) + { + if (ModelState.IsValid) + { + db.ItemFlux.Add(itemFlux); + db.SaveChanges(); + return RedirectToAction("Index"); + } + + ViewBag.ItemID = new SelectList(db.Item, "ID", "Descr", itemFlux.ItemID); + ViewBag.LocationID = new SelectList(db.Location, "ID", "Descr", itemFlux.LocationID); + ViewBag.MovTypeID = new SelectList(db.MovType, "ID", "Descr", itemFlux.MovTypeID); + return View(itemFlux); + } + + // GET: ItemFluxes/Edit/5 + public ActionResult Edit(int? id) + { + if (id == null) + { + return new HttpStatusCodeResult(HttpStatusCode.BadRequest); + } + ItemFlux itemFlux = db.ItemFlux.Find(id); + if (itemFlux == null) + { + return HttpNotFound(); + } + ViewBag.ItemID = new SelectList(db.Item, "ID", "Descr", itemFlux.ItemID); + ViewBag.LocationID = new SelectList(db.Location, "ID", "Descr", itemFlux.LocationID); + ViewBag.MovTypeID = new SelectList(db.MovType, "ID", "Descr", itemFlux.MovTypeID); + return View(itemFlux); + } + + // POST: ItemFluxes/Edit/5 + // To protect from overposting attacks, please enable the specific properties you want to bind to, for + // more details see http://go.microsoft.com/fwlink/?LinkId=317598. + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult Edit([Bind(Include = "ID,ItemID,LocationID,MovTypeID,ExtLocationID,dtMov,Qta,TotValue,UnitVal,Note,dtExport")] ItemFlux itemFlux) + { + if (ModelState.IsValid) + { + db.Entry(itemFlux).State = EntityState.Modified; + db.SaveChanges(); + return RedirectToAction("Index"); + } + ViewBag.ItemID = new SelectList(db.Item, "ID", "Descr", itemFlux.ItemID); + ViewBag.LocationID = new SelectList(db.Location, "ID", "Descr", itemFlux.LocationID); + ViewBag.MovTypeID = new SelectList(db.MovType, "ID", "Descr", itemFlux.MovTypeID); + return View(itemFlux); + } + + // GET: ItemFluxes/Delete/5 + public ActionResult Delete(int? id) + { + if (id == null) + { + return new HttpStatusCodeResult(HttpStatusCode.BadRequest); + } + ItemFlux itemFlux = db.ItemFlux.Find(id); + if (itemFlux == null) + { + return HttpNotFound(); + } + return View(itemFlux); + } + + // POST: ItemFluxes/Delete/5 + [HttpPost, ActionName("Delete")] + [ValidateAntiForgeryToken] + public ActionResult DeleteConfirmed(int id) + { + ItemFlux itemFlux = db.ItemFlux.Find(id); + db.ItemFlux.Remove(itemFlux); + db.SaveChanges(); + return RedirectToAction("Index"); + } + + protected override void Dispose(bool disposing) + { + if (disposing) + { + db.Dispose(); + } + base.Dispose(disposing); + } + } +} diff --git a/StockManMVC/Controllers/ItemStocksController.cs b/StockManMVC/Controllers/ItemStocksController.cs new file mode 100644 index 0000000..74431d1 --- /dev/null +++ b/StockManMVC/Controllers/ItemStocksController.cs @@ -0,0 +1,136 @@ +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 ItemStocksController : Controller + { + private StockManEntities db = new StockManEntities(); + + // GET: ItemStocks + public ActionResult Index() + { + var itemStock = db.ItemStock.Include(i => i.Item).Include(i => i.Location); + return View(itemStock.ToList()); + } + + // GET: ItemStocks/Details/5 + public ActionResult Details(int? id) + { + if (id == null) + { + return new HttpStatusCodeResult(HttpStatusCode.BadRequest); + } + ItemStock itemStock = db.ItemStock.Find(id); + if (itemStock == null) + { + return HttpNotFound(); + } + return View(itemStock); + } + + // GET: ItemStocks/Create + public ActionResult Create() + { + ViewBag.ItemID = new SelectList(db.Item, "ID", "Descr"); + ViewBag.LocationID = new SelectList(db.Location, "ID", "Descr"); + return View(); + } + + // POST: ItemStocks/Create + // To protect from overposting attacks, please enable the specific properties you want to bind to, for + // more details see http://go.microsoft.com/fwlink/?LinkId=317598. + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult Create([Bind(Include = "ID,ItemID,LocationID,QtyConf,Note,dtLastUpd")] ItemStock itemStock) + { + if (ModelState.IsValid) + { + db.ItemStock.Add(itemStock); + db.SaveChanges(); + return RedirectToAction("Index"); + } + + ViewBag.ItemID = new SelectList(db.Item, "ID", "Descr", itemStock.ItemID); + ViewBag.LocationID = new SelectList(db.Location, "ID", "Descr", itemStock.LocationID); + return View(itemStock); + } + + // GET: ItemStocks/Edit/5 + public ActionResult Edit(int? id) + { + if (id == null) + { + return new HttpStatusCodeResult(HttpStatusCode.BadRequest); + } + ItemStock itemStock = db.ItemStock.Find(id); + if (itemStock == null) + { + return HttpNotFound(); + } + ViewBag.ItemID = new SelectList(db.Item, "ID", "Descr", itemStock.ItemID); + ViewBag.LocationID = new SelectList(db.Location, "ID", "Descr", itemStock.LocationID); + return View(itemStock); + } + + // POST: ItemStocks/Edit/5 + // To protect from overposting attacks, please enable the specific properties you want to bind to, for + // more details see http://go.microsoft.com/fwlink/?LinkId=317598. + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult Edit([Bind(Include = "ID,ItemID,LocationID,QtyConf,Note,dtLastUpd")] ItemStock itemStock) + { + if (ModelState.IsValid) + { + db.Entry(itemStock).State = EntityState.Modified; + db.SaveChanges(); + return RedirectToAction("Index"); + } + ViewBag.ItemID = new SelectList(db.Item, "ID", "Descr", itemStock.ItemID); + ViewBag.LocationID = new SelectList(db.Location, "ID", "Descr", itemStock.LocationID); + return View(itemStock); + } + + // GET: ItemStocks/Delete/5 + public ActionResult Delete(int? id) + { + if (id == null) + { + return new HttpStatusCodeResult(HttpStatusCode.BadRequest); + } + ItemStock itemStock = db.ItemStock.Find(id); + if (itemStock == null) + { + return HttpNotFound(); + } + return View(itemStock); + } + + // POST: ItemStocks/Delete/5 + [HttpPost, ActionName("Delete")] + [ValidateAntiForgeryToken] + public ActionResult DeleteConfirmed(int id) + { + ItemStock itemStock = db.ItemStock.Find(id); + db.ItemStock.Remove(itemStock); + db.SaveChanges(); + return RedirectToAction("Index"); + } + + protected override void Dispose(bool disposing) + { + if (disposing) + { + db.Dispose(); + } + base.Dispose(disposing); + } + } +} diff --git a/StockManMVC/Controllers/ItemsController.cs b/StockManMVC/Controllers/ItemsController.cs new file mode 100644 index 0000000..88bf523 --- /dev/null +++ b/StockManMVC/Controllers/ItemsController.cs @@ -0,0 +1,127 @@ +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 ItemsController : Controller + { + private StockManEntities db = new StockManEntities(); + + // GET: Items + public ActionResult Index() + { + return View(db.Item.ToList()); + } + + // GET: Items/Details/5 + public ActionResult Details(int? id) + { + if (id == null) + { + return new HttpStatusCodeResult(HttpStatusCode.BadRequest); + } + Item item = db.Item.Find(id); + if (item == null) + { + return HttpNotFound(); + } + return View(item); + } + + // GET: Items/Create + public ActionResult Create() + { + return View(); + } + + // POST: Items/Create + // To protect from overposting attacks, please enable the specific properties you want to bind to, for + // more details see http://go.microsoft.com/fwlink/?LinkId=317598. + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult Create([Bind(Include = "ID,Descr,CodInt,Family,CodExt,DescrExt,QtaMin,QtaBatch,CurrValue")] Item item) + { + if (ModelState.IsValid) + { + db.Item.Add(item); + db.SaveChanges(); + return RedirectToAction("Index"); + } + + return View(item); + } + + // GET: Items/Edit/5 + public ActionResult Edit(int? id) + { + if (id == null) + { + return new HttpStatusCodeResult(HttpStatusCode.BadRequest); + } + Item item = db.Item.Find(id); + if (item == null) + { + return HttpNotFound(); + } + return View(item); + } + + // POST: Items/Edit/5 + // To protect from overposting attacks, please enable the specific properties you want to bind to, for + // more details see http://go.microsoft.com/fwlink/?LinkId=317598. + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult Edit([Bind(Include = "ID,Descr,CodInt,Family,CodExt,DescrExt,QtaMin,QtaBatch,CurrValue")] Item item) + { + if (ModelState.IsValid) + { + db.Entry(item).State = EntityState.Modified; + db.SaveChanges(); + return RedirectToAction("Index"); + } + return View(item); + } + + // GET: Items/Delete/5 + public ActionResult Delete(int? id) + { + if (id == null) + { + return new HttpStatusCodeResult(HttpStatusCode.BadRequest); + } + Item item = db.Item.Find(id); + if (item == null) + { + return HttpNotFound(); + } + return View(item); + } + + // POST: Items/Delete/5 + [HttpPost, ActionName("Delete")] + [ValidateAntiForgeryToken] + public ActionResult DeleteConfirmed(int id) + { + Item item = db.Item.Find(id); + db.Item.Remove(item); + db.SaveChanges(); + return RedirectToAction("Index"); + } + + protected override void Dispose(bool disposing) + { + if (disposing) + { + db.Dispose(); + } + base.Dispose(disposing); + } + } +} diff --git a/StockManMVC/Models/ItemStockStatus.cs b/StockManMVC/Models/ItemStockStatus.cs new file mode 100644 index 0000000..582a6dd --- /dev/null +++ b/StockManMVC/Models/ItemStockStatus.cs @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// +// This code was generated from a template. +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace StockManMVC.Models +{ + using System; + using System.Collections.Generic; + + public partial class ItemStockStatus + { + public int ItemID { get; set; } + public string Descr { get; set; } + public string CodInt { get; set; } + public string Family { get; set; } + public string CodExt { get; set; } + public string DescrExt { get; set; } + public int QtaMin { get; set; } + public int QtaBatch { get; set; } + public int QtyConf { get; set; } + public decimal ValConf { get; set; } + public Nullable QtaPend { get; set; } + public Nullable ValPend { get; set; } + public Nullable QtaNew { get; set; } + public Nullable ValNew { get; set; } + } +} diff --git a/StockManMVC/Models/SMModel.Context.cs b/StockManMVC/Models/SMModel.Context.cs index 6f24c0e..ca219ec 100644 --- a/StockManMVC/Models/SMModel.Context.cs +++ b/StockManMVC/Models/SMModel.Context.cs @@ -31,7 +31,8 @@ namespace StockManMVC.Models public virtual DbSet Location { get; set; } public virtual DbSet LocType { get; set; } public virtual DbSet MovType { get; set; } - public virtual DbSet vItemFlux2Save { get; set; } public virtual DbSet vLocationVal { get; set; } + public virtual DbSet vItemFlux2Save { get; set; } + public virtual DbSet ItemStockStatus { get; set; } } } diff --git a/StockManMVC/Models/SMModel.edmx b/StockManMVC/Models/SMModel.edmx index 94c4878..aa23d9c 100644 --- a/StockManMVC/Models/SMModel.edmx +++ b/StockManMVC/Models/SMModel.edmx @@ -78,10 +78,32 @@ warning 6002: The table/view 'StockMan.dbo.vItemFlux2Save' does not have a prima + + + + + + + + + + + + + + + + + + + + + @@ -172,9 +194,28 @@ warning 6002: The table/view 'StockMan.dbo.vLocationVal' does not have a primary SELECT [vItemFlux2Save].[ItemID] AS [ItemID], + [vItemFlux2Save].[NumMov] AS [NumMov], [vItemFlux2Save].[TotQta] AS [TotQta], [vItemFlux2Save].[TotVal] AS [TotVal] FROM [dbo].[vItemFlux2Save] AS [vItemFlux2Save] + + + SELECT + [vItemStockStatus].[ItemID] AS [ItemID], + [vItemStockStatus].[Descr] AS [Descr], + [vItemStockStatus].[CodInt] AS [CodInt], + [vItemStockStatus].[Family] AS [Family], + [vItemStockStatus].[CodExt] AS [CodExt], + [vItemStockStatus].[DescrExt] AS [DescrExt], + [vItemStockStatus].[QtaMin] AS [QtaMin], + [vItemStockStatus].[QtaBatch] AS [QtaBatch], + [vItemStockStatus].[QtyConf] AS [QtyConf], + [vItemStockStatus].[ValConf] AS [ValConf], + [vItemStockStatus].[QtaPend] AS [QtaPend], + [vItemStockStatus].[ValPend] AS [ValPend], + [vItemStockStatus].[QtaNew] AS [QtaNew], + [vItemStockStatus].[ValNew] AS [ValNew] + FROM [dbo].[vItemStockStatus] AS [vItemStockStatus] SELECT @@ -218,7 +259,6 @@ warning 6002: The table/view 'StockMan.dbo.vLocationVal' does not have a primary - @@ -244,6 +284,8 @@ warning 6002: The table/view 'StockMan.dbo.vLocationVal' does not have a primary + + @@ -323,14 +365,6 @@ warning 6002: The table/view 'StockMan.dbo.vLocationVal' does not have a primary - - - - - - - - @@ -410,6 +444,34 @@ warning 6002: The table/view 'StockMan.dbo.vLocationVal' does not have a primary + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -488,15 +550,6 @@ warning 6002: The table/view 'StockMan.dbo.vLocationVal' does not have a primary - - - - - - - - - @@ -505,6 +558,36 @@ warning 6002: The table/view 'StockMan.dbo.vLocationVal' does not have a primary + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StockManMVC/Models/SMModel.edmx.diagram b/StockManMVC/Models/SMModel.edmx.diagram index cf8331c..ec1380b 100644 --- a/StockManMVC/Models/SMModel.edmx.diagram +++ b/StockManMVC/Models/SMModel.edmx.diagram @@ -5,13 +5,12 @@ - - - - - - - + + + + + + @@ -19,6 +18,8 @@ + + diff --git a/StockManMVC/Models/vItemFlux2Save.cs b/StockManMVC/Models/vItemFlux2Save.cs index 82d0184..2de5837 100644 --- a/StockManMVC/Models/vItemFlux2Save.cs +++ b/StockManMVC/Models/vItemFlux2Save.cs @@ -15,6 +15,7 @@ namespace StockManMVC.Models public partial class vItemFlux2Save { public int ItemID { get; set; } + public Nullable NumMov { get; set; } public Nullable TotQta { get; set; } public Nullable TotVal { get; set; } } diff --git a/StockManMVC/StockManMVC.csproj b/StockManMVC/StockManMVC.csproj index 5e1e15e..78231f9 100644 --- a/StockManMVC/StockManMVC.csproj +++ b/StockManMVC/StockManMVC.csproj @@ -153,6 +153,9 @@ + + + @@ -169,6 +172,9 @@ SMModel.tt + + SMModel.tt + SMModel.tt @@ -288,6 +294,21 @@ + + + + + + + + + + + + + + + diff --git a/StockManMVC/Views/ItemFluxes/Create.cshtml b/StockManMVC/Views/ItemFluxes/Create.cshtml new file mode 100644 index 0000000..3929892 --- /dev/null +++ b/StockManMVC/Views/ItemFluxes/Create.cshtml @@ -0,0 +1,104 @@ +@model StockManMVC.Models.ItemFlux + +@{ + ViewBag.Title = "Create"; +} + +

Create

+ + +@using (Html.BeginForm()) +{ + @Html.AntiForgeryToken() + +
+

ItemFlux

+
+ @Html.ValidationSummary(true, "", new { @class = "text-danger" }) +
+ @Html.LabelFor(model => model.ItemID, "ItemID", htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.DropDownList("ItemID", null, htmlAttributes: new { @class = "form-control" }) + @Html.ValidationMessageFor(model => model.ItemID, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.LocationID, "LocationID", htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.DropDownList("LocationID", null, htmlAttributes: new { @class = "form-control" }) + @Html.ValidationMessageFor(model => model.LocationID, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.MovTypeID, "MovTypeID", htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.DropDownList("MovTypeID", null, htmlAttributes: new { @class = "form-control" }) + @Html.ValidationMessageFor(model => model.MovTypeID, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.ExtLocationID, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.ExtLocationID, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.ExtLocationID, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.dtMov, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.dtMov, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.dtMov, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.Qta, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.Qta, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.Qta, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.TotValue, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.TotValue, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.TotValue, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.Note, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.Note, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.Note, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.dtExport, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.dtExport, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.dtExport, "", new { @class = "text-danger" }) +
+
+ +
+
+ +
+
+
+} + +
+ @Html.ActionLink("Back to List", "Index") +
+ +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/StockManMVC/Views/ItemFluxes/Delete.cshtml b/StockManMVC/Views/ItemFluxes/Delete.cshtml new file mode 100644 index 0000000..7e2f4e3 --- /dev/null +++ b/StockManMVC/Views/ItemFluxes/Delete.cshtml @@ -0,0 +1,104 @@ +@model StockManMVC.Models.ItemFlux + +@{ + ViewBag.Title = "Delete"; +} + +

Delete

+ +

Are you sure you want to delete this?

+
+

ItemFlux

+
+
+
+ @Html.DisplayNameFor(model => model.ExtLocationID) +
+ +
+ @Html.DisplayFor(model => model.ExtLocationID) +
+ +
+ @Html.DisplayNameFor(model => model.dtMov) +
+ +
+ @Html.DisplayFor(model => model.dtMov) +
+ +
+ @Html.DisplayNameFor(model => model.Qta) +
+ +
+ @Html.DisplayFor(model => model.Qta) +
+ +
+ @Html.DisplayNameFor(model => model.TotValue) +
+ +
+ @Html.DisplayFor(model => model.TotValue) +
+ +
+ @Html.DisplayNameFor(model => model.UnitVal) +
+ +
+ @Html.DisplayFor(model => model.UnitVal) +
+ +
+ @Html.DisplayNameFor(model => model.Note) +
+ +
+ @Html.DisplayFor(model => model.Note) +
+ +
+ @Html.DisplayNameFor(model => model.dtExport) +
+ +
+ @Html.DisplayFor(model => model.dtExport) +
+ +
+ @Html.DisplayNameFor(model => model.Item.Descr) +
+ +
+ @Html.DisplayFor(model => model.Item.Descr) +
+ +
+ @Html.DisplayNameFor(model => model.Location.Descr) +
+ +
+ @Html.DisplayFor(model => model.Location.Descr) +
+ +
+ @Html.DisplayNameFor(model => model.MovType.Descr) +
+ +
+ @Html.DisplayFor(model => model.MovType.Descr) +
+ +
+ + @using (Html.BeginForm()) { + @Html.AntiForgeryToken() + +
+ | + @Html.ActionLink("Back to List", "Index") +
+ } +
diff --git a/StockManMVC/Views/ItemFluxes/Details.cshtml b/StockManMVC/Views/ItemFluxes/Details.cshtml new file mode 100644 index 0000000..7cd16cd --- /dev/null +++ b/StockManMVC/Views/ItemFluxes/Details.cshtml @@ -0,0 +1,98 @@ +@model StockManMVC.Models.ItemFlux + +@{ + ViewBag.Title = "Details"; +} + +

Details

+ +
+

ItemFlux

+
+
+
+ @Html.DisplayNameFor(model => model.ExtLocationID) +
+ +
+ @Html.DisplayFor(model => model.ExtLocationID) +
+ +
+ @Html.DisplayNameFor(model => model.dtMov) +
+ +
+ @Html.DisplayFor(model => model.dtMov) +
+ +
+ @Html.DisplayNameFor(model => model.Qta) +
+ +
+ @Html.DisplayFor(model => model.Qta) +
+ +
+ @Html.DisplayNameFor(model => model.TotValue) +
+ +
+ @Html.DisplayFor(model => model.TotValue) +
+ +
+ @Html.DisplayNameFor(model => model.UnitVal) +
+ +
+ @Html.DisplayFor(model => model.UnitVal) +
+ +
+ @Html.DisplayNameFor(model => model.Note) +
+ +
+ @Html.DisplayFor(model => model.Note) +
+ +
+ @Html.DisplayNameFor(model => model.dtExport) +
+ +
+ @Html.DisplayFor(model => model.dtExport) +
+ +
+ @Html.DisplayNameFor(model => model.Item.Descr) +
+ +
+ @Html.DisplayFor(model => model.Item.Descr) +
+ +
+ @Html.DisplayNameFor(model => model.Location.Descr) +
+ +
+ @Html.DisplayFor(model => model.Location.Descr) +
+ +
+ @Html.DisplayNameFor(model => model.MovType.Descr) +
+ +
+ @Html.DisplayFor(model => model.MovType.Descr) +
+ +
+
+

+ @Html.ActionLink("Edit", "Edit", new { id = Model.ID }) | + @Html.ActionLink("Back to List", "Index") +

diff --git a/StockManMVC/Views/ItemFluxes/Edit.cshtml b/StockManMVC/Views/ItemFluxes/Edit.cshtml new file mode 100644 index 0000000..8f6d80a --- /dev/null +++ b/StockManMVC/Views/ItemFluxes/Edit.cshtml @@ -0,0 +1,114 @@ +@model StockManMVC.Models.ItemFlux + +@{ + ViewBag.Title = "Edit"; +} + +

Edit

+ + +@using (Html.BeginForm()) +{ + @Html.AntiForgeryToken() + +
+

ItemFlux

+
+ @Html.ValidationSummary(true, "", new { @class = "text-danger" }) + @Html.HiddenFor(model => model.ID) + +
+ @Html.LabelFor(model => model.ItemID, "ItemID", htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.DropDownList("ItemID", null, htmlAttributes: new { @class = "form-control" }) + @Html.ValidationMessageFor(model => model.ItemID, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.LocationID, "LocationID", htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.DropDownList("LocationID", null, htmlAttributes: new { @class = "form-control" }) + @Html.ValidationMessageFor(model => model.LocationID, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.MovTypeID, "MovTypeID", htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.DropDownList("MovTypeID", null, htmlAttributes: new { @class = "form-control" }) + @Html.ValidationMessageFor(model => model.MovTypeID, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.ExtLocationID, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.ExtLocationID, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.ExtLocationID, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.dtMov, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.dtMov, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.dtMov, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.Qta, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.Qta, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.Qta, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.TotValue, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.TotValue, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.TotValue, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.UnitVal, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.UnitVal, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.UnitVal, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.Note, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.Note, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.Note, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.dtExport, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.dtExport, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.dtExport, "", new { @class = "text-danger" }) +
+
+ +
+
+ +
+
+
+} + +
+ @Html.ActionLink("Back to List", "Index") +
+ +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/StockManMVC/Views/ItemFluxes/Index.cshtml b/StockManMVC/Views/ItemFluxes/Index.cshtml new file mode 100644 index 0000000..3306c75 --- /dev/null +++ b/StockManMVC/Views/ItemFluxes/Index.cshtml @@ -0,0 +1,87 @@ +@model IEnumerable + +@{ + ViewBag.Title = "Index"; +} + +

Index

+ +

+ @Html.ActionLink("Create New", "Create") +

+ + + + + + + + + + + + + + + +@foreach (var item in Model) { + + + + + + + + + + + + + +} + +
+ @Html.DisplayNameFor(model => model.ExtLocationID) + + @Html.DisplayNameFor(model => model.dtMov) + + @Html.DisplayNameFor(model => model.Qta) + + @Html.DisplayNameFor(model => model.TotValue) + + @Html.DisplayNameFor(model => model.UnitVal) + + @Html.DisplayNameFor(model => model.Note) + + @Html.DisplayNameFor(model => model.dtExport) + + @Html.DisplayNameFor(model => model.Item.Descr) + + @Html.DisplayNameFor(model => model.Location.Descr) + + @Html.DisplayNameFor(model => model.MovType.Descr) +
+ @Html.DisplayFor(modelItem => item.ExtLocationID) + + @Html.DisplayFor(modelItem => item.dtMov) + + @Html.DisplayFor(modelItem => item.Qta) + + @Html.DisplayFor(modelItem => item.TotValue) + + @Html.DisplayFor(modelItem => item.UnitVal) + + @Html.DisplayFor(modelItem => item.Note) + + @Html.DisplayFor(modelItem => item.dtExport) + + @Html.DisplayFor(modelItem => item.Item.Descr) + + @Html.DisplayFor(modelItem => item.Location.Descr) + + @Html.DisplayFor(modelItem => item.MovType.Descr) + + @Html.ActionLink("Edit", "Edit", new { id=item.ID }) | + @Html.ActionLink("Details", "Details", new { id=item.ID }) | + @Html.ActionLink("Delete", "Delete", new { id=item.ID }) +
diff --git a/StockManMVC/Views/ItemStocks/Create.cshtml b/StockManMVC/Views/ItemStocks/Create.cshtml new file mode 100644 index 0000000..09e8632 --- /dev/null +++ b/StockManMVC/Views/ItemStocks/Create.cshtml @@ -0,0 +1,72 @@ +@model StockManMVC.Models.ItemStock + +@{ + ViewBag.Title = "Create"; +} + +

Create

+ + +@using (Html.BeginForm()) +{ + @Html.AntiForgeryToken() + +
+

ItemStock

+
+ @Html.ValidationSummary(true, "", new { @class = "text-danger" }) +
+ @Html.LabelFor(model => model.ItemID, "ItemID", htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.DropDownList("ItemID", null, htmlAttributes: new { @class = "form-control" }) + @Html.ValidationMessageFor(model => model.ItemID, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.LocationID, "LocationID", htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.DropDownList("LocationID", null, htmlAttributes: new { @class = "form-control" }) + @Html.ValidationMessageFor(model => model.LocationID, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.QtyConf, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.QtyConf, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.QtyConf, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.Note, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.Note, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.Note, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.dtLastUpd, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.dtLastUpd, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.dtLastUpd, "", new { @class = "text-danger" }) +
+
+ +
+
+ +
+
+
+} + +
+ @Html.ActionLink("Back to List", "Index") +
+ +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/StockManMVC/Views/ItemStocks/Delete.cshtml b/StockManMVC/Views/ItemStocks/Delete.cshtml new file mode 100644 index 0000000..782cc17 --- /dev/null +++ b/StockManMVC/Views/ItemStocks/Delete.cshtml @@ -0,0 +1,64 @@ +@model StockManMVC.Models.ItemStock + +@{ + ViewBag.Title = "Delete"; +} + +

Delete

+ +

Are you sure you want to delete this?

+
+

ItemStock

+
+
+
+ @Html.DisplayNameFor(model => model.QtyConf) +
+ +
+ @Html.DisplayFor(model => model.QtyConf) +
+ +
+ @Html.DisplayNameFor(model => model.Note) +
+ +
+ @Html.DisplayFor(model => model.Note) +
+ +
+ @Html.DisplayNameFor(model => model.dtLastUpd) +
+ +
+ @Html.DisplayFor(model => model.dtLastUpd) +
+ +
+ @Html.DisplayNameFor(model => model.Item.Descr) +
+ +
+ @Html.DisplayFor(model => model.Item.Descr) +
+ +
+ @Html.DisplayNameFor(model => model.Location.Descr) +
+ +
+ @Html.DisplayFor(model => model.Location.Descr) +
+ +
+ + @using (Html.BeginForm()) { + @Html.AntiForgeryToken() + +
+ | + @Html.ActionLink("Back to List", "Index") +
+ } +
diff --git a/StockManMVC/Views/ItemStocks/Details.cshtml b/StockManMVC/Views/ItemStocks/Details.cshtml new file mode 100644 index 0000000..f0d2f99 --- /dev/null +++ b/StockManMVC/Views/ItemStocks/Details.cshtml @@ -0,0 +1,58 @@ +@model StockManMVC.Models.ItemStock + +@{ + ViewBag.Title = "Details"; +} + +

Details

+ +
+

ItemStock

+
+
+
+ @Html.DisplayNameFor(model => model.QtyConf) +
+ +
+ @Html.DisplayFor(model => model.QtyConf) +
+ +
+ @Html.DisplayNameFor(model => model.Note) +
+ +
+ @Html.DisplayFor(model => model.Note) +
+ +
+ @Html.DisplayNameFor(model => model.dtLastUpd) +
+ +
+ @Html.DisplayFor(model => model.dtLastUpd) +
+ +
+ @Html.DisplayNameFor(model => model.Item.Descr) +
+ +
+ @Html.DisplayFor(model => model.Item.Descr) +
+ +
+ @Html.DisplayNameFor(model => model.Location.Descr) +
+ +
+ @Html.DisplayFor(model => model.Location.Descr) +
+ +
+
+

+ @Html.ActionLink("Edit", "Edit", new { id = Model.ID }) | + @Html.ActionLink("Back to List", "Index") +

diff --git a/StockManMVC/Views/ItemStocks/Edit.cshtml b/StockManMVC/Views/ItemStocks/Edit.cshtml new file mode 100644 index 0000000..8338779 --- /dev/null +++ b/StockManMVC/Views/ItemStocks/Edit.cshtml @@ -0,0 +1,74 @@ +@model StockManMVC.Models.ItemStock + +@{ + ViewBag.Title = "Edit"; +} + +

Edit

+ + +@using (Html.BeginForm()) +{ + @Html.AntiForgeryToken() + +
+

ItemStock

+
+ @Html.ValidationSummary(true, "", new { @class = "text-danger" }) + @Html.HiddenFor(model => model.ID) + +
+ @Html.LabelFor(model => model.ItemID, "ItemID", htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.DropDownList("ItemID", null, htmlAttributes: new { @class = "form-control" }) + @Html.ValidationMessageFor(model => model.ItemID, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.LocationID, "LocationID", htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.DropDownList("LocationID", null, htmlAttributes: new { @class = "form-control" }) + @Html.ValidationMessageFor(model => model.LocationID, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.QtyConf, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.QtyConf, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.QtyConf, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.Note, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.Note, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.Note, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.dtLastUpd, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.dtLastUpd, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.dtLastUpd, "", new { @class = "text-danger" }) +
+
+ +
+
+ +
+
+
+} + +
+ @Html.ActionLink("Back to List", "Index") +
+ +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/StockManMVC/Views/ItemStocks/Index.cshtml b/StockManMVC/Views/ItemStocks/Index.cshtml new file mode 100644 index 0000000..dc71a39 --- /dev/null +++ b/StockManMVC/Views/ItemStocks/Index.cshtml @@ -0,0 +1,57 @@ +@model IEnumerable + +@{ + ViewBag.Title = "Index"; +} + +

Index

+ +

+ @Html.ActionLink("Create New", "Create") +

+ + + + + + + + + + +@foreach (var item in Model) { + + + + + + + + +} + +
+ @Html.DisplayNameFor(model => model.QtyConf) + + @Html.DisplayNameFor(model => model.Note) + + @Html.DisplayNameFor(model => model.dtLastUpd) + + @Html.DisplayNameFor(model => model.Item.Descr) + + @Html.DisplayNameFor(model => model.Location.Descr) +
+ @Html.DisplayFor(modelItem => item.QtyConf) + + @Html.DisplayFor(modelItem => item.Note) + + @Html.DisplayFor(modelItem => item.dtLastUpd) + + @Html.DisplayFor(modelItem => item.Item.Descr) + + @Html.DisplayFor(modelItem => item.Location.Descr) + + @Html.ActionLink("Edit", "Edit", new { id=item.ID }) | + @Html.ActionLink("Details", "Details", new { id=item.ID }) | + @Html.ActionLink("Delete", "Delete", new { id=item.ID }) +
diff --git a/StockManMVC/Views/Items/Create.cshtml b/StockManMVC/Views/Items/Create.cshtml new file mode 100644 index 0000000..2e478c2 --- /dev/null +++ b/StockManMVC/Views/Items/Create.cshtml @@ -0,0 +1,96 @@ +@model StockManMVC.Models.Item + +@{ + ViewBag.Title = "Create"; +} + +

Create

+ + +@using (Html.BeginForm()) +{ + @Html.AntiForgeryToken() + +
+

Item

+
+ @Html.ValidationSummary(true, "", new { @class = "text-danger" }) +
+ @Html.LabelFor(model => model.Descr, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.Descr, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.Descr, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.CodInt, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.CodInt, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.CodInt, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.Family, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.Family, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.Family, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.CodExt, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.CodExt, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.CodExt, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.DescrExt, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.DescrExt, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.DescrExt, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.QtaMin, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.QtaMin, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.QtaMin, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.QtaBatch, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.QtaBatch, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.QtaBatch, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.CurrValue, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.CurrValue, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.CurrValue, "", new { @class = "text-danger" }) +
+
+ +
+
+ +
+
+
+} + +
+ @Html.ActionLink("Back to List", "Index") +
+ +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/StockManMVC/Views/Items/Delete.cshtml b/StockManMVC/Views/Items/Delete.cshtml new file mode 100644 index 0000000..49152f6 --- /dev/null +++ b/StockManMVC/Views/Items/Delete.cshtml @@ -0,0 +1,88 @@ +@model StockManMVC.Models.Item + +@{ + ViewBag.Title = "Delete"; +} + +

Delete

+ +

Are you sure you want to delete this?

+
+

Item

+
+
+
+ @Html.DisplayNameFor(model => model.Descr) +
+ +
+ @Html.DisplayFor(model => model.Descr) +
+ +
+ @Html.DisplayNameFor(model => model.CodInt) +
+ +
+ @Html.DisplayFor(model => model.CodInt) +
+ +
+ @Html.DisplayNameFor(model => model.Family) +
+ +
+ @Html.DisplayFor(model => model.Family) +
+ +
+ @Html.DisplayNameFor(model => model.CodExt) +
+ +
+ @Html.DisplayFor(model => model.CodExt) +
+ +
+ @Html.DisplayNameFor(model => model.DescrExt) +
+ +
+ @Html.DisplayFor(model => model.DescrExt) +
+ +
+ @Html.DisplayNameFor(model => model.QtaMin) +
+ +
+ @Html.DisplayFor(model => model.QtaMin) +
+ +
+ @Html.DisplayNameFor(model => model.QtaBatch) +
+ +
+ @Html.DisplayFor(model => model.QtaBatch) +
+ +
+ @Html.DisplayNameFor(model => model.CurrValue) +
+ +
+ @Html.DisplayFor(model => model.CurrValue) +
+ +
+ + @using (Html.BeginForm()) { + @Html.AntiForgeryToken() + +
+ | + @Html.ActionLink("Back to List", "Index") +
+ } +
diff --git a/StockManMVC/Views/Items/Details.cshtml b/StockManMVC/Views/Items/Details.cshtml new file mode 100644 index 0000000..8d45914 --- /dev/null +++ b/StockManMVC/Views/Items/Details.cshtml @@ -0,0 +1,82 @@ +@model StockManMVC.Models.Item + +@{ + ViewBag.Title = "Details"; +} + +

Details

+ +
+

Item

+
+
+
+ @Html.DisplayNameFor(model => model.Descr) +
+ +
+ @Html.DisplayFor(model => model.Descr) +
+ +
+ @Html.DisplayNameFor(model => model.CodInt) +
+ +
+ @Html.DisplayFor(model => model.CodInt) +
+ +
+ @Html.DisplayNameFor(model => model.Family) +
+ +
+ @Html.DisplayFor(model => model.Family) +
+ +
+ @Html.DisplayNameFor(model => model.CodExt) +
+ +
+ @Html.DisplayFor(model => model.CodExt) +
+ +
+ @Html.DisplayNameFor(model => model.DescrExt) +
+ +
+ @Html.DisplayFor(model => model.DescrExt) +
+ +
+ @Html.DisplayNameFor(model => model.QtaMin) +
+ +
+ @Html.DisplayFor(model => model.QtaMin) +
+ +
+ @Html.DisplayNameFor(model => model.QtaBatch) +
+ +
+ @Html.DisplayFor(model => model.QtaBatch) +
+ +
+ @Html.DisplayNameFor(model => model.CurrValue) +
+ +
+ @Html.DisplayFor(model => model.CurrValue) +
+ +
+
+

+ @Html.ActionLink("Edit", "Edit", new { id = Model.ID }) | + @Html.ActionLink("Back to List", "Index") +

diff --git a/StockManMVC/Views/Items/Edit.cshtml b/StockManMVC/Views/Items/Edit.cshtml new file mode 100644 index 0000000..c8dabf0 --- /dev/null +++ b/StockManMVC/Views/Items/Edit.cshtml @@ -0,0 +1,98 @@ +@model StockManMVC.Models.Item + +@{ + ViewBag.Title = "Edit"; +} + +

Edit

+ + +@using (Html.BeginForm()) +{ + @Html.AntiForgeryToken() + +
+

Item

+
+ @Html.ValidationSummary(true, "", new { @class = "text-danger" }) + @Html.HiddenFor(model => model.ID) + +
+ @Html.LabelFor(model => model.Descr, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.Descr, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.Descr, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.CodInt, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.CodInt, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.CodInt, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.Family, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.Family, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.Family, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.CodExt, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.CodExt, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.CodExt, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.DescrExt, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.DescrExt, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.DescrExt, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.QtaMin, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.QtaMin, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.QtaMin, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.QtaBatch, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.QtaBatch, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.QtaBatch, "", new { @class = "text-danger" }) +
+
+ +
+ @Html.LabelFor(model => model.CurrValue, htmlAttributes: new { @class = "control-label col-md-2" }) +
+ @Html.EditorFor(model => model.CurrValue, new { htmlAttributes = new { @class = "form-control" } }) + @Html.ValidationMessageFor(model => model.CurrValue, "", new { @class = "text-danger" }) +
+
+ +
+
+ +
+
+
+} + +
+ @Html.ActionLink("Back to List", "Index") +
+ +@section Scripts { + @Scripts.Render("~/bundles/jqueryval") +} diff --git a/StockManMVC/Views/Items/Index.cshtml b/StockManMVC/Views/Items/Index.cshtml new file mode 100644 index 0000000..96babb8 --- /dev/null +++ b/StockManMVC/Views/Items/Index.cshtml @@ -0,0 +1,75 @@ +@model IEnumerable + +@{ + ViewBag.Title = "Anagrafica Articoli"; +} + +

Anagrafica Articoli

+ +

+ @Html.ActionLink("Create New", "Create") +

+ + + + + + + + + + + + + +@foreach (var item in Model) { + + + + + + + + + + + +} + +
+ @Html.DisplayNameFor(model => model.Descr) + + @Html.DisplayNameFor(model => model.CodInt) + + @Html.DisplayNameFor(model => model.Family) + + @Html.DisplayNameFor(model => model.CodExt) + + @Html.DisplayNameFor(model => model.DescrExt) + + @Html.DisplayNameFor(model => model.QtaMin) + + @Html.DisplayNameFor(model => model.QtaBatch) + + @Html.DisplayNameFor(model => model.CurrValue) +
+ @Html.DisplayFor(modelItem => item.Descr) + + @Html.DisplayFor(modelItem => item.CodInt) + + @Html.DisplayFor(modelItem => item.Family) + + @Html.DisplayFor(modelItem => item.CodExt) + + @Html.DisplayFor(modelItem => item.DescrExt) + + @Html.DisplayFor(modelItem => item.QtaMin) + + @Html.DisplayFor(modelItem => item.QtaBatch) + + @Html.DisplayFor(modelItem => item.CurrValue) + + @Html.ActionLink("Edit", "Edit", new { id=item.ID }) | + @Html.ActionLink("Details", "Details", new { id=item.ID }) | + @Html.ActionLink("Delete", "Delete", new { id=item.ID }) +
diff --git a/StockManMVC/Views/Shared/_Layout.cshtml b/StockManMVC/Views/Shared/_Layout.cshtml index b53a7d5..59858a7 100644 --- a/StockManMVC/Views/Shared/_Layout.cshtml +++ b/StockManMVC/Views/Shared/_Layout.cshtml @@ -23,12 +23,13 @@
  • @Html.ActionLink("Home", "Index", "Home")
  • @*
  • @Html.ActionLink("About", "About", "Home")
  • @Html.ActionLink("Contact", "Contact", "Home")
  • *@ -
  • @Html.ActionLink("Items", "Index", "Items")
  • -
  • @Html.ActionLink("Stock", "Index", "ItemStocks")
  • -
  • @Html.ActionLink("Flux", "Index", "ItemFluxs")
  • -
  • @Html.ActionLink("Locations", "Index", "Locations")
  • -
  • @Html.ActionLink("Location Type", "Index", "LocTypes")
  • -
  • @Html.ActionLink("Move Type", "Index", "MovTypes")
  • +
  • @Html.ActionLink("Articoli", "Index", "Items")
  • +
  • @Html.ActionLink("Magazzino Articoli", "Index", "ItemStockStatus")
  • + @*
  • @Html.ActionLink("Stock", "Index", "ItemStocks")
  • +
  • @Html.ActionLink("Flux", "Index", "ItemFluxes")
  • *@ +
  • @Html.ActionLink("Posizioni", "Index", "Locations")
  • +
  • @Html.ActionLink("Tipo Posizioni", "Index", "LocTypes")
  • +
  • @Html.ActionLink("Tipo Movimenti", "Index", "MovTypes")
  • diff --git a/StockManMVC/bin/StockManMVC.dll b/StockManMVC/bin/StockManMVC.dll index 5625de4..9cefc67 100644 Binary files a/StockManMVC/bin/StockManMVC.dll and b/StockManMVC/bin/StockManMVC.dll differ