BLL/BLLUser.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// @ Project : TestOnline
// @ File Name : User.cs
// @ Date : 2009-3-12
// @ Author : ruimingde
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using Entity;
using DAL;
namespace BLL
{
public class BLLUser
{
protected static readonly DBUser dbUser=new DBUser();//引用数据访问层
/// <summary>
/// 账号或者密码错误返回null
/// </summary>
public User CheckLogin(string userID, string userPwd)
{
if (string.IsNullOrEmpty(userID) || string.IsNullOrEmpty(userPwd))
return null;
User user = dbUser.SelectByID(userID);
if (null == user)
return null;
if (user.UserPwd.Equals(userPwd))
{
return user;
}
else
return null;
}
/// <summary>
/// 返回-1表示原密码存在、返回1表示修改成功
/// </summary>
public int ModifyPwd(string userID, string oldPwd, string newPwd)
{
if (string.IsNullOrEmpty(userID) || string.IsNullOrEmpty(oldPwd) ||string.IsNullOrEmpty(newPwd))
return 0;
oldPwd = oldPwd;
newPwd =newPwd;
return dbUser.UpdatePwd(userID, oldPwd, newPwd);
}
public User GetUserByID(string userID)
{
if (string.IsNullOrEmpty(userID))
return null;
return dbUser.SelectByID(userID);
}
后面还有 18 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
