Closed raholland79 closed 8 years ago
If I can get some guidance I can contribute some full examples for 214, 204, 210, and 990 classes/test files that would cover the transportation industry.
For loops aka custom logical structures I would use the EdiSegmentGroup
attribute. Try something like this and tell me if it makes sense. The feature is quite new as requested in issue #13
[EdiMessage]
public class Message
{
[EdiValue("9(3)", Path = "ST/00", Description = "")]
public int IdentifierCode { get; set; }
[EdiValue("X(9)", Path = "ST/01", Description = "")]
public string ControlNumber { get; set; }
[EdiValue("9(30)", Path="B10/0")]
public int ReferenceIdentification { get; set; }
public List<Place> Places { get; set; }
}
[EdiSegment, EdiSegmentGroup("N1", SequenceEnd = "LX")]
public class Place
{
[EdiValue("X(9)", Path = "N1/0", Description = "")]
public string FieldValue1 { get; set; }
[EdiValue("X(9)", Path = "N3/0", Description = "")]
public string FieldValue2 { get; set; }
etc.....
}
That works - although the B10/0 is coming in null, but the places/loop works just fine.
Any idea there?
Really appreciate the help - Once I have this done I'll fork and add tests/etc for full sets of logistics/transportation files for you.
Hi @raholland79, I think you found a bug. It seems quite easy to fix so I will try to put out a beta version ASAP that covers this. Thanks for reporting back!
Hi @raholland79
The latest release fixes your issue. V1.1.0-beta is up on nuget. If you could verify that its ok I can close the issue.
I'll check it now. Thanks!
None of the other sample files this company sent work, at all, and I feel it's the ISA line.
Can't get this working, which is their ISA for the 990:
ISA00 00 _02_SCAC _ZZ_MGCTLYST _160726_0836_U_00400_000002356_0T>
And their 214 has
ISA00 00 _ZZ_MGCTLYST _02_SCAC _160726_1256_U_00401_000018718_0T:
These give parse errors, presumably because of the segment bit being :
I'm not sure if it's an error of their syntax or something wonky they do that this library isn't supporting.
Checking the beta build now on the other issue!
Confirmed the beta build fixes the B10 issue!
If I can get beyond the 990 and 214 not working I can probably use this and generate POCO examples for you.
@raholland79 glad we fixed issue #16
I opened a new issue to track the :
colon problem: issue #19
This isn't an issue with the library - but I need some guidance.
I have a 214 (Transportation) with a loop of places
I have the ISA and functional group working just fine, I have the ST within a message in the functional group GS. From there I can't figure out how to get the rest of the file going starting with B10 and the N loops.
Code I have this far: