示例#1
0
        public static PropertyBuilder <TType, T> UsingDataSourceProperty <TType, T>(this PropertyBuilder <TType, T> builder, string datasourceProperty, DataSourcePropertyIsNullMode nullMode = DataSourcePropertyIsNullMode.SelectNothing, CriteriaOperator isNullCriteria = null) where TType : class
        {
            var crit = ReferenceEquals(isNullCriteria, null) ? string.Empty : isNullCriteria.ToString();

            return(builder.WithAttribute(new DataSourcePropertyAttribute(datasourceProperty, nullMode, crit)));
        }
示例#2
0
 public static PropertyBuilder <TType, T> UsingDataSourceCriteriaAttribute <TType, T>(this PropertyBuilder <TType, T> builder, CriteriaOperator datasourceCriteria) where TType : class
 {
     return(builder.UsingDataSourceCriteriaAttribute(datasourceCriteria.ToString()));
 }
示例#3
0
 public static PropertyBuilder <TType, T> UsingDataSourceCriteriaAttribute <TType, T>(this PropertyBuilder <TType, T> builder, string datasourceCriteria) where TType : class
 {
     return(builder.WithAttribute(new DataSourceCriteriaAttribute(datasourceCriteria)));
 }
示例#4
0
 public static PropertyBuilder <TType, T> UsingDataSourceCriteriaProperty <TType, T, TProp>(this PropertyBuilder <TType, T> builder, Expression <Func <T, TProp> > datasourceProperty)
     where TType : class
     where T : class
 {
     return(builder.UsingDataSourceCriteriaProperty(builder._Fields.GetPropertyName(datasourceProperty)));
 }
示例#5
0
 public static PropertyBuilder <TType, T> UsingDataSourceProperty <TType, T, TProp>(this PropertyBuilder <TType, T> builder, Expression <Func <T, TProp> > datasourceProperty, DataSourcePropertyIsNullMode nullMode = DataSourcePropertyIsNullMode.SelectNothing, CriteriaOperator isNullCriteria = null)
     where TType : class
     where T : class
 {
     return(builder.UsingDataSourceProperty(builder._Fields.GetPropertyName(datasourceProperty), nullMode, isNullCriteria));
 }
 public static PropertyBuilder <string, T> HasEditMask <T>(this PropertyBuilder <string, T> builder, string editMask)
 {
     return(builder.WithModelDefault(ModelDefaultKeys.EditMask.EditMaskKey, editMask));
 }