BLL/UserBLL.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using DAL;
namespace BLL
{
public class UserBLL
{
#region//登录业务
public bool Userlogin(string loginName, string loginPwd)
{
UserDAL useDal = new UserDAL();
Users user = useDal.UserCheck(loginName);
if (loginName == "")
{
throw new System.Exception("用户名不能为空");
}
if (loginPwd == "")
{
throw new System.Exception("登录密码不能为空");
}
if (user == null)
{
throw new System.Exception("用户名错误,请重新输入");
}
if (user.UserPwd == loginPwd)
{
return true;
}
else
{
throw new System.Exception("密码错误,请重新输入");
}
}
#endregion
#region //添加用户信息
public bool UserADD(Users user)
{
if (user.UserName == "")
{
throw new System.Exception("用户名不能为空");
}
if (user.UserPwd == "")
{
throw new System.Exception("登录密码不能为空");
}
UserDAL userDal = new UserDAL();
Users useModel = userDal.UserCheck(user.UserName);
if (useModel != null)
{
throw new System.Exception("改用户名已经存在,添加失败!");
}
else
{
return (userDal.UserAdd(user));
}
后面还有 59 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。