async void First_Clicked(object sender, System.EventArgs e)
        {
            var button = (Button)sender;

            selectedBooking = button.CommandParameter as Booking;
            if (button.Text.ToLower().Equals("receipt"))
            {
                var res = await service.GetReceipt(App.Current.Properties["defaultPid"].ToString(), selectedBooking.receiptNo);

                if (res != null)
                {
                    await Navigation.PushAsync(new ReceiptDetailsPage(true, selectedBooking.bookingID)
                    {
                        //TBD
                        agencyName        = res.agencyName,
                        facilityName      = res.portfolioName,
                        strataTitle       = res.strataTitle,
                        agencyMobile      = res.agencyMobile,
                        agencyFax         = res.agencyFax,
                        website           = res.website,
                        givenName         = res.givenName,
                        familyName        = res.familyName,
                        blockNo           = selectedBooking.blockNo,
                        unitNo            = res.unitNo,
                        staffName         = res.staffName,
                        gstRegNo          = res.gstRegNo,
                        date              = res.date,
                        chequeNo          = res.chequeNo,
                        bank              = res.bank,
                        transactionType   = res.transactionType,
                        receiptDetailList = res.receiptDetailList,
                        paymentMethod     = res.paymentMethod,
                        receiptNo         = res.receiptNo,
                        totalPayment      = res.totalPayment
                    });
                }
                else
                {
                    await DisplayAlert("Error", Config.CommonErrorMsg, "OK");
                }
            }
            else if (button.Text.ToLower().Equals("confirm payment"))
            {
                var res = await service.ConfirmPayment(App.Current.Properties["defaultPid"].ToString(), selectedBooking.bookingID);

                if (res != null)
                {
                    BookingDetails bookingDetails = new BookingDetails()
                    {
                        bookingID    = res.bookingID,
                        totalPayment = (float)res.totalPayment,
                        depositFee   = selectedBooking.deposit,
                        remarks      = selectedBooking._statusRemark,
                        receiptNo    = selectedBooking.receiptNo,

                        confirmedBookingTimeSlotList = res.confirmedBookingTimeSlotList
                                                       //reminderList = selectedBooking.
                    };
                    await Navigation.PushAsync(new FacilityBookingDetailsPage(bookingDetails, true)
                    {
                        date         = DateTime.Parse(selectedBooking.bookingDate),
                        unitID       = selectedBooking.unitID,
                        facilityName = selectedBooking.facilityName,
                        facilityId   = selectedBooking.facilityId,
                    });
                }
            }
            else if (button.Text.ToLower().Equals("refund"))
            {
                refundModal.IsVisible = true;
            }
        }
        async void Confirm(object sender, System.EventArgs e)
        {
            var title = "Do you want to book?";

            if (paymentSegment.SelectedSegment == 2)
            {
                title = "Do you want to reserve?";
            }
            string[] messageList =
            {
                "This will confirm that payment by cash was received by you for booking",
                "This will confirm that payment by NETS was done by you for booking",
                "This will reserve the booking without payment"
            };
            if (reminderSegment.SelectedSegment == 1 && selectedResidentList.Count == 0)
            {
                warningLabel.Text = "Nobody selected for reminder";
                return;
            }
            var result = await DisplayAlert(title, messageList[paymentSegment.SelectedSegment], "OK", "Cancel");

            if (result)
            {
                var paymentMethodList = new List <string>();
                paymentMethodList.Add("Cash");
                paymentMethodList.Add("Nets");
                paymentMethodList.Add("Reserve");
                var confirmedBookingSlots = new List <ConfirmedBookingTimeSlot>();
                if (booking.confirmedBookingTimeSlotList != null)
                {
                    foreach (var item in booking.confirmedBookingTimeSlotList)
                    {
                        confirmedBookingSlots.Add(new ConfirmedBookingTimeSlot()
                        {
                            tid = item.tId
                        });
                    }
                }

                string selectedDate = date.Year + "-" + date.Month + "-" + date.Day;
                var    request      = new PaidBookingRequest()
                {
                    remarks        = remarksText.Text,
                    bookingconfirm = true,
                    confirmedBookingTimeSlotList = confirmedBookingSlots,
                    paymentMethod = paymentMethodList[paymentSegment.SelectedSegment],
                    reminderList  = selectedResidentList
                };
                if (total == 0)
                {
                    request.paymentMethod = "NotRequired";
                }
                if (!fromList)
                {
                    var res = await service.ConfirmBooking(App.Current.Properties["defaultPid"].ToString(), facilityId, unitID, tenantId, selectedDate, request);

                    if (res != null)
                    {
                        if (res.status_code == System.Net.HttpStatusCode.Created)
                        {
                            await Navigation.PushAsync(new BookingListPage()
                            {
                                blockNo = this.blockNo
                            });
                        }
                        else
                        {
                            await DisplayAlert("Error", res.message, "OK");
                        }
                    }
                    else
                    {
                        await DisplayAlert("Error", Config.CommonErrorMsg, "OK");
                    }
                }
                else
                {
                    var res = await service.ConfirmPayment(App.Current.Properties["defaultPid"].ToString(), booking.bookingID, request);

                    if (res != null)
                    {
                        if (res.status_code == System.Net.HttpStatusCode.OK)
                        {
                            await Navigation.PopAsync(true);
                        }
                        else
                        {
                            await DisplayAlert("Error", res.message, "OK");
                        }
                    }
                    else
                    {
                        await DisplayAlert("Error", Config.CommonErrorMsg, "OK");
                    }
                }
            }
        }