SeSegment¶
SeSegment models the X12 SE transaction-set trailer, the closing segment that pairs with an StSegment header to bound a single transaction set. Its control number is zero-padded to at least four digits on output, matching the format used by the paired StSegment.ControlNumber (BR-041).
Purpose¶
- Represents the SE segment identity via
SegmentIdreturning the literal"SE"(BR-020). - Carries
NumberOfSegments, the count of segments included in the transaction set being closed. - Carries
ControlNumber, zero-padded to at least four digits onBuild()to match the pairedStSegment.ControlNumberformat (BR-041).
Context¶
- Namespace:
SAIF.Common.Files.Edi.Segments - Assembly/package:
SAIF.Framework.Common.Files
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| SegmentId | string SegmentId { get; } |
Returns the literal X12 segment identifier "SE". |
| NumberOfSegments | int NumberOfSegments { get; set; } |
The number of segments included in the transaction set, counting ST through SE inclusive (SE01), element 1. |
| ControlNumber | long ControlNumber { get; set; } |
The transaction set control number matching the paired StSegment.ControlNumber (SE02), zero-padded to at least four digits on Build() (BR-041). |
| Build | IEdiSegment Build() |
Creates a SegmentBuilder("SE"), adds NumberOfSegments at element 1, and adds ControlNumber formatted with at least four digits (using the greater of its natural digit count or four) at element 2, returning the built segment (BR-041). |
| Fill | void Fill(IEdiSegment segment) |
Reads elements 1-2 via GetChildValue, converting to int/long, into NumberOfSegments and ControlNumber. |
| Parse | static SeSegment Parse(IEdiSegment segment) |
Instantiates a new SeSegment, calls Fill(segment) on it, and returns it. |
Sources¶
- Common\SAIF.Common.Files\Edi\Segments\SeSegment.cs