Ejemplo n.º 1
0
        private async Task AddPaymentStatuses()
        {
            var viewModel = new PaymentStatusDetailViewModel(new PaymentStatusTableViewModel(), _paymentStatusStore, _pageService);

            viewModel.PaymentStatusAdded += (source, module) =>
            {
                PaymentStatus.Add(new PaymentStatusTableViewModel(module));
            };

            await _pageService.PushModalAsync(new PaymentStatusDetailPage(viewModel));
        }
Ejemplo n.º 2
0
        private async Task SelectPaymentStatuses(PaymentStatusTableViewModel paymentStatus)
        {
            if (paymentStatus == null)
            {
                return;
            }

            SelectedPaymentStatus = null;

            var viewModel = new PaymentStatusDetailViewModel(paymentStatus, _paymentStatusStore, _pageService);

            viewModel.PaymentStatusUpdated += (source, updatePaymentStatus) =>
            {
                paymentStatus.Id         = updatePaymentStatus.id;
                paymentStatus.StudentID  = updatePaymentStatus.studentID;
                paymentStatus.CourseID   = updatePaymentStatus.courseID;
                paymentStatus.AmountPaid = updatePaymentStatus.amountPaid;
                paymentStatus.Fee        = updatePaymentStatus.fee;
                paymentStatus.Date       = updatePaymentStatus.date;
            };

            await _pageService.PushModalAsync(new PaymentStatusDetailPage(viewModel));
        }