async void Handle_Clicked(object sender, System.EventArgs e) { var button = (Button)sender; item = (Transaction)button.CommandParameter; if (item._actionType.ToLower().Equals("refund full")) { var res = await service.GetReceipt(App.Current.Properties["defaultPid"].ToString(), item.transactionNo); if (res != null) { var detailPage = new RefundPage() { tenantName = res.givenName + " " + res.familyName, blockUnitName = item.blockNo + ", " + res.unitNo, receiptDetailList = res.receiptDetailList, bank = res.bank, checkNumber = res.chequeNo, facilityImage = res.facilityImage, totalPayment = res.totalPayment, bookingId = item.bookingID, paymentMethod = res.paymentMethod }; await Navigation.PushAsync(detailPage); } } else if (item._actionType.ToLower().Equals("refund deposit")) { confirmModal.IsVisible = true; } }
async void Second_Clicked(object sender, System.EventArgs e) { var button = (Button)sender; selectedBooking = button.CommandParameter as Booking; if (button.Text.ToLower().Equals("cancel reservation")) { reservationCancelModal.IsVisible = true; } else if (button.Text.ToLower().Equals("cancel booking")) //private booking { if (selectedBooking.invoiceNo.ToLower().Equals("private")) { bookingCancelModal.IsVisible = true; } else { var res = await service.GetReceipt(App.Current.Properties["defaultPid"].ToString(), selectedBooking.receiptNo); if (res != null) { var detailPage = new RefundPage() { tenantName = res.givenName + " " + res.familyName, blockUnitName = res.unitNo, receiptDetailList = res.receiptDetailList, facilityImage = res.facilityImage, totalPayment = res.totalPayment, bookingId = selectedBooking.bookingID, bank = res.bank, checkNumber = res.chequeNo, paymentMethod = res.paymentMethod, }; await Navigation.PushAsync(detailPage); } } } else if (button.Text.ToLower().Equals("forfeited")) { forfeitModal.IsVisible = true; } }