private async void LoadDetailPreConfirmNewCoordination(ResponsePreConfirmNewMedicalCenterCoordination response) { IMedicalCenterCoordinationPageViewModel medicalCenterCoordinationPageViewModel = ServiceLocator.Current.GetInstance <IMedicalCenterCoordinationPageViewModel>(); if (response.PreConfirm != null) { PreCoordination = new CoordinationViewModel { Address = MedicalCenterSelected.Address, AgendaName = ServiceSelected.Name, ClinicCode = MedicalCenterSelected.ClinicCode, ClinicName = MedicalCenterSelected.ClinicName, Date = ScheduleSelected.Date, Document = PersonSelected.Document, FullAddress = string.Format("{0} - {1}", MedicalCenterSelected.ClinicName, response.PreConfirm.ClinicAddress), Hour = ScheduleSelected.Time, IsVisiblePay = true, IsVisibleRecommendation = false, Latitude = double.Parse((response.PreConfirm.Latitude.Replace(".", phoneService.CurrentCulture.NumberFormat.CurrencyDecimalSeparator))), Longitude = double.Parse((response.PreConfirm.Longitude.Replace(".", phoneService.CurrentCulture.NumberFormat.CurrencyDecimalSeparator))), Names = PersonSelected.Names, NameSpecialty = SpecialitySelected.Description, Price = response.PreConfirm.Price, RDACode = MedicalCenterSelected.RDACode, SpecialityCode = SpecialitySelected.Code, Time = ScheduleSelected.Time, TitleButton = response.PreConfirm.Price == "0.0" ? AppResources.TitleConfirmNewCoordination : AppResources.TitlePay, TypeCoordination = SpecialitySelected.Description, YearMonthDay = ScheduleSelected.YearMonthDay }; medicalCenterCoordinationPageViewModel.CoordinationSelected = PreCoordination; await navigationService.Navigate(AppPages.MedicalCenterCoordinationDetailPage); } }
private async void ValidatePreConfirmationNewMedicalCenterCoordination(ResponsePreConfirmNewMedicalCenterCoordination response) { if (response.Success) { if (response.StatusCode == 0) { LoadDetailPreConfirmNewCoordination(response); return; } } await dialogService.ShowMessage(response.Title, response.Message); }