private async void cancelWorkshopBooking()
        {
            if (wkBooking != null)
            {
                WorkshopBookingList workshopBookingList = new WorkshopBookingList();
                try {
                    await workshopBookingList.cancelBooking(wkBooking, AppParam.Instance.student);

                    this.DismissViewControllerAsync(true);
                } catch (Exception ex) {
                    AppParam.Instance.showAlertMessage("Workshop Booking", "Cancel workshop booking Fail!");
                }
            }
        }
        private async void bookWorkshop()
        {
            LoadingOverlay.Instance.showLoading(this);
            WorkshopBookingList workshopBookingList = new WorkshopBookingList();

            try{
                await workshopBookingList.createBooking(singleWorkshop, AppParam.Instance.student);

                await this.DismissViewControllerAsync(true);
            }
            catch (Exception ex) {
                AppParam.Instance.showAlertMessage("Workshop Booking", "Booking Fail!");
            }
        }
Exemple #3
0
        private async void showPastBookingList()
        {
            LoadingOverlay.Instance.showLoading(this);

            WorkshopBookingList workshopBookingList = new WorkshopBookingList();
            SessionBookingList  sessionBookingList  = new SessionBookingList();

            Student student = AppParam.Instance.student;

            List <WorkshopBooking> wkBookingList = await workshopBookingList.getPastByStudent(student);

            List <SessionBooking> ssBookingList = await sessionBookingList.getPastByStudent(student);

            historyBookingTable.Source = new HistoryTableSource(this, wkBookingList, ssBookingList);
            historyBookingTable.ReloadData();
        }
        private async void showUpcomingBookingList()
        {
            LoadingOverlay.Instance.showLoading(this);

            WorkshopBookingList workshopBookingList = new WorkshopBookingList();
            SessionBookingList  sessionBookingList  = new SessionBookingList();

            Student student = AppParam.Instance.student;

            List <WorkshopBooking> wkBookingList = await workshopBookingList.getUpcomingByStudent(student);

            List <SessionBooking> ssBookingList = await sessionBookingList.getUpcomingByStudent(student);

            myBookingTableView.Source = new MyBookingTableSource(this, wkBookingList, ssBookingList);
            myBookingTableView.ReloadData();
        }