public JsonResult GetAlerts() { var res = dashboardData.GetAlertData(SessionData.UserID); SessionData.AlertCount = res.Count; return(Json(res, JsonRequestBehavior.AllowGet)); }
public JsonResult UpdateUserEmail(EmailViewModel model) { String FirstName = HttpContext.User.Identity.Name; String Email = model.Email.Trim(); String msg = ""; if (!String.IsNullOrWhiteSpace(Email)) { if (!String.IsNullOrWhiteSpace(SessionData.StripeCustId)) { msg = pdata.UpdateUserProfile(SessionData.UserID, Email); if (msg == "") { var customerOptions = new StripeCustomerUpdateOptions { Email = Email }; StripeHelper.UpdateCustomer(SessionData.StripeCustId, customerOptions); SessionData.Email = Email; var res = dashboardData.GetAlertData(SessionData.UserID); SessionData.AlertCount = res.Count; String _url = "Settings/UpdateUserEmail"; String emailConfirm = ealert.SendActivationEmail(SessionData.UserID, FirstName, SessionData.LastName, Email, _url, AccounType.MppUser); msg += emailConfirm; } } else { msg = Constant.STRIPE_ID_NOTFOUND; } } else { msg = Constant.EMAIL_NOTFOUND; } return(new JsonResult() { Data = msg, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }