PageAdmin网站内容管理系统(CMS)交流论坛

注册

 

QQ登录

只需一步,快速开始

发新话题 回复该主题

做了个班组工作栏目,在栏目列表和内容也都显示正常,怎么将列表... [复制链接]

1#
如题,栏目列表代码为@{
    int columnId = Html.CurrentColumnId();//当前栏目id
    PageInfo pageInfo = new PageInfo()
    {
        PageSize = 5,//每页显示12条数据
        CurrentPage = (int)ViewBag.CurrentPage //当前页码,系统预设
    };
    var dataList = Html.InfoDataList(new { ColumnId = columnId }, null, null, pageInfo);
}

<div class="clear padding-top-10 padding-bottom-10">
        <div class="web_navs1 zlm_left">
            @Html.Partial("subNavPartialleft")
        </div>
  <div class="web_wz_wc zlm_right">
            @Html.Partial("BreadcrumbPartial")
            <div class="letter_header"></div>
<table class="letter" width="100%" cellspacing="0" cellpadding="0" border="0">
                <tbody>
                  

                    @foreach (var item in dataList)
                    {
                        string Sbsj = item.Sbsj;
                        string Dbbz = item.Dbbz;
                                                string Bzcy = item.Bzcy;
                                                string Wcqk = item.Wcqk;
                        string url = Html.InfoDataUrl((int)item.ColumnId, (int)item.Id);
                        { <tr class="head">
                        <td width="13%" align="center"><strong>上班时间</strong></td>
                        <td width="13%" align="center"><strong>当班班长</strong></td>
                                                <td align="center"><strong>班组成员</strong></td>
                        <td align="center"><strong>任务完成情况</strong></td>
                    </tr>
            <tr class="item">
                                <td align="center">
                                    @Sbsj                                </td>
                                <td align="center">@Dbbz</td>
                                                                 <td width="24%" align="center">@Bzcy</td>
                                                                 <td align="center"><a href="@url" >详细情况</a></td>
                            </tr>                                                                                
                        }
                    }
          </tbody>
            </table>
            <p>&nbsp;</p>
  </div>
</div>
,怎么能在首页调用实现图片中这样的效果
,请高手指点,谢谢!
无标题.jpg (, 下载次数:0)

(2019/9/28 20:51:23 上传)

无标题.jpg

分享 转发
TOP
2#

var dataList = Html.InfoDataList(new { ColumnId = columnId }, null, null, pageInfo);

改为
var dataList = Html.InfoDataList(new { ColumnId = 栏目id });

栏目id 在栏目管理中可以看到
TOP
3#

谢谢老大,问题已解决!
TOP
发新话题 回复该主题