List<User>lstUser=DAOHelp.GetDataBySQL<User>($"SELECT a.code AS Code, RTRIM(a.name) AS Name, a.ystype, b.code AS DeptCode, RTRIM(b.name) AS DeptName, b.ksattrib FROM his.hisdata.dbo.YSCODE a(NOLOCK) JOIN his.hisdata.dbo.KSCode b(NOLOCK) ON a.kscode = b.code WHERE a.CODE = '{code}'");
List<User>lstUser=DAOHelp.GetDataBySQL<User>($"SELECT a.code AS Code, RTRIM(a.name) AS Name, a.ystype, b.code AS DeptCode, RTRIM(b.name) AS DeptName, b.ksattrib FROM {Global.HisDBName}.YSCODE a(NOLOCK) JOIN {Global.HisDBName}.KSCode b(NOLOCK) ON a.kscode = b.code WHERE a.CODE = '{code}'");
if(lstUser?.Count()>0)
if(lstUser?.Count()>0)
{
{
returnlstUser.ToArray()[0];
returnlstUser.ToArray()[0];
@ -41,7 +41,7 @@ namespace PEIS.Model
publicBooleanHisLogin(Useruser)
publicBooleanHisLogin(Useruser)
{
{
Stringsql=String.Format($"SELECT a.code AS Code, RTRIM(a.name) AS Name, a.ystype, b.code AS DeptCode, RTRIM(b.name) AS DeptName, b.ksattrib FROM his.hisdata.dbo.YSCODE a(NOLOCK) JOIN his.hisdata.dbo.KSCode b(NOLOCK) ON a.kscode = b.code WHERE a.CODE = '{user.Code}' AND a.PASSWORD = '{user.PassWord}'");
Stringsql=String.Format($"SELECT a.code AS Code, RTRIM(a.name) AS Name, a.ystype, b.code AS DeptCode, RTRIM(b.name) AS DeptName, b.ksattrib FROM {Global.HisDBName}.YSCODE a(NOLOCK) JOIN {Global.HisDBName}.KSCode b(NOLOCK) ON a.kscode = b.code WHERE a.CODE = '{user.Code}' AND a.PASSWORD = '{user.PassWord}'");
returnDAOHelp.GetDataBySQL<User>($"select Code,RTRIM(Name) as Name,kscode as DeptCode,RTRIM(ksname) as DeptName from his.hisdata.dbo.yscode where code='{code}'").FirstOrDefault();
returnDAOHelp.GetDataBySQL<User>($"select Code,RTRIM(Name) as Name,kscode as DeptCode,RTRIM(ksname) as DeptName from {Global.HisDBName}.yscode where code='{code}'").FirstOrDefault();