SVN r1117

SVN-Revision: r1117
This commit is contained in:
tdx
2026-02-05 09:07:43 +00:00
parent 6efcbb6bce
commit 48a57b70a4
+72 -8
View File
@@ -16,6 +16,8 @@ using Lskj.Model;
using System.Net;
using System.Collections.Generic;
using System.Linq;
using Kdbndp;
using KdbndpTypes;
namespace Lskj.Business.Impl
{
@@ -97,7 +99,7 @@ namespace Lskj.Business.Impl
}
List<SqlParameter> list = new List<SqlParameter>
{
new SqlParameter("@ReturnValue",SqlDbType.Int),
new SqlParameter("@ReturnValue",SqlDbType.NVarChar),
new SqlParameter("@operatorid",SqlDbType.VarChar),
new SqlParameter("@pwd",SqlDbType.VarChar,100),
};
@@ -109,9 +111,9 @@ namespace Lskj.Business.Impl
cmdParams[0].Direction = ParameterDirection.ReturnValue;
cmdParams[1].Value = userId;
cmdParams[2].Value = password;
if (cmdParams.Length > 3)
if (cmdParams.Length > 7)
{
cmdParams[3].Value = 1;
cmdParams[7].Value = 1;
}
SqlHelper.ExecuteNonQuery(CommandType.StoredProcedure, "P_Login_pr", cmdParams);
return Convert.ToInt32(cmdParams[0].Value);
@@ -448,10 +450,8 @@ namespace Lskj.Business.Impl
/// <exception cref="System.NotImplementedException"></exception>
public static DataRow GetSystemdllTab(string menuCode)
{
string sqlValue = "select * from P_systemdlltab where DllCoid=@coid";
DataTable dtTable = SqlHelper.ExecuteDataTable(sqlValue, new SqlParameter[] { new SqlParameter("@coid", menuCode) });//执行sql返回DataTable
string sqlValue = $"select * from P_systemdlltab where DllCoid = '{menuCode}'";
DataTable dtTable = SqlHelper.ExecuteDataTable(sqlValue);//执行sql返回DataTable
return dtTable.Rows.Count > 0 ? dtTable.Rows[0] : null;
}
/// <summary>
@@ -1261,4 +1261,68 @@ namespace Lskj.Business.Impl
if (dataRow != null && !string.IsNullOrWhiteSpace(dataRow["MacAddress"] + ""))
{
List<string> MacAddress = ((dataRow["MacAddress"] + "").Split(',')).ToList();
return MacAddress.Contains(ERPInfo.Instance.MacAddress);
}
}
}
}
catch (Exception ex)
{
return false;
}
return true;
}
/// <summary>
/// <para>说明:获取模块信息</para>
/// <para>创建人:曹屹峰</para>
/// <para>创建日期:2025-03-03 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
public static DataRow GetModuleInformation(string menuCode)
{
string sqlValue = string.Format("select * from p_formmenuconfigtab where PurviewId='{0}'", menuCode);
DataTable dtTable = SqlHelper.ExecuteDataTable(sqlValue);
return dtTable.Rows.Count > 0 ? dtTable.Rows[0] : null;
}
/// <summary>
/// 获取自增长列名
/// </summary>
/// <returns></returns>
public static string GetAutogrowcolumn(string tableName)
{
string sqlvalue = $@"SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.columns
WHERE TABLE_NAME = '{0}' AND COLUMNPROPERTY(OBJECT_ID('{tableName}'),COLUMN_NAME,'IsIdentity')= 1;";
if (SqlHelper.ConnectionType == ConnectionType.DmServer)
{
sqlvalue = $@"select a.NAME from SYS.SYSCOLUMNS a,sysobjects b
where b.id = a.id and b.name = '{tableName}' and a.info2 = 1;";
}
return BaseImpl.GetResult(sqlvalue) + "";
}
/// <summary>
/// 获取表格属性
/// </summary>
/// <returns></returns>
public static DataTable GetDatabaseProperty(string tableName)
{
string sqlvalue = $@"select COLUMN_NAME,DATA_TYPE,CHARACTER_MAXIMUM_LENGTH from information_schema.columns
where table_name = '{tableName}';";
if (SqlHelper.ConnectionType == ConnectionType.DmServer)
{
sqlvalue = $@"SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH AS CHARACTER_MAXIMUM_LENGTH
FROM USER_TAB_COLUMNS WHERE TABLE_NAME = '{tableName}';";
}
return BaseImpl.GetDataTableResult(sqlvalue);
}
}
}