OrderViewModel.cs 793 B

1234567891011121314151617181920212223242526
  1. using examPrepare.Models;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace examPrepare.ViewModels
  9. {
  10. public class OrderViewModel : INotifyPropertyChanged
  11. {
  12. private List<ProductModel> _products = new List<ProductModel>();
  13. public List<ProductModel> Products { get { return _products; } set { _products = value; OnPropertyChanged("Products"); } }
  14. public string orderNumber { get; set; } = String.Empty;
  15. public OrderViewModel()
  16. {
  17. }
  18. public event PropertyChangedEventHandler PropertyChanged;
  19. protected void OnPropertyChanged(string propertyName)
  20. {
  21. PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
  22. }
  23. }
  24. }