Clothes.BLL/CLLoginBLL.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using Clothes.Comment;
using Clothes.DAL;
using Clothes.IBLL;
using Clothes.IDAL;
using Clothes.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Clothes.BLL
{
    public class CLLoginBLL : CLLoginIBLL
    {
        CLLoginIDAL Login = new CLLoginDAL();
        /// <summary>
        /// 注册
        /// </summary>
        /// <param name="name">姓名</param>
        /// <param name="Number">手机号</param>
        /// <param name="Password">密码</param>
        /// <param name="Manager">是否是管理员(0不是 1是)</param>
        /// <returns></returns>
        public OperResult Register(string name, string Number, string Password, int Manager)
        {
            if (string.IsNullOrWhiteSpace(name))
            {
                return OperResult.Failed("用户名不能为空");
            }
            if (string.IsNullOrWhiteSpace(Number))
            {
                return OperResult.Failed("手机号不能为空");
            }
            if (string.IsNullOrWhiteSpace(Password))
            {
                return OperResult.Failed("密码不能为空");
            }
            
            if (Login.LoginName(name))
            {
                return OperResult.Failed("用户名已存在");
            }
            if (Login.LoginNumber(Number))
            {
                return OperResult.Failed("手机号已存在");
            }
            Encryption encryption = new Encryption();
            Model.CLLogin login = new Model.CLLogin()
            {
                UserName = name,
                MobileNumber = Number,
                Password = encryption.SHA1Encryp(Password),
                Manager = Manager,
                Delect = false
            };
            if (Login.Insert(login))
            {
                return OperResult.Success("添加成功");
            }
后面还有 37 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。