public JsonResult GetFiles(string id) { var files = new FileInfoBLL().GetFileList(id); files.ForEach(x => x.FilePath = Url.Content(x.FilePath)); return(Json(files, JsonRequestBehavior.AllowGet)); }
/// <summary> /// 附件显示 /// </summary> /// <param name="recid">主键Id</param> /// <returns></returns> public ActionResult ShowFile(string recid) { List <FileInfoEntity> fileList = new FileInfoBLL().GetFilesByRecIdNew(recid).ToList(); fileList.ForEach(x => { x.FilePath = Url.Content(x.FilePath); }); return(View(fileList)); }