olmelabs / EdiEngine

Simple .NET EDI X12 Reader, Writer and Validator. EDI JSON Serialization and Deserialization. Written in C#
MIT License
95 stars 47 forks source link

Acknowledgement Required in ISA #39

Open BeliaViktoria opened 5 months ago

BeliaViktoria commented 5 months ago

Hi! Is there any way to set Acknowledgement Required of ISA as 1? For now I see that it is hardcoded as 0. EdiDataWriterSettings settings = new EdiDataWriterSettings( new SegmentDefinitions.ISA(), new SegmentDefinitions.IEA(), new SegmentDefinitions.GS(), new SegmentDefinitions.GE(), new SegmentDefinitions.ST(), new SegmentDefinitions.SE(), "ZZ", "SENDER", "ZZ", "RECEIVER", "SENDER", "RECEIVER", "00401", "004010", "T", 276, 276, "\\", "*"); EdiDataWriter w = new EdiDataWriter(settings); Console.WriteLine(w.WriteToString(b));

olmelabs commented 4 months ago

Hi, i think it is hardcoded by default, but you can create ISA Segment and then replace Content, smth like


var isa = new SegmentDefinitions.ISA();
isa.Content[12] = new EdiSimpleDataElement((MapSimpleDataElement)isa.Content[12], "1"),

I havent tried it though