Generate EDIFACT UNB

Download EDIFACT 214 C# Sample


///
/// Build UNB.
/// 
public static UNB BuildUnb(string controlNumber)
{
	return new UNB
	{
		SYNTAXIDENTIFIER_1 = new S001
		{
			//  Syntax Identifier
			SyntaxIdentifier_1 = "UNOB",
			//  Syntax Version Number
			SyntaxVersionNumber_2 = "1"
		},
		INTERCHANGESENDER_2 = new S002
		{
			//  Interchange sender identification
			InterchangeSenderIdentification_1 = "SENDERID",
			//  Identification code qualifier
			IdentificationCodeQualifier_2 = "01",
			//  Interchange sender internal identification
			InterchangeSenderInternalIdentification_3 = "ZZZ"
		},
		INTERCHANGERECIPIENT_3 = new S003
		{
			//  Interchange recipient identification
			InterchangeRecipientIdentification_1 = "RECEIVERID",
			//  Identification code qualifier
			IdentificationCodeQualifier_2 = "16",
			//  Interchange recipient internal identification
			InterchangeRecipientInternalIdentification_3 = "ZZZ"
		},
		DATEANDTIMEOFPREPARATION_4 = new S004
		{
			//  Date
			Date_1 = DateTime.Now.Date.ToString("yyMMdd"),
			//  Time
			Time_2 = DateTime.Now.TimeOfDay.ToString("hhmm")
		},
		//  Interchange control reference
		InterchangeControlReference_5 = controlNumber
	};
}
Was this article helpful?
0 out of 0 found this helpful