Beispiel #1
0
        internal FunctionGroup AddFunctionGroup(string segmentString)
        {
            FunctionGroup fg = new FunctionGroup(_specFinder, this, _delimiters, segmentString);

            _functionGroups.Add(fg);
            return(fg);
        }
Beispiel #2
0
        public FunctionGroup AddFunctionGroup(string functionIdCode, DateTime date, int controlNumber, string version)
        {
            if (controlNumber > 999999999 || controlNumber < 1)
            {
                throw new ElementValidationException("Element {0} cannot containe the value '{1}' because it must be a positive number between 1 and 999999999.",
                                                     "GS06", controlNumber.ToString());
            }

            FunctionGroup fg = new FunctionGroup(_specFinder, this, _delimiters,
                                                 string.Format("GS{0}{0}{0}{0}{0}{0}{0}X{0}{2}{1}", _delimiters.ElementSeparator, _delimiters.SegmentTerminator, version));

            fg.FunctionalIdentifierCode = functionIdCode;
            fg.Date          = date;
            fg.ControlNumber = controlNumber;

            fg.SetTerminatingTrailerSegment(String.Format("GE{0}0{0}{2}{1}", _delimiters.ElementSeparator, _delimiters.SegmentTerminator, controlNumber));
            _functionGroups.Add(fg);
            return(fg);
        }
        public FunctionGroup AddFunctionGroup(string functionIdCode, DateTime date, int controlNumber, string version)
        {
            if (controlNumber > 999999999 || controlNumber < 1)
                throw new ElementValidationException("Element {0} cannot containe the value '{1}' because it must be a positive number between 1 and 999999999.",
                    "GS06", controlNumber.ToString());

            FunctionGroup fg = new FunctionGroup(_specFinder, this, _delimiters,
                string.Format("GS{0}{0}{0}{0}{0}{0}{0}X{0}{2}{1}", _delimiters.ElementSeparator, _delimiters.SegmentTerminator, version));
            fg.FunctionalIdentifierCode = functionIdCode;
            fg.Date = date;
            fg.ControlNumber = controlNumber;

            fg.SetTerminatingTrailerSegment(String.Format("GE{0}0{0}{2}{1}", _delimiters.ElementSeparator, _delimiters.SegmentTerminator, controlNumber));
            _functionGroups.Add(fg);
            return fg;
        }
 internal FunctionGroup AddFunctionGroup(string segmentString)
 {
     FunctionGroup fg = new FunctionGroup(_specFinder, this, _delimiters, segmentString);
     _functionGroups.Add(fg);
     return fg;
 }