20230327展示页跳转

This commit is contained in:
2023-03-27 15:49:34 +08:00
parent a9feacd3d2
commit 05730bb704
37 changed files with 657 additions and 101 deletions
@@ -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>
/// 附件显示