Search Results for

    Show / Hide Table of Contents

    Class SQLWrapperResultsViewParams

    The parameters for the SQLWrapperResultsController which determines which ISQLWrapper to execute along with the parameter values to use

    The SQLWrapperResultsSerializedParamController is responsible for the UI param popup for editing these parameters

    Inheritance
    object
    SerializedParam
    ViewSerializedParam
    SQLWrapperResultsViewParams
    ExpressReportViewResultParams
    PivotViewResultParams
    Implements
    ICloneable
    ICloneable<ViewSerializedParam>
    ICloneable<SQLWrapperResultsViewParams>
    INotifyPropertyChanged
    Inherited Members
    ViewSerializedParam.OnPropChanged(string)
    ViewSerializedParam.AddVisibleOnlyToRole(Guid)
    ViewSerializedParam.RemoveVisibleOnlyToRole(Guid)
    ViewSerializedParam.CopyFromSource(ViewSerializedParam)
    ViewSerializedParam.HelpUrl
    ViewSerializedParam.ViewName
    ViewSerializedParam.ViewDescriptor
    ViewSerializedParam.ViewIcon
    ViewSerializedParam.VisibilityFormula
    ViewSerializedParam.Visible
    ViewSerializedParam.AutoSelectOnVisible
    ViewSerializedParam.VisibleOnlyToRoles
    ViewSerializedParam.FormulaVisibility
    ViewSerializedParam.PropertyChanged
    SerializedParam.GetParam<T>(string)
    SerializedParam.GetParam<T>(byte[])
    SerializedParam.GetParam(string)
    SerializedParam.GetParam(string, bool)
    SerializedParam.GetParam(byte[])
    SerializedParam.ToSerializedString()
    SerializedParam.ToSerializedBytes()
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.Client.Core.Views.Controllers
    Assembly: LemonEdge.ClientCore.dll
    Syntax
    [DataContract]
    public class SQLWrapperResultsViewParams : ViewSerializedParam, ICloneable, ICloneable<ViewSerializedParam>, ICloneable<SQLWrapperResultsViewParams>, INotifyPropertyChanged

    Constructors

    SQLWrapperResultsViewParams()

    Declaration
    public SQLWrapperResultsViewParams()

    Properties

    AsOf

    Indicates the query should be run using the specified as of date

    Declaration
    public DateTimeOffset? AsOf { get; set; }
    Property Value
    Type Description
    DateTimeOffset?

    AutoRun

    Indicates this query should automatically be run straight away by the syste,

    Declaration
    public bool AutoRun { get; set; }
    Property Value
    Type Description
    bool

    ContextItemTypeForFormula

    The type of the context item used for formulas

    Declaration
    public Type ContextItemTypeForFormula { get; set; }
    Property Value
    Type Description
    Type

    DesignMode

    Indicates if this parameter is in design mode allowing the user to set formulas against query parameter values that can be evaluated automatically at run time

    Declaration
    public bool DesignMode { get; set; }
    Property Value
    Type Description
    bool

    GetParameters

    Returns a dictionary of all the parameters by parameter name as key, and (Value, Formula, Visible, Required, Type) as value

    Declaration
    public IReadOnlyDictionary<string, (string Value, string Formula, bool Visible, bool Required, Type Type)> GetParameters { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<string, (string Value, string Formula, bool Visible, bool Required, Type Type)>

    IsSingleLookupQuery

    Indicates this is being used as a popup view for a custom lookup query override. This way view filters can be ignored as the user is defining the exact behaviour

    Declaration
    public bool IsSingleLookupQuery { get; set; }
    Property Value
    Type Description
    bool

    RequiresUserParam

    Indicates parameter values are required to be entered if ParameterRequired parameters do not have a value or formula set

    Declaration
    public bool RequiresUserParam { get; }
    Property Value
    Type Description
    bool

    ShouldDisplayUserParams

    Indicates the user parameters should be displayed if there are any visible parameters to be entered

    Declaration
    public bool ShouldDisplayUserParams { get; }
    Property Value
    Type Description
    bool

    WrapperID

    The ISQLWrapper this query should execute for the results

    Declaration
    public Guid WrapperID { get; set; }
    Property Value
    Type Description
    Guid

    WrapperID_Label

    The Name of the WrapperID

    Declaration
    public string WrapperID_Label { get; set; }
    Property Value
    Type Description
    string

    Methods

    AddOrUpdateFormula(ISQLTypeWrapper, string)

    Adds/Updates a specified formula for the specified wrapper parameter

    Declaration
    public void AddOrUpdateFormula(ISQLTypeWrapper wrapper, string formula)
    Parameters
    Type Name Description
    ISQLTypeWrapper wrapper

    The parameter to provide a formula for that should be executed at run time to provide a value automatically to use for the parameter

    string formula

    The formula to use for the parameter

    AddOrUpdateFormula(string, string)

    Adds/Updates a specified formula for the specified paramName parameter

    Declaration
    public void AddOrUpdateFormula(string paramName, string formula)
    Parameters
    Type Name Description
    string paramName

    The name of the parameter to provide a formula for that should be executed at run time to provide a value automatically to use for the parameter

    string formula

    The formula to use for the parameter

    AddOrUpdateProps(string, bool, bool)

    Adds/Updates the other settings for a parameter such as if it is visible to the user, or required

    Declaration
    public void AddOrUpdateProps(string paramName, bool visible, bool required)
    Parameters
    Type Name Description
    string paramName

    The name of the parameter to update the visibility and required status for

    bool visible

    Indicates if this parameter should be visible to the user to edit

    bool required

    Indicates if this parameter must have a value in order for execution of the query to be valid

    AddOrUpdateValue(ISQLTypeWrapper, object)

    Adds/Updates a specified value for the specified wrapper parameter

    Declaration
    public void AddOrUpdateValue(ISQLTypeWrapper wrapper, object value)
    Parameters
    Type Name Description
    ISQLTypeWrapper wrapper

    The parameter to provide a value for

    object value

    The value to use

    AddOrUpdateValue(string, string)

    Adds/Updates a specified value for the specified paramName parameter

    Declaration
    public void AddOrUpdateValue(string paramName, string value)
    Parameters
    Type Name Description
    string paramName

    The name of the parameter to provide a value for

    string value

    The value to use

    ClearValueLoadedFromFormulas()

    Clears values that have been evaluated at run time from formulas, so they can be recalculatd next time they are run

    Declaration
    public void ClearValueLoadedFromFormulas()

    Clone()

    Creates a new instance of this class (of type SQLWrapperResultsViewParams) with all the same property values as this instance

    Declaration
    public SQLWrapperResultsViewParams Clone()
    Returns
    Type Description
    SQLWrapperResultsViewParams

    A new instance of this class with all the same property values as this instance

    CopyFromParam(SerializedParam)

    Should be overridden by inheriting implementations to ensure all parameters values are copied from the specified source

    Declaration
    protected override void CopyFromParam(SerializedParam source)
    Parameters
    Type Name Description
    SerializedParam source

    The source instance of a SerializedParam that is of the same type as this one to copy parameter values from

    Overrides
    ViewSerializedParam.CopyFromParam(SerializedParam)
    Remarks

    Used by the generic implementation of Clone()

    CopyFromSource(SQLWrapperResultsViewParams)

    Updates all properties in this item to have the same properties as the source object.

    Declaration
    public void CopyFromSource(SQLWrapperResultsViewParams source)
    Parameters
    Type Name Description
    SQLWrapperResultsViewParams source

    The source object to copy all values from.

    CreateNewParam()

    Must be implemented by inheriting classes to provide a new instance of the current class type.

    Used when cloning this SerializedParam to create a new instance of the same type

    Declaration
    protected override SerializedParam CreateNewParam()
    Returns
    Type Description
    SerializedParam

    A new instance of the current SerializedParam type

    Overrides
    ViewSerializedParam.CreateNewParam()

    GetParamaeterControls()

    Returns the control definitions to be created for each parameter the user must select/edit

    Declaration
    public IEnumerable<(ControlDisplayInfo Control, ISQLTypeWrapper Param)> GetParamaeterControls()
    Returns
    Type Description
    IEnumerable<(ControlDisplayInfo Control, ISQLTypeWrapper Param)>

    The control definitions to be created for each parameter the user must select/edit

    GetValue(ISQLWrapperResult, ISQLTypeWrapper)

    The view for the SQLWrapperResultsSerializedParamController uses a ISQLWrapperResult to temporarily hold the results of values entered by the user for the parameters

    This uses the specified parameter p to get its value against the specified result

    This way the ui can use a class as standard which has the properties for setting/getting arbitary amount of parameters and can be bound to
    Declaration
    public object GetValue(ISQLWrapperResult result, ISQLTypeWrapper p)
    Parameters
    Type Name Description
    ISQLWrapperResult result

    The dummy result to retrieve the property value of the parameter from

    ISQLTypeWrapper p

    The parameter property of the result to retrieve the value of

    Returns
    Type Description
    object

    The value from the result corrosponding to the specified parameter p

    IsValid()

    Indicates the parameters are valid to execute the query if all ParameterRequired parameters have been assigned a value

    Declaration
    public bool IsValid()
    Returns
    Type Description
    bool

    True if all ParameterRequired parameters have been assigned a value

    Load(IReadOnlyCache)

    Loads the parameters required and default settings from the ISQLWrapper selected on WrapperID

    Declaration
    public virtual Task Load(IReadOnlyCache cache)
    Parameters
    Type Name Description
    IReadOnlyCache cache

    A local cache

    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    LoadParameters(IReadOnlyCache)

    Declaration
    protected virtual Task<IEnumerable<ISQLTypeWrapper>> LoadParameters(IReadOnlyCache cache)
    Parameters
    Type Name Description
    IReadOnlyCache cache
    Returns
    Type Description
    Task<IEnumerable<ISQLTypeWrapper>>

    SetValue(ISQLWrapperResult, ISQLTypeWrapper, IEntityRetriever)

    The view for the SQLWrapperResultsSerializedParamController uses a ISQLWrapperResult to temporarily hold the results of values entered by the user for the parameters

    This uses the specified parameter p (which holds its value too) to set its value against the specified result

    This way the ui can use a class as standard which has the properties for setting/getting arbitary amount of parameters and can be bound to
    Declaration
    public Task SetValue(ISQLWrapperResult result, ISQLTypeWrapper p, IEntityRetriever retriever)
    Parameters
    Type Name Description
    ISQLWrapperResult result

    The dummy result to update the value of with the parameter value

    ISQLTypeWrapper p

    The parameter property of the result to update with the specified value on this parameter

    IEntityRetriever retriever

    A context for querying the system

    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    Implements

    ICloneable
    ICloneable<T>
    ICloneable<T>
    INotifyPropertyChanged

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    ViewSerializedParamExtensions.GetItemFromIDWithNameFallback<T>(ViewSerializedParam, Guid, string, IReadOnlyCache)
    ViewSerializedParamExtensions.IsVisible(ViewSerializedParam)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.