Exemple #1
0
 internal void ReInitialize()
 {
     CloseTillModel                  = new CloseTillModel();
     SelectedCloseTillTenders        = null;
     IsReportVisible                 = false;
     IsBillCoinGridVisible           = false;
     IsExitButtonEnable              = true;
     IsCompleteTillCloseButtonEnable = true;
     IsBillCoinCounterEnable         = true;
 }
Exemple #2
0
        private async void SetCloseTillResponse(CloseTill response)
        {
            if (response != null)
            {
                response.BillCoins = response.BillCoins ?? new List <BillCoins>();
                response.Tenders   = response.Tenders ?? new List <CloseTillTenders>();

                var billCoins = (from b in response.BillCoins
                                 select new BillCoinsModel
                {
                    Amount = b.Amount,
                    Description = b.Description,
                    Value = b.Value
                }).ToList();

                var closeTillTenders = (from t in response.Tenders
                                        select new CloseTillTendersModel
                {
                    Count = t.Count,
                    Difference = t.Difference,
                    Entered = t.Entered,
                    System = t.System,
                    Tender = t.Tender
                }).ToList();


                CloseTillModel = new CloseTillModel
                {
                    Total               = response.Total,
                    BillCoins           = new ObservableCollection <BillCoinsModel>(billCoins),
                    Tenders             = new ObservableCollection <CloseTillTendersModel>(closeTillTenders),
                    ShowBillCoins       = response.ShowBillCoins,
                    ShowDifferenceField = response.ShowDifferenceField,
                    ShowEnteredField    = response.ShowEnteredField,
                    ShowSystemField     = response.ShowSystemField,
                    LineDisplay         = response.LineDisplay
                };

                SetVisibilityOfGrid();

                // Adding wait for the keyboard closing
                await Task.Delay(500);

                MessengerInstance.Send(new CloseKeyboardMessage());
            }
        }