|
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.225
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ASP
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Helpers;
using System.Web.Security;
using System.Web.UI;
using System.Web.WebPages;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using System.Web.Mvc.Html;
using System.Web.Routing;
using Signum.Utilities;
using Signum.Entities;
using Signum.Web;
using System.Collections;
using System.Collections.Specialized;
using System.ComponentModel.DataAnnotations;
using System.Configuration;
using System.Text;
using System.Text.RegularExpressions;
using System.Web.Caching;
using System.Web.DynamicData;
using System.Web.SessionState;
using System.Web.Profile;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using Signum.Entities.DynamicQuery;
using Signum.Entities.Reflection;
using Signum.Web.Properties;
using Signum.Engine;
[System.CodeDom.Compiler.GeneratedCodeAttribute("MvcRazorClassGenerator", "1.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Signum/Views/SearchResults.cshtml")]
public class _Page_Signum_Views_SearchResults_cshtml : System.Web.Mvc.WebViewPage<Context>
{
#line hidden
public _Page_Signum_Views_SearchResults_cshtml()
{
}
protected System.Web.HttpApplication ApplicationInstance
{
get
{
return ((System.Web.HttpApplication)(Context.ApplicationInstance));
}
}
public override void Execute()
{
WriteLiteral("\r\n");
FindOptions findOptions = (FindOptions)ViewData[ViewDataKeys.FindOptions];
QueryDescription queryDescription = (QueryDescription)ViewData[ViewDataKeys.QueryDescription];
var entityColumn = queryDescription.Columns.Single(a => a.IsEntity);
Type entitiesType = Reflector.ExtractLite(entityColumn.Type);
Implementations implementations = entityColumn.Implementations;
bool viewable = findOptions.View && (implementations != null || Navigator.IsNavigable(entitiesType, true));
ResultTable queryResult = (ResultTable)ViewData[ViewDataKeys.Results];
Dictionary<int, Func<HtmlHelper, object, MvcHtmlString>> formatters = (Dictionary<int, Func<HtmlHelper, object, MvcHtmlString>>)ViewData[ViewDataKeys.Formatters];
WriteLiteral("\r\n");
if (ViewData.ContainsKey(ViewDataKeys.MultipliedMessage))
{
WriteLiteral(" <tr class=\"sf-tr-multiply\">\r\n <td class=\"sf-td-multiply ui-state-highl" +
"ight\" colspan=\"");
Write(queryResult.Columns.Count() + (viewable ? 1 : 0) + (findOptions.AllowMultiple.HasValue ? 1 : 0));
WriteLiteral("\">\r\n <span class=\"ui-icon ui-icon-info\" style=\"float: left; margin-rig" +
"ht: .3em;\"></span>\r\n ");
Write(ViewData[ViewDataKeys.MultipliedMessage]);
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
}
WriteLiteral("\r\n");
foreach (var row in queryResult.Rows)
{
Lite entityField = row.Entity;
WriteLiteral(" <tr data-entity=\"");
Write(entityField.Key());
WriteLiteral("\">\r\n");
if (findOptions.AllowMultiple.HasValue)
{
WriteLiteral(" <td>\r\n");
if (findOptions.AllowMultiple.Value)
{
Write(Html.CheckBox(
Model.Compose("rowSelection", row.Index.ToString()),
new { value = entityField.Id.ToString() + "__" + Navigator.ResolveWebTypeName(entityField.RuntimeType) + "__" + entityField.ToStr }));
;
}
else
{
Write(Html.RadioButton(
Model.Compose("rowSelection"),
entityField.Id.ToString() + "__" + Navigator.ResolveWebTypeName(entityField.RuntimeType) + "__" + entityField.ToStr));
;
}
WriteLiteral(" </td>\r\n");
}
if (viewable)
{
WriteLiteral(" <td>\r\n ");
Write(QuerySettings.EntityFormatRules.Last(fr => fr.IsApplyable(entityField)).Formatter(Html, entityField));
WriteLiteral("\r\n </td>\r\n");
}
foreach (var col in queryResult.Columns)
{
WriteLiteral(" <td>\r\n ");
Write(formatters[col.Index](Html, row[col]));
WriteLiteral("\r\n </td>\r\n");
}
WriteLiteral(" </tr>\r\n");
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I'm Computer Scientist, one of the founders of Signum Software, and the lead developer behind Signum Framework.
www.signumframework.com
I love programming in C#, Linq, Compilers, Algorithms, Functional Programming, Computer Graphics, Maths...