feat: support BS menu opening mode
This commit is contained in:
@@ -663,6 +663,37 @@ namespace Lskj.Business.Impl
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 获取菜单是否使用 BS 网页方式打开。
|
||||
/// </summary>
|
||||
/// <param name="menuId">菜单 ID。</param>
|
||||
/// <returns>1 表示使用 BS 网页方式打开;其他值按原 CS 方式打开。</returns>
|
||||
public static int GetBsOpenMode(string menuId)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(menuId) || !HasExistsColumn("P_FormMenuConfigTab", "BsOpenMode"))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
const string sqlValue = @"select ISNULL(BsOpenMode,0) as BsOpenMode
|
||||
from P_FormMenuConfigTab
|
||||
where MenuId=@MenuId";
|
||||
DataTable dataTable = SqlHelper.ExecuteDataTable(
|
||||
sqlValue,
|
||||
new SqlParameter("@MenuId", menuId));
|
||||
int bsOpenMode;
|
||||
return dataTable.Rows.Count > 0 &&
|
||||
int.TryParse(dataTable.Rows[0]["BsOpenMode"] + "", out bsOpenMode)
|
||||
? bsOpenMode
|
||||
: 0;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:根据配置MenuType加载菜单</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2017-08-16 </para>
|
||||
@@ -1358,4 +1389,4 @@ namespace Lskj.Business.Impl
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user