public DrvPackingSlipLineEditPageViewModel(PackingSlipLine line)
        {
            ClosePopupCommand      = new Command(() => ShowPopup = false);
            SubmitPopupCommand     = new AsyncDelegateCommand <PackReasonEventArgs>(OnSubmit);
            AddReasonCommand       = new AsyncDelegateCommand(OnAddReason);
            QuantityChangedCommand = new AsyncDelegateCommand(OnQuantityChanged);
            Line  = line;
            Title = $"{nameof(AppResources.EditLine).Translate()} {_line.Key}";
            var qtdList = new List <int>();

            for (int i = 0; i <= line.ShippedQuantity; i++)
            {
                qtdList.Add(i);
            }
            PackReasonList            = line.PackingReasonList.CloneJson() ?? new ObservableCollection <PackReasonEventArgs>();
            QuantityList              = new ObservableCollection <int>(qtdList);
            DeleteReasonCommand       = new Command <PackReasonEventArgs>(OnDeleteReason);
            SelectedDeliveredQuantity = qtdList.Last();
            RaisePropertyChanged(nameof(AvailableQuantity));
        }
 public DrvPackingSlipLineEditPage(PackingSlipLine line)
 {
     InitializeComponent();
     BindingContext = _vm = new DrvPackingSlipLineEditPageViewModel(line);
 }