Exemple #1
0
 ///<summary>
 ///Replace an element within this segment.
 ///</summary>
 ///<param name="elementNumber">The element that you want to replace.</param>
 ///<param name="value">The string value with which you want to replace the element.</param>
 public bool replaceElement(int elementNumber, String value)
 {
     String[] elements = LineText.Split(x12File.elementDelimiter);
     if (elementNumber < elements.Length && elementNumber > 0)
     {
         elements[elementNumber] = value;
         this.LineText           = String.Join(x12File.elementDelimiter.ToString(), elements);
         return(true);
     }
     return(false);
 }
Exemple #2
0
        private static void ProtocolReaderLineAnalyze()
        {
            LineDesc = "";
            LineContect.Clear();

            string[] words1      = LineText.Split(strSeparators1, StringSplitOptions.RemoveEmptyEntries);
            string   str_contect = words1[0].Trim();

            if (words1.Length >= 2)
            {
                LineDesc = words1[1].Trim();
            }
            LineContect = str_contect.Split(strSeparators2, StringSplitOptions.RemoveEmptyEntries).ToList();
        }