gm_cabs_driver_maui/GMCabsDriverAssistantSolution/Views/AcceptedFutureBookingDetailPage.xaml.cs

30 lines
878 B
C#
Raw Normal View History

using GMCabsDriverAssistantSolution.ViewModels;
namespace GMCabsDriverAssistantSolution.Views;
public partial class AcceptedFutureBookingDetailPage : ContentPage
{
private AcceptedFutureBookingDetailViewModel _viewModel;
public AcceptedFutureBookingDetailPage()
{
InitializeComponent();
BindingContext = _viewModel = new AcceptedFutureBookingDetailViewModel();
}
protected override void OnAppearing()
{
base.OnAppearing();
corporateVipLabel.IsVisible = _viewModel.IsCorporateBooking;
}
private async void OnDeclineBookingClicked(object sender, EventArgs e)
{
bool answer = await DisplayAlert("", "Are you sure you want to release this booking, cancellation fees may apply", "YES", "NO");
if (answer)
{
await _viewModel.OnDeclineBookingClickedAsync();
}
}
}