diff --git a/StockManMVC/Controllers/ItemsController.cs b/StockManMVC/Controllers/ItemsController.cs deleted file mode 100644 index d33499f..0000000 --- a/StockManMVC/Controllers/ItemsController.cs +++ /dev/null @@ -1,127 +0,0 @@ -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.Items.ToList()); - } - - // GET: Items/Details/5 - public ActionResult Details(int? id) - { - if (id == null) - { - return new HttpStatusCodeResult(HttpStatusCode.BadRequest); - } - Items items = db.Items.Find(id); - if (items == null) - { - return HttpNotFound(); - } - return View(items); - } - - // 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,Family,DescrExt,CodExt,CodInt,QtaMin,QtaBatch,Value")] Items items) - { - if (ModelState.IsValid) - { - db.Items.Add(items); - db.SaveChanges(); - return RedirectToAction("Index"); - } - - return View(items); - } - - // GET: Items/Edit/5 - public ActionResult Edit(int? id) - { - if (id == null) - { - return new HttpStatusCodeResult(HttpStatusCode.BadRequest); - } - Items items = db.Items.Find(id); - if (items == null) - { - return HttpNotFound(); - } - return View(items); - } - - // 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,Family,DescrExt,CodExt,CodInt,QtaMin,QtaBatch,Value")] Items items) - { - if (ModelState.IsValid) - { - db.Entry(items).State = EntityState.Modified; - db.SaveChanges(); - return RedirectToAction("Index"); - } - return View(items); - } - - // GET: Items/Delete/5 - public ActionResult Delete(int? id) - { - if (id == null) - { - return new HttpStatusCodeResult(HttpStatusCode.BadRequest); - } - Items items = db.Items.Find(id); - if (items == null) - { - return HttpNotFound(); - } - return View(items); - } - - // POST: Items/Delete/5 - [HttpPost, ActionName("Delete")] - [ValidateAntiForgeryToken] - public ActionResult DeleteConfirmed(int id) - { - Items items = db.Items.Find(id); - db.Items.Remove(items); - db.SaveChanges(); - return RedirectToAction("Index"); - } - - protected override void Dispose(bool disposing) - { - if (disposing) - { - db.Dispose(); - } - base.Dispose(disposing); - } - } -} diff --git a/StockManMVC/Controllers/LocTypesController.cs b/StockManMVC/Controllers/LocTypesController.cs index 458170f..5486a61 100644 --- a/StockManMVC/Controllers/LocTypesController.cs +++ b/StockManMVC/Controllers/LocTypesController.cs @@ -46,7 +46,7 @@ namespace StockManMVC.Controllers // more details see http://go.microsoft.com/fwlink/?LinkId=317598. [HttpPost] [ValidateAntiForgeryToken] - public ActionResult Create([Bind(Include = "ID,Descr")] LocType locType) + public ActionResult Create([Bind(Include = "ID,Descr,IsStock,IsCli,IsFor")] LocType locType) { if (ModelState.IsValid) { @@ -78,7 +78,7 @@ namespace StockManMVC.Controllers // more details see http://go.microsoft.com/fwlink/?LinkId=317598. [HttpPost] [ValidateAntiForgeryToken] - public ActionResult Edit([Bind(Include = "ID,Descr")] LocType locType) + public ActionResult Edit([Bind(Include = "ID,Descr,IsStock,IsCli,IsFor")] LocType locType) { if (ModelState.IsValid) { diff --git a/StockManMVC/Controllers/StockMovsController.cs b/StockManMVC/Controllers/StockMovsController.cs deleted file mode 100644 index e59e632..0000000 --- a/StockManMVC/Controllers/StockMovsController.cs +++ /dev/null @@ -1,136 +0,0 @@ -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 StockMovsController : Controller - { - private StockManEntities db = new StockManEntities(); - - // GET: StockMovs - public ActionResult Index() - { - var stockMov = db.StockMov.Include(s => s.MovType).Include(s => s.Stock); - return View(stockMov.ToList()); - } - - // GET: StockMovs/Details/5 - public ActionResult Details(int? id) - { - if (id == null) - { - return new HttpStatusCodeResult(HttpStatusCode.BadRequest); - } - StockMov stockMov = db.StockMov.Find(id); - if (stockMov == null) - { - return HttpNotFound(); - } - return View(stockMov); - } - - // GET: StockMovs/Create - public ActionResult Create() - { - ViewBag.MovTypeID = new SelectList(db.MovType, "ID", "Descr"); - ViewBag.ItemID = new SelectList(db.Stock, "ItemID", "Note"); - return View(); - } - - // POST: StockMovs/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 = "ItemID,LocationID,dtMov,Qta,Note,dtExport,MovTypeID")] StockMov stockMov) - { - if (ModelState.IsValid) - { - db.StockMov.Add(stockMov); - db.SaveChanges(); - return RedirectToAction("Index"); - } - - ViewBag.MovTypeID = new SelectList(db.MovType, "ID", "Descr", stockMov.MovTypeID); - ViewBag.ItemID = new SelectList(db.Stock, "ItemID", "Note", stockMov.ItemID); - return View(stockMov); - } - - // GET: StockMovs/Edit/5 - public ActionResult Edit(int? id) - { - if (id == null) - { - return new HttpStatusCodeResult(HttpStatusCode.BadRequest); - } - StockMov stockMov = db.StockMov.Find(id); - if (stockMov == null) - { - return HttpNotFound(); - } - ViewBag.MovTypeID = new SelectList(db.MovType, "ID", "Descr", stockMov.MovTypeID); - ViewBag.ItemID = new SelectList(db.Stock, "ItemID", "Note", stockMov.ItemID); - return View(stockMov); - } - - // POST: StockMovs/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 = "ItemID,LocationID,dtMov,Qta,Note,dtExport,MovTypeID")] StockMov stockMov) - { - if (ModelState.IsValid) - { - db.Entry(stockMov).State = EntityState.Modified; - db.SaveChanges(); - return RedirectToAction("Index"); - } - ViewBag.MovTypeID = new SelectList(db.MovType, "ID", "Descr", stockMov.MovTypeID); - ViewBag.ItemID = new SelectList(db.Stock, "ItemID", "Note", stockMov.ItemID); - return View(stockMov); - } - - // GET: StockMovs/Delete/5 - public ActionResult Delete(int? id) - { - if (id == null) - { - return new HttpStatusCodeResult(HttpStatusCode.BadRequest); - } - StockMov stockMov = db.StockMov.Find(id); - if (stockMov == null) - { - return HttpNotFound(); - } - return View(stockMov); - } - - // POST: StockMovs/Delete/5 - [HttpPost, ActionName("Delete")] - [ValidateAntiForgeryToken] - public ActionResult DeleteConfirmed(int id) - { - StockMov stockMov = db.StockMov.Find(id); - db.StockMov.Remove(stockMov); - db.SaveChanges(); - return RedirectToAction("Index"); - } - - protected override void Dispose(bool disposing) - { - if (disposing) - { - db.Dispose(); - } - base.Dispose(disposing); - } - } -} diff --git a/StockManMVC/Controllers/StocksController.cs b/StockManMVC/Controllers/StocksController.cs deleted file mode 100644 index 67d7bea..0000000 --- a/StockManMVC/Controllers/StocksController.cs +++ /dev/null @@ -1,136 +0,0 @@ -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 StocksController : Controller - { - private StockManEntities db = new StockManEntities(); - - // GET: Stocks - public ActionResult Index() - { - var stock = db.Stock.Include(s => s.Location).Include(s => s.Items); - return View(stock.ToList()); - } - - // GET: Stocks/Details/5 - public ActionResult Details(int? id) - { - if (id == null) - { - return new HttpStatusCodeResult(HttpStatusCode.BadRequest); - } - Stock stock = db.Stock.Find(id); - if (stock == null) - { - return HttpNotFound(); - } - return View(stock); - } - - // GET: Stocks/Create - public ActionResult Create() - { - ViewBag.LocationID = new SelectList(db.Location, "ID", "Descr"); - ViewBag.ItemID = new SelectList(db.Items, "ID", "Descr"); - return View(); - } - - // POST: Stocks/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 = "ItemID,LocationID,QtyConf,Note,dtLastUpd")] Stock stock) - { - if (ModelState.IsValid) - { - db.Stock.Add(stock); - db.SaveChanges(); - return RedirectToAction("Index"); - } - - ViewBag.LocationID = new SelectList(db.Location, "ID", "Descr", stock.LocationID); - ViewBag.ItemID = new SelectList(db.Items, "ID", "Descr", stock.ItemID); - return View(stock); - } - - // GET: Stocks/Edit/5 - public ActionResult Edit(int? id) - { - if (id == null) - { - return new HttpStatusCodeResult(HttpStatusCode.BadRequest); - } - Stock stock = db.Stock.Find(id); - if (stock == null) - { - return HttpNotFound(); - } - ViewBag.LocationID = new SelectList(db.Location, "ID", "Descr", stock.LocationID); - ViewBag.ItemID = new SelectList(db.Items, "ID", "Descr", stock.ItemID); - return View(stock); - } - - // POST: Stocks/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 = "ItemID,LocationID,QtyConf,Note,dtLastUpd")] Stock stock) - { - if (ModelState.IsValid) - { - db.Entry(stock).State = EntityState.Modified; - db.SaveChanges(); - return RedirectToAction("Index"); - } - ViewBag.LocationID = new SelectList(db.Location, "ID", "Descr", stock.LocationID); - ViewBag.ItemID = new SelectList(db.Items, "ID", "Descr", stock.ItemID); - return View(stock); - } - - // GET: Stocks/Delete/5 - public ActionResult Delete(int? id) - { - if (id == null) - { - return new HttpStatusCodeResult(HttpStatusCode.BadRequest); - } - Stock stock = db.Stock.Find(id); - if (stock == null) - { - return HttpNotFound(); - } - return View(stock); - } - - // POST: Stocks/Delete/5 - [HttpPost, ActionName("Delete")] - [ValidateAntiForgeryToken] - public ActionResult DeleteConfirmed(int id) - { - Stock stock = db.Stock.Find(id); - db.Stock.Remove(stock); - db.SaveChanges(); - return RedirectToAction("Index"); - } - - protected override void Dispose(bool disposing) - { - if (disposing) - { - db.Dispose(); - } - base.Dispose(disposing); - } - } -} diff --git a/StockManMVC/Models/Items.cs b/StockManMVC/Models/Item.cs similarity index 70% rename from StockManMVC/Models/Items.cs rename to StockManMVC/Models/Item.cs index 9a782aa..6a91582 100644 --- a/StockManMVC/Models/Items.cs +++ b/StockManMVC/Models/Item.cs @@ -12,25 +12,28 @@ namespace StockManMVC.Models using System; using System.Collections.Generic; - public partial class Items + public partial class Item { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] - public Items() + public Item() { - this.Stock = new HashSet(); + this.ItemFlux = new HashSet(); + this.ItemStock = new HashSet(); } public int ID { get; set; } public string Descr { get; set; } - public string Family { get; set; } - public string DescrExt { get; set; } - public string CodExt { 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 decimal Value { get; set; } + public decimal CurrValue { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection Stock { get; set; } + public virtual ICollection ItemFlux { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection ItemStock { get; set; } } } diff --git a/StockManMVC/Models/StockMov.cs b/StockManMVC/Models/ItemFlux.cs similarity index 73% rename from StockManMVC/Models/StockMov.cs rename to StockManMVC/Models/ItemFlux.cs index 62f4f95..3d398a0 100644 --- a/StockManMVC/Models/StockMov.cs +++ b/StockManMVC/Models/ItemFlux.cs @@ -12,17 +12,22 @@ namespace StockManMVC.Models using System; using System.Collections.Generic; - public partial class StockMov + public partial class ItemFlux { + public int ID { get; set; } public int ItemID { get; set; } public string LocationID { get; set; } + public string MovTypeID { get; set; } + public string ExtLocationID { get; set; } public System.DateTime dtMov { get; set; } public int Qta { get; set; } + public decimal TotValue { get; set; } + public Nullable UnitVal { get; set; } public string Note { get; set; } public Nullable dtExport { get; set; } - public string MovTypeID { get; set; } + public virtual Item Item { get; set; } + public virtual Location Location { get; set; } public virtual MovType MovType { get; set; } - public virtual Stock Stock { get; set; } } } diff --git a/StockManMVC/Models/Stock.cs b/StockManMVC/Models/ItemStock.cs similarity index 57% rename from StockManMVC/Models/Stock.cs rename to StockManMVC/Models/ItemStock.cs index 1a77407..d08a1d2 100644 --- a/StockManMVC/Models/Stock.cs +++ b/StockManMVC/Models/ItemStock.cs @@ -12,23 +12,16 @@ namespace StockManMVC.Models using System; using System.Collections.Generic; - public partial class Stock + public partial class ItemStock { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] - public Stock() - { - this.StockMov = new HashSet(); - } - + public int ID { get; set; } public int ItemID { get; set; } public string LocationID { get; set; } public int QtyConf { get; set; } public string Note { get; set; } - public Nullable dtLastUpd { get; set; } + public System.DateTime dtLastUpd { get; set; } - public virtual Items Items { get; set; } + public virtual Item Item { get; set; } public virtual Location Location { get; set; } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection StockMov { get; set; } } } diff --git a/StockManMVC/Models/LocType.cs b/StockManMVC/Models/LocType.cs index c5dc916..e2c13d7 100644 --- a/StockManMVC/Models/LocType.cs +++ b/StockManMVC/Models/LocType.cs @@ -22,6 +22,9 @@ namespace StockManMVC.Models public string ID { get; set; } public string Descr { get; set; } + public bool IsStock { get; set; } + public bool IsCli { get; set; } + public bool IsFor { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection Location { get; set; } diff --git a/StockManMVC/Models/Location.cs b/StockManMVC/Models/Location.cs index 662bf6b..399a0fd 100644 --- a/StockManMVC/Models/Location.cs +++ b/StockManMVC/Models/Location.cs @@ -17,15 +17,18 @@ namespace StockManMVC.Models [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public Location() { - this.Stock = new HashSet(); + this.ItemFlux = new HashSet(); + this.ItemStock = new HashSet(); } public string ID { get; set; } public string Descr { get; set; } public string LocTypeID { get; set; } - public virtual LocType LocType { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection Stock { get; set; } + public virtual ICollection ItemFlux { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection ItemStock { get; set; } + public virtual LocType LocType { get; set; } } } diff --git a/StockManMVC/Models/Metadata.cs b/StockManMVC/Models/Metadata.cs new file mode 100644 index 0000000..0ce1072 --- /dev/null +++ b/StockManMVC/Models/Metadata.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Web; + +namespace StockManMVC.Models +{ + public class ItemsMetadata + { + [StringLength(250)] + [Display(Name = "Descrizione Articolo")] + public string Descr; + + [StringLength(50)] + [Display(Name = "Famiglia Articolo")] + public string Family; + + [StringLength(250)] + [Display(Name = "Descrizione Articolo Ext")] + public string DescrExt; + + [StringLength(250)] + [Display(Name = "Cod Articolo Ext")] + public string CodExt; + + [StringLength(50)] + [Display(Name = "Cod Articolo Int")] + public string CodInt; + + } + + public class StocksMetadata + { + [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)] + [DataType(DataType.Date)] + public Nullable dtLastUpd; + } + + //public class EnrollmentMetadata + //{ + // [Range(0, 4)] + // public Nullable Grade; + //} +} diff --git a/StockManMVC/Models/MovType.cs b/StockManMVC/Models/MovType.cs index 98f3f7e..347eec1 100644 --- a/StockManMVC/Models/MovType.cs +++ b/StockManMVC/Models/MovType.cs @@ -17,13 +17,13 @@ namespace StockManMVC.Models [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] public MovType() { - this.StockMov = new HashSet(); + this.ItemFlux = new HashSet(); } public string ID { get; set; } public string Descr { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection StockMov { get; set; } + public virtual ICollection ItemFlux { get; set; } } } diff --git a/StockManMVC/Models/PartialClasses.cs b/StockManMVC/Models/PartialClasses.cs new file mode 100644 index 0000000..0f581f1 --- /dev/null +++ b/StockManMVC/Models/PartialClasses.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Web; + +namespace StockManMVC.Models +{ + [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 4e01a61..6f24c0e 100644 --- a/StockManMVC/Models/SMModel.Context.cs +++ b/StockManMVC/Models/SMModel.Context.cs @@ -25,11 +25,13 @@ namespace StockManMVC.Models throw new UnintentionalCodeFirstException(); } + public virtual DbSet Item { get; set; } + public virtual DbSet ItemFlux { get; set; } + public virtual DbSet ItemStock { get; set; } public virtual DbSet Location { get; set; } public virtual DbSet LocType { get; set; } public virtual DbSet MovType { get; set; } - public virtual DbSet Items { get; set; } - public virtual DbSet Stock { get; set; } - public virtual DbSet StockMov { get; set; } + public virtual DbSet vItemFlux2Save { get; set; } + public virtual DbSet vLocationVal { get; set; } } } diff --git a/StockManMVC/Models/SMModel.edmx b/StockManMVC/Models/SMModel.edmx index a994c33..94c4878 100644 --- a/StockManMVC/Models/SMModel.edmx +++ b/StockManMVC/Models/SMModel.edmx @@ -5,19 +5,46 @@ - + - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -32,7 +59,10 @@ - + + + + @@ -41,31 +71,49 @@ - + + - - - - - + + - + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + @@ -79,81 +127,84 @@ - - + + - + - + - + - + - - + + - + - - - - - - - - - - - - - - - + + + - - + + SELECT + [vItemFlux2Save].[ItemID] AS [ItemID], + [vItemFlux2Save].[TotQta] AS [TotQta], + [vItemFlux2Save].[TotVal] AS [TotVal] + FROM [dbo].[vItemFlux2Save] AS [vItemFlux2Save] + + + SELECT + [vLocationVal].[LocationID] AS [LocationID], + [vLocationVal].[TotVal] AS [TotVal] + FROM [dbo].[vLocationVal] AS [vLocationVal] + + + + + + + + + - - + + - + - - - - - + @@ -161,33 +212,87 @@ + + + - - - + + + + + - - - - - + + - + - + - + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -195,16 +300,20 @@ - - - + + + + - - + + + + + @@ -212,9 +321,84 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -226,107 +410,56 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -339,6 +472,9 @@ + + + @@ -352,42 +488,20 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + - - - - - - - - + + + + - diff --git a/StockManMVC/Models/SMModel.edmx.diagram b/StockManMVC/Models/SMModel.edmx.diagram index b551bdc..cf8331c 100644 --- a/StockManMVC/Models/SMModel.edmx.diagram +++ b/StockManMVC/Models/SMModel.edmx.diagram @@ -5,18 +5,21 @@ - - - - - - - + + + + + + + + + - + - - + + + \ No newline at end of file diff --git a/StockManMVC/Models/vItemFlux2Save.cs b/StockManMVC/Models/vItemFlux2Save.cs new file mode 100644 index 0000000..82d0184 --- /dev/null +++ b/StockManMVC/Models/vItemFlux2Save.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// +// 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 vItemFlux2Save + { + public int ItemID { get; set; } + public Nullable TotQta { get; set; } + public Nullable TotVal { get; set; } + } +} diff --git a/StockManMVC/Models/vLocationVal.cs b/StockManMVC/Models/vLocationVal.cs new file mode 100644 index 0000000..e2c4769 --- /dev/null +++ b/StockManMVC/Models/vLocationVal.cs @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +// +// 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 vLocationVal + { + public string LocationID { get; set; } + public Nullable TotVal { get; set; } + } +} diff --git a/StockManMVC/Properties/PublishProfiles/IIS01.pubxml b/StockManMVC/Properties/PublishProfiles/IIS01.pubxml new file mode 100644 index 0000000..c3192e8 --- /dev/null +++ b/StockManMVC/Properties/PublishProfiles/IIS01.pubxml @@ -0,0 +1,44 @@ + + + + + MSDeploy + False + Release + Any CPU + + True + True + True + False + DonotMerge + True + https://IIS01:8172/MsDeploy.axd + Default Web Site/StockMan + + False + WMSVC + True + steamw\administrator + <_SavePWD>True + + + + + + + + + + + + + + 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" + False + + + \ No newline at end of file diff --git a/StockManMVC/Properties/PublishProfiles/IIS01.pubxml.user b/StockManMVC/Properties/PublishProfiles/IIS01.pubxml.user new file mode 100644 index 0000000..4e81284 --- /dev/null +++ b/StockManMVC/Properties/PublishProfiles/IIS01.pubxml.user @@ -0,0 +1,11 @@ + + + + + + AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAH0adXzrANk+QkSQiwkrZoAAAAAACAAAAAAADZgAAwAAAABAAAAB0wAoouI5mFgpqPdW4WAs0AAAAAASAAACgAAAAEAAAAFgxGx8deTa0Rn4f7A3EOkAYAAAADATKYJM6fsjZYxcUxK0WU3LwspmiSZ0tFAAAAM1F/OQsTPYeJEHDZD6ydW+CPv1a + + \ No newline at end of file diff --git a/StockManMVC/Properties/PublishProfiles/IIS02.pubxml b/StockManMVC/Properties/PublishProfiles/IIS02.pubxml new file mode 100644 index 0000000..3f3cd9d --- /dev/null +++ b/StockManMVC/Properties/PublishProfiles/IIS02.pubxml @@ -0,0 +1,44 @@ + + + + + MSDeploy + False + Release + Any CPU + + True + True + https://IIS02:8172/MsDeploy.axd + Default Web Site/StockMan + + False + WMSVC + True + steamw\administrator + <_SavePWD>True + + + + + + + + + + + True + True + False + DonotMerge + + + + 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" + False + + + \ No newline at end of file diff --git a/StockManMVC/Properties/PublishProfiles/IIS02.pubxml.user b/StockManMVC/Properties/PublishProfiles/IIS02.pubxml.user new file mode 100644 index 0000000..c900ae5 --- /dev/null +++ b/StockManMVC/Properties/PublishProfiles/IIS02.pubxml.user @@ -0,0 +1,11 @@ + + + + + + AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAH0adXzrANk+QkSQiwkrZoAAAAAACAAAAAAADZgAAwAAAABAAAAAL4ykoVZpq6VvJoOMfqTDMAAAAAASAAACgAAAAEAAAAHXB2Qfiu7+Q1McLJF7uFbQYAAAAWLATeTGPoE9DeuieMmq4pfynUIyfYz/UFAAAAK9SNIIM14k0UnyiXT5Bgwp/AGYs + + \ No newline at end of file diff --git a/StockManMVC/StockManMVC.csproj b/StockManMVC/StockManMVC.csproj index 87652c8..bdf2fbf 100644 --- a/StockManMVC/StockManMVC.csproj +++ b/StockManMVC/StockManMVC.csproj @@ -153,17 +153,20 @@ - - - Global.asax - + + SMModel.tt + + + SMModel.tt + + SMModel.tt @@ -190,10 +193,10 @@ True SMModel.edmx - + SMModel.tt - + SMModel.tt @@ -234,6 +237,8 @@ SMModel.edmx + + @@ -266,36 +271,21 @@ - - - - - + + + + + - - - - - - - - - - - - - - - diff --git a/StockManMVC/StockManMVC.csproj.user b/StockManMVC/StockManMVC.csproj.user index a9216ea..eaf680a 100644 --- a/StockManMVC/StockManMVC.csproj.user +++ b/StockManMVC/StockManMVC.csproj.user @@ -12,6 +12,8 @@ StockManMVC.Models.StockManEntities True False + ShowAllFiles + IIS01 diff --git a/StockManMVC/Views/Items/Create.cshtml b/StockManMVC/Views/Items/Create.cshtml deleted file mode 100644 index 102ce0e..0000000 --- a/StockManMVC/Views/Items/Create.cshtml +++ /dev/null @@ -1,104 +0,0 @@ -@model StockManMVC.Models.Items - -@{ - ViewBag.Title = "Create"; -} - -

