本文整理汇总了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> </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=\"");
//.........这里部分代码省略.........