Beispiel #1
0
        /// <summary>
        /// Raises the appearing event.
        /// </summary>
        protected override void OnAppearing()
        {
            base.OnAppearing();

            DoctorsDataManager.Instance.LoadDoctorsWithJson(Constants.Constants.JSON_DOCTORS);

            MessagingCenter.Subscribe <AppointmentCell, AppointmentModel> (this, Constants.Constants.MESSEGE_CENTER_OPEN_DOCTOR_PAGE, (sender, appointmentModel) => {
                //DoctorModel doctor = DoctorsDataManager.Instance.GetModelById(appointmentModel.DoctorId);
                var doctorPage      = new DoctorPage();
                doctorPage.DoctorId = appointmentModel.DoctorId;
                Navigation.PushAsync(doctorPage, true);
            });

            /// IF appointments are not already loaded
            if (!AppointmentsDataManager.Instance.IsAppointmentsLoaded)
            {
                // Load
                _activityIndicatorStack.IsVisible = true;
                _listView.IsVisible = false;

                Dictionary <string, string> networkParms = new Dictionary <string, string> ();
                networkParms.Add(Constants.Constants.PARAM_ID, Constants.Constants.USER_ID);
                _networkHandler = new NetworkHandler("users/{id}/appointments", networkParms, this, 1);
                _networkHandler.GetJsonData(true, Constants.Constants.JSON_APPOINTMENTS);
            }
        }
Beispiel #2
0
 public DoctorController(DoctorPage doctorPage)
 {
     this.doctorPage = doctorPage;
 }