Foxtable(狐表)用户栏目专家坐堂 → 请教甜大师


  共有3203人关注过本帖树形打印复制链接

主题:请教甜大师

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/11/5 22:49:00 [显示全部帖子]

'''


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


 回到顶部