Untitled
unknown
plain_text
a year ago
1.2 kB
11
Indexable
//Invoke button var item = sender as SwipeItemView; if (!(item?.BindingContext is Schools getAC)) return; schid = getAC.SchoolID; if (!await DisplayAlert("Leave School", "You are about to leave the school. All associated data from your account with this school will be removed. You will have to enter the class again when you decide to comeback." + "Do you really want to leave?", "Yes", "No")) return; progressLoading.IsVisible = true; var a = await mySchools.LeaveSchool(schid); if (a) { var text = "You have successfully left the school!."; var duration = TimeSpan.FromSeconds(3); var snackbar = Snackbar.Make(text, null, "Got it!", duration, SnackBarSuccess); await snackbar.Show(cancellationTokenSource.Token); progressLoading.IsVisible = false; } else { var text = "Something went wrong with your request. Please try again later!"; var duration = TimeSpan.FromSeconds(3); var snackbar = Snackbar.Make(text, null, "Got it!", duration, SnackBarError); await snackbar.Show(cancellationTokenSource.Token); progressLoading.IsVisible = false; }
Editor is loading...
Leave a Comment