private async void Forgot_Click(object sender, EventArgs e) { if (mobile.Text.Equals("") || mobile.Text.Length != 10) { Toast.MakeText(ApplicationContext, "Please enter a 10 digit mobile number", ToastLength.Short).Show(); return; } else { mLoadingDialog.Show(); CabsAPI api = new CabsAPI(); OtpResponse response = await api.GetOTP(mobile.Text); if (response.Code == ResponseCode.SUCCESS) { mLoadingDialog.Dismiss(); otpRecieved = response.Otp; showOtpDialog(); } else { } } // FragmentTransaction tra = FragmentManager.BeginTransaction(); // ForgotPasswordFragment dia = new ForgotPasswordFragment(); // dia.Show(tra, "dialog"); // dia.marg += Dia_marg; }
public async void OTP_Click(object sender, RoutedEventArgs e) { if (!IsInternet()) { await new MessageDialog("Seems you are not connected to the Internet").ShowAsync(); return; } else { progress.IsActive = true; CabsAPI api = new CabsAPI(); OtpResponse otpResponse = await api.GetOTP(_mobile); if (otpResponse.Code == ResponseCode.SUCCESS) { progress.IsActive = false; otpGot = otpResponse.Otp; } else { await new MessageDialog("Server error!").ShowAsync(); return; } } }