superUserInfo.cs
发布日期:2021-10-16 07:12:09 浏览次数:5 分类:技术文章

本文共 1267 字,大约阅读时间需要 4 分钟。

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Data.OleDb;/// /// superUserInfo 的摘要说明/// /// namespace newClasses{    public class superUserInfo    {        public string userID;        public string userPWD;        public string userName;        public string userGroup;        private Boolean isLogin;        public superUserInfo()        {            userID = "";            userPWD = "";            isLogin = false;        }        public Boolean tryLogin()        {            isLogin = false;            superConn userconn = new superConn("userInfo.accdb");            userconn.open();            string _sql_user = "select * from t_userinfo where u_userid = '" + userID + "'";            OleDbDataReader dr_user = userconn.GetDataReader(_sql_user);            if (dr_user.Read())            {                if (dr_user["u_pwd"].ToString() == userPWD)                    isLogin = true;                userName = dr_user["u_name"].ToString();                userGroup = dr_user["u_group"].ToString();            }            userconn.close();            return isLogin;        }        public void LogOut()        {            isLogin = false;        }        public Boolean GetIsLogin() { return isLogin; }    }}

转载地址:https://blog.csdn.net/sjpljr/article/details/68062744 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:Microsoft的JET与MADE相关知识
下一篇:myconn类

发表评论

最新留言

网站不错 人气很旺了 加油
[***.192.178.218]2024年04月01日 16时34分03秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章