Class X12SourceExtensions
The X12SourceExtension methods override the default loop 1000A settings in the 837 and 277. The SDK automatically inserts loop 1000A when creating an 837 or 277 transaction set. You can use one of the following methods to override the default NM1 and PER segments that are populated from X12Source.
Warning
The source (1000A) only applies to the 837 and 277 transactions. Applying any of these extension methods to other transaction will throw an X12Exception with error code ValueNotSupported
Inheritance
Namespace: Bishop.X12.Extensions
Assembly: Bishop.X12.dll
Syntax
public static class X12SourceExtensions
Methods
FromSource(X12Transaction, X12EntityType, String, String)
Create a source loop 1000A in either the 277 or 837 transaction overriding the default X12Source values set in InitAsync(String, String, String, String, X12Source, OnX12Progress)
Declaration
public static X12Transaction FromSource(this X12Transaction self, X12EntityType type, string lastOrOrgName, string etin)
Parameters
Type | Name | Description |
---|---|---|
X12Transaction | self | an 837 or 277 X12Transaction object |
X12EntityType | type | override the entity type set in X12Source |
System.String | lastOrOrgName | override the last name or org name set in X12Source |
System.String | etin | override the eletronic trader identification number set in X12Source |
Returns
Type | Description |
---|---|
X12Transaction | The 837 or 277 X12Transaction object |
Examples
using X12Transaction ts837P = grp837P
.AddTransaction(1)
.SetHierType(X12TsPurposeCode.Original, X12TsTypeCode.Chargable)
.FromSource(X12EntityType.Person, "John Henry", "ABC123"); // Change the sender to Person name John Henry with ETIN "ABC123"
FromSource(X12Transaction, X12EntityType, String)
Create a source loop 1000A in either the 277 or 837 transaction overriding the default X12Source values set in InitAsync(String, String, String, String, X12Source, OnX12Progress)
Declaration
public static X12Transaction FromSource(this X12Transaction self, X12EntityType type, string lastOrOrgName)
Parameters
Type | Name | Description |
---|---|---|
X12Transaction | self | an 837 or 277 X12Transaction object |
X12EntityType | type | override the entity type set in X12Source |
System.String | lastOrOrgName | override the last name or org name set in X12Source |
Returns
Type | Description |
---|---|
X12Transaction | The 837 or 277 X12Transaction object |
Examples
using X12Transaction ts837P = grp837P
.AddTransaction(1)
.SetHierType(X12TsPurposeCode.Original, X12TsTypeCode.Chargable)
.FromSource(X12EntityType.Person, "John Henry"); // Change the sender to Person name John Henry
FromSource(X12Transaction, String)
Create a source loop 1000A in either the 277 or 837 transaction overriding the default X12Source values set in InitAsync(String, String, String, String, X12Source, OnX12Progress)
Declaration
public static X12Transaction FromSource(this X12Transaction self, string etin)
Parameters
Type | Name | Description |
---|---|---|
X12Transaction | self | an 837 or 277 X12Transaction object |
System.String | etin | override the eletronic trader identification number set in X12Source |
Returns
Type | Description |
---|---|
X12Transaction | The 837 or 277 X12Transaction object |
Examples
using X12Transaction ts837P = grp837P
.AddTransaction(1)
.SetHierType(X12TsPurposeCode.Original, X12TsTypeCode.Chargable)
.FromSource("ABC123"); // overrides the ETIN set in X12Source