示例#1
0
        public async Task SendReason(bool showModal)
        {
            if (ReasonSelect != null)
            {
                ReasonSelect.ErrorOther = string.Empty;
                if (ReasonSelect.Type == "O" && ValidateData() == false)
                {
                    return;
                }

                queingFirebase.GetOutSesionWaitingRoom(patient.PatientServiceType, requestMedicalService.PatientDocument);

                dialogService.ShowProgress();
                requestMedicalService.Controller                = AppConfigurations.VideoCallController;
                requestMedicalService.Action                    = AppConfigurations.PostIntent;
                requestMedicalService.ReasonsAbandonmentId      = int.Parse(ReasonSelect.Code);
                requestMedicalService.ReasonsAbandonmentComment = ReasonSelect.Comment;
                PostIntentResponse response = await apiService.PostIntent(requestMedicalService);

                dialogService.HideProgress();
                if (showModal)
                {
                    await navigationService.BackModal();

                    await navigationService.BackToRoot();

                    await navigationService.Navigate(Enumerations.AppPages.ServicesPage);
                }
                else
                {
                    await navigationService.Back();
                }
            }
        }
        protected override void OnDisappearing()
        {
            base.OnDisappearing();
            VisiblePage = false;

            if (BindingContext is IQueuingViewModel viewModel)
            {
                if (viewModel.Qualify == false)
                {
                    IQueingFirebaseService queingFirebase = ServiceLocator.Current.GetInstance <IQueingFirebaseService>();
                    queingFirebase.GetOutSesionWaitingRoom(viewModel.patient.PatientServiceType, viewModel.requestMedicalService.PatientDocument);
                }
            }
        }