public override async Task OnNavigatedToAsync(INavigationParameters parameters)
        {
            if (parameters.GetNavigationMode() == NavigationMode.New)
            {
                using (_userDialogs.Loading(ConstantStrings.Loading))
                {
                    Request = parameters.GetValue <EvlRequestItemSource>(nameof(Request));

                    List <PhotoTypeDto> photos;

                    if (Request.InsuranceType == InsuranceType.Sales)
                    {
                        photos = await _initialDataService.GetSalesPhotos();
                    }
                    else
                    {
                        photos = await _initialDataService.GetBadanePhotos();
                    }

                    List <EvlRequestFileItemSource> files = photos.Select(i =>
                                                                          new EvlRequestFileItemSource
                    {
                        IsRequired = i.IsRequired,
                        TypeId     = i.ID,
                        TypeName   = i.Name,
                        Image      = ImageSource.FromResource("Sanaap.App.Images.photo.jpg")
                    }).ToList();

                    Files = new ObservableCollection <EvlRequestFileItemSource>(files);

                    await base.OnNavigatedToAsync(parameters);
                }
            }
        }
Beispiel #2
0
        public async Task syncInitialData()
        {
            await _initialDataService.GetSalesPhotos();

            await _initialDataService.GetBadanePhotos();

            await _initialDataService.GetCars();

            await _initialDataService.GetColors();

            await _initialDataService.GetCurrentUserInfo();

            await _initialDataService.GetInsurers();

            await _initialDataService.GetAlphabets();

            await _initialDataService.GetAccidentReasons();
        }