Search Results for

    Show / Hide Table of Contents

    Class SQLWrapperResultsController

    A standard controller that displays results of executing a ISQLWrapper against any entity in the system

    Uses the SQLWrapperResultsViewParams for the parameters of the ISQLWrapper to execute

    Inheritance
    System.Object
    ModelViewController
    BaseGridController
    BaseGridControllerAny<ISQLWrapperResult>
    BaseGridAnyRelatedAnyCollectionController<ISQLWrapperResult>
    SQLWrapperResultsController
    Implements
    IBaseGridController
    IModelViewController
    ICollectionExportable
    INewGridItemImplementor<ISQLWrapperResult>
    ICopyGridItemImplementor<ISQLWrapperResult>
    IGrid
    IDeleteGridItemImplementor<ISQLWrapperResult>
    Inherited Members
    BaseGridAnyRelatedAnyCollectionController<ISQLWrapperResult>.GetGridController(IBaseGridAnyRelatedAnyCollection<ISQLWrapperResult>)
    BaseGridAnyRelatedAnyCollectionController<ISQLWrapperResult>.SingleItem
    BaseGridAnyRelatedAnyCollectionController<ISQLWrapperResult>.AlterQuery(QueryableExecuter<ISQLWrapperResult>)
    BaseGridAnyRelatedAnyCollectionController<ISQLWrapperResult>.UpdateNewItem(ISQLWrapperResult)
    BaseGridAnyRelatedAnyCollectionController<ISQLWrapperResult>.CollectionRelationshipColumnNameLabel
    BaseGridAnyRelatedAnyCollectionController<ISQLWrapperResult>.PopulateNewFromLookupColumnName
    BaseGridControllerAny<ISQLWrapperResult>.GetGridController(IBaseGrid<ISQLWrapperResult>)
    BaseGridControllerAny<ISQLWrapperResult>.CollectionType
    BaseGridControllerAny<ISQLWrapperResult>.GetInternalDescriptor()
    BaseGridControllerAny<ISQLWrapperResult>.Descriptor
    BaseGridControllerAny<ISQLWrapperResult>.CanEditRowItem(ISQLWrapperResult)
    BaseGridControllerAny<ISQLWrapperResult>.TrackItemChanges
    BaseGridControllerAny<ISQLWrapperResult>.OnTrackedItemChanged(Object, String)
    BaseGridControllerAny<ISQLWrapperResult>.BulkUpdateMulltipleSelectedItemsOnEdit
    BaseGridControllerAny<ISQLWrapperResult>.GridView
    BaseGridControllerAny<ISQLWrapperResult>.GetGridSourceItems(IEnumerable<ISQLWrapperResult>)
    BaseGridControllerAny<ISQLWrapperResult>.AlterLoadedItems(IEnumerable<ISQLWrapperResult>)
    BaseGridControllerAny<ISQLWrapperResult>.Clear()
    BaseGridControllerAny<ISQLWrapperResult>.CloseController()
    BaseGridControllerAny<ISQLWrapperResult>.CurrentGridItems
    BaseGridControllerAny<ISQLWrapperResult>.CurrentItems
    BaseGridControllerAny<ISQLWrapperResult>.InitDisplay()
    BaseGridControllerAny<ISQLWrapperResult>.ResetColumnsAndGroups(Boolean)
    BaseGridControllerAny<ISQLWrapperResult>.LoadAdditionalColumns()
    BaseGridControllerAny<ISQLWrapperResult>.AddCol(Int16, ControlDisplayInfoLight, EntityDescriptor)
    BaseGridControllerAny<ISQLWrapperResult>.ColumnNames()
    BaseGridControllerAny<ISQLWrapperResult>.PivotColumns(Int16)
    BaseGridControllerAny<ISQLWrapperResult>.AddStandardColumns
    BaseGridControllerAny<ISQLWrapperResult>.StandardColumnsUniqueGroupKey
    BaseGridControllerAny<ISQLWrapperResult>.ApplyGridSettingsToFilter(QueryableExecuter)
    BaseGridControllerAny<ISQLWrapperResult>.ApplyPaging(QueryableExecuter)
    BaseGridControllerAny<ISQLWrapperResult>.SetTotalCount(Int32)
    BaseGridControllerAny<ISQLWrapperResult>.DefaultRowCount
    BaseGridControllerAny<ISQLWrapperResult>.PagerRequired
    BaseGridControllerAny<ISQLWrapperResult>.CurrentPageIndex
    BaseGridControllerAny<ISQLWrapperResult>.TotalCount
    BaseGridControllerAny<ISQLWrapperResult>.TotalPageCount
    BaseGridControllerAny<ISQLWrapperResult>.Sortings
    BaseGridControllerAny<ISQLWrapperResult>.Filters
    BaseGridControllerAny<ISQLWrapperResult>.SetPageIndex(Int32)
    BaseGridControllerAny<ISQLWrapperResult>.TrackResults(IEnumerable<ISQLWrapperResult>)
    BaseGridControllerAny<ISQLWrapperResult>.AlterColumnInfo(ControlDisplayInfo)
    BaseGridControllerAny<ISQLWrapperResult>.UpdateColumnFromName(String)
    BaseGridControllerAny<ISQLWrapperResult>.TogglerZeroColumn
    BaseGridControllerAny<ISQLWrapperResult>.IsZeroColumnColumnVisible(String)
    BaseGridControllerAny<ISQLWrapperResult>.ToggleZeroColumns()
    BaseGridControllerAny<ISQLWrapperResult>.UpdateAllZeroColumns()
    BaseGridControllerAny<ISQLWrapperResult>.UpdateTransferColumnStatus()
    BaseGridControllerAny<ISQLWrapperResult>.TransferColToggler
    BaseGridControllerAny<ISQLWrapperResult>.CanDelete(ISQLWrapperResult)
    BaseGridControllerAny<ISQLWrapperResult>.CanCreateNew
    BaseGridControllerAny<ISQLWrapperResult>.GetStandardExtraColumns(String)
    BaseGridControllerAny<ISQLWrapperResult>.IDeleteGridItemImplementor<ISQLWrapperResult>.Grid
    BaseGridControllerAny<ISQLWrapperResult>.NewItemHelper
    BaseGridControllerAny<ISQLWrapperResult>.CopyItemHelper
    BaseGridControllerAny<ISQLWrapperResult>.GetPublicToggleCommand()
    BaseGridControllerAny<ISQLWrapperResult>.GetNewGridCommand()
    BaseGridControllerAny<ISQLWrapperResult>.GetCopyGridCommand()
    BaseGridControllerAny<ISQLWrapperResult>.GetDeleteCommand()
    BaseGridControllerAny<ISQLWrapperResult>.GetUpCommand()
    BaseGridControllerAny<ISQLWrapperResult>.GetDownCommand()
    BaseGridControllerAny<ISQLWrapperResult>.AllowColumnSelection
    BaseGridControllerAny<ISQLWrapperResult>.AllowPublicToggleCommand
    BaseGridControllerAny<ISQLWrapperResult>.AllowSearchCommand
    BaseGridControllerAny<ISQLWrapperResult>.AllowDeleteCommand
    BaseGridControllerAny<ISQLWrapperResult>.AllowNewCommand
    BaseGridControllerAny<ISQLWrapperResult>.AllowCopyCommand
    BaseGridControllerAny<ISQLWrapperResult>.AllowXMLImportExport
    BaseGridControllerAny<ISQLWrapperResult>.AllowMultipleSelect
    BaseGridControllerAny<ISQLWrapperResult>.AllowExcelExport
    BaseGridControllerAny<ISQLWrapperResult>.AllowSequencing
    BaseGridControllerAny<ISQLWrapperResult>.AutoOpenNewItemInTab
    BaseGridControllerAny<ISQLWrapperResult>.OpenFromRelatedColumnName
    BaseGridControllerAny<ISQLWrapperResult>.GetLookupIDsForNewItems(Func<IBaseEntity, Task>)
    BaseGridControllerAny<ISQLWrapperResult>.PreventDuplicateLookupIDs
    BaseGridControllerAny<ISQLWrapperResult>.RemoveItems(IEnumerable<ISQLWrapperResult>)
    BaseGridControllerAny<ISQLWrapperResult>.AddItem(ISQLWrapperResult)
    BaseGridController.ComboItemsClear
    BaseGridController.AllPossibleSearchColumns()
    BaseGridController.InternalFilter
    BaseGridController.ColumnSortings
    BaseGridController.ColumnFilters
    BaseGridController.SearchColumns
    BaseGridController.Search
    BaseGridController.SetOrdering(IEnumerable<QueryableSort>)
    BaseGridController.SetFilters(IEnumerable<QueryableFilter>)
    BaseGridController.SetSearch(String, IEnumerable<String>)
    BaseGridController.BaseGridView
    BaseGridController.GetVisibleColumnNames()
    BaseGridController.OnlyExportGrid
    BaseGridController.Created
    BaseGridController.IGrid.GridItems
    ModelViewController.CurrentDisplayedItem
    ModelViewController.CanWrite
    ModelViewController.CheckIsLockedForCanWrite
    ModelViewController.View
    ModelViewController.DisplayItem(Object)
    ModelViewController.ShouldDisplayItem(Object)
    ModelViewController.DisplayIfNull
    ModelViewController.RemoveHandlers(Object)
    ModelViewController.AddHandlers(Object)
    ModelViewController.RemoveCommand(ViewCommand)
    ModelViewController.RemoveCommands<OFType>()
    ModelViewController.InsertCommand(ViewCommand, Int32)
    ModelViewController.InsertCommand(ViewCommand, ViewCommand, ViewCommand)
    ModelViewController.Commands
    ModelViewController.UpdateAllCommands()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: LemonEdge.Client.Core.Views.Controllers
    Assembly: ClientCore.dll
    Syntax
    [ViewSerializedParam(typeof(SQLWrapperResultsViewParams))]
    public class SQLWrapperResultsController : BaseGridAnyRelatedAnyCollectionController<ISQLWrapperResult>, IBaseGridController, IModelViewController, ICollectionExportable, INewGridItemImplementor<ISQLWrapperResult>, ICopyGridItemImplementor<ISQLWrapperResult>, IGrid, IDeleteGridItemImplementor<ISQLWrapperResult>

    Constructors

    SQLWrapperResultsController(IBaseGridAnyRelatedAnyCollection<ISQLWrapperResult>)

    Creates a new SQLWrapperResultsController

    Declaration
    public SQLWrapperResultsController(IBaseGridAnyRelatedAnyCollection<ISQLWrapperResult> view)
    Parameters
    Type Name Description
    IBaseGridAnyRelatedAnyCollection<ISQLWrapperResult> view

    The IBaseGridRelatedCollection view implementation using the UI components of the client application

    Properties

    AllowOpenCommand

    Declaration
    public override bool AllowOpenCommand { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<LemonEdge.API.ComplexTypes.ISQLWrapperResult>.AllowOpenCommand

    AutoSelectFirstRow

    Declaration
    protected override bool AutoSelectFirstRow { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<LemonEdge.API.ComplexTypes.ISQLWrapperResult>.AutoSelectFirstRow

    CollectionRelationshipColumnName

    Indicates all ISQLWrapperResult are related through the SQLWrapperID property

    Declaration
    public override string CollectionRelationshipColumnName { get; }
    Property Value
    Type Description
    System.String
    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridAnyRelatedAnyCollectionController<LemonEdge.API.ComplexTypes.ISQLWrapperResult>.CollectionRelationshipColumnName

    ContextHelpURL

    Declaration
    public override string ContextHelpURL { get; }
    Property Value
    Type Description
    System.String
    Overrides
    ModelViewController.ContextHelpURL

    DefaultColumnGroupIndexes

    Returns the indexes of the columns that should be grouped by default which are marked as GridGroupBy in the ISQLWrapper definition

    Declaration
    public override IEnumerable<int> DefaultColumnGroupIndexes { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.Int32>
    Overrides
    BaseGridController.DefaultColumnGroupIndexes

    DefaultFrozenColumnCount

    Returns the index of the column to show the pane freeze splitter which is marked as GridFreezeUpTo in the ISQLWrapper definition

    If there are no columns marked as such then the default is returned of the first column

    Declaration
    public override int DefaultFrozenColumnCount { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    BaseGridController.DefaultFrozenColumnCount

    DefaultSearchColumn

    Returns the column to be used when searching the grid by default, which is marked with GridIsDefaultSearch

    Declaration
    protected override string DefaultSearchColumn { get; }
    Property Value
    Type Description
    System.String
    Overrides
    BaseGridController.DefaultSearchColumn

    ExcelExportCommand

    Overrides the standard excel export command to use the ExportData command with the ISQLWrapper this controller is executing

    Declaration
    protected override ViewCommand ExcelExportCommand { get; }
    Property Value
    Type Description
    ViewCommand
    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<LemonEdge.API.ComplexTypes.ISQLWrapperResult>.ExcelExportCommand

    OnlyExportFromQuery

    Returns True - Indicates the export functionality should only work from the query itself, and not from results that are displayed in the grid

    Declaration
    public override bool OnlyExportFromQuery { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    BaseGridController.OnlyExportFromQuery

    RowPreviewColumns

    Returns the column(s) that should have their values appear as text in a preview tooltip when scrolling, which are marked as GridPartOfRowHeader in the ISQLWrapper definition

    Declaration
    public override IEnumerable<ControlDisplayInfo> RowPreviewColumns { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<ControlDisplayInfo>
    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<LemonEdge.API.ComplexTypes.ISQLWrapperResult>.RowPreviewColumns

    SelectedItemForSubViews

    Declaration
    public override object SelectedItemForSubViews { get; }
    Property Value
    Type Description
    System.Object
    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<LemonEdge.API.ComplexTypes.ISQLWrapperResult>.SelectedItemForSubViews

    Methods

    ColumnGroups()

    Returns all the column groups setup in the ISQLWrapper by the columns marked with GridGroupHeader and GridSubGroupHeader values

    Declaration
    public override IEnumerable<GridColumnGroup> ColumnGroups()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<GridColumnGroup>

    All the column groups setup in the ISQLWrapper by the columns marked with GridGroupHeader and GridSubGroupHeader values

    Overrides
    BaseGridController.ColumnGroups()

    Columns()

    Returns all the columns defined in the ISQLWrapper with their appropriate type, settings and visibility

    Declaration
    public override IEnumerable<ControlDisplayInfo> Columns()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<ControlDisplayInfo>

    All the columns defined in the ISQLWrapper with their appropriate type, settings and visibility

    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<LemonEdge.API.ComplexTypes.ISQLWrapperResult>.Columns()

    DisplayUI()

    Loads the ISQLWrapper to execute, from the wrapper specified in the SQLWrapperResultsViewParams or from the SingleItem this view is displaying if it is a SQLWrapper or Dataset

    Once loaded (or already loaded), the system displays parameters (if required or is not the first execution of the grid) then displays the results

    Declaration
    public override Task DisplayUI()
    Returns
    Type Description
    System.Threading.Tasks.Task

    A task indicating the completion of the operation

    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<LemonEdge.API.ComplexTypes.ISQLWrapperResult>.DisplayUI()

    Execute()

    Forces the query to be re-run (including prompting for parameters if required)

    Declaration
    public Task Execute()
    Returns
    Type Description
    System.Threading.Tasks.Task

    A task indicating the completion of the operation

    GetControlDisplayInfo(SQLWrapperInterpretor, ISQLTypeWrapper, Int16)

    Returns a control display info for displaying the specified control (defined using a ISQLTypeWrapper) against a ISQLWrapperResult

    Declaration
    public static ControlDisplayInfo GetControlDisplayInfo(SQLWrapperInterpretor helper, ISQLTypeWrapper col, short index)
    Parameters
    Type Name Description
    SQLWrapperInterpretor helper

    The sql wrapper interprator this control is being defined for

    ISQLTypeWrapper col

    The column defining the control

    System.Int16 index

    The index to use for this control in the sequence of controls being created

    Returns
    Type Description
    ControlDisplayInfo

    A control display info for displaying the specified control (defined using a ISQLTypeWrapper) against a ISQLWrapperResult

    GetControlDisplayInfo(Func<ISQLTypeWrapper, String>, Func<Int32, ISQLTypeWrapper>, ISQLTypeWrapper, Int16)

    Returns a control display info for displaying the specified control (defined using a ISQLTypeWrapper) against a ISQLWrapperResult

    Declaration
    public static ControlDisplayInfo GetControlDisplayInfo(Func<ISQLTypeWrapper, string> getColumnBinding, Func<int, ISQLTypeWrapper> getColumnFromIndex, ISQLTypeWrapper col, short index)
    Parameters
    Type Name Description
    System.Func<ISQLTypeWrapper, System.String> getColumnBinding

    The binding this control will bound to on the ISQLWrapperResult

    System.Func<System.Int32, ISQLTypeWrapper> getColumnFromIndex

    Returns the column definition for the specified index

    ISQLTypeWrapper col

    The column defining the control

    System.Int16 index

    The index to use for this control in the sequence of controls being created

    Returns
    Type Description
    ControlDisplayInfo

    A control display info for displaying the specified control (defined using a ISQLTypeWrapper) against a ISQLWrapperResult

    GetExportableColumnInfo(IEnumerable<ColumnDescriptor>)

    Gets the columns that can be exported from this query including their visibility status

    Declaration
    public override Task<IEnumerable<ControlDisplayVisibilityInfo>> GetExportableColumnInfo(IEnumerable<ColumnDescriptor> visibleColumns)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<ColumnDescriptor> visibleColumns

    The current columns visible in the grid

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ControlDisplayVisibilityInfo>>

    The columns that can be exported from this query including their visibility status

    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<LemonEdge.API.ComplexTypes.ISQLWrapperResult>.GetExportableColumnInfo(System.Collections.Generic.IEnumerable<LemonEdge.Core.Descriptors.ColumnDescriptor>)

    GetGridSourceItems()

    Prompts for parameters (if required or not the first execution), and executes the query with the correct filters/parameters, returning the results

    Declaration
    public override Task<IEnumerable<ISQLWrapperResult>> GetGridSourceItems()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ISQLWrapperResult>>

    A list of all the results given the query execution

    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<LemonEdge.API.ComplexTypes.ISQLWrapperResult>.GetGridSourceItems()

    GetOpenGridCommand()

    Overridse the default open behaviour with a custom open command that provides the ability to open all the different type of openable items in a single query result

    Declaration
    protected override ViewCommand GetOpenGridCommand()
    Returns
    Type Description
    ViewCommand

    A custom open command capable of opening more than one item from a query result row

    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<LemonEdge.API.ComplexTypes.ISQLWrapperResult>.GetOpenGridCommand()

    GetQueryForExcelResults()

    Returns the QueryableExecuter used to filter results from this custom ISQLWrapper query

    Declaration
    public override QueryableExecuter GetQueryForExcelResults()
    Returns
    Type Description
    QueryableExecuter

    The QueryableExecuter used to filter results from this custom ISQLWrapper query

    Overrides
    BaseGridController.GetQueryForExcelResults()

    InitAsync()

    Initializes this controller by loading the View.Descriptor.Param as a SQLWrapperResultsViewParams

    If the WrapperID is set then the system loads the definition using a SQLWrapperInterpretor

    Declaration
    public override Task InitAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    A task indicating the completion of the operation

    Overrides
    ModelViewController.InitAsync()

    InitCommands(IList<ViewCommand>)

    Adds a command called [Run] that prompts for parameter changes to the query and then re-runs to get all the new results

    Declaration
    protected override void InitCommands(IList<ViewCommand> commands)
    Parameters
    Type Name Description
    System.Collections.Generic.IList<ViewCommand> commands

    The current commands for the controller

    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<LemonEdge.API.ComplexTypes.ISQLWrapperResult>.InitCommands(System.Collections.Generic.IList<LemonEdge.Client.Core.Commands.ViewCommands.ViewCommand>)

    OnOpenRowItem(ISQLWrapperResult)

    Automatically opens in a new layout the default openable item from this query

    The openable items can be retrieved from OpenableColumns

    Declaration
    public override Task OnOpenRowItem(ISQLWrapperResult rowItem)
    Parameters
    Type Name Description
    ISQLWrapperResult rowItem

    The selected row to open an item from

    Returns
    Type Description
    System.Threading.Tasks.Task

    A task indicating the completion of the operation

    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<LemonEdge.API.ComplexTypes.ISQLWrapperResult>.OnOpenRowItem(LemonEdge.API.ComplexTypes.ISQLWrapperResult)

    Redisplay()

    Forces the query to be re-run (including prompting for parameters if required)

    Declaration
    public override Task Redisplay()
    Returns
    Type Description
    System.Threading.Tasks.Task

    A task indicating the completion of the operation

    Overrides
    LemonEdge.Client.Core.Views.Core.BaseGridControllerAny<LemonEdge.API.ComplexTypes.ISQLWrapperResult>.Redisplay()

    Implements

    IBaseGridController
    IModelViewController
    ICollectionExportable
    INewGridItemImplementor<T>
    ICopyGridItemImplementor<T>
    IGrid
    IDeleteGridItemImplementor<T>

    Extension Methods

    MiscExtensions.SetIfNotEqual<T, P>(T, Expression<Func<T, P>>, P)
    ReflectionExtensions.ClearEventInvocations(Object, String)
    StringExtensions.ToCSVFormatString(Object, Type)
    SQLExtensions.ToSQLValue(Object, Boolean)
    In This Article
    Back to top © LemonTree Software Ltd. All rights reserved.