Backup/DAL/UserInfoDAO.cs

(开头部分) 4KB

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

using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using Model;

namespace DAL
{
    public class UserInfoDAO
    {
       
        SQLHelper sqlhelper = new SQLHelper();
        private DataSet ds;

        //判断用户名密码是否正确
        public int userIsRight(UserInfoBean u)
        {
            int count = 0;
            count = sqlhelper.ReturnSQL("select count(*) from userinfo where userid='"+u.userid+"' and userpwd='"+u.userPwd+"'");
            return count;
        }
        //查询用户ID
        public int getIdByUserid(string userid)
        {
            int count = sqlhelper.ReturnSQL("select id from userinfo where userid='"+userid+"'");
            return count;
        }
        //查询用户角色
        public int getRoleTypeInfo(string userID)
        {
            int count = 0;
            count = sqlhelper.ReturnSQL("select roleid from userinfo where userid='"+userID+"'");
            return count;
        }
        //判断用户状态
        public int userStates(string userID)
        {
            int count = 0;
            count = sqlhelper.ReturnSQL("select userstate from userinfo where userid='"+userID+"'");
            return count;
        }

        //得到总记录数
        public int GetUserInfoCount()
        {
            try
            {
                int count = sqlhelper.ReturnSQL("select count(*) from userinfo");
                return count;
            }
            catch (Exception)
            {
                
                throw;
            }
        }
        //查询用户信息
        public DataSet GetUserInfo(int start,int limit)
        {
            try
后面还有 85 行代码,解锁后查看完整代码

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

AI 解读

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

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