Create

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

Items

-
- @Html.ValidationSummary(true, "", new { @class = "text-danger" }) -
- @Html.LabelFor(model => model.ID, htmlAttributes: new { @class = "control-label col-md-2" }) -
- @Html.EditorFor(model => model.ID, new { htmlAttributes = new { @class = "form-control" } }) - @Html.ValidationMessageFor(model => model.ID, "", 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.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.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.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.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.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.Value, htmlAttributes: new { @class = "control-label col-md-2" }) -
- @Html.EditorFor(model => model.Value, new { htmlAttributes = new { @class = "form-control" } }) - @Html.ValidationMessageFor(model => model.Value, "", 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 deleted file mode 100644 index 425f7d2..0000000 --- a/StockManMVC/Views/Items/Delete.cshtml +++ /dev/null @@ -1,88 +0,0 @@ -@model StockManMVC.Models.Items - -@{ - ViewBag.Title = "Delete"; -} - -

Delete

- -

Are you sure you want to delete this?

-
-

Items

-
-
-
- @Html.DisplayNameFor(model => model.Descr) -
- -
- @Html.DisplayFor(model => model.Descr) -
- -
- @Html.DisplayNameFor(model => model.Family) -
- -
- @Html.DisplayFor(model => model.Family) -
- -
- @Html.DisplayNameFor(model => model.DescrExt) -
- -
- @Html.DisplayFor(model => model.DescrExt) -
- -
- @Html.DisplayNameFor(model => model.CodExt) -
- -
- @Html.DisplayFor(model => model.CodExt) -
- -
- @Html.DisplayNameFor(model => model.CodInt) -
- -
- @Html.DisplayFor(model => model.CodInt) -
- -
- @Html.DisplayNameFor(model => model.QtaMin) -
- -
- @Html.DisplayFor(model => model.QtaMin) -
- -
- @Html.DisplayNameFor(model => model.QtaBatch) -
- -
- @Html.DisplayFor(model => model.QtaBatch) -
- -
- @Html.DisplayNameFor(model => model.Value) -
- -
- @Html.DisplayFor(model => model.Value) -
- -
- - @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 deleted file mode 100644 index f2ba8aa..0000000 --- a/StockManMVC/Views/Items/Details.cshtml +++ /dev/null @@ -1,116 +0,0 @@ -@model StockManMVC.Models.Items - -@{ - ViewBag.Title = "Details"; -} - -

Details

- -
-

Items

-
-
-
-
-
- @Html.DisplayNameFor(model => model.Descr) -
- -
- @Html.DisplayFor(model => model.Descr) -
- -
- @Html.DisplayNameFor(model => model.Family) -
- -
- @Html.DisplayFor(model => model.Family) -
- -
- @Html.DisplayNameFor(model => model.DescrExt) -
- -
- @Html.DisplayFor(model => model.DescrExt) -
- -
- @Html.DisplayNameFor(model => model.CodExt) -
- -
- @Html.DisplayFor(model => model.CodExt) -
- -
- @Html.DisplayNameFor(model => model.CodInt) -
- -
- @Html.DisplayFor(model => model.CodInt) -
- -
- @Html.DisplayNameFor(model => model.QtaMin) -
- -
- @Html.DisplayFor(model => model.QtaMin) -
- -
- @Html.DisplayNameFor(model => model.QtaBatch) -
- -
- @Html.DisplayFor(model => model.QtaBatch) -
- -
- @Html.DisplayNameFor(model => model.Value) -
- -
- @Html.DisplayFor(model => model.Value) -
- -
-
-
- - - - - - - - @foreach (var item in Model.Stock) - { - - - - - - } -
- Location - - Qty - - Last upd. -
- @Html.DisplayFor(modelItem => item.Location.Descr) - - @Html.DisplayFor(modelItem => item.QtyConf) - - @Html.DisplayFor(modelItem => item.dtLastUpd) -
-
-
-
-

- @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 deleted file mode 100644 index e98c3f6..0000000 --- a/StockManMVC/Views/Items/Edit.cshtml +++ /dev/null @@ -1,98 +0,0 @@ -@model StockManMVC.Models.Items - -@{ - ViewBag.Title = "Edit"; -} - -

Edit

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

Items

-
- @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.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.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.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.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.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.Value, htmlAttributes: new { @class = "control-label col-md-2" }) -
- @Html.EditorFor(model => model.Value, new { htmlAttributes = new { @class = "form-control" } }) - @Html.ValidationMessageFor(model => model.Value, "", 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 deleted file mode 100644 index 6dc2998..0000000 --- a/StockManMVC/Views/Items/Index.cshtml +++ /dev/null @@ -1,75 +0,0 @@ -@model IEnumerable - -@{ - ViewBag.Title = "Index"; -} - -

Index

- -

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

- - - - - - - - - - - - - -@foreach (var item in Model) { - - - - - - - - - - - -} - -
- @Html.DisplayNameFor(model => model.Descr) - - @Html.DisplayNameFor(model => model.Family) - - @Html.DisplayNameFor(model => model.DescrExt) - - @Html.DisplayNameFor(model => model.CodExt) - - @Html.DisplayNameFor(model => model.CodInt) - - @Html.DisplayNameFor(model => model.QtaMin) - - @Html.DisplayNameFor(model => model.QtaBatch) - - @Html.DisplayNameFor(model => model.Value) -
- @Html.DisplayFor(modelItem => item.Descr) - - @Html.DisplayFor(modelItem => item.Family) - - @Html.DisplayFor(modelItem => item.DescrExt) - - @Html.DisplayFor(modelItem => item.CodExt) - - @Html.DisplayFor(modelItem => item.CodInt) - - @Html.DisplayFor(modelItem => item.QtaMin) - - @Html.DisplayFor(modelItem => item.QtaBatch) - - @Html.DisplayFor(modelItem => item.Value) - - @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/LocTypes/Create.cshtml b/StockManMVC/Views/LocTypes/Create.cshtml index 8a27464..1e23d3f 100644 --- a/StockManMVC/Views/LocTypes/Create.cshtml +++ b/StockManMVC/Views/LocTypes/Create.cshtml @@ -31,6 +31,36 @@ +
+ @Html.LabelFor(model => model.IsStock, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.IsStock) + @Html.ValidationMessageFor(model => model.IsStock, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.IsCli, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.IsCli) + @Html.ValidationMessageFor(model => model.IsCli, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.IsFor, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.IsFor) + @Html.ValidationMessageFor(model => model.IsFor, "", new { @class = "text-danger" }) +
+
+
+
diff --git a/StockManMVC/Views/LocTypes/Delete.cshtml b/StockManMVC/Views/LocTypes/Delete.cshtml index 66cf8e9..4ae576b 100644 --- a/StockManMVC/Views/LocTypes/Delete.cshtml +++ b/StockManMVC/Views/LocTypes/Delete.cshtml @@ -19,6 +19,30 @@ @Html.DisplayFor(model => model.Descr) +
+ @Html.DisplayNameFor(model => model.IsStock) +
+ +
+ @Html.DisplayFor(model => model.IsStock) +
+ +
+ @Html.DisplayNameFor(model => model.IsCli) +
+ +
+ @Html.DisplayFor(model => model.IsCli) +
+ +
+ @Html.DisplayNameFor(model => model.IsFor) +
+ +
+ @Html.DisplayFor(model => model.IsFor) +
+ @using (Html.BeginForm()) { diff --git a/StockManMVC/Views/LocTypes/Details.cshtml b/StockManMVC/Views/LocTypes/Details.cshtml index 927cb03..44bb5a5 100644 --- a/StockManMVC/Views/LocTypes/Details.cshtml +++ b/StockManMVC/Views/LocTypes/Details.cshtml @@ -18,6 +18,30 @@ @Html.DisplayFor(model => model.Descr) +
+ @Html.DisplayNameFor(model => model.IsStock) +
+ +
+ @Html.DisplayFor(model => model.IsStock) +
+ +
+ @Html.DisplayNameFor(model => model.IsCli) +
+ +
+ @Html.DisplayFor(model => model.IsCli) +
+ +
+ @Html.DisplayNameFor(model => model.IsFor) +
+ +
+ @Html.DisplayFor(model => model.IsFor) +
+

diff --git a/StockManMVC/Views/LocTypes/Edit.cshtml b/StockManMVC/Views/LocTypes/Edit.cshtml index 2091107..a111c31 100644 --- a/StockManMVC/Views/LocTypes/Edit.cshtml +++ b/StockManMVC/Views/LocTypes/Edit.cshtml @@ -25,6 +25,36 @@

+
+ @Html.LabelFor(model => model.IsStock, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.IsStock) + @Html.ValidationMessageFor(model => model.IsStock, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.IsCli, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.IsCli) + @Html.ValidationMessageFor(model => model.IsCli, "", new { @class = "text-danger" }) +
+
+
+ +
+ @Html.LabelFor(model => model.IsFor, htmlAttributes: new { @class = "control-label col-md-2" }) +
+
+ @Html.EditorFor(model => model.IsFor) + @Html.ValidationMessageFor(model => model.IsFor, "", new { @class = "text-danger" }) +
+
+
+
diff --git a/StockManMVC/Views/LocTypes/Index.cshtml b/StockManMVC/Views/LocTypes/Index.cshtml index e904831..14258d1 100644 --- a/StockManMVC/Views/LocTypes/Index.cshtml +++ b/StockManMVC/Views/LocTypes/Index.cshtml @@ -14,6 +14,15 @@ @Html.DisplayNameFor(model => model.Descr) + + @Html.DisplayNameFor(model => model.IsStock) + + + @Html.DisplayNameFor(model => model.IsCli) + + + @Html.DisplayNameFor(model => model.IsFor) + @@ -22,6 +31,15 @@ @Html.DisplayFor(modelItem => item.Descr) + + @Html.DisplayFor(modelItem => item.IsStock) + + + @Html.DisplayFor(modelItem => item.IsCli) + + + @Html.DisplayFor(modelItem => item.IsFor) + @Html.ActionLink("Edit", "Edit", new { id=item.ID }) | @Html.ActionLink("Details", "Details", new { id=item.ID }) | diff --git a/StockManMVC/Views/Locations/Index.cshtml b/StockManMVC/Views/Locations/Index.cshtml index c69bfa1..3b3aae8 100644 --- a/StockManMVC/Views/Locations/Index.cshtml +++ b/StockManMVC/Views/Locations/Index.cshtml @@ -9,7 +9,7 @@

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

- +
@Html.DisplayNameFor(model => model.Descr) diff --git a/StockManMVC/Views/Shared/_Layout.cshtml b/StockManMVC/Views/Shared/_Layout.cshtml index f712a5f..b53a7d5 100644 --- a/StockManMVC/Views/Shared/_Layout.cshtml +++ b/StockManMVC/Views/Shared/_Layout.cshtml @@ -24,8 +24,8 @@ @*
  • @Html.ActionLink("About", "About", "Home")
  • @Html.ActionLink("Contact", "Contact", "Home")
  • *@
  • @Html.ActionLink("Items", "Index", "Items")
  • -
  • @Html.ActionLink("Stock", "Index", "Stocks")
  • -
  • @Html.ActionLink("Stock Movs", "Index", "StockMovs")
  • +
  • @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")
  • diff --git a/StockManMVC/Views/StockMovs/Create.cshtml b/StockManMVC/Views/StockMovs/Create.cshtml deleted file mode 100644 index 18921e0..0000000 --- a/StockManMVC/Views/StockMovs/Create.cshtml +++ /dev/null @@ -1,88 +0,0 @@ -@model StockManMVC.Models.StockMov - -@{ - ViewBag.Title = "Create"; -} - -

    Create

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

    StockMov

    -
    - @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.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.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.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.ActionLink("Back to List", "Index") -
    - -@section Scripts { - @Scripts.Render("~/bundles/jqueryval") -} diff --git a/StockManMVC/Views/StockMovs/Delete.cshtml b/StockManMVC/Views/StockMovs/Delete.cshtml deleted file mode 100644 index 82665f2..0000000 --- a/StockManMVC/Views/StockMovs/Delete.cshtml +++ /dev/null @@ -1,64 +0,0 @@ -@model StockManMVC.Models.StockMov - -@{ - ViewBag.Title = "Delete"; -} - -

    Delete

    - -

    Are you sure you want to delete this?

    -
    -

    StockMov

    -
    -
    -
    - @Html.DisplayNameFor(model => model.Qta) -
    - -
    - @Html.DisplayFor(model => model.Qta) -
    - -
    - @Html.DisplayNameFor(model => model.Note) -
    - -
    - @Html.DisplayFor(model => model.Note) -
    - -
    - @Html.DisplayNameFor(model => model.dtExport) -
    - -
    - @Html.DisplayFor(model => model.dtExport) -
    - -
    - @Html.DisplayNameFor(model => model.MovType.Descr) -
    - -
    - @Html.DisplayFor(model => model.MovType.Descr) -
    - -
    - @Html.DisplayNameFor(model => model.Stock.Note) -
    - -
    - @Html.DisplayFor(model => model.Stock.Note) -
    - -
    - - @using (Html.BeginForm()) { - @Html.AntiForgeryToken() - -
    - | - @Html.ActionLink("Back to List", "Index") -
    - } -
    diff --git a/StockManMVC/Views/StockMovs/Details.cshtml b/StockManMVC/Views/StockMovs/Details.cshtml deleted file mode 100644 index c97c383..0000000 --- a/StockManMVC/Views/StockMovs/Details.cshtml +++ /dev/null @@ -1,58 +0,0 @@ -@model StockManMVC.Models.StockMov - -@{ - ViewBag.Title = "Details"; -} - -

    Details

    - -
    -

    StockMov

    -
    -
    -
    - @Html.DisplayNameFor(model => model.Qta) -
    - -
    - @Html.DisplayFor(model => model.Qta) -
    - -
    - @Html.DisplayNameFor(model => model.Note) -
    - -
    - @Html.DisplayFor(model => model.Note) -
    - -
    - @Html.DisplayNameFor(model => model.dtExport) -
    - -
    - @Html.DisplayFor(model => model.dtExport) -
    - -
    - @Html.DisplayNameFor(model => model.MovType.Descr) -
    - -
    - @Html.DisplayFor(model => model.MovType.Descr) -
    - -
    - @Html.DisplayNameFor(model => model.Stock.Note) -
    - -
    - @Html.DisplayFor(model => model.Stock.Note) -
    - -
    -
    -

    - @Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) | - @Html.ActionLink("Back to List", "Index") -

    diff --git a/StockManMVC/Views/StockMovs/Edit.cshtml b/StockManMVC/Views/StockMovs/Edit.cshtml deleted file mode 100644 index 6fffd2a..0000000 --- a/StockManMVC/Views/StockMovs/Edit.cshtml +++ /dev/null @@ -1,70 +0,0 @@ -@model StockManMVC.Models.StockMov - -@{ - ViewBag.Title = "Edit"; -} - -

    Edit

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

    StockMov

    -
    - @Html.ValidationSummary(true, "", new { @class = "text-danger" }) - @Html.HiddenFor(model => model.ItemID) - - @Html.HiddenFor(model => model.LocationID) - - @Html.HiddenFor(model => model.dtMov) - -
    - @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.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.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.ActionLink("Back to List", "Index") -
    - -@section Scripts { - @Scripts.Render("~/bundles/jqueryval") -} diff --git a/StockManMVC/Views/StockMovs/Index.cshtml b/StockManMVC/Views/StockMovs/Index.cshtml deleted file mode 100644 index 2a1358f..0000000 --- a/StockManMVC/Views/StockMovs/Index.cshtml +++ /dev/null @@ -1,57 +0,0 @@ -@model IEnumerable - -@{ - ViewBag.Title = "Index"; -} - -

    Index

    - -

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

    - - - - - - - - - - -@foreach (var item in Model) { - - - - - - - - -} - -
    - @Html.DisplayNameFor(model => model.Qta) - - @Html.DisplayNameFor(model => model.Note) - - @Html.DisplayNameFor(model => model.dtExport) - - @Html.DisplayNameFor(model => model.MovType.Descr) - - @Html.DisplayNameFor(model => model.Stock.Note) -
    - @Html.DisplayFor(modelItem => item.Qta) - - @Html.DisplayFor(modelItem => item.Note) - - @Html.DisplayFor(modelItem => item.dtExport) - - @Html.DisplayFor(modelItem => item.MovType.Descr) - - @Html.DisplayFor(modelItem => item.Stock.Note) - - @Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) | - @Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) | - @Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ }) -
    diff --git a/StockManMVC/Views/Stocks/Create.cshtml b/StockManMVC/Views/Stocks/Create.cshtml deleted file mode 100644 index 895307b..0000000 --- a/StockManMVC/Views/Stocks/Create.cshtml +++ /dev/null @@ -1,72 +0,0 @@ -@model StockManMVC.Models.Stock - -@{ - ViewBag.Title = "Create"; -} - -

    Create

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

    Stock

    -
    - @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/Stocks/Delete.cshtml b/StockManMVC/Views/Stocks/Delete.cshtml deleted file mode 100644 index 7c7772b..0000000 --- a/StockManMVC/Views/Stocks/Delete.cshtml +++ /dev/null @@ -1,64 +0,0 @@ -@model StockManMVC.Models.Stock - -@{ - ViewBag.Title = "Delete"; -} - -

    Delete

    - -

    Are you sure you want to delete this?

    -
    -

    Stock

    -
    -
    -
    - @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.Location.Descr) -
    - -
    - @Html.DisplayFor(model => model.Location.Descr) -
    - -
    - @Html.DisplayNameFor(model => model.Items.Descr) -
    - -
    - @Html.DisplayFor(model => model.Items.Descr) -
    - -
    - - @using (Html.BeginForm()) { - @Html.AntiForgeryToken() - -
    - | - @Html.ActionLink("Back to List", "Index") -
    - } -
    diff --git a/StockManMVC/Views/Stocks/Details.cshtml b/StockManMVC/Views/Stocks/Details.cshtml deleted file mode 100644 index 3a2f45d..0000000 --- a/StockManMVC/Views/Stocks/Details.cshtml +++ /dev/null @@ -1,98 +0,0 @@ -@model StockManMVC.Models.Stock - -@{ - ViewBag.Title = "Details"; -} - -

    Details

    - -
    -

    Stock

    -
    -
    -
    -
    -
    - @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.Location.Descr) -
    - -
    - @Html.DisplayFor(model => model.Location.Descr) -
    - -
    - @Html.DisplayNameFor(model => model.Items.Descr) -
    - -
    - @Html.DisplayFor(model => model.Items.Descr) -
    - -
    -
    -
    - - - - - - - - - @foreach (var item in Model.StockMov) - { - - - - - - - } -
    - Data Mov - - Type - - Qty - - Note -
    - @Html.DisplayFor(modelItem => item.dtMov) - - @Html.DisplayFor(modelItem => item.MovType.Descr) - - @Html.DisplayFor(modelItem => item.Qta) - - @Html.DisplayFor(modelItem => item.Note) -
    -
    -
    -
    -

    - @Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) | - @Html.ActionLink("Back to List", "Index") -

    diff --git a/StockManMVC/Views/Stocks/Edit.cshtml b/StockManMVC/Views/Stocks/Edit.cshtml deleted file mode 100644 index c05201b..0000000 --- a/StockManMVC/Views/Stocks/Edit.cshtml +++ /dev/null @@ -1,60 +0,0 @@ -@model StockManMVC.Models.Stock - -@{ - ViewBag.Title = "Edit"; -} - -

    Edit

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

    Stock

    -
    - @Html.ValidationSummary(true, "", new { @class = "text-danger" }) - @Html.HiddenFor(model => model.ItemID) - - @Html.HiddenFor(model => model.LocationID) - -
    - @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/Stocks/Index.cshtml b/StockManMVC/Views/Stocks/Index.cshtml deleted file mode 100644 index fadbe95..0000000 --- a/StockManMVC/Views/Stocks/Index.cshtml +++ /dev/null @@ -1,57 +0,0 @@ -@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.Location.Descr) - - @Html.DisplayNameFor(model => model.Items.Descr) -
    - @Html.DisplayFor(modelItem => item.QtyConf) - - @Html.DisplayFor(modelItem => item.Note) - - @Html.DisplayFor(modelItem => item.dtLastUpd) - - @Html.DisplayFor(modelItem => item.Location.Descr) - - @Html.DisplayFor(modelItem => item.Items.Descr) - - @Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) | - @Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) | - @Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ }) -
    diff --git a/StockManMVC/bin/StockManMVC.dll b/StockManMVC/bin/StockManMVC.dll index 2d92521..9b0a6ff 100644 Binary files a/StockManMVC/bin/StockManMVC.dll and b/StockManMVC/bin/StockManMVC.dll differ diff --git a/VersGen/obj/Release/TempPE/VersGen.cs.dll b/VersGen/obj/Release/TempPE/VersGen.cs.dll new file mode 100644 index 0000000..be39f58 Binary files /dev/null and b/VersGen/obj/Release/TempPE/VersGen.cs.dll differ diff --git a/VersGen/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/VersGen/obj/Release/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 0000000..e69de29 diff --git a/VersGen/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/VersGen/obj/Release/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 0000000..e69de29 diff --git a/VersGen/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/VersGen/obj/Release/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 0000000..e69de29