Foxtable(狐表)用户栏目专家坐堂 → [求助]想做一个可视化员工一览表窗口


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

主题:[求助]想做一个可视化员工一览表窗口

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


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

参考,自行扩充

 

Dim dt As DataTable = DataTables("员工信息表")
Dim pcount As Integer = 1
For Each sl As String In dt.GetValues("势力")
    Dim pnl As WinForm.panel
    pnl = e.Form.CreateControl("lable1", ControlTypeEnum.panel)
    pnl.Left = 100
    pnl.Top = 100 * pcount
    pnl.width = 500
    pnl.height = 100
    e.Form.AddControl(pnl)
    pcount += 1
    Dim lcount As Integer = 0
    For Each dr As DataRow In dt.Select("势力 = '" & sl & "'")
        Dim lbl As WinForm.label
        lbl = e.Form.CreateControl("lable" & dr("姓名"), ControlTypeEnum.Label)
        lbl.Text = dr("姓名")
        lbl.Left = 10 + lcount*100
        lbl.Top = 10
        If dr("类型") = "武将" Then
            lbl.backcolor = Color.red
        ElseIf dr("类型") = "文臣" Then
            lbl.backcolor = Color.yellow
        End If
        lcount += 1
        pnl.AddControl(lbl)
    Next
Next


 回到顶部