Exemple #1
0
        ///<Summary>
        ///<CreatedOn>20/12/2017</CreatedOn>
        ///<Author>Sunny Bhardwaj</Author>
        ///<Description>Returns object for BHT segments(Beginning of Hierarchical Transaction)</Description>
        ///</Summary>
        public static BHT GetBHT(string BHT01, string BHT02, string BHT03, string BHT04, string BHT05, string BHT06)
        {
            BHT obj = new BHT();

            obj.BHT01 = BHT01;
            obj.BHT02 = BHT02; //"18 for resubmision"
            obj.BHT03 = BHT03; //It length can be 1 to 50
            obj.BHT04 = BHT04;
            obj.BHT05 = BHT05;
            obj.BHT06 = BHT06;
            return(obj);
        }
Exemple #2
0
        internal X12Doc(bool includeDefinition)
        {
            DocDelimiters = new Delimiters
            {
                Element    = '*',
                Component  = ':',
                Repetition = '^',
                Segment    = '~'
            };

            InterchagneControlHeader     = new ISA();
            FunctionGroupHeader          = new GS();
            TransactionSetHeader         = new ST();
            BeginHierarchicalTransaction = new BHT();
            TransactionSetTrailer        = new SE();
            FunctionalGroupTrailer       = new GE();
            InterchangeControlTrailer    = new IEA();
        }
Exemple #3
0
        public override bool IsValid(object value)
        {
            BHT bhtValue = (BHT)value;

            return(bhtValue.BHT1 == "0019" & (bhtValue.BHT2 == "00" || bhtValue.BHT2 == "18") & bhtValue.BHT3 != "" & bhtValue.BHT3.Length <= 50 & bhtValue.BHT4 != "" & bhtValue.BHT4.Length == 8 & bhtValue.BHT5.Length >= 4 & bhtValue.BHT5.Length <= 8 & (bhtValue.BHT6 == "31" || bhtValue.BHT6 == "CH" || bhtValue.BHT6 == "RP"));
        }