Example #1
0
        /// <summary>
        /// Called when a row is touched
        /// </summary>
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            if (singleWorkhopList != null)
            {
                SingleWorkshop singleWorkshop = singleWorkhopList [indexPath.Row];

                newBookingDetailViewController = (NewBookingDetailViewController)AppDelegate.Storyboard.InstantiateViewController("NewBookingDetailViewController");
                //New BookingDetailViewController
                if (singleWorkshop != null)
                {
                    newBookingDetailViewController.ModalTransitionStyle = UIModalTransitionStyle.CrossDissolve;
                    newBookingDetailViewController.singleWorkshop       = singleWorkshop;
                    newBookingViewController.PresentViewController(newBookingDetailViewController, true, null);
                }
            }
            if (sessionWorkhopList != null)
            {
                SessionBooking sessionBooking = sessionWorkhopList [indexPath.Row];

                newBookingDetailViewController = (NewBookingDetailViewController)AppDelegate.Storyboard.InstantiateViewController("NewBookingDetailViewController");
                //New BookingDetailViewController
                if (sessionBooking != null)
                {
                    newBookingDetailViewController.ModalTransitionStyle = UIModalTransitionStyle.CrossDissolve;
                    newBookingDetailViewController.sessionBooking       = sessionBooking;
                    newBookingViewController.PresentViewController(newBookingDetailViewController, true, null);
                }
            }
            //deselect row
            tableView.DeselectRow(indexPath, true);
        }
Example #2
0
        /// <summary>
        /// Called when a row is touched
        /// </summary>
        public async override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            if (myBookingDetailViewController == null)
            {
                myBookingDetailViewController = (MyBookingDetailViewController)AppDelegate.Storyboard.InstantiateViewController("MyBookingDetailViewController");
            }

            if (indexPath.Section == 0)
            {
                WorkshopBooking workshopBooking = workshopBookingList [indexPath.Row];
                //myBookingDetailViewController
                if (workshopBooking != null)
                {
                    LoadingOverlay.Instance.showLoading(myBookingViewController);
                    AppParam.campusName = await this.getCampusRoom(workshopBooking.campusID);

                    myBookingDetailViewController.ModalTransitionStyle = UIModalTransitionStyle.CrossDissolve;
                    myBookingDetailViewController.wkBooking            = workshopBooking;
                    myBookingDetailViewController.ssBooking            = null;
                    myBookingViewController.PresentViewController(myBookingDetailViewController, true, null);
                }
            }
            else
            {
                SessionBooking sessionBooking = sessionBookingList [indexPath.Row];
                //myBookingDetailViewController
                if (sessionBooking != null)
                {
                    myBookingDetailViewController.ModalTransitionStyle = UIModalTransitionStyle.CrossDissolve;
                    myBookingDetailViewController.wkBooking            = null;
                    myBookingDetailViewController.ssBooking            = sessionBooking;
                    myBookingViewController.PresentViewController(myBookingDetailViewController, true, null);
                }
            }
            //deselect row
            tableView.DeselectRow(indexPath, true);
        }
 public MyBookingDetailTableSource(WorkshopBooking workshopBooking, SessionBooking sessionBooking)
 {
     this.workshopBooking = workshopBooking;
     this.sessionBooking  = sessionBooking;
 }
 public NewBookingDetailTableSource(SessionBooking sessionBooking)
 {
     this.sessionBooking = sessionBooking;
 }