当前位置: 首页>>代码示例>>C#>>正文


C# SelectList.Any方法代码示例

本文整理汇总了C#中System.Web.Mvc.SelectList.Any方法的典型用法代码示例。如果您正苦于以下问题:C# SelectList.Any方法的具体用法?C# SelectList.Any怎么用?C# SelectList.Any使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Web.Mvc.SelectList的用法示例。


在下文中一共展示了SelectList.Any方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Grid

public static System.Web.WebPages.HelperResult Grid(string id, SelectList choices, SelectList prompts, Grid<string> values, string label, string summary, bool readOnly = false) {
return new System.Web.WebPages.HelperResult(__razor_helper_writer => {



#line 196 "..\..\FlowForms\Helpers\HelperDefinitions.cshtml"
                                                                                                                                           
    var cellClass = readOnly ? "readonlyTd" : "textTd";

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "    <table summary=\"");



#line 198 "..\..\FlowForms\Helpers\HelperDefinitions.cshtml"
WebViewPage.WriteTo(@__razor_helper_writer, summary);

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "\" id=\"");



#line 198 "..\..\FlowForms\Helpers\HelperDefinitions.cshtml"
WebViewPage.WriteTo(@__razor_helper_writer, id);

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "\">\r\n        <tr>\r\n            <td>&nbsp;</td>\r\n");



#line 201 "..\..\FlowForms\Helpers\HelperDefinitions.cshtml"
             foreach(var choice in choices) {

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "                <th scope=\"col\">");



#line 202 "..\..\FlowForms\Helpers\HelperDefinitions.cshtml"
WebViewPage.WriteTo(@__razor_helper_writer, choice.Text);

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "</th>\r\n");



#line 203 "..\..\FlowForms\Helpers\HelperDefinitions.cshtml"
            }

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "        </tr>\r\n");



#line 205 "..\..\FlowForms\Helpers\HelperDefinitions.cshtml"
         foreach(var prompt in prompts) {
            var printRow = !readOnly
                || !string.IsNullOrWhiteSpace(prompt.Text)
                || choices.Any(choice => !string.IsNullOrWhiteSpace(values.Cell(prompt.Value, choice.Value)));
            if (printRow) {

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "                <tr>\r\n                    <th scope=\"row\">");



#line 211 "..\..\FlowForms\Helpers\HelperDefinitions.cshtml"
WebViewPage.WriteTo(@__razor_helper_writer, prompt.Text);

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "</th>\r\n");



#line 212 "..\..\FlowForms\Helpers\HelperDefinitions.cshtml"
                     foreach(var choice in choices) {
                        var cellId = string.Format("{0}.{1}.{2}", id, prompt.Value, choice.Value);

#line default
#line hidden

WebViewPage.WriteLiteralTo(@__razor_helper_writer, "                        <td class=\"");


//.........这里部分代码省略.........
开发者ID:SharePointSusan,项目名称:Research-Data-Manager,代码行数:101,代码来源:HelperDefinitions.generated.cs


注:本文中的System.Web.Mvc.SelectList.Any方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。