MVC View返回list列表
{
Sql sql1 = new Sql().Append("WHERE DataType = @0 And IsMyStates=1 And IsAdminStates=1 And IsDefault=1 ", "Z001").OrderBy(" Sequence desc");
IList<NewsInfo> list1 = NewsService.GetList(sql1, 6);
Sql sql2 = new Sql().Append("WHERE DataType = @0 And IsMyStates=1 And IsAdminStates=1 And IsDefault=1 ", "Z002").OrderBy(" Sequence desc");
IList<NewsInfo> list2 = NewsService.GetList(sql2, 5);
Sql sql3 = new Sql().Append("WHERE DataType = @0 And IsMyStates=1 And IsAdminStates=1 And IsDefault=1 ", "Z003").OrderBy(" Sequence desc");
IList<NewsInfo> list3 = NewsService.GetList(sql3, 6);
Sql sql4 = new Sql().Append("WHERE DataType = @0 And IsMyStates=1 And IsAdminStates=1 And IsDefault=1 ", "Z004").OrderBy(" Sequence desc");
IList<NewsInfo> list4 = NewsService.GetList(sql4, 6);
Sql sql5 = new Sql().Append("WHERE DataType = @0 And IsMyStates=1 And IsAdminStates=1 And IsDefault=1 ", "Z005").OrderBy(" Sequence desc");
IList<NewsInfo> list5 = NewsService.GetList(sql5, 6);
Sql sql6 = new Sql().Append("WHERE DataType = @0 And IsMyStates=1 And IsAdminStates=1 And IsDefault=1 ", "Z006").OrderBy(" Sequence desc");
IList<NewsInfo> list6 = NewsService.GetList(sql6, 6);
Sql sql7 = new Sql().Append("WHERE DataType = @0 And IsMyStates=1 And IsAdminStates=1 And IsDefault=1 ", "Z007").OrderBy(" Sequence desc");
IList<NewsInfo> list7 = NewsService.GetList(sql7, 4);
Sql sql8 = new Sql().Append("WHERE DataType = @0 And IsMyStates=1 And IsAdminStates=1 And IsDefault=1 ", "Z008").OrderBy(" Sequence desc");
IList<NewsInfo> list8 = NewsService.GetList(sql8, 2);
//IList<ConstDataInfo> list9 = ConstDataService.GetConstDataListLeafByType("C0001");
//IList<ConstDataInfo> list10 = ConstDataService.GetConstDataListLeafByType("C0002");
//IList<ConstDataInfo> list11 = ConstDataService.GetConstDataListLeafByType("C0003");
ViewBag.jList = ConstDataService.GetConstDataListRootByType(EnumUtil.ConstDataType.JfjcType);
return View(new IndexModel(list1, list2, list3, list4, list5, list6, list7, list8));
}
model:
前台html
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。