20230327展示页跳转
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user