Search Results for

    Show / Hide Table of Contents

    Class TransactionExtensions

    A helper class used for translating values held against an ITransaction

    This is because transactions and transaction allocated records store their values in different value fields depending on the configuration of the ITransactionCode

    Inheritance
    object
    TransactionExtensions
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.API.Entities.FinancialServices.Transactions.Helpers
    Assembly: LemonEdge.API.Entities.FinancialServices.dll
    Syntax
    public static class TransactionExtensions

    Fields

    MAX_VALUES

    Declaration
    public static readonly short MAX_VALUES
    Field Value
    Type Description
    short

    Methods

    CanDeleteCancelledTransaction(IHeaderTransactionalEntity, UserInfo, IReadOnlyCache)

    Declaration
    public static Task<bool> CanDeleteCancelledTransaction(IHeaderTransactionalEntity item, UserInfo currentUser, IReadOnlyCache cache)
    Parameters
    Type Name Description
    IHeaderTransactionalEntity item
    UserInfo currentUser
    IReadOnlyCache cache
    Returns
    Type Description
    Task<bool>

    GetFuncValuePropName(short)

    Declaration
    public static string GetFuncValuePropName(short sequence)
    Parameters
    Type Name Description
    short sequence
    Returns
    Type Description
    string

    GetHeaderTransactionsInCodeDependantProcessingOrder<T>(IEnumerable<ITransactionCodeDependant>, IEnumerable<T>, Func<T, Guid>)

    Declaration
    public static IEnumerable<T> GetHeaderTransactionsInCodeDependantProcessingOrder<T>(IEnumerable<ITransactionCodeDependant> all, IEnumerable<T> items, Func<T, Guid> getCodeID)
    Parameters
    Type Name Description
    IEnumerable<ITransactionCodeDependant> all
    IEnumerable<T> items
    Func<T, Guid> getCodeID
    Returns
    Type Description
    IEnumerable<T>
    Type Parameters
    Name Description
    T

    GetLocalValuePropName(short)

    Declaration
    public static string GetLocalValuePropName(short sequence)
    Parameters
    Type Name Description
    short sequence
    Returns
    Type Description
    string

    GetNextFreeSequence(ITransaction)

    Declaration
    public static short? GetNextFreeSequence(this ITransaction transaction)
    Parameters
    Type Name Description
    ITransaction transaction
    Returns
    Type Description
    short?

    GetReportingValuePropName(short)

    Declaration
    public static string GetReportingValuePropName(short sequence)
    Parameters
    Type Name Description
    short sequence
    Returns
    Type Description
    string

    GetSequence(ITransaction, short)

    Returns the sequence of the value that is stored against the specified transaction for the specified ValueIndex

    Declaration
    public static short? GetSequence(this ITransaction transaction, short valueIndex)
    Parameters
    Type Name Description
    ITransaction transaction

    The record to return the sequence of value field that holds the specified type

    short valueIndex

    The id of the type of value that is stored against the transaction

    Returns
    Type Description
    short?

    The sequence of the value that is stored against the specified transaction for the specified ValueIndex. Returns null if it is not being stored.

    GetValueIndex(ITransaction, short)

    Returns the ValueIndex for the type stored against the specified sequence as defined from Sequence

    Declaration
    public static short GetValueIndex(this ITransaction transaction, short sequence)
    Parameters
    Type Name Description
    ITransaction transaction

    The record to return the value index of for the specified sequence

    short sequence

    The sequence indicating the value index to be returned by the Sequence against the transactions transaction code

    Returns
    Type Description
    short

    The ValueIndex for the type stored against the specified sequence as defined from Sequence

    GetValueIndexPropName(short)

    Declaration
    public static string GetValueIndexPropName(short sequence)
    Parameters
    Type Name Description
    short sequence
    Returns
    Type Description
    string

    GetValues(ITransaction, short)

    Declaration
    public static (decimal Local, decimal Func, decimal Rep) GetValues(this ITransaction transaction, short seq)
    Parameters
    Type Name Description
    ITransaction transaction
    short seq
    Returns
    Type Description
    (decimal ReportingValue, decimal FuncValue, decimal LocalValue)

    HasValue(ITransaction, short)

    Declaration
    public static bool HasValue(this ITransaction transaction, short valueTypeIndex)
    Parameters
    Type Name Description
    ITransaction transaction
    short valueTypeIndex
    Returns
    Type Description
    bool

    SetValueIndex(ITransaction, short, short)

    Sets the ValueIndex of the type being stored against the specified Sequence

    Declaration
    public static void SetValueIndex(this ITransaction transaction, short sequence, short index)
    Parameters
    Type Name Description
    ITransaction transaction

    The record to update the value index of for the specified sequence

    short sequence

    The sequence indicating the value index to be updated by the Sequence against the transactions transaction code

    short index

    The new ValueIndex

    SetValues(ITransaction, short, decimal, decimal, decimal)

    Declaration
    public static void SetValues(this ITransaction tran, short seq, decimal local, decimal func, decimal rep)
    Parameters
    Type Name Description
    ITransaction tran
    short seq
    decimal local
    decimal func
    decimal rep
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.