[This is preliminary documentation and is subject to change.]

Gets or sets the value determining if initial value binding is suppressed when the BusinessProcessActivity property is set to Insert.

Namespace:  Firefly.Box
Assembly:  Firefly.Box (in Firefly.Box.dll) Version: 3.4.23.6473 (3.4.23.6473)

Syntax

C#
public bool SuppressValueBindingInInsertActivity { get; set; }
Visual Basic (Declaration)
Public Property SuppressValueBindingInInsertActivity As Boolean
Visual C++
public:
property bool SuppressValueBindingInInsertActivity {
	bool get ();
	void set (bool value);
}

Remarks

This property doesn't affect reevaluation

Examples

SupressValueBinding
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
CopyC#
using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using Firefly.Box;
using Firefly.Box.Testing;

namespace TestFirefly.Box.Documentation
{
    [TestFixture]
    public class SupressValueBindingDemo
    {
        [Test]
        public void Supressed()
        {
            var jobs = new Pubs.Jobs();
            jobs.Truncate();

            var bp =
                new BusinessProcess(
                    new BusinessProcess.AdvancedSettings
                        {
                            SuppressValueBindingInInsertActivity = true
                        })
                    {
                        From = jobs,
                        Activity = Activities.Insert
                    };
            bp.AddAllColumns();

            jobs.Id.BindValue(() => 1);
            bp.ForFirstRow(() => jobs.Id.ShouldBe(0));//Because the bind value is supressed, the id is 0
        }
        [Test]
        public void NotSupressed()
        {
            var jobs = new Pubs.Jobs();
            jobs.Truncate();

            var bp =
                new BusinessProcess(
                    new BusinessProcess.AdvancedSettings
                    {
                        SuppressValueBindingInInsertActivity = false
                    })
                {
                    From = jobs,
                    Activity = Activities.Insert
                };
            bp.AddAllColumns();

            jobs.Id.BindValue(() => 1);
            bp.ForFirstRow(() => jobs.Id.ShouldBe(1));//Because the bind value is not supressed, 
                    // it is evaluated, and the value is 1;
        }
    }
}

See Also