本文整理汇总了C#中this.Column方法的典型用法代码示例。如果您正苦于以下问题:C# this.Column方法的具体用法?C# this.Column怎么用?C# this.Column使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类this
的用法示例。
在下文中一共展示了this.Column方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Configure
public static Configurator<BearData, BearRow> Configure(this Configurator<BearData, BearRow> conf)
{
// we hide redundant columns just for convinence
conf.Column(c=>c.ImageUrl).DataOnly();
conf.Column(c=>c.Sales).DataOnly();
conf.Column(c=>c.RecentlySoldDate).DataOnly();
conf.Column(c => c.Rating)
.TemplateFunction("formatRating")
.Orderable(c => c.Rating, ui => ui.UseClientOrdering());
return conf;
}
示例2: Configure
public static Configurator<Source, Target> Configure(this Configurator<Source, Target> conf)
{
conf.Column(c=>c.Id).DataOnly();
conf.AppendEmptyFilters();
conf.Limit(ui => ui.EnableClientLimiting().Values(new[] {"All", "-", "10", "25", "50"}, "10"),"lt");
conf.Paging(ui=>ui.PagingWithPeriods().EnableClientPaging(),"rb");
conf.Column(c => c.Name).FilterValue(c => c.Name, ui => ui.ClientFiltering());
conf.Column(c => c.Name);
conf.Column(c => c.Size)
.FormatEnumWithDisplayAttribute()
.Orderable(c => c.Size, ui => ui.UseClientOrdering())
.FilterSelect(c=>c.Size,ui=>ui.SelectAny().SelectItems(EnumHelper.GetSelectList(typeof(BearSize))));
conf.Column(c => c.IsAvailableForCheckout).Template(tpl =>
{
tpl.ReturnsIf("{IsAvailableForCheckout}"
, x => x.Tag("span").Class("glyphicon glyphicon-ok").Css("color", "green")
, x => x.Tag("span").Class("glyphicon glyphicon-remove").Css("color", "darkred"));
}).Title("Checkout?");
conf.Column(c => c.LastSale).Title("Last sale")
.Template(tpl => tpl.Returns("`moment({LastSale}).format('MMM Do YY')`"))
.Orderable(c => c.LastSale, ui => ui.UseClientOrdering());
conf.Column(c => c.QuantityAvailable).Title("Quantity");
conf.Column(c => c.StoreAddress).Title("Store address");
return conf;
}
示例3: GetUniqueIndex
public static string GetUniqueIndex(this HbmManyToOne item)
{
if (item.index != null)
{
return item.index;
}
return item.Column().GetUniqueIndex();
}
示例4: SelectColumns
public static DenseMatrix SelectColumns(this DenseMatrix mtx, IEnumerable<int> indexes)
{
var cols = new List<DenseVector> ();
foreach (int index in indexes) {
cols.Add ((DenseVector)mtx.Column (index));
}
return DenseMatrix.OfColumns (cols [0].Count, cols.Count, cols);
}
示例5: CanBeNull
public static bool? CanBeNull(this HbmProperty item)
{
if (item.notnullSpecified)
{
return !item.notnull;
}
return item.Column().CanBeNull();
}
示例6: GetUniqueIndex
public static string GetUniqueIndex(this HbmProperty item)
{
if (item.index != null)
{
return item.index;
}
return item.Column().GetUniqueIndex();
}
示例7: NodeConnectorRecord
public static CreateTableCommand NodeConnectorRecord(this CreateTableCommand table)
{
table
.Column<int>("Id", column => column.PrimaryKey().Identity())
.Column<int>("Node1Id", column => column.NotNull())
.Column<int>("Node2Id", column => column.NotNull());
return table;
}
示例8: GetColumnName
public static string GetColumnName(this HbmId item)
{
HbmColumn column = item.Column();
if (column == null)
{
return null;
}
return column.name;
}
示例9: GetColumnName
public static string GetColumnName(this HbmManyToOne item)
{
if (item.column != null && !item.column.IsEmpty())
{
return item.column;
}
return item.Column().name;
}
示例10: GetMaxLength
public static int? GetMaxLength(this HbmId item)
{
int? maxLength = item.length.ParseInt32();
if (maxLength == null)
{
HbmColumn column = item.Column();
maxLength = column.length.ParseInt32();
}
return maxLength;
}
示例11: GetColumnName
public static string GetColumnName(this HbmProperty item)
{
string columnName = item.column;
if (columnName == null)
{
HbmColumn column = item.Column();
columnName = column.name;
}
return columnName;
}
示例12: GetSqlType
public static string GetSqlType(this HbmManyToOne item)
{
string columnName = item.column;
if (columnName == null)
{
HbmColumn column = item.Column();
columnName = column.sqltype;
}
return columnName;
}
示例13: Links
public static WebGridColumn Links(this WebGrid grid, HtmlHelper html, UrlHelper url)
{
return grid.Column(
header: "editar",
style: "action-cell",
format: item => new HtmlString(
string.Format(@"<a href='" + url.Action("Atualizar", new {id= item.ID}) + "' class='list-button' title='editar'><i class='fa fa-pencil-square-o'></i></a>")
)
);
}
示例14: CanBeNull
public static bool? CanBeNull(this HbmManyToOne item)
{
if (item.notnullSpecified)
{
return !item.notnull;
}
var column = item.Column();
if (column == null) return null;
return column.CanBeNull();
}
示例15: GetMaxLength
public static int? GetMaxLength(this HbmManyToOne item)
{
string sqlType = item.GetSqlType();
if (sqlType != "VARCHAR2")
{
return null;
}
HbmColumn column = item.Column();
int? maxLength = column.length.ParseInt32();
return maxLength;
}