public VoidItemViewModel(Manifest manifest, FiltersEvent filtersEvent) { ItemType = Model.Filters.ExpandItem(manifest.ItemType)?.Value ?? manifest.ItemType; PrimePrice = manifest.PrimePrice; RegularPrice = manifest.RegularPrice; this.manifest = manifest; ItemsUpdatedWeakEventManager.AddHandler(filtersEvent, OnItemsFilterUpdated); }
public DailyDealViewModel(DailyDeal dailyDeal, FiltersEvent filtersEvent) { this.dailyDeal = dailyDeal; Activation = Tools.Time.ToDateTime(dailyDeal.Activation.Date.NumberLong); Expiry = Tools.Time.ToDateTime(dailyDeal.Expiry.Date.NumberLong); StoreItem = Model.Filters.ExpandItem(dailyDeal.StoreItem)?.Value ?? dailyDeal.StoreItem; StoreItemOriginal = dailyDeal.StoreItem; Discount = dailyDeal.Discount; OriginalPrice = dailyDeal.OriginalPrice; SalePrice = dailyDeal.SalePrice; AmountTotal = dailyDeal.AmountTotal; AmountSold = dailyDeal.AmountSold; Update(); ItemsUpdatedWeakEventManager.AddHandler(filtersEvent, OnItemsFilterUpdated); }