/// <summary> /// Webservice to reset pin /// </summary> private void ResetPinWebService() { string apiUrl = RxConstants.sendResetPinCode; SendResetPinCodeRequest objInputParam = new SendResetPinCodeRequest { mail = App.LoginEmailId, system_version = "android", app_version = "1.6", branding_version = "MLP" }; WebClient resetpinswebservicecall = new WebClient(); var uri = new Uri(apiUrl, UriKind.RelativeOrAbsolute); var json = JsonHelper.Serialize(objInputParam); resetpinswebservicecall.Headers["Content-type"] = "application/json"; resetpinswebservicecall.UploadStringCompleted += resetpinswebservicecall_UploadStringCompleted; resetpinswebservicecall.UploadStringAsync(uri, "POST", json); }
/// <summary> /// To check user emailid validity for resetpin /// </summary> private void ResetPinWebService() { string apiUrl = RxConstants.sendResetPinCode; try { SendResetPinCodeRequest objInputParam = new SendResetPinCodeRequest { mail = objSignUpViewModel.LoginEmail, system_version = "android", app_version = "1.6", branding_version = "MLP" }; WebClient resetpinswebservicecall = new WebClient(); var uri = new Uri(apiUrl, UriKind.RelativeOrAbsolute); var json = JsonHelper.Serialize(objInputParam); resetpinswebservicecall.Headers["Content-type"] = "application/json"; resetpinswebservicecall.UploadStringCompleted += resetpinswebservicecall_UploadStringCompleted; resetpinswebservicecall.UploadStringAsync(uri, "POST", json); } catch (Exception) { MessageBox.Show("Sorry, Unable to process your request."); } }