WebUI/AchieveManageWeb/Controllers/UserController.cs
(开头部分) 12KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using AchieveBLL;
using AchieveCommon;
using AchieveEntity;
using System;
using System.Web.Mvc;
namespace AchieveManageWeb.Controllers
{
[AchieveManageWeb.App_Start.JudgmentLogin]
public class UserController : Controller
{
//
// GET: /User/
public ActionResult Index()
{
return View();
}
/// <summary>
/// 更新密码
/// </summary>
/// <param name="UserPwd"></param>
/// <param name="NewPwd"></param>
/// <param name="ConfirmPwd"></param>
/// <returns></returns>
public ActionResult UpdatePwd(string UserPwd, string NewPwd, string ConfirmPwd)
{
try
{
string result = "";
UserEntity uInfo = ViewData["Account"] as UserEntity;
UserEntity userChangePwd = new UserEntity();
userChangePwd.ID = uInfo.ID;
userChangePwd.Password = Md5.GetMD5String(NewPwd); //md5加密
if (Md5.GetMD5String(UserPwd) == uInfo.Password)
{
if (new UserBLL().ChangePwd(userChangePwd))
{
result = "{\"msg\":\"修改成功,请重新登录!\",\"success\":true}";
}
else
{
result = "{\"msg\":\"修改失败!\",\"success\":false}";
}
}
else
{
result = "{\"msg\":\"原密码不正确!\",\"success\":false}";
}
return Content(result);
}
catch (Exception ex)
{
return Content("{\"msg\":\"修改失败," + ex.Message + "\",\"success\":false}");
}
}
后面还有 266 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。