Ejemplo n.º 1
0
        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 FilterTemplateParameters
        (
            string templateName,

            bool isPrimitive,

            [Comments("Update modelType first. Property name for the text field. Use a period for nested fields i.e. foo.bar.")]
            [ParameterEditorControl(ParameterControlType.ParameterSourcedPropertyInput)]
            [NameValue(AttributeNames.PROPERTYSOURCEPARAMETER, "modelType")]
            string textField,

            [Comments("Update modelType first. Property name for the value field. Use a period for nested fields i.e. foo.bar.")]
            [ParameterEditorControl(ParameterControlType.ParameterSourcedPropertyInput)]
            [NameValue(AttributeNames.PROPERTYSOURCEPARAMETER, "modelType")]
            string valueField,

            DataRequestStateParameters state,

            RequestDetailsParameters requestDetails,

            [ParameterEditorControl(ParameterControlType.ParameterSourceOnly)]
            [NameValue(AttributeNames.DEFAULTVALUE, "Contoso.Domain.Entities")]
            [Comments("Fully qualified class name for the model type.")]
            string modelType = null
        )
        {
            TemplateName   = templateName;
            IsPrimitive    = isPrimitive;
            TextField      = textField;
            ValueField     = valueField;
            State          = state;
            RequestDetails = requestDetails;
        }
        public DomainRequestParameters
        (
            [Comments("Defines the request state including the sort, filter, page and page size.")]
            DataRequestStateParameters state,

            [Comments("URL and other meta data for the data request.")]
            RequestDetailsParameters requestDetails
        )
        {
            State          = state;
            RequestDetails = requestDetails;
        }
Ejemplo n.º 4
0
        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 MultiSelectTemplateParameters
        (
            [Comments("HTML template for the drop-down.")]
            [NameValue(AttributeNames.DEFAULTVALUE, "multiSelectTemplate")]
            string templateName,

            [Comments("Place holder text.")]
            [NameValue(AttributeNames.DEFAULTVALUE, "Select One ...")]
            string placeHolderText,

            [Comments("Update modelType first. Property name for the text field. Use a period for nested fields i.e. foo.bar.")]
            [ParameterEditorControl(ParameterControlType.ParameterSourcedPropertyInput)]
            [NameValue(AttributeNames.PROPERTYSOURCEPARAMETER, "modelType")]
            [NameValue(AttributeNames.DEFAULTVALUE, "text")]
            string textField,

            [Comments("Update modelType first. Property name for the value field. Use a period for nested fields i.e. foo.bar.")]
            [ParameterEditorControl(ParameterControlType.ParameterSourcedPropertyInput)]
            [NameValue(AttributeNames.PROPERTYSOURCEPARAMETER, "modelType")]
            [NameValue(AttributeNames.DEFAULTVALUE, "value")]
            string valueField,

            [Comments("Details about the drop-down data source including joins and partial field set (selects).")]
            RequestDetailsParameters requestDetails,

            [Comments("The request state defines sorting, filtering, grouping and aggregates if necessary.")]
            DataRequestStateParameters state = null,

            [ParameterEditorControl(ParameterControlType.ParameterSourceOnly)]
            [Comments("Fully qualified class name for the model type.")]
            string modelType = "Contoso.Domain.Entities"
        )
        {
            TemplateName    = templateName;
            PlaceHolderText = placeHolderText;
            TextField       = textField;
            ValueField      = valueField;
            State           = state;
            RequestDetails  = requestDetails;
            ModelType       = modelType;
        }
        public AboutFormSettingsParameters
        (
            [NameValue(AttributeNames.DEFAULTVALUE, "Title")]
            [Comments("Header field on the form")]
            string title,

            [Comments("Includes the URL to retrieve the data.")]
            RequestDetailsParameters requestDetails,

            [Comments("Defines the state of the request including the sort, filter, page and page size.")]
            DataRequestStateParameters state,

            [Comments("List of fields and form groups for display.")]
            List <DetailItemParameters> fieldSettings
        )
        {
            Title          = title;
            RequestDetails = requestDetails;
            State          = state;
            FieldSettings  = fieldSettings;
        }
Ejemplo n.º 7
0
        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;
        }