20230327展示页跳转
This commit is contained in:
@@ -47,6 +47,43 @@ namespace BLL
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件显示不带删除
|
||||
/// <summary>
|
||||
/// 附件显示
|
||||
/// </summary>
|
||||
public static string ShowAttachment2(string rootPath, string path)
|
||||
{
|
||||
string htmlStr = string.Empty;
|
||||
if (!string.IsNullOrEmpty(path))
|
||||
{
|
||||
htmlStr = "<table runat='server' cellpadding='5' cellspacing='5' style=\"width: 100%\">";
|
||||
string[] arrStr = path.Split(new string[] { "," }, System.StringSplitOptions.RemoveEmptyEntries);
|
||||
for (int i = 0; i < arrStr.Length; i++)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(arrStr[i]))
|
||||
{
|
||||
string[] urlArray = arrStr[i].Split('\\');
|
||||
string scanUrl = string.Empty;
|
||||
for (int j = 0; j < urlArray.Length; j++)
|
||||
{
|
||||
scanUrl += urlArray[j] + "|";
|
||||
}
|
||||
|
||||
string url = rootPath + arrStr[i].Replace('\\', '/');
|
||||
string[] subUrl = url.Split('/');
|
||||
string fileName = subUrl[subUrl.Count() - 1];
|
||||
string newFileName = fileName.Substring(fileName.IndexOf("_") + 1);
|
||||
htmlStr += "<tr><td style=\"width: 60%\" align=\"left\"><span style='cursor:pointer;cursor:pointer;cursor:pointer;TEXT-DECORATION: underline;color:blue' onclick=\"window.open('" + url + "')\">" + newFileName + "</span></td>";
|
||||
}
|
||||
}
|
||||
|
||||
htmlStr += "</table>";
|
||||
}
|
||||
|
||||
return htmlStr;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 附件显示带删除 页面单个附件
|
||||
/// <summary>
|
||||
/// 附件显示
|
||||
|
||||
Reference in New Issue
Block a user