public JsonResult changePasswordAjax(string currentPassword, string newPassword) { try { StaffDetails staff = Fingerprints.Common.FactoryInstance.Instance.CreateInstance <StaffDetails>(); string result = LoginData.ChangePassword(currentPassword.Trim(), newPassword.Trim(), staff.UserId.ToString()); if (result == "1") { string imagepath = UrlExtensions.LinkToRegistrationProcess("Content/img/logo_email.png"); Thread thread = new Thread(delegate() { SendMail.Sendchangepassword(staff.EmailID, newPassword.Trim(), string.Empty, Server.MapPath("~/MailTemplate"), imagepath); }); thread.Start(); } return(Json(result)); } catch (Exception Ex) { return(Json(Ex.Message)); } }
public JsonResult changePasswordAjax(string currentPassword, string newPassword) { try { return(Json(LoginData.ChangePassword(currentPassword, newPassword, Session["UserID"].ToString()))); } catch (Exception Ex) { return(Json(Ex.Message)); } }
public SPChangePassword_Result ChangePassword(ChangePassword _Change) { return(_loginData.ChangePassword(_Change)); }