ComColumndataType Class

To Complete documentation

Definition

Namespace: Firefly.Box.Interop
Assembly: Firefly.Box (in Firefly.Box.dll) Version: debug-master-v:33791
C#
public class ComColumn<dataType> : TypedColumnBase<dataType>
Inheritance
Object    ColumnBase    TypedColumnBasedataType    ComColumndataType
Derived

Type Parameters

dataType

Example

Filter Usage
This example is in the form of Unit Tests. It references the NUnit framework. This framework can be downloaded from www.NUnit.org. For more information about unit testing visit: www.NUnit.org.
This example is based on test data. The code for the entities included in this test data can be found in the documentation of Entity
C#
using System;
using System.Collections.Generic;
using System.Text;
using Firefly.Box.Data.Advanced;
using NUnit.Framework;
using Firefly.Box;
using Firefly.Box.Testing;

namespace TestFirefly.Box.Documentation
{
    [TestFixture]
    public class WhereUsage
    {
        [Test]
        public void SimpleWhere()
        {
            var employees = new Pubs.Employees();
            employees.InitializeWithTestData();

            var bp = new BusinessProcess
                         {
                             From = employees
                         };
            bp.Where.Add(employees.JobLevel.IsEqualTo(150));
            bp.Run();
            bp.Counter.ShouldBe(3);
        }
        [Test]
        public void AddingTwoFiltersBehavesAsAndWould()
        {
            var employees = new Pubs.Employees();
            employees.InitializeWithTestData();

            var bp = new BusinessProcess
            {
                From = employees
            };
            bp.Where.Add(employees.JobLevel.IsEqualTo(150));
            bp.Where.Add(employees.JobId.IsLessThan(9));
            bp.Run();
            bp.Counter.ShouldBe(1);
        }
        [Test]
        public void UsingAndAndOr()
        {
            var employees = new Pubs.Employees();
            employees.InitializeWithTestData();

            var bp = new BusinessProcess
            {
                From = employees
            };
            bp.Where.Add(employees.JobLevel.IsEqualTo(150).And(
                        employees.JobId.IsLessThan(9).Or(
                        employees.MiddleInitial.IsEqualTo("C"))));
            bp.Run();
            bp.Counter.ShouldBe(2);
        }
        [Test]
        public void SendingDirectStringToTheDB()
        {
            var employees = new Pubs.Employees();
            employees.InitializeWithTestData();
            var bp = new BusinessProcess
                         {
                             From = employees
                         };
            bp.Where.Add("{0} in ({1},{2},{3})",employees.MiddleInitial, "M", "R", "A");
            bp.Run();
            bp.Counter.ShouldBe(9);
        }
        [Test]
        public void UsingCustomInMemoryFilter()
        {
            var employees = new Pubs.Employees();
            employees.InitializeWithTestData();
            var bp = new BusinessProcess
            {
                From = employees
            };
            //This has a slight performance penalty as this condition is evaluated in memory, and not by the database
            bp.Where.Add(() => employees.MiddleInitial == "M" || employees.MiddleInitial == "R" || employees.MiddleInitial == "A");
            bp.Run();
            bp.Counter.ShouldBe(9);
        }
        [Test]
        public void UsingAPreDefinedFilter()
        {
            var employees = new Pubs.Employees();
            employees.InitializeWithTestData();
            var bp = new BusinessProcess
            {
                From = employees
            };
            FilterCollection filter = new FilterCollection();
            filter.Add(employees.JobLevel.IsEqualTo(150));
            filter.Add(employees.JobId.IsLessThan(9));

            bp.Where.Add(filter);
            bp.Run();
            bp.Counter.ShouldBe(1);
        }
    }
}

Constructors

ComColumndataTypeTo Complete documentation
ComColumndataType(String)To Complete documentation

Properties

__RecomputePath
(Inherited from ColumnBase)
AfterExpandGoToNextControl Returns an Boolean that represents additional settings for the Expand event
(Inherited from ColumnBase)
AllowNull Gets or sets whether this column allows null values in it's Value property
(Inherited from TypedColumnBasedataType)
CaptionGets or sets the ColumnBase's caption
(Inherited from ColumnBase)
CreateInstanceTo Complete documentation
DbReadOnly Determines if this column is only read from the database but not saved to it.
(Inherited from ColumnBase)
DefaultValue
(Inherited from TypedColumnBasedataType)
DisplayName
(Inherited from ColumnBase)
Entity Gets the Entity to which this column is bound.
(Inherited from ColumnBase)
ExcludeFromDbWhere
(Inherited from ColumnBase)
FormatTo be completed
(Inherited from TypedColumnBasedataType)
FormatInfo Used to provide additional info on the specified Format
(Inherited from ColumnBase)
InputRange Get or sets this column's input range.
(Inherited from ColumnBase)
InstanceTypeTo Complete documentation
NameGets or sets the ColumnBase's name
(Inherited from ColumnBase)
NullDisplayText Gets or sets the text that will be displayed if this column's Value is null.
(Inherited from ColumnBase)
OnChangeMarkRowAsChanged Determines if the UIController.RowChanged property will be set, when this column is changed.
(Inherited from ColumnBase)
OriginalValue
(Inherited from TypedColumnBasedataType)
Storage
(Inherited from TypedColumnBasedataType)
Value
(Inherited from TypedColumnBasedataType)
WasSet
(Inherited from ColumnBase)

