protected void ctlConfirm_Click(object sender, EventArgs e) { //Spring.Validation.ValidationErrors errors = new Spring.Validation.ValidationErrors(); try { SuUser user = new SuUser(); user.UserName = ctlUserName.Text; string realPassword = SuUserService.Forgetpassword(ctlUserName.Text); user = SuUserService.FindByUserName(ctlUserName.Text).First <SuUser>(); if (user != null) { UserEngine.SyncUpdateUserData(user.UserName); } SCGEmailService.SendEmailEM12(user.Userid, realPassword.ToString()); //Alert(GetMessage("ForgetPasswordIsComplete")); this.ModalPopupMsg.Show(); HidePopup(); } catch (ServiceValidationException ex) { ValidationErrors.MergeErrors(ex.ValidationErrors); } }
protected void ctlResetPassword_Click(object sender, EventArgs e) { try { SuUser user = new SuUser(); user = SuUserService.FindByIdentity(UserID); if (user != null) { string realPassword = SuUserService.Forgetpassword(user.UserName); SCGEmailService.SendEmailEM12(user.Userid, realPassword.ToString()); ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), string.Empty, string.Format("alert('{0}');", GetProgramMessage("ResetPasswordSuccess")), true); } } catch (ServiceValidationException ex) { ValidationErrors.MergeErrors(ex.ValidationErrors); } }