zoukankan      html  css  js  c++  java
  • 循环输出ViewBag集合

    <tr>
                <td>
                    权限分配:
                </td>
                <td>
                    <table id="table1">
                        @{
                        
                            var userGroupArray = ViewBag.UserGroupLogSyslist as IList<UserGroupLogSys>;

                            if (userGroupArray != null && userGroupArray.Count > 0)
                            {

                                double userGroupCount = (userGroupArray.Count() * 1.0) / 5;
                                int iCount = (int)Math.Ceiling((decimal)userGroupCount);
                                int num = 0;
                                int jnum = 0;
                                for (int j = 0; j < iCount; j++)
                                {

                                    jnum = num;
                                
                            <tr>
                                @for (int i = num; i < userGroupArray.Count; i++)
                                {

                                    if (num % 5 == 0 && num != jnum)
                                    {
                                        break;
                                    }
                                    else
                                    {
                                  
                                    <td>
                                        <input type="checkbox" value="@userGroupArray[i].ID" name='checkboxs'/>
                                        @userGroupArray[i].userGroupFlag _ @userGroupArray[i].LogSys _ @userGroupArray[i].CompanyName
                                    </td>
                                        
                                    }

                                    num++;

                                }
                            </tr>
                                
                                }
                            }
                        }
                    </table>
                </td>
            </tr>

  • 相关阅读:
    详细讲解 关于Linux静态库和动态库的分析
    linux下的共享库(动态库)和静态库
    原子性
    TCP-心跳
    linux alsa pcm(此pcm非硬件pcm接口)
    linux音频 DAPM之二:audio paths与dapm kcontrol
    linux 音频驱动
    imx6qsbd kpp
    nand flash详解及驱动编写
    嵌入式Qt程序启动参数-qws 不需要X11桌面系统
  • 原文地址:https://www.cnblogs.com/dzdrmmf/p/6377298.html
Copyright © 2011-2022 走看看