private async void FetchBookingData() { progressDialog = new ProgressDialog(this); await FetchWorkshopBookingData(); await FetchSessionBookingData(); progressDialog.Hide(); // Set up the views _Landing = new LandingFragment(sessionBookingData, workshopBookingData, studentData); _Future = new FutureBookingsFragment(sessionBookingData, workshopBookingData, studentData); _Past = new PastBookingsFragment(sessionBookingData, workshopBookingData, studentData); // Set up the landing page SetView(Resource.Id.fragmentContainer, _Landing, false); string helloUser = GetString(Resource.String.hello) + " " + studentData.attributes.studentID + "!"; TextView helloUserText = FindViewById<TextView>(Resource.Id.textHelloUser); helloUserText.Text = helloUser; }
private void SetCurrentFragment() { switch (_CurrentViewTitle) { case Resource.String.applicationName : _Landing = new LandingFragment(sessionBookingData, workshopBookingData,studentData); SetView(Resource.Id.fragmentContainer, _Landing, true); break; case Resource.String.searchTitle: //Fetch workshop data for available workshops //FetchAvailableWorkshops(); _Search = new SearchWorkshopsFragment(workshopData); SetView(Resource.Id.fragmentContainer, _Search, true); break; // Future bookings. case Resource.String.futureBookingsTitle: _Future = new FutureBookingsFragment(sessionBookingData, workshopBookingData, studentData); SetView(Resource.Id.fragmentContainer, _Future, true); break; // Past bookings. case Resource.String.pastBookingsTitle: _Past = new PastBookingsFragment(sessionBookingData, workshopBookingData, studentData); SetView(Resource.Id.fragmentContainer, _Past, true); break; } }