Created
February 17, 2022 20:56
-
-
Save bjoerntx/5b25b1e6ae8c86591fe9e19d9c2064b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// load the template | |
textControl1.Load("template.tx", TXTextControl.StreamType.InternalUnicodeFormat); | |
// get the "outofstock" SubTextPart | |
SubTextPart subTextPart = textControl1.SubTextParts.GetItem("txmb_outofstock"); | |
// create a MergeBlockInfo object | |
MergeBlockInfo mergeBlockInfo = new MergeBlockInfo(subTextPart); | |
// add the condition | |
mergeBlockInfo.BlockMergingCondition = | |
new List<TXTextControl.DocumentServer.DataShaping.FilterInstruction>() | |
{ | |
new TXTextControl.DocumentServer.DataShaping.FilterInstruction( | |
"available", | |
TXTextControl.DocumentServer.DataShaping.RelationalOperator.Equals, | |
false | |
) | |
}; | |
// store the condition in the SubTextPart | |
mergeBlockInfo.Apply(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment