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


C# this.Column方法代码示例

本文整理汇总了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;
        }
开发者ID:reinforced,项目名称:Reinforced.Lattice.Documentation,代码行数:12,代码来源:Table.cs

示例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;
        }
开发者ID:reinforced,项目名称:Reinforced.Lattice.Documentation,代码行数:34,代码来源:Table.cs

示例3: GetUniqueIndex

 public static string GetUniqueIndex(this HbmManyToOne item)
 {
     if (item.index != null)
     {
         return item.index;
     }
     return item.Column().GetUniqueIndex();
 }
开发者ID:mvba,项目名称:hbm-to-fnh,代码行数:8,代码来源:HbmManyToOneExtensions.cs

示例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);
 }
开发者ID:RandomStuffs22,项目名称:Labs,代码行数:8,代码来源:Extensions.cs

示例5: CanBeNull

 public static bool? CanBeNull(this HbmProperty item)
 {
     if (item.notnullSpecified)
     {
         return !item.notnull;
     }
     return item.Column().CanBeNull();
 }
开发者ID:MelleKoning,项目名称:hbm-to-fnh,代码行数:8,代码来源:HbmPropertyExtensions.cs

示例6: GetUniqueIndex

 public static string GetUniqueIndex(this HbmProperty item)
 {
     if (item.index != null)
     {
         return item.index;
     }
     return item.Column().GetUniqueIndex();
 }
开发者ID:MelleKoning,项目名称:hbm-to-fnh,代码行数:8,代码来源:HbmPropertyExtensions.cs

示例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;
        }
开发者ID:Lombiq,项目名称:Associativy-Core,代码行数:9,代码来源:CreateTableCommandExtensions.cs

示例8: GetColumnName

 public static string GetColumnName(this HbmId item)
 {
     HbmColumn column = item.Column();
     if (column == null)
     {
         return null;
     }
     return column.name;
 }
开发者ID:MelleKoning,项目名称:hbm-to-fnh,代码行数:9,代码来源:HbmIdExtensions.cs

示例9: GetColumnName

        public static string GetColumnName(this HbmManyToOne item)
        {
            if (item.column != null && !item.column.IsEmpty())
            {
                return item.column;
            }

            return item.Column().name;
        }
开发者ID:mvba,项目名称:hbm-to-fnh,代码行数:9,代码来源:HbmManyToOneExtensions.cs

示例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;
 }
开发者ID:MelleKoning,项目名称:hbm-to-fnh,代码行数:10,代码来源:HbmIdExtensions.cs

示例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;
 }
开发者ID:MelleKoning,项目名称:hbm-to-fnh,代码行数:10,代码来源:HbmPropertyExtensions.cs

示例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;
 }
开发者ID:mvba,项目名称:hbm-to-fnh,代码行数:10,代码来源:HbmManyToOneExtensions.cs

示例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>")
                 )
     );
 }
开发者ID:leoregisr,项目名称:planb-test-1,代码行数:10,代码来源:WebGridExtensions.cs

示例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();
        }
开发者ID:mvba,项目名称:hbm-to-fnh,代码行数:11,代码来源:HbmManyToOneExtensions.cs

示例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;
        }
开发者ID:mvba,项目名称:hbm-to-fnh,代码行数:12,代码来源:HbmManyToOneExtensions.cs


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