Retail_manager/RMWPFUserInterface/Models/ProductDisplayModel.cs
s459315 4a4fc708c7 Update Cart Quantites
Add AutoMapper and INotifyPropertyChanged to enable cart quantity changes to be reflected
2022-07-27 14:57:33 +02:00

37 lines
1013 B
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RMWPFUserInterface.Models
{
public class ProductDisplayModel : INotifyPropertyChanged
{
public int Id { get; set; }
public string ProductName { get; set; }
public string Description { get; set; }
public decimal RetailPrice { get; set; }
private int _quantityInStock;
public int QuantityInStock
{
get { return _quantityInStock; }
set
{
_quantityInStock = value;
CallPropertyChanges(nameof(QuantityInStock));
}
}
public bool IsTaxable { get; set; }
public event PropertyChangedEventHandler PropertyChanged;
public void CallPropertyChanges(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}