------ #### OnLineUpgradeConfig V1.0.2501.0601 - *.[修复]修复用户管理列表无法默认勾选已选择用户的BUG。 #### RaUI V4.0.2501.0601 - *.[新增]RyFiles类新增SetFileDate、SetFileCreationTime、SetFileLastWriteTime方法。 - *.[新增]RyFiles.CopyBigFile方法现在会同步来源文件的创建和修改时间。 - *.[新增]ryQuickSQL类新增GetPostData函数,将数据快速转成Post数据。 - *.[改进]执行MySQL下的ExecuteNonQuery时,如果遇到连接关闭错误,允许重连并重新执行。 - *.[改进]IDbInterface在执行新的SQL语句前,自动清空最后错误。 - *.[修复]修复LayeredForm窗体以正常窗体打开的时候,文本框无法编辑的BUG。 - *.[修复]修复ApkOp获取apk权限时可能带乱码的BUG。 - *.[修复]修复WeifenLuo.WinFormsUI.Docking的ResourceManager.GetString路径不对导致报错的BUG。
40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.Data.SqlClient;
|
|
using System.Data;
|
|
using ryCommon;
|
|
using ryCommonDb;
|
|
using ryConfig.MSSQLTables;
|
|
namespace Server.User
|
|
{
|
|
//用户数据实现
|
|
class UserData:IUserData
|
|
{
|
|
public bool CheckUser(string userName, string password,out string nickName)
|
|
{
|
|
nickName = "";
|
|
DataProvider mydb = new DataProvider();
|
|
IDbInterface db =new SqlDataProvider();
|
|
if (db.ConnDb(Config.clsPram.SQLConnStr) == 1)
|
|
{
|
|
RyQuickSQL mySQL = new RyQuickSQL(TableUsers.TableName);
|
|
mySQL.AddParameter("@userid", userName);
|
|
mySQL.AddParameter("@pwd", password);
|
|
DataSet ds = db.ReadData("select * from " + TableUsers.TableName + " where "
|
|
+ TableUsers.UserId + "=@userid and "
|
|
+ TableUsers.Pwd + "=@pwd and " + TableUsers.Enabled + "=1", mySQL);
|
|
if (mydb.HaveData(ds))
|
|
{
|
|
DataRow reader = ds.Tables[0].Rows[0];
|
|
nickName = reader[TableUsers.NickName].ToString();
|
|
db.Free();
|
|
return true;
|
|
}
|
|
}
|
|
db.Free();
|
|
return false;
|
|
}
|
|
}
|
|
}
|