foreach (string line in lines) { string[] a = line.Split('|'); oDocumentSQ.DocNum = Convert.ToInt32(a[0]); oDocumentSQ.CardCode = a[1]; oDocumentSQ.NumAtCard = a[2]; oDocumentSQ.DocDate = Convert.ToDateTime(a[3]); oDocumentSQ.Lines.ItemCode = a[4]; oDocumentSQ.Lines.UnitPrice = Convert.ToDouble(a[5]); oDocumentSQ.Lines.Quantity = Convert.ToInt32(a[6]); oDocumentSQ.Lines.VatGroup = a[7]; oDocumentSQ.Lines.Add(); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter