コード例 #1
0
        private async Task GetProfileInfo()
        {
            if (CrossConnectivity.Current.IsConnected)
            {
                IsBusy = true;
                await UserHandler.GetProfile(App.UserName,
                                             (responseProfile) => {
                    this._userProfile = responseProfile.ProfileInfo;
                    SetProfileInfo();
                    IsBusy = false;
                },
                                             (errorResponseProfile) => {
                    NavigationHandler.LoginNavigator.DisplayAlert(Constants.APP_NAME, Constants.UpdateUnSuccess, Constants.OK_TEXT);
//						Debug.WriteLine ("Error:: /nCode: " + errorResponseProfile.ResponseCode + "/nMessage: " + errorResponseProfile.Status);
                    IsBusy = false;
                });
            }
            else
            {
                NavigationHandler.LoginNavigator.DisplayAlert(Constants.APP_NAME, Constants.NETWORK_ERROR, Constants.OK_TEXT);
            }
        }
コード例 #2
0
 private async void GetProfileInfo()
 {
     if (CrossConnectivity.Current.IsConnected)
     {
         IsBusy = true;
         await UserHandler.GetProfile(App.UserName,
                                      (responseProfile) => {
             this._userProfile    = responseProfile.ProfileInfo;
             App.UserProfileImage = _userProfile.PersonalInfo.ProfileImage;
             SetProfileInfo();
             IsBusy = false;
         },
                                      (errorResponseProfile) => {
             NavigationHandler.GlobalNavigator.DisplayAlert(Constants.APP_NAME, Constants.ServerUnSuccess, Constants.OK_TEXT);
             IsBusy = false;
         });
     }
     else
     {
         NavigationHandler.LoginNavigator.DisplayAlert(Constants.APP_NAME, Constants.NETWORK_ERROR, Constants.OK_TEXT);
     }
 }