コード例 #1
0
ファイル: CashDrawVM.cs プロジェクト: lulzzz/infonetpos_ui
        private void RemoveCashDrawList(ProductDataModel currency)
        {
            if (CashDrawModelList.Any(x => x.Tender.Equals(currency.Description)))
            {
                var cashDrawModel = CashDrawModelList.FirstOrDefault(x => x.Tender.Equals(currency.Description));
                CashDrawModelList.Remove(cashDrawModel);
            }

            IsCompleteEnabled = IsCashTenderEmpty();
        }
コード例 #2
0
ファイル: CashDrawVM.cs プロジェクト: lulzzz/infonetpos_ui
        private void UpdateCashDrawList(ProductDataModel currency)
        {
            if (CashDrawModelList.Any(x => x.Tender.Equals(currency.Description)))
            {
                CashDrawModelList.FirstOrDefault(x => x.Tender.Equals(currency.Description)).Amount
                    = currency.Quantity * currency.Value;
            }
            else
            {
                CashDrawModelList.Add(new CashDrawModel
                {
                    Value  = currency.Value.ToString(CultureInfo.InvariantCulture),
                    Amount = currency.Value * currency.Quantity,
                    Tender = currency.Description
                });

                IsCompleteEnabled = IsCashTenderEmpty();
            }
        }