/// <summary> /// 检测用户名是否存在 /// </summary> /// <param name="UserName">用户名</param> /// <returns>整型数据</returns> public int CheckUser(string UserName) { string strSQL = "select * from admin where username='******'"; return(db.ReturnRowCount(strSQL)); }
/// <summary> /// 执行SQL语句,返回记录总行数,主要应用于管理员的登录 /// </summary> /// <param name="UserName">用户名</param> /// <param name="PassWord">密码</param> /// <returns>记录数量</returns> public int ReRowCount(string UserName, string PassWord) { string strSQL = "select * from admin where username='******' and password = '******' and aleave='管理员'"; return(db.ReturnRowCount(strSQL)); }