public DataRequestStateParameters ( [Comments("Number of records to skip.")] int?skip = null, [Comments("Page size.")] int?take = null, [Comments("Sort descriptor.")] List <SortParameters> sort = null, [Comments("Group by.")] List <GroupParameters> group = null, [Comments("Filter descriptors.")] FilterGroupParameters filterGroup = null, [Comments("Aggregate functions.")] List <AggregateDefinitionParameters> aggregates = null ) { Skip = skip; Take = take; Sort = sort; Group = group; FilterGroup = filterGroup; Aggregates = aggregates; }
public DetailFormSettingsParameters ( [NameValue(AttributeNames.DEFAULTVALUE, "Title")] [Comments("Header field on the form")] string title, [ParameterEditorControl(ParameterControlType.ParameterSourcedPropertyInput)] [NameValue(AttributeNames.PROPERTYSOURCEPARAMETER, "modelType")] [Comments("Update modelType first. This field is displayed next to the title.")] string displayField, [Comments("Includes the URL to retrieve the data.")] RequestDetailsParameters requestDetails, [Comments("List of fields and form groups for display.")] List <DetailItemParameters> fieldSettings, [Comments("Defines the filter for the single object being displayed.")] FilterGroupParameters filterGroup = null, [ParameterEditorControl(ParameterControlType.ParameterSourceOnly)] [Comments("Fully qualified class name for the model type.")] string modelType = "Contoso.Domain.Entities" ) { Title = title; DisplayField = displayField; RequestDetails = requestDetails; FieldSettings = fieldSettings; FilterGroup = filterGroup; }
public EditFormSettingsParameters ( [NameValue(AttributeNames.DEFAULTVALUE, "Title")] [Comments("Header field on the form")] string title, [ParameterEditorControl(ParameterControlType.ParameterSourcedPropertyInput)] [NameValue(AttributeNames.PROPERTYSOURCEPARAMETER, "modelType")] [Comments("Update modelType first. This field is displayed next to the title - empty on Create.")] string displayField, [Comments("Includes the URL's for create, read, update and delete.")] RequestDetailsParameters requestDetails, [Comments("Input validation messages for each field.")] List <ValidationMessageParameters> validationMessages, [Comments("List of fields and form groups for this form.")] List <FormItemSettingParameters> fieldSettings, [Comments("Defines the filter for the single object being edited - does not apply on Create.")] FilterGroupParameters filterGroup = null, [Comments("Conditional directtives for each field.")] List <VariableDirectivesParameters> conditionalDirectives = null, [ParameterEditorControl(ParameterControlType.ParameterSourceOnly)] [Comments("Fully qualified class name for the model type.")] string modelType = "Contoso.Domain.Entities" ) { Title = title; DisplayField = displayField; RequestDetails = requestDetails; ValidationMessages = validationMessages.ToDictionary(kvp => kvp.Field, kvp => kvp.Methods); FieldSettings = fieldSettings; FilterGroup = filterGroup; ConditionalDirectives = conditionalDirectives == null ? new Dictionary <string, List <DirectiveParameters> >() : conditionalDirectives .Select(cd => new VariableDirectivesParameters { Field = cd.Field.Replace('.', '_'), ConditionalDirectives = cd.ConditionalDirectives }) .ToDictionary(kvp => kvp.Field, kvp => kvp.ConditionalDirectives); ModelType = modelType; }
public GridSettingsParameters ( [Comments("Grid Title.")] string title, [Comments("True if the grid is sortable otherwise false")] [Domain("true,false")] [ParameterEditorControl(ParameterControlType.DropDown)] bool sortable, [Comments("True if the grid is pageable otherwise false")] [Domain("true,false")] [ParameterEditorControl(ParameterControlType.DropDown)] bool pageable, [Comments("'scrollable' if the grid is scrollable otherwise empty string.")] [Domain("scrollable")] string scrollable, [Comments("True if the grid is groupable otherwise false")] [Domain("true,false")] [ParameterEditorControl(ParameterControlType.DropDown)] bool groupable, [Comments("True if the grid is filterpable otherwise false. The filterableType field takes precedence.")] [Domain("true,false")] [ParameterEditorControl(ParameterControlType.DropDown)] bool isFilterable, [Comments("Defines the type of filter for the grid. Use menu, row for both filter types. When a filter type has been set, the grid will be filterable regardless of the isFilterable property.")] [Domain("row,menu,\"menu, row\"")] string filterableType, [Comments("URL and other meta data for the data request.")] RequestDetailsParameters requestDetails, [Comments("Column definitions.")] List <ColumnSettingsParameters> columns, [Comments("The grid ID helps determine if a command button should be assigned to the grid's command column.")] int?gridId = null, [Comments("Filter descriptors.")] FilterGroupParameters itemFilter = null, [Comments("Gives the grid a fixed height when set.")] int?height = null, [Comments("Details about the command (Edit, Detail, Delete) column.")] CommandColumnParameters commandColumn = null, [Comments("Defines the state of the grid including the sort, filter, page and page size.")] DataRequestStateParameters state = null, [Comments("List of fields and correspondong aggregate functions if set.")] List <AggregateDefinitionParameters> aggregates = null, [Comments("Detail grid if set.")] GridSettingsParameters detailGridSettings = null ) { Title = title; Sortable = sortable; Pageable = pageable; Scrollable = scrollable; Groupable = groupable; IsFilterable = isFilterable; FilterableType = filterableType; Columns = columns; GridId = gridId; ItemFilter = itemFilter; Height = height; CommandColumn = commandColumn; State = state; Aggregates = aggregates; RequestDetails = requestDetails; DetailGridSettings = detailGridSettings; }