Methods

AdjustGetValue
(Inherited from TypedColumnBasedataType)
AdjustSetValue
(Inherited from TypedColumnBasedataType)
AreEqualOrdinal
(Inherited from TypedColumnBasedataType)
BindValue(FuncdataType) Binds the value of this column to the specified expression
(Inherited from TypedColumnBasedataType)
BindValue(TypedColumnBasedataType)
(Inherited from TypedColumnBasedataType)
BindValueToColumnChange Sets an expression that will be used for the value of this column
(Inherited from TypedColumnBasedataType)
CanYouBeQueried
(Inherited from ColumnBase)
Cast
(Overrides TypedColumnBasedataTypeCast(Object))
Compare
(Inherited from TypedColumnBasedataType)
CompareValueFromDbWithFilterValue
(Inherited from TypedColumnBasedataType)
CreateInstanceCoreTo Complete documentation
DbAreEqual
(Inherited from TypedColumnBasedataType)
DbValueStartsWithFilterValue
(Inherited from TypedColumnBasedataType)
Dispose Disposes the currently stored Object if it implements the IDisposable interface
Equals
(Inherited from TypedColumnBasedataType)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
ForceIncrementalSearchWhenCurrentValueMeetsCriteria
(Inherited from TypedColumnBasedataType)
GetHashCode
(Inherited from TypedColumnBasedataType)
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetValueFromDB
(Inherited from TypedColumnBasedataType)
IsBetween(FuncdataType, TypedColumnBasedataType)Creates a filter that represents a between relation between this column and the values specified
(Inherited from TypedColumnBasedataType)
IsBetween(FuncdataType, FuncdataType)Creates a filter that represents a between relation between this column and the values specified
(Inherited from TypedColumnBasedataType)
IsBetween(TypedColumnBasedataType, TypedColumnBasedataType)Creates a filter that represents a between relation between this column and the values specified
(Inherited from TypedColumnBasedataType)
IsBetween(TypedColumnBasedataType, FuncdataType)Creates a filter that represents a between relation between this column and the values specified
(Inherited from TypedColumnBasedataType)
IsDifferentFrom(FuncdataType)
(Inherited from TypedColumnBasedataType)
IsDifferentFrom(TypedColumnBasedataType)
(Inherited from TypedColumnBasedataType)
IsEqualTo(FuncdataType)Creates a filter that represents the is equal to relation between this column and the value specified
(Inherited from TypedColumnBasedataType)
IsEqualTo(TypedColumnBasedataType)Creates a filter that represents the is equal to relation between this column and the value specified
(Inherited from TypedColumnBasedataType)
IsGreaterOrEqualTo(FuncdataType)Creates a filter that represents the is greater or equal to relation between this column and the value specified
(Inherited from TypedColumnBasedataType)
IsGreaterOrEqualTo(TypedColumnBasedataType)Creates a filter that represents the is greater or equal to relation between this column and the value specified
(Inherited from TypedColumnBasedataType)
IsGreaterThan(FuncdataType)Creates a filter that represents the is greater than relation between this column and the value specified
(Inherited from TypedColumnBasedataType)
IsGreaterThan(TypedColumnBasedataType)Creates a filter that represents the is greater than relation between this column and the value specified
(Inherited from TypedColumnBasedataType)
IsLessOrEqualTo(FuncdataType)Creates a filter that represents the is less or equal to relation between this column and the value specified
(Inherited from TypedColumnBasedataType)
IsLessOrEqualTo(TypedColumnBasedataType)Creates a filter that represents the is less or equal to relation between this column and the value specified
(Inherited from TypedColumnBasedataType)
IsLessThan(FuncdataType)Creates a filter that represents the is less than relation between this column and the value specified
(Inherited from TypedColumnBasedataType)
IsLessThan(TypedColumnBasedataType)Creates a filter that represents the is less than relation between this column and the value specified
(Inherited from TypedColumnBasedataType)
IsNull
(Inherited from TypedColumnBasedataType)
LoadFrom
(Inherited from TypedColumnBasedataType)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
OnFormatChanged
(Inherited from TypedColumnBasedataType)
Parse
(Inherited from TypedColumnBasedataType)
ProcessUserInput
(Inherited from TypedColumnBasedataType)
ResetToDefaultValue
(Inherited from TypedColumnBasedataType)
SaveYourValueToDb
(Inherited from TypedColumnBasedataType)
SetValueWithoutEventHandlingTo Complete documentation
ToString
(Inherited from TypedColumnBasedataType)
ToString(String)
(Inherited from TypedColumnBasedataType)
ToString(String, IFormatProvider)Formats the value of the current instance using the specified format.
(Inherited from ColumnBase)
ValueIsComObjectTo Complete documentation

Events

Expand Occurs when the user parks on a control that is bound to this column and invokes the ExpandCommand
(Inherited from ColumnBase)
ValueChanged Occurs when the Value of this column changes
(Inherited from TypedColumnBasedataType)

Operators

Extension Methods

See Also