以下是引用飞飞在2014-10-14 23:43:00的发言:
今天给客户开发,发现,来回切换表很麻烦,做了一个翻表功能:
代码很简练,思路很牛X,功能很实用,看懂的给个 精 啊
--------------全局变量-------------
Public LT As New List(Of String)
Public RT As New List(Of String)
----------------导航---------------
Dim TableName As String = e.Link.Name
LT.Remove(TableName)
LT.ADD(TableName)
RT.Clear
MainTable=Tables(TableName )
以下内容只有回复后才可以浏览
--------------左翻表按钮-------------------------
Dim LC As Integer = LT.count
Dim RC As Integer = RT.count
Dim NextTable As String
If LC >1 Then
NextTable = LT(LC-1)
Try
RT.add(NextTable )
LT.remove(NextTable)
MainTable=Tables(LT(LC-2))
Catch
End Try
End If
--------------右翻表按钮-------------------------
Dim LC As Integer = LT.count
Dim RC As Integer = RT.count
Dim NextTable As String
If RC >0 Then
NextTable = RT(RC-1)
Try
LT.add(NextTable )
RT.remove(NextTable)
MainTable=Tables(NextTable)
Catch
End Try
End If
[此贴子已经被作者于2014-10-14 23:50:43编辑过]
没有弄明白,楼主上传个附件。