'''
Dim p As WinForm.Panel = Forms("导入").Controls("Panel1") '---------表上面的覆盖面板
p.Visible = False
Dim a As WinForm.TextBox = Forms("导入").Controls("TextBox1") '---定义文件路径
Dim b As WinForm.ComboBox = Forms("导入").Controls("ComboBox1") '-----定义表-----
If a.Value = "" Or b.Value = "" Then
MessageBox.Show("请选择工作簿及工作表","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Return Nothing
End If
Dim rgs As DataTable
Dim rg As WinForm.Table = Forms("导入").Controls("Table1")
rgs = rg.Table.DataTable
'----------判断年初有无全部修改-------------------------------------------------------------
Dim shzs1() As String
shzs1 = new String() {"年初"}
Dim rs3 As DataRow
Dim zbl As Integer
For Each shz1 As String In shzs1
For Each cl1 As Col In rg.Table.Cols
rs3 = rgs.find(cl1.name & " Like '" & shz1 & "*'")
If rs3 IsNot Nothing Then
If rs3(cl1.name) Like "*" & shz1 & "*" Then
zbl = zbl +1
End If
End If
Next
If zbl = 2 Then
Exit For
Else
MessageBox.Show("表的标题年初数、期末数,资产与负债及所有者权益不一致!" & vbcrlf & "请资产类和负债及所有者权益类同步修改!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Return Nothing
End If
Next
'----------判断期末有无全部修改---------------
Dim shzs2() As String
shzs2 = new String() {"期末"}
Dim rs2 As DataRow
Dim zbl2 As Integer
For Each shz2 As String In shzs2
For Each cl2 As Col In rg.Table.Cols
rs2 = rgs.find(cl2.name & " Like '" & shz2 & "*'")
If rs2 IsNot Nothing Then
If rs2(cl2.name) Like "*" & shz2 & "*" Then
zbl2 = zbl2 +1
End If
End If
Next
If zbl2 = 2 Then
Exit For
Else
MessageBox.Show("表的标题年初数、期末数,资产与负债及所有者权益不一致!" & vbcrlf & "请资产类和负债及所有者权益类同步修改!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Return Nothing
End If
Next
If zbl = 2 And zbl2 = 2 Then
MessageBox.Show("检查完毕,未发现问题!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If