コード例 #1
0
        private async Task GetCashButtons()
        {
            var response = await _cashBussinessLogic.GetCashButtons();

            CashButtons.Clear();
            foreach (var button in response)
            {
                CashButtons.Add(new CashButtonModel
                {
                    Button = button.Button,
                    Value  = button.Value
                });
            }
        }
コード例 #2
0
        private async Task GetCashButtons()
        {
            var cashButtons = await _fuelPumpBusinessLogic.GetManualCashButtons();

            CashButtons?.Clear();
            if (cashButtons?.Count > 0)
            {
                CashButtons = new ObservableCollection <CashButtonModel>(
                    from c in cashButtons
                    select new CashButtonModel
                {
                    Button = c.Button,
                    Value  = c.Value
                });
            }
        }