BXXT/Controllers/AdminAjaxServiceController.cs
(开头部分) 13KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using BXXT.Models;
namespace BXXT.Controllers
{
public class AdminAjaxServiceController : Controller
{
private DataDataContext Dc = new DataDataContext();
/// <summary>
/// 修改密码
/// </summary>
/// <returns></returns>
public ActionResult AlertPassword()
{
JsonResult Ret = new JsonResult();//创建json返回对象
AlertPasswordMsg Msg = new AlertPasswordMsg();
UpdateModel(Msg, Request.Form.AllKeys);
AjaxRetMsg RetMsg = new AjaxRetMsg();
Ret.Data = RetMsg;
if (Msg.PwdNew != null && Msg.PwdOld != null && Msg.Repeat != null)
{
if (Msg.PwdNew.Length >= 6 && Msg.PwdOld.Length >= 6 && Msg.Repeat.Length >= 6)
{
if (Msg.PwdNew == Msg.Repeat)
{
var Query = from item in Dc.管理员
where item.管理员帐号 == Session["UserName"].ToString() && item.管理员密码 == Msg.PwdOld
select item;
if (Query.Count() == 1)
{
管理员 i = Query.First();
i.管理员密码 = Msg.PwdNew;//设置新密码
try
{
Dc.SubmitChanges();//提交更新
RetMsg.Ret = true;
RetMsg.RetMsg = "修改成功";
return Ret;
}
catch (Exception)
{
RetMsg.Ret = false;
RetMsg.RetMsg = "修改失败";
return Ret;
}
}
else
{
RetMsg.Ret = false;
RetMsg.RetMsg = "原始密码错误";
return Ret;
}
}
}
}
后面还有 307 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。