public ActionResult GetFormJson(string keyValue) { var data = noticeBLL.GetEntity(keyValue); FileInfoBLL fi = new FileInfoBLL(); IList list = fi.GetFilesByRecId(keyValue); return(ToJsonResult(new { formData = data, files = list })); }
public ActionResult GetFormJson(string keyValue) { var data = safetydaybll.GetEntity(keyValue); FileInfoBLL fi = new FileInfoBLL(); IList list = fi.GetFilesByRecId(keyValue); var json = JsonConvert.SerializeObject(list); List <FileInfoModel> fileList = JsonConvert.DeserializeObject <List <FileInfoModel> >(json); fileList.ForEach(x => { if (x.FileExtensions.ToLower().Contains("gw")) { x.FilePath = x.FilePath.ToLower().Replace(".gw", ".pdf"); } }); return(ToJsonResult(new { formData = data, files = fileList })); }
public ActionResult getFile(string keyValue) { var file = filebll.GetFilesByRecId(keyValue); return(Content(file.ToJson())); }