public string getmessagebody() { StringBuilder messagebody = new StringBuilder(); GoodssourceinformationPagination goodspage = new GoodssourceinformationPagination(); goodspage.Limit = 5; goodspage.Offset = 0; IList <Goodssourceinformation> goodssourcelist = this.goodsinformationtable.PaginationFindAll(goodspage); foreach (Goodssourceinformation enti in goodssourcelist) { messagebody.Append("<tr><td><a target=\"_parent\" href=\"../InfoShow/detailinfoframe.aspx?id=" + enti.Id.ToString() + "&type=goods\" class=\"infoTitle goodsInfoTitle\">"); messagebody.Append(enti.Title); messagebody.Append("</a><p><span class=\"light-info\">所需车辆长度:</span><span class=\"infos spanNeedLength\" id=\"carLength\">"); messagebody.Append(enti.Needtrunklength); messagebody.Append("</span>|<span class=\"light-info\">货重:</span><span class=\"infos spanGoodsWeight\" id=\"goodsWeight\">"); messagebody.Append(enti.Needtrunkweight); messagebody.Append("</span></p><p><span class=\"light-info\">信息来源:</span><a href=\"#\" class=\"goodsOrignLink\">"); Users userEinfos = this.userInfos.Find(enti.Userid); messagebody.Append(userEinfos.Username); messagebody.Append("</a></p></td><td><span class=\"infos goodsPublishTime\" id=\"publishTime\">"); messagebody.Append(enti.Releasedate); messagebody.Append("</span></td><td><span class=\"spanGoodsPlace\">"); IList <County> countyEinfos = this.countyInfos.FindByCode(enti.Srccountycode); messagebody.Append(countyEinfos[0].Name); messagebody.Append("</span></td><td><a class=\"moreBottn\" href=\"#\" target=\"_blank\"><img src=\"../../imgs/plus_alt.png\" id=\"moreBtn\"></a></td></tr>"); } return(messagebody.ToString()); }
public IList <Goodssourceinformation> DescendOrderPaginationFindByTitlecolor(GoodssourceinformationPagination obj) { String stmtId = "GoodssourceinformationPagination.DescendOrderFindByTitlecolor"; IList <Goodssourceinformation> result = this.sqlMapper.QueryForList <Goodssourceinformation>(stmtId, obj); return(result); }
public IList <Goodssourceinformation> PaginationFindByCautiontypeid(GoodssourceinformationPagination obj) { String stmtId = "GoodssourceinformationPagination.FindByCautiontypeid"; IList <Goodssourceinformation> result = this.sqlMapper.QueryForList <Goodssourceinformation>(stmtId, obj); return(result); }
public IList <Goodssourceinformation> PaginationFindByNeedtrunklength(GoodssourceinformationPagination obj) { String stmtId = "GoodssourceinformationPagination.FindByNeedtrunklength"; IList <Goodssourceinformation> result = this.sqlMapper.QueryForList <Goodssourceinformation>(stmtId, obj); return(result); }
/// <summary> /// /// </summary> /// <param name="pageNumber"></param> /// <param name="pageSize"></param> /// <param name="userId"></param> /// <returns></returns> private string buildTableHTML(string pageNumber, string pageSize, string userId) { logger.Info("Build table html with pageNumber:" + pageNumber); logger.Info("Build table html with pageSize:" + pageSize); logger.Info("Build table html with userID:" + userId); GoodssourceinformationPagination goodsInfoPoco = new GoodssourceinformationPagination(); goodsInfoPoco.Limit = int.Parse(pageSize); goodsInfoPoco.Offset = (int.Parse(pageNumber) - 1) * goodsInfoPoco.Limit; goodsInfoPoco.Userid = long.Parse(userId); IList <Goodssourceinformation> goodsPocoList = this.goodsInfoDao.DescendOrderPaginationFindByUserid(goodsInfoPoco); logger.Info("Got items count:" + goodsPocoList.Count.ToString()); string tableHTML = this.tableGenerator.getTableHTML(this.getTableHeader(), this.getTableData(goodsPocoList), this.getOperate()); logger.Info("Build table HTML done:" + tableHTML); return(tableHTML); }