Add transaction list

This commit is contained in:
2016-08-29 14:43:26 -04:00
parent b57c5ae41c
commit 016f031664
11 changed files with 124 additions and 26 deletions
@@ -14,6 +14,8 @@ namespace InventoryTraker.Web.Models
public string Name { get; set; }
public int UnitsPerCase { get; set; }
public string ContainerType { get; set; }
public DateTime ExpirationDate { get; set; }
public DateTime AddedDate { get; set; }
[Required]
public int AddedQuantity { get; set; }
@@ -37,6 +39,10 @@ namespace InventoryTraker.Web.Models
configuration.CreateMap<Transaction, TransactionViewModel>()
.ForMember(d => d.Name,
opt => opt.MapFrom(s => s.Inventory.InventoryType.Name))
.ForMember(d => d.ExpirationDate,
opt => opt.MapFrom(s => s.Inventory.ExpirationDate))
.ForMember(d => d.AddedDate,
opt => opt.MapFrom(s => s.Inventory.AddedDate))
.ForMember(d => d.UnitsPerCase,
opt => opt.MapFrom(s => s.Inventory.InventoryType.UnitsPerCase))
.ForMember(d => d.ContainerType,