• .NET餐厅管理系统user数据帮助类判断是否存在管理员、判断管理员密码是否正确、判断用户是否存在、判断用户密码是否正确、查找管理员姓名


     SqlDBHelper db = new SqlDBHelper();
            #region//判断是否存在管理员
            ///


            /// 判断是否存在管理员
            ///

            ///
            ///
            public bool A_IsExist(string aid)
            {
                string sql = "select * from Admin where AID='" + aid + "'";
                return db.YNExistData(sql);
            }
            #endregion
            #region//判断管理员密码是否正确
            ///
            /// 判断管理员密码是否正确
            ///

            ///
            ///
            ///
            public bool A_IsExist(string aid, string apsw)
            {
                string sql = "select * from Admin where AID='" + aid + "' and APsw='" + apsw + "'";
                return db.YNExistData(sql);
            }
            #endregion
            #region//判断用户是否存在
            ///
            ///判断是否存在用户
            ///

            ///
            ///
            public bool U_IsExist(string userId)
            {
                string sql = "select * from Customer where CID='" + userId + "'";
                return db.YNExistData(sql);
            }
            #endregion
            #region//判断用户密码是否正确
            ///
            /// 判断密码是否正确
            ///

            ///
            ///
            ///
            public bool U_IsExist(string userId, string password)
            {
                string sql = "select * from Customer where CID='" + userId + "' and CPsw='" + password + "'";
                return db.YNExistData(sql);
            }
            #endregion
            #region//查找管理员姓名
            ///
            /// 查找管理员姓名
            ///

            ///
            ///
            public string GetAName(string aid)
            {
                string sql = "select AName from Admin where AID='" + aid + "'";
                return db.GetSingleVal(sql);
            }
            #endregion

  • 相关阅读:
    ArcGIS Pro中的拓扑检查
    nacos做服务配置和服务器发现
    ESP8266-Arduino编程实例-VCNL4010光传感器驱动
    Sentinel服务熔断和流控
    4Spring及Spring系列-基本
    让我们用ArcGIS制作一张好看的中国月度气温图
    155. 最小栈
    全球电梯空气消毒机行业调研及趋势分析报告
    1.4、栈
    一文彻底理解评分卡开发中——Y的确定(Vintage分析、滚动率分析等)
  • 原文地址:https://blog.csdn.net/m0_74456535/article/details/128098511