Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        private async Task create(SingleWorkshop workshop, Student student, string apiUri)
        {
            Dictionary <string, Object> parameters = new Dictionary <string, Object>();

            parameters.Add("workshopId", workshop.WorkshopId);
            parameters.Add("studentId", student.studentID);
            parameters.Add("userId", student.studentID);
            Response <Object> response = await db.post <Object>(apiUri + "create", parameters, null);

            if (!response.IsSuccess)
            {
                throw new StudentNotBooked(response.DisplayMessage);
            }
        }
 public NewBookingDetailTableSource(SingleWorkshop singleWorkshop)
 {
     this.singleWorkshop = singleWorkshop;
 }
Ejemplo n.º 4
0
 public async Task createWaiting(SingleWorkshop workshop, Student student)
 {
     await create(workshop, student, apiWaitingUri);
 }