Dim lb1 As WinForm.Label = e.Form.Controls("Label1")
Dim lb2 As WinForm.Label = e.Form.Controls("Label2")
Dim lb3 As WinForm.Label = e.Form.Controls("Label3")
Dim lb4 As WinForm.Label = e.Form.Controls("Label4")
Dim lb5 As WinForm.Label = e.Form.Controls("Label5")
Dim lb6 As WinForm.Label = e.Form.Controls("Label6")
Dim lb7 As WinForm.Label = e.Form.Controls("Label7")
Dim lb8 As WinForm.Label = e.Form.Controls("Label8")
Dim lb9 As WinForm.Label = e.Form.Controls("Label9")
Dim lb10 As WinForm.Label = e.Form.Controls("Label10")
Dim lb11 As WinForm.Label = e.Form.Controls("Label11")
Dim lb12 As WinForm.Label = e.Form.Controls("Label12")
Dim lb13 As WinForm.Label = e.Form.Controls("Label13")
Dim lb14 As WinForm.Label = e.Form.Controls("Label14")
If DataTables("窗口3_Table1").DataRows.Count = 0 Then '如果是一个空表
Return '那么返回
Else
If Tables("窗口3_Table1").Current.IsNull("面料识别号") = False Then
lb1.Text = "面料识别号: " & Tables("窗口3_Table1").Current("面料识别号")
Else
lb1.Visible = False
End If
If Tables("窗口3_Table1").Current.IsNull("客户编号") = False Then
lb2.Text = "客户编号: " & Tables("窗口3_Table1").Current("客户编号")
Else
lb2.Visible = False
End If
If Tables("窗口3_Table1").Current.IsNull("面料名称") = False Then
lb3.Text = "面料名称: " & Tables("窗口3_Table1").Current("面料名称")
Else
lb3.Visible = False
End If
If Tables("窗口3_Table1").Current.IsNull("面料门幅") = False Then
lb4.Text = "面料门幅: " & Tables("窗口3_Table1").Current("面料门幅") & " Cm"
Else
lb4.Visible = False
End If
If Tables("窗口3_Table1").Current.IsNull("面料克重") = False Then
lb5.Text = "面料克重: " & Tables("窗口3_Table1").Current("面料克重") & " g/m2"
Else
lb5.Visible = False
End If
If Tables("窗口3_Table1").Current.IsNull("色号") = False Then
lb6.Text = "面料色号: " & Tables("窗口3_Table1").Current("色号")
Else
lb6.Visible = False
End If
If Tables("窗口3_Table1").Current.IsNull("颜色") = False Then
lb7.Text = "面料颜色: " & Tables("窗口3_Table1").Current("颜色")
Else
lb7.Visible = False
End If
If Tables("窗口3_Table1").Current.IsNull("品牌") = False Then
lb8.Text = "品牌: " & Tables("窗口3_Table1").Current("品牌")
Else
lb8.Visible = False
End If
If Tables("窗口3_Table1").Current.IsNull("款号") = False Then
lb9.Text = "款号: " & Tables("窗口3_Table1").Current("款号")
Else
lb9.Visible = False
End If
If Tables("窗口3_Table1").Current.IsNull("件数") = False Then
lb10.Text = "件数: " & Tables("窗口3_Table1").Current("件数")
Else
lb10.Visible = False
End If
If Tables("窗口3_Table1").Current.IsNull("数量") = False Then
lb11.Text = "成品数量: " & Tables("窗口3_Table1").Current("数量") & " Kg"
Else
lb11.Visible = False
End If
If Tables("窗口3_Table1").Current.IsNull("交货日期") = False Then
lb12.Text = "交货日期: " & Tables("窗口3_Table1").Current("交货日期")
Else
lb12.Visible = False
End If
If Tables("窗口3_Table1").Current.IsNull("交货单位") = False Then
lb13.Visible = True
lb13.Text = "交货单位: " & Tables("窗口3_Table1").Current("交货单位")
Else
lb13.Visible = False
End If
Dim s1 As String = Tables("窗口3_Table1").Current("备注").Replace(", ", ",").Replace(", ", ",").Replace(" ,", ",").Replace(" ,", ",").Replace(vbcrlf, ",").Replace(vbtab, ",").Replace(" ", ",").Replace(",", ",").Replace(" ,", ",").Replace("(备注", ",(备注")
If s1 <> "" Then
Dim Vu As String
Dim Multi As String = s1
Dim Values() As String
Values = Multi.split(",")
Dim Value As String
For i As Integer = 0 To Values.Count - 1
Dim sbu As New StringBuilder
msgbox("1")
Dim ite As Integer = 18
msgbox("2")
Dim szb As String = Values(i).SubString(0, ite)
msgbox(szb)
Dim c As Integer = (szb.Length * 2 - Encoding.default.GetBytes(szb).length) / 2
msgbox(c)
Dim szc As String = Values(i).SubString(0, ite + c)
Dim l As Integer = (szc.Length * 2 - Encoding.default.GetBytes(szc).length) / 2
msgbox(e)
Dim g As Integer = l - c
If Encoding.default.GetBytes(Values(i)).length > 42 Then
Do While Values(i).SubString(0, ite + c + g)
sbu.AppendLine(Values(i).SubString(0, ite + c + g))
Values(i) = Values(i).SubString(0, ite + c + g)
Loop
End If
sbu.Append(Values(i))
Vu = Vu & "," & sbu.ToString
Next
Value = Vu.Trim(",").Replace(",", vbcrlf)
lb14.Visible = True
lb14.Text = "备注: " & vbcrlf & Value
Else
lb14.Visible = False
End If
End If
此主题相关图片如下:01.jpg
怎么回事?哪里错了?