Dim cmd As New SQLCommand
Dim dt As DataTable
Dim bd1 As New GroupTableBuilder("统计表1",DataTables("users"))
Dim lst As WinFor m.Table = e.For m.Controls("Table1")
If lst.Table.Cols.Count>=0 Then
Dim useryhbm As String
cmd.C
cmd.CommandText = "Delete Fro m {Users} Where [yhbm] = '" & Useryhbm & "'"
cmd.ExecuteNonQuery
End If
cmd.C
cmd.CommandText = "SELECT DISTINCT Name Fro m {Users}"
dt = cmd.ExecuteReader()
Dim dt1 As fxDataSource
bd1.Groups.AddDef("yhbm","用户信息_用户账号") '根据根据用户账号分组
bd1.Groups.AddDef("name","用户信息_用户姓名") '根据用户姓名分组
bd1.Groups.AddDef("dwmc","用户信息_所属部门") '根据所属部门分组
bd1.Groups.AddDef("group","用户信息_用户角色") '根据用户角色分组
dt1 = bd1.BuildDataSource()
Tables("用户管理_Table1").DataSource = dt1 '将统计结果绑定到Table
Tables("用户管理_table1").AutoSizeCols() '设置自动列宽