SVN r1218
SVN-Revision: r1218
This commit is contained in:
@@ -349,8 +349,13 @@ namespace Lskj.Business.Impl
|
||||
/// <returns>DataTable.</returns>
|
||||
public static DataRow GetTempletFile(string sName, string webpath = "")
|
||||
{
|
||||
string sqlValue = "select * from P_fm_FileTab where sName=@sName";
|
||||
DataTable dt = SqlHelper.ExecuteDataTable(sqlValue, new SqlParameter[] { new SqlParameter("@sName", sName) });
|
||||
//如果文件名中有 不间断空格 会导致查不出来,所以改成 ={0}的写法
|
||||
//string sqlValue = "select * from P_fm_FileTab where sName=@sName";
|
||||
//DataTable dt = SqlHelper.ExecuteDataTable(sqlValue, new SqlParameter[] { new SqlParameter("@sName", sName) });
|
||||
|
||||
string sqlValue = string.Format("select * from P_fm_FileTab where sName='{0}'", sName.Replace("'", "''"));
|
||||
DataTable dt = SqlHelper.ExecuteDataTable(sqlValue);
|
||||
|
||||
if (dt.Rows.Count > 1)
|
||||
{
|
||||
//string webpath11 = Lskj.Web.Core.Util.FileUtil.UrlEncode(HttpUtility.UrlDecode(webpath), false);
|
||||
@@ -372,17 +377,13 @@ namespace Lskj.Business.Impl
|
||||
|
||||
// 完全参数化 SQL,彻底杜绝 SQL 注入!
|
||||
sqlValue = @"SELECT * FROM P_fm_FileTab
|
||||
WHERE sName = @sName
|
||||
AND (webpath LIKE @path1
|
||||
OR webpath LIKE @path2
|
||||
OR webpath LIKE @path3)";
|
||||
WHERE sName = '{0}'
|
||||
AND (webpath LIKE '{1}'
|
||||
OR webpath LIKE '{2}'
|
||||
OR webpath LIKE '{3}')";
|
||||
|
||||
dt = SqlHelper.ExecuteDataTable(sqlValue,
|
||||
new SqlParameter("@sName", sName),
|
||||
new SqlParameter("@path1", "%" + webpath),
|
||||
new SqlParameter("@path2", "%" + formatPath),
|
||||
new SqlParameter("@path3", "%" + decodePath)
|
||||
);
|
||||
dt = SqlHelper.ExecuteDataTable(
|
||||
string.Format(sqlValue,sName.Replace("'", "''"),"%" + webpath.Replace("'", "''"),"%" + formatPath.Replace("'", "''"),"%" + decodePath.Replace("'", "''")));
|
||||
|
||||
}
|
||||
return dt.Rows.Count > 0 ? dt.Rows[0] : null;
|
||||
|
||||
+1399
-1393
File diff suppressed because it is too large
Load Diff
@@ -696,10 +696,17 @@ namespace Lskj.Business.Impl
|
||||
AND CHARINDEX(',' + '{1}' + ',', ',' + userList + ',') > 0
|
||||
) b on CHARINDEX(',' + CAST(b.privTypeId AS VARCHAR(5)) + ',',',' + PrivilegeView + ',') > 0
|
||||
where sourceId in (select id from p_systembillsource where typeCode=@typeCode" + cond + @" and isnull(isVisible,0)=0 and (isnull(viewOper,'')='' or CHARINDEX(',' + '{1}' + ',', ',' + viewOper + ',')>0) OR EXISTS (
|
||||
SELECT 1 FROM UserRoles AS ur WHERE CHARINDEX('{{&' + ur.roleName + '&}}', viewOper) > 0)) {3} order by sourceId,orderid", menuCode, ERPInfo.Instance.UserName, otherfield, conditions);
|
||||
|
||||
SELECT 1 FROM UserRoles AS ur WHERE CHARINDEX('{{&' + ur.roleName + '&}}', viewOper) > 0)) {3} ", menuCode, ERPInfo.Instance.UserName, otherfield, conditions);
|
||||
htTable["master"] = SqlHelper.ExecuteDataTable(sqlValue, new SqlParameter[] { new SqlParameter("@typeCode", menuCode) });
|
||||
htTable["detail"] = SqlHelper.ExecuteDataTable(sqlDetail, new SqlParameter[] { new SqlParameter("@typeCode", menuCode) });
|
||||
|
||||
DataTable detailTable= SqlHelper.ExecuteDataTable(sqlDetail, new SqlParameter[] { new SqlParameter("@typeCode", menuCode) });
|
||||
// order by sourceId,orderid 数据库不排序,在表格中排序(解决慢查询)
|
||||
if (detailTable != null && detailTable.Rows.Count > 0)
|
||||
{
|
||||
detailTable.DefaultView.Sort = "sourceId ASC, orderid ASC";
|
||||
detailTable = detailTable.DefaultView.ToTable();
|
||||
}
|
||||
htTable["detail"] = detailTable;
|
||||
|
||||
return htTable;
|
||||
}
|
||||
|
||||
@@ -321,7 +321,9 @@ namespace Lskj.Business
|
||||
Instance.ModuleSpecialDrag = item.Table.Columns.Contains("ModuleSpecialDrag") && !string.IsNullOrEmpty(item["ModuleSpecialDrag"] + "") ? "1".Equals(item["ModuleSpecialDrag"] + "") : false;
|
||||
Instance.ViewPwd = item.Table.Columns.Contains("ViewPwd") && !string.IsNullOrEmpty(item["ViewPwd"] + "") ? "1".Equals(item["ViewPwd"] + "") : false;
|
||||
Instance.LoginAnnouncement = item.Table.Columns.Contains("LoginAnnouncement") && !string.IsNullOrEmpty(item["LoginAnnouncement"] + "") ? "1".Equals(item["LoginAnnouncement"] + "") : false;
|
||||
|
||||
Instance.PromptDeadlock = item.Table.Columns.Contains("PromptDeadlock") && !string.IsNullOrEmpty(item["PromptDeadlock"] + "") ? "1".Equals(item["PromptDeadlock"] + "") : false;
|
||||
Instance.AuditChangeRecord = item.Table.Columns.Contains("AuditChangeRecord") && !string.IsNullOrEmpty(item["AuditChangeRecord"] + "") ? "1".Equals(item["AuditChangeRecord"] + "") : false;
|
||||
Instance.IsInsertWorksheet = item.Table.Columns.Contains("IsInsertWorksheet") && !string.IsNullOrEmpty(item["IsInsertWorksheet"] + "") ? "1".Equals(item["IsInsertWorksheet"] + "") : false;
|
||||
}
|
||||
/// <summary>
|
||||
/// 高拍仪AccessKey
|
||||
@@ -1090,4 +1092,12 @@ namespace Lskj.Business
|
||||
/// </summary>
|
||||
public string CDSBLimsPrivateKey;
|
||||
/// <summary>
|
||||
/// 流转记录sql不拼�
|
||||
/// 流转记录sql不拼接flowSource(目前只对单据生效)
|
||||
/// 2026-2-26 朱萌反应加上 and flowSource='模块号' 查不出数据,确认加字段限制这个条件
|
||||
/// </summary>
|
||||
public bool CancelFlowSource;
|
||||
/// <summary>
|
||||
/// 空白单元格添加颜色(设置了单元格颜色和行颜色,都会进入单元格绘制的事件,空白单元格不会设置颜色)
|
||||
/// </summary>
|
||||
public bool isBlankCellColor;
|
||||
|
||||
Reference in New Issue
Block a user