예제 #1
0
        protected async override void OnAppearing()
        {
            try
            {
                ShowBusy(MessageHelper.Loading);
                var result = await Task.Run(() => _accountStatementService.GetAllService(houseId));

                this.stmtModel = result;
                Title          = MessageHelper.AccountStatement + stmtModel.House.Name;

                var advanceStatemntViewModel = stmtModel.Accounts.Select(c => new AdvanceAccountStatementViewModel
                {
                    Date           = c.ValueDate,
                    Doc            = Convert.ToString(c.DocumentNumber),
                    Description    = c.Description,
                    Debit          = c.DebitAmount,
                    Credit         = c.CreditAmount,
                    AdvanceBalance = c.DuesBalance,
                });
                AccountStatementView.ItemsSource = advanceStatemntViewModel;
                GridVisibility.IsVisible         = true;
            }
            catch (Exception)
            {
                if (!CrossConnectivity.Current.IsConnected)
                {
                    UserDialogs.Instance.ErrorToast(MessageHelper.NoInternet);
                }
            }
            finally
            {
                HideBusy();
            }
            base.OnAppearing();
        }
예제 #2
0
        protected async override void OnAppearing()
        {
            var result = _accountStatementService.GetAllService(houseId);

            this.stmtModel = result.Result;
            Title          = "Advance Account Statement of " + stmtModel.house.name;

            var advanceStatemntViewModel = stmtModel.accounts.Select(c => new AdvanceAccountStatementViewModel
            {
                Date           = c.value_date,
                Doc            = Convert.ToString(c.document_num),
                Description    = c.description,
                Debit          = c.debit_amount,
                Credit         = c.credit_amount,
                AdvanceBalance = c.dues_balance,
            });

            AccountStatementView.ItemsSource = advanceStatemntViewModel;
            base.OnAppearing();
        }