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
+19
View File
@@ -80,6 +80,25 @@ namespace BLL
return Funs.DB.AttachFile.FirstOrDefault(e => e.ToKeyId == toKey);
}
/// <summary>
/// 根据对应主键获取文件信息
/// </summary>
/// <param name="toKey">对应主键</param>
/// <returns>文件信息</returns>
public static string GetBtnFileUrl(object toKey)
{
string fileUrl = string.Empty;
if (toKey != null)
{
Model.AttachFile file = Funs.DB.AttachFile.FirstOrDefault(e => e.ToKeyId == toKey.ToString());
if (file != null && !string.IsNullOrEmpty(file.AttachUrl))
{
string url = file.AttachUrl.Replace('\\', '/');
fileUrl = BLL.UploadAttachmentService.ShowAttachment2("../../", url);
}
}
return fileUrl;
}
/// <summary>
///
/// </summary>