private void addWorkshopToList(WorkshopBookingData workshopBookingData, List<WorkshopBooking> workshops)
 {
     //foreach (WorkshopBooking workshop in WorkshopBookingData.attributes)
        // {
         // {Architecture} add available workshops
        // }
 }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = inflater.Inflate(Resource.Layout.BookingsLayout, container, false);

            sessionBookingData = Server.currentSessionBookingData;
            workshopBookingData = Server.currentWorkshopBookingData;

            _NoDisplay = view.FindViewById<TextView>(Resource.Id.textNoBooking);

            // Set the "Upcoming Sessions" list view to display (upto) the four closest sessions
            DisplayUpcomingBookings(view);

            if (bookings.Count < 1)
                _NoDisplay.Visibility = ViewStates.Visible;

            return view;
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = inflater.Inflate(Resource.Layout.BookingsLayout, container, false);

            //Get student data from intent in parent activity
            _StudentData = JsonConvert.DeserializeObject<StudentData>(this.Activity.Intent.GetStringExtra("student"));

            _SessionBookingData = Server.currentSessionBookingData;
            _WorkshopBookingData = Server.currentWorkshopBookingData;

            _NoDisplay = view.FindViewById<TextView>(Resource.Id.textNoBooking);
            _NoDisplay.Visibility = ViewStates.Gone;

            // Set the "Past Bookings" list view to display (upto) the four closest sessions
            DisplayPastBookings(view);

            if (_Bookings.Count < 1)
                _NoDisplay.Visibility = ViewStates.Visible;

            return view;
        }
예제 #4
0
        private async Task FetchWorkshopBookingData()
        {
            studentData = JsonConvert.DeserializeObject<StudentData>(Intent.GetStringExtra("student"));

            ShowProgressDialog(progressDialog, "Fetching bookings. Please wait...", true);

            WorkshopController workshopController = new WorkshopController();
            workshopBookingData = await workshopController.GetWorkshopBookingData(studentData.attributes.studentID);
            Server.currentWorkshopBookingData = workshopBookingData;
            if (workshopBookingData != null && workshopBookingData.attributes.Count > 0)
            {
                FetchCampusData();
                FetchWorkshopSetData();
            }

            ShowProgressDialog(progressDialog, "Fetching bookings. Please wait...", false);
        }
예제 #5
0
 private void addBookingsToList(List<Booking> bookings, SessionBookingData sessionBookingData, WorkshopBookingData workshopBookingData)
 {
     addSessionBookingsToList(sessionBookingData, bookings);
     addWorkshopBookingsToList(workshopBookingData, bookings);
 }
예제 #6
0
 public LandingFragment(SessionBookingData sessionBookingData, WorkshopBookingData workshopBookingData, StudentData studentData)
 {
     this.sessionBookingData = sessionBookingData;
     this.workshopBookingData = workshopBookingData;
     this.studentData = studentData;
 }
예제 #7
0
 private void addWorkshopBookingsToList(WorkshopBookingData workshopBookingData,  List<Booking> bookings)
 {
     foreach (WorkshopBooking workshopBooking in workshopBookingData.attributes)
     {
         if (workshopBooking.starting > DateTime.Now && !workshopBooking.Status().Equals("Canceled booking"))
             bookings.Add(workshopBooking);
     }
 }
 public PastBookingsFragment(SessionBookingData sessionBookingData, WorkshopBookingData workshopBookingData, StudentData studentData)
 {
     this._SessionBookingData = sessionBookingData;
     this._WorkshopBookingData = workshopBookingData;
     this._StudentData = studentData;
 }
 private void addWorkshopBookingsToList(WorkshopBookingData _WorkshopBookingData, List<Booking> bookings)
 {
     foreach (WorkshopBooking workshopBooking in _WorkshopBookingData.attributes)
     {
         if (workshopBooking.starting < DateTime.Now)
             bookings.Add(workshopBooking);
     }
 }
 private void addWorkshopBookingsToList(WorkshopBookingData workshopBookingData, List<Booking> bookings)
 {
     foreach (WorkshopBooking workshopBooking in workshopBookingData.attributes)
     {
         Console.WriteLine(workshopBooking.Status());
         if (workshopBooking.starting > DateTime.Now && !workshopBooking.Status().Equals("Canceled booking"))
         {
             bookings.Add(workshopBooking);
             //Server.futureBookings.Add(workshopBooking);
         }
     }
 }