• 循环输出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>

  • 相关阅读:
    (转)样本方差的期望
    (转)Python 字典排序
    曝光补偿
    python判断字符串是否包含子字符串
    python requests接口测试 -----博客园串接口
    jmeter+ant+jenkins 搭建接口自动化测试
    TOMCAT闪退。cmd执行startup.bat保错:the CATALINA_HOME environment variable is not defined correctly
    selenium python自动化测试 ddt数据驱动
    jenkins到底如何拉取代码 如何部署的
    git 常用命令
  • 原文地址:https://www.cnblogs.com/dzdrmmf/p/6377298.html
Copyright © 2020-2023  润新知