private async void SendAppointmentBooking()
        {
            try
            {
                await Navigation.PushPopupAsync(new LoadingPopPage());

                _objBookAppointmentResponseModel = await _apiServices.BookAppointmentAsync(new Get_API_Url().BookAppointmentListApi(_baseUrl), true, _objHeaderModel, _objBookAppointmentRequestModel);

                var _result = _objBookAppointmentResponseModel.Response;
                if (_result.StatusCode == 200)
                {
                    //await DisplayAlert("Info", _result.Message, "OK");
                    await App.NavigationPage.Navigation.PushAsync(new AppointmentPage(), true);

                    DependencyService.Get <IToast>().ShowToast("Your Booking Is Confirmed!!");
                    await Navigation.PopAllPopupAsync();
                }
                else
                {
                    DependencyService.Get <IToast>().ShowToast(_result.Message);
                    await Navigation.PopAllPopupAsync();
                }
            }
            catch (Exception ex)
            {
                DependencyService.Get <IToast>().ShowToast("Something Went Wrong please try Again or check your Internet Connection!!");
                await Navigation.PopAllPopupAsync();

                var msg = ex.Message;
            }
        }
 public DoctorDetailViewPage(BookAppointmentRequestModel ObjBookAppointmentRequestModel)
 {
     InitializeComponent();
     _objBookAppointmentRequestModel = ObjBookAppointmentRequestModel;
     NavigationPage.SetHasNavigationBar(this, false);
     _objBookAppointmentResponseModel = new BookAppointmentResponseModel();
     _objHeaderModel          = new HeaderModel();
     _objHeaderModel.OTPToken = Settings.TokenCode;
     _apiServices             = new RestApi();
     _baseUrl = Settings.Url + Domain.BookAppoinmentApiConstant;
 }
Exemplo n.º 3
0
        public AppointmentBookingPage()
        {
            InitializeComponent();
            NavigationPage.SetHasNavigationBar(this, false);
            _apiServices = new RestApi();
            _objBookAppointmentRequestModel  = new BookAppointmentRequestModel();
            _objBookAppointmentResponseModel = new BookAppointmentResponseModel();
            _objDepartmentListRequestModel   = new DepartmentListRequestModel();
            _objDepartmentListResponseModel  = new DepartmentListResponseModel();
            _objDoctorListRequestModel       = new DoctorListRequestModel();
            _objDoctorListResponseModel      = new DoctorListResponseModel();
            _objReason4VisitResponseModel    = new Reason4VisitResponseModel();
            _objHeaderModel          = new HeaderModel();
            _objHeaderModel.OTPToken = Settings.TokenCode;

            _baseurlDeptList = Settings.Url + Domain.DepartmentApiConstant;
            _baseUrlDocList  = Settings.Url + Domain.DoctorDetailApiConstant;
            _reason4VisitUrl = Settings.Url + Domain.GetReasonForVisitApiConstant;

            GetReason4Visit();
            listDoctorListByDept.ItemSelected += ListDoctorListByDept_ItemSelected;
        }