public ActionResult BizActiveEmail() { Member member = MemberService.Find(CookieHelper.MemberID); ViewBag.Email = member.Email; if (member.Status <= (int)MemberStatus.Registered) { int actionEmailActive = (int)MemberActionType.EmailActvie; int limitMins = ConfigSetting.GetBindEmailTimeDiffMin; if (!Member_ActionService.HasActionByActionTypeInLimiteTime(member.MemberID, actionEmailActive, limitMins)) { string emailKey = Guid.NewGuid().ToString(); string emailTitle = member.NickName + string.Format(" 您好!绑定{0}登录邮箱!", ConfigSetting.SiteName); EmailModel em = EmailService.GetMail(Server.MapPath("~/EmailTemplate/bizactive.htm"), emailTitle, member.MemberID, member.Email, member.NickName, emailKey); EmailService.SendMail(em); Member_ActionService.Create(member, actionEmailActive, emailKey); } } else { return(Content("<script>alert('您的邮箱已经绑定,请勿重复绑定!');window.top.location='" + Url.Action("activeok") + "';</script>")); } return(View()); }
public ActionResult BindEmail() { ViewBag.MenuItem = "email"; Member member = MemberService.Find(CookieHelper.MemberID); if (member.Status <= (int)MemberStatus.Registered) { int actionEmailActive = (int)MemberActionType.EmailActvie; int limitMins = ConfigSetting.GetBindEmailTimeDiffMin; if (Member_ActionService.HasActionByActionTypeInLimiteTime(CookieHelper.MemberID, actionEmailActive, limitMins)) { ViewBag.HasSendEmail = true; } else { ViewBag.HasSendEmail = false; } ViewBag.Actived = false; } else { ViewBag.Actived = true; } return(View()); }