public static void SetupSearchableField(ISearchableField field, FieldResult fieldResult) { field.SearchConfiguration = ParseSearchFieldConfiguration(fieldResult.FilterData); field.FilterCommand = fieldResult.FilterCommand; field.FilterData = fieldResult.FilterData; field.FilterType = fieldResult.FilterType ?? 0; }
public static LookupPropertyField ToLookupPropertyField(this FieldResult fieldResult) { var field = fieldResult.ToGenericPropertyField <LookupPropertyField>(); SetupSearchableField(field, fieldResult); return(field); }
public static SearchField ToSearchField(this FieldResult fieldResult) { var field = fieldResult.ToField <SearchField>(); SetupSearchableField(field, fieldResult); return(field); }
public static GridField ToGridField(this FieldResult fieldResult) { var field = fieldResult.ToField <GridField>(); field.Order = fieldResult.ResultOrder ?? int.MaxValue; return(field); }
public static TPropertyField ToGenericPropertyField <TPropertyField>(this FieldResult fieldResult) where TPropertyField : PropertyField, new() { var field = fieldResult.ToField <TPropertyField>(); field.IsEditable = field.IsEditable; field.Order = fieldResult.ViewerOrder ?? fieldResult.ResultOrder ?? int.MaxValue; return(field); }
public static TField ToField <TField>(this FieldResult fieldResult) where TField : Field, new() { return(new TField { Identifier = fieldResult.UniqueName ?? fieldResult.ID.ToString(), DisplayName = fieldResult.Name, Type = fieldResult.Type, IsKey = fieldResult.IsKey, MapTo = fieldResult.MapTo, Format = fieldResult.Format }); }
public static PropertyField ToPropertyField(this FieldResult fieldResult) { return(fieldResult.ToGenericPropertyField <PropertyField>()); }