public async void EmailVerification(Boolean Load) { if (Load == true) { AndHUD.Shared.Show(this, "Checking Email Verification", Convert.ToInt32(MaskType.Clear)); } DeviceToken DO = new DeviceToken(); try { // DO = await svc.CheckMail(AuthServ.customer.CustomerID.ToString()); DO = await svc.CheckMail(CurrentUser.GetInternalCustometID()); if (DO.VerificationStatus == 1) { // if (AuthServ.customer != null && AuthServ.customer.CustomerID != 0) if (CurrentUser.GetInternalCustometID() != null && Convert.ToInt32(CurrentUser.GetInternalCustometID()) != 0) { // LoggingClass.LogInfo("The User logged in with user id: " + CurrentUser.getUserId(), screenid); SendRegistrationToAppServer(CurrentUser.getDeviceToken()); // CurrentUser.SavePrefered(AuthServ.customer.PreferredStore); int storename = Convert.ToInt32(CurrentUser.GetPrefered());///AuthServ.customer.PreferredStore; if (storename == 1) { Intent intent = new Intent(this, typeof(GridViewActivity)); intent.PutExtra("MyData", "Wall Store"); ProgressIndicator.Show(this); StartActivity(intent); } else if (storename == 2) { Intent intent = new Intent(this, typeof(GridViewActivity)); intent.PutExtra("MyData", "Point Pleasant Store"); ProgressIndicator.Show(this); StartActivity(intent); } else if (storename == 3) { Intent intent = new Intent(this, typeof(GridViewActivity)); intent.PutExtra("MyData", AppConstants.SecaucusStore); ProgressIndicator.Show(this); StartActivity(intent); } else { Intent intent = new Intent(this, typeof(Login)); ProgressIndicator.Show(this); StartActivity(intent); } LoggingClass.LogInfoEx("User verified and Logging" + "---->" + CurrentUser.GetCardNumber(), screenid); AndHUD.Shared.Dismiss(); AndHUD.Shared.ShowSuccess(Parent, "Success!", MaskType.Clear, TimeSpan.FromSeconds(2)); } else { AlertDialog.Builder aler = new AlertDialog.Builder(this, Resource.Style.MyDialogTheme); aler.SetTitle("Sorry"); aler.SetMessage("You entered wrong details or authentication failed"); aler.SetNegativeButton("Ok", delegate { }); Dialog dialog1 = aler.Create(); dialog1.Show(); }; } else { AlertDialog.Builder aler = new AlertDialog.Builder(this, Resource.Style.MyDialogTheme); aler.SetMessage("Your email is not verified. please check email and verify."); aler.SetNegativeButton("Ok", delegate { }); Dialog dialog = aler.Create(); dialog.Show(); } AndHUD.Shared.Dismiss(); } catch (Exception exe) { AndHUD.Shared.Dismiss(); LoggingClass.LogError(exe.Message, screenid, exe.StackTrace.ToString()); } AndHUD.Shared.Dismiss(); //BtnLogin.Dispose(); //BtnResend.Dispose(); //BtnContinue.Dispose(); //BtnUpdateEmail.Dispose(); //update.Dispose(); }