private async Task <bool> ValidateResponseAffiliate(ResponseAffiliate response) { if (await validatorService.ValidateResponse(response) == false) { return(false); } ViewModelHelper.SetAffiliateToPersonalDataViewModel(this, response.PersonalData); return(true); }
public async Task LoadPersonalData() { ErrorEmail = ErrorCellPhone = string.Empty; dialogService.ShowProgress(); RequestAffiliate request = new RequestAffiliate(); ResponseAffiliate response = await apiService.GetAffiliate(request); if (await ValidateResponseAffiliate(response)) { RequestDocument requestDocument = new RequestDocument(); ResponseDocuments responseDocuments = await apiService.GetDocuments(requestDocument); ValidateResponseDocuments(responseDocuments); dialogService.HideProgress(); } else { dialogService.HideProgress(); await navigationService.Back(); } }