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
    System.Object
    SerializedParam
    ViewSerializedParam
    SQLWrapperResultsViewParams
    PivotViewResultParams
    Implements
    ICloneable
    ICloneable<ViewSerializedParam>
    ICloneable<SQLWrapperResultsViewParams>
    System.ComponentModel.INotifyPropertyChanged
    Inherited Members
    ViewSerializedParam.ViewName
    ViewSerializedParam.ViewIcon
    ViewSerializedParam.VisibleFormula
    ViewSerializedParam.Visible
    ViewSerializedParam.VisibleOnlyToRoles
    ViewSerializedParam.AddVisibleOnlyToRole(Guid)
    ViewSerializedParam.RemoveVisibleOnlyToRole(Guid)
    ViewSerializedParam.IsVisible
    ViewSerializedParam.EvaluateVisibilityFormula(DisplayableItemDescriptor, ModelLayoutDisplayerController, IModelView, IBaseEntity)
    ViewSerializedParam.CopyFromSource(ViewSerializedParam)
    SerializedParam.GetParam<T>(String)
    SerializedParam.GetParam<T>(Byte[])
    SerializedParam.GetParam(String)
    SerializedParam.GetParam(Byte[])
    SerializedParam.ToSerializedString()
    SerializedParam.ToSerializedBytes()
    SerializedParam.ICloneable.Clone()
    SerializedParam.ICloneable.CopyFromSource(Object)
    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
    [DataContract]
    public class SQLWrapperResultsViewParams : ViewSerializedParam, ICloneable, ICloneable<ViewSerializedParam>, ICloneable<SQLWrapperResultsViewParams>, INotifyPropertyChanged

    Properties

    AsOf

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

    Declaration
    public DateTimeOffset? AsOf { get; set; }
    Property Value
    Type Description
    System.Nullable<System.DateTimeOffset>

    AutoRun

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

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

    ContextItemTypeForFormula

    The type of the context item used for formulas

    Declaration
    public Type ContextItemTypeForFormula { get; set; }
    Property Value
    Type Description
    System.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
    System.Boolean

    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
    System.Collections.Generic.IReadOnlyDictionary<System.String, System.ValueTuple<System.String, System.String, System.Boolean, System.Boolean, System.Type>>

    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
    System.Boolean

    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
    System.Boolean

    WrapperID

    The ISQLWrapper this query should execute for the results

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

    WrapperID_Label

    The Name of the WrapperID

    Declaration
    public string WrapperID_Label { get; set; }
    Property Value
    Type Description
    System.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

    System.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
    System.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

    System.String formula

    The formula to use for the parameter

    AddOrUpdateProps(String, Boolean, Boolean)

    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
    System.String paramName

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

    System.Boolean visible

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

    System.Boolean 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

    System.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
    System.String paramName

    The name of the parameter to provide a value for

    System.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()

    Declaration
    public SQLWrapperResultsViewParams Clone()
    Returns
    Type Description
    SQLWrapperResultsViewParams

    CopyFromParam(SerializedParam)

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

    CopyFromSource(SQLWrapperResultsViewParams)

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

    CreateNewParam()

    Declaration
    protected override SerializedParam CreateNewParam()
    Returns
    Type Description
    SerializedParam
    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
    System.Collections.Generic.IEnumerable<System.ValueTuple<ControlDisplayInfo, ISQLTypeWrapper>>

    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
    System.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
    System.Boolean

    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
    System.Threading.Tasks.Task

    A task indicating the completion of the operation

    OnPropertyChanged(String)

    Declaration
    protected void OnPropertyChanged(string propName)
    Parameters
    Type Name Description
    System.String propName

    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
    System.Threading.Tasks.Task

    A task indicating the completion of the operation

    Events

    PropertyChanged

    Declaration
    public event PropertyChangedEventHandler PropertyChanged
    Event Type
    Type Description
    System.ComponentModel.PropertyChangedEventHandler

    Implements

    ICloneable
    ICloneable<T>
    ICloneable<T>
    System.ComponentModel.INotifyPropertyChanged

    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.