using BPA.Message;
using BPA.Message.Enum;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.ObjectModel;
using Microsoft.Toolkit.Mvvm.ComponentModel;

namespace BPASmartClient.Model
{
    public class OrderData : ObservableObject
    {
        public bool IsAllSelect
        {
            get { return _mIsAllSelect; }
            set
            {
                _mIsAllSelect = value;
                OnPropertyChanged();
                for (int i = 0; i < morkOrderPushes.Count; i++)
                {
                    morkOrderPushes.ElementAt(i).IsSelected = value;
                }
            }
        }
        private bool _mIsAllSelect;


        public string DeviceId { get { return _mDeviceId; } set { _mDeviceId = value; OnPropertyChanged(); } }
        private string _mDeviceId;

        public ObservableCollection<MorkOrder> morkOrderPushes { get; set; } = new ObservableCollection<MorkOrder>();

    }

    public class MorkOrder : ObservableObject
    {
        public bool IsSelected { get { return _mIsSelected; } set { _mIsSelected = value; OnPropertyChanged(); } }
        private bool _mIsSelected = true;

        public MorkOrderPush OrderPush { get { return _mOrderPush; } set { _mOrderPush = value; OnPropertyChanged(); } }
        private MorkOrderPush _mOrderPush = new MorkOrderPush();

        public ORDER_STATUS OrderStatus { get { return _mOrderStatus; } set { _mOrderStatus = value; OnPropertyChanged(); } }
        private ORDER_STATUS _mOrderStatus;

        public string StartDate { get { return _mStartDate; } set { _mStartDate = value; OnPropertyChanged(); } }
        private string _mStartDate = string.Empty;

        public string EndDate { get { return _mEndDate; } set { _mEndDate = value; OnPropertyChanged(); } }
        private string _mEndDate = string.Empty;

        public string CompleteDate { get { return _mCompleteDate; } set { _mCompleteDate = value; OnPropertyChanged(); } }
        private string _mCompleteDate = string.Empty;
    }



}
