/// <summary>
        /// Check the response for  resetpin webservice
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void resetpinswebservicecall_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
        {
            SendResetPinCodeResponse objresetpincoderesponse = new SendResetPinCodeResponse();
            try
            {
                if (e.Result != null)
                {
                    var response = e.Result.ToString();
                    objresetpincoderesponse = Utils.JsonHelper.Deserialize<SendResetPinCodeResponse>(response);
                    if (objresetpincoderesponse.status == 0)
                    {
                        enterPinViewModel.HitVisibility = true;
                        PhoneApplicationFrame frame = (PhoneApplicationFrame)Application.Current.RootVisual;
                        frame.Navigate(new Uri(PageURL.navigateToResetPinLoginURL, UriKind.Relative));
                    }
                    else
                    {
                        enterPinViewModel.ProgressBarVisibilty = Visibility.Collapsed;
                        MessageBox.Show("Please Contact your pharmacy.");
                    }

                }
            }
            catch (Exception)
            {
                enterPinViewModel.ProgressBarVisibilty = Visibility.Collapsed;
                enterPinViewModel.HitVisibility = true;
                MessageBox.Show("Sorry, Unable to process your request.");
            }
        }
Пример #2
0
 /// <summary>
 /// Check the response for the emailid in resetpin
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void resetpinswebservicecall_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
 {
     SendResetPinCodeResponse objresetpincoderesponse = new SendResetPinCodeResponse();
     try
     {
         if (e.Result != null)
         {
             var response = e.Result.ToString();
             objresetpincoderesponse = Utils.JsonHelper.Deserialize<SendResetPinCodeResponse>(response);
             if (objresetpincoderesponse.status == 0)
             {
                 objSignUpViewModel.IsConfirmPopupOpen = false;
                 objSignUpViewModel.HitVisibility = true;
                 PhoneApplicationFrame frame = (PhoneApplicationFrame)Application.Current.RootVisual;
                 frame.Navigate(new Uri(PageURL.navigateToResetPinLoginURL, UriKind.Relative));
             }
             else if (objresetpincoderesponse.status == 310)
             {
                 objSignUpViewModel.IsConfirmPopupOpen = false;
                 objSignUpViewModel.IsPopupOpen = true;
                 objSignUpViewModel.PopupText = "No such user.";
             }
             else if (objresetpincoderesponse.status == 318)
             {
                 objSignUpViewModel.IsConfirmPopupOpen = false;
                 objSignUpViewModel.IsWaitPopupOpen = true;
                 objSignUpViewModel.HitVisibility = false;
             }
             else
             {
                 objSignUpViewModel.IsConfirmPopupOpen = false;
                 objSignUpViewModel.IsPopupOpen = true;
                 objSignUpViewModel.PopupText = objresetpincoderesponse.message;
             }
             objSignUpViewModel.ProgressBarVisibilty = Visibility.Collapsed;
         }
     }
     catch (Exception)
     {
         objSignUpViewModel.ProgressBarVisibilty = Visibility.Collapsed;
         objSignUpViewModel.HitVisibility = true;
         MessageBox.Show("Sorry, Unable to process your request.");     
     }
 }