private async void FindData() { // Sets status of controls this.SetStatusControl(false, true, "Green", 1); // Validate the connections of internet var response = await this.apiService.CheckConnection(); if (!response.IsSuccess) { // Sets status of controls this.SetStatusControl(false, false, "Green", 0); await this.dialogService.ShowMessage( "Error", response.Message, "Accept"); return; } // Define the url parameter var ulrParameter = string.Format( "/{0}", this.zoomItemViewModel.Tracking); // Get data of the cne api response = await apiService.Get <Zoom>( MethodsHelper.GetUrlIvss(), "/infove/zoom", "/seguimiento", ulrParameter); if (!response.IsSuccess) { // Sets status of controls this.SetStatusControl(false, false, "Green", 0); await this.dialogService.ShowMessage( "Error", response.Message, "Accept"); return; } // Convert result response this.zoom = (Zoom)response.Result; // Load values in the control // this.LoadValuesControls(1, (Zoom)response.Result); this.LoadValuesControls(1, this.zoom); // Sets status of controls if (isValid) { this.SetStatusControl(true, false, "Green", 0); } }
private async void FindData() { // Sets status of controls this.SetStatusControl(false, true, "Green", 1); // Validate the connections of internet var response = await this.apiService.CheckConnection(); if (!response.IsSuccess) { // Sets status of controls this.SetStatusControl(false, false, "Green", 0); await this.dialogService.ShowMessage( "Error", response.Message, "Accept"); return; } // Define the url parameter var ulrParameter = string.Format( "/{0}/{1}/{2}/{3}/{4}", this.ivssItemViewModel.NationalityDatas[0].Abbreviation, this.ivssItemViewModel.IdentificationCard, this.ivssItemViewModel.BirthDate.Day, this.ivssItemViewModel.BirthDate.Month, this.ivssItemViewModel.BirthDate.Year); // Get data of the cne api response = await apiService.Get <Ivss>( MethodsHelper.GetUrlIvss(), "/infove/ivss", "/cuenta", ulrParameter); if (!response.IsSuccess) { // Sets status of controls this.SetStatusControl(false, false, "Green", 0); await this.dialogService.ShowMessage( "Error", response.Message, "Accept"); return; } // Load values in the control this.LoadValuesControls(1, (Ivss)response.Result); // Sets status of controls if (isValid) { this.SetStatusControl(true, false, "Green", 0); } }