Retail_manager/RMWPFUserInterface/Models/ProductDisplayModel.cs

37 lines
1013 B
C#
Raw Normal View History

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));
}
}
}