/// <summary> /// 获取项目评论列表 /// </summary> /// <param name="queryCondition"></param> /// <returns></returns> public JsonResult GetProjectCommentListData(SelProjectDocmentList queryCondition) { ResultModel result = new ResultModel(); TableHelper _TableHelper = queryCondition.ConvertToT <TableHelper>(); try { PageHelper pageHelper = new PageHelper(_TableHelper.PageIndex, _TableHelper.PageSize); var queryUserList = (from c in _CommentBusiness.SleCommenyByProjectId(queryCondition.ProId) join u in ef.tb_user on c.Account equals u.Id select new { c.Account, c.Content, c.Id, c.InsertTime, c.ProId, c.Subject, c.ProPhase, AccountName = u.UserName, AccountIcon = u.AccountIcon.Replace("~", BaseUrl) } ).OrderByDescending(c => c.InsertTime); var commentList = PagingFunction(queryUserList, ref pageHelper); result.ResultCode = 1; result.ResultData = new { data = commentList, pageInfo = pageHelper }; } catch (Exception ex) { throw; } return(Json(result)); }
/// <summary> /// 获取访谈纪要列表 /// </summary> /// <param name="selProjectDocmentList"></param> /// <returns></returns> public JsonResult SelProjectTxtList(SelProjectDocmentList selProjectDocmentList) { ResultModel result = new ResultModel(); TableHelper _TableHelper = selProjectDocmentList.ConvertToT <TableHelper>(); try { var query = _InterviewRecordBusiness.GetDataListByProId(selProjectDocmentList.ProId); _TableHelper.data = query.ToList().ConvertToExpand(); string tableHtml = RenderPartialViewToString(this, "_normalTable", _TableHelper); result.ResultCode = 1; result.ResultData = new { data = tableHtml, pageInfo = new { } }; } catch (Exception ex) { throw; } return(Json(result)); }
public JsonResult SelProjectDocmentDownList(SelProjectDocmentList selProjectDocmentList) { ResultModel result = new ResultModel(); TableHelper _TableHelper = selProjectDocmentList.ConvertToT <TableHelper>(); try { var query = (from pd in _ProjectDocmentBusiness.GetProjectDocmentListByProId(selProjectDocmentList.ProId) join f in _FileBusiness.GetAllData() on pd.FileId equals f.Id join u in _userBusiness.GetAllUserInfo() on pd.Account equals u.Id join t in _constantBusiness.GetAllData() on pd.DocmentTypeId equals t.Id join r in _constantBusiness.GetAllData() on pd.ProPhaseId equals r.Id orderby pd.InsertTime descending select new { pd.Id, pd.ProId, pd.FileDesc, pd.InsertTime, u.UserName, f.FileType, FileSize = f.FileSize, f.FileSName, FilePath = f.FilePath.Replace("~", BaseUrl), DocmentTypeName = t == null ? "" : t.ItemName, ProPhaseName = r == null ? "" : r.ItemName }); _TableHelper.data = query.ToList().ConvertToExpand(); string tableHtml = RenderPartialViewToString(this, "_downloadTable", _TableHelper); result.ResultCode = 1; result.ResultData = new { data = tableHtml, pageInfo = new { } }; } catch (Exception ex) { throw; } return(Json(result)); }