VB.NET coding

Dim documentdate,documentnumber,invoiceamount,invoicenumber,customername,amountandcurrency,amount,currency,companycode As String
documentdate=Mid(tmp,20,15)

companycode=Split(Split(tmp,"TO:"+vbNewLine)(1),vbNewLine)(0)

documentnumber=Split(Split(tmp,"BILL REFERENCE NO :")(1),vbNewLine)(0)

invoiceamount=Split(Split(tmp,"BILL AMOUNT : USD ")(1),vbNewLine)(0)

invoicenumber=Split(Split(tmp,"YOUR REF : ")(1),vbNewLine)(0)

customername=Split(Split(tmp,"APPLICANT : ")(1),vbNewLine)(0)

amountandcurrency=Split(Split(tmp,"NET AMOUNT CREDITED: ")(1),vbNewLine)(0)
amount=Split(amountandcurrency," ")(1)
currency=Split(amountandcurrency," ")(0)

Dim ii As Integer=checkdt.Rows.Count,i As Integer'替换companycode
For  i=0 To ii-1
		If checkdt.Rows(i)(0).ToString = companycode Then
			companycode=checkdt.Rows(i)(1).ToString
		End If
	Next
System.Console.WriteLine(""+companycode)'(documentdate+","+documentnumber+","+customername+","+currency+","+amount+","+companycode)
tmpdocumentdate=documentdate
tmpcurrency=currency
tmpamount=amount
tmpdocnum=documentnumber
tmpcustname=customername
tmpcompanycode=companycode

猜你喜欢

转载自blog.csdn.net/weixin_31808811/article/details/80355382