/// <summary> /// Method to get response of web service /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void resetpinswebservicecall_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e) { ResetPinResponse objResetPinResponse = new ResetPinResponse(); try { if (e.Result != null) { var response = e.Result.ToString(); objResetPinResponse = Utils.JsonHelper.Deserialize<ResetPinResponse>(response); if (objResetPinResponse.status == 0) { objVerifyBySmsViewModel.IsResentPopupOpen = true; objVerifyBySmsViewModel.HitVisibility = false; } else if (objResetPinResponse.status == 324) { objVerifyBySmsViewModel.IsRequestPopupOpen = true; objVerifyBySmsViewModel.HitVisibility = false; objVerifyBySmsViewModel.PopupText = objResetPinResponse.message; } } } catch (Exception) { objVerifyBySmsViewModel.HitVisibility = true; MessageBox.Show("Sorry, Unable to process your request."); } }
/// <summary> /// Response of webservice /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void resetpinswebservicecall_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e) { ResetPinResponse objResetPinResponse = new ResetPinResponse(); try { if (e.Result != null) { var response = e.Result.ToString(); objResetPinResponse = Utils.JsonHelper.Deserialize<ResetPinResponse>(response); if (objResetPinResponse.status == 0) { objResetPinLoginViewModel.IsResetPopupOpen = true; objResetPinLoginViewModel.HitVisibility = false; App.resetLoginAuthCode = null; App.resetLoginPIN = null; App.PIN = null; objResetPinLoginViewModel.AuthCode = null; objResetPinLoginViewModel.DisplaySignUpPin = null; } else if (objResetPinResponse.status == 315) { objResetPinLoginViewModel.IsIncorrectPopupOpen = true; objResetPinLoginViewModel.HitVisibility = false; } else if (objResetPinResponse.status == 310) { objResetPinLoginViewModel.IsLoginPinTextBoxVisible = Visibility.Collapsed; objResetPinLoginViewModel.IsNoUserPopupOpen = true; objResetPinLoginViewModel.HitVisibility = false; } } } catch (Exception) { objResetPinLoginViewModel.HitVisibility = true; MessageBox.Show("Sorry, Unable to process your request."); } }