第一次机房收费系统之正在值班教师

对于其他的窗体来说,“正在值班教师”这个窗体就相对来说比较简单了,只需要把此窗体连接到OnWork表即可。

'添加表头
    With MSHFlexGrid1
        .CellAlignment = 4 '表格居中对齐
        .TextMatrix(0, 0) = "记录号"
        .TextMatrix(0, 1) = "教师"
        .TextMatrix(0, 2) = "级别"
        .TextMatrix(0, 3) = "登录日期"
        .TextMatrix(0, 4) = "登录时间"
        .TextMatrix(0, 5) = "机器名"
    End With
    
    Dim txtSQL As String
    Dim mrc As ADODB.Recordset
    Dim Msgtext As String
    
    txtSQL = "select * from OnWork_info" '连接onwork表
    Set mrc = ExecuteSQL(txtSQL, Msgtext)
    
    With MSHFlexGrid1
        .Rows = .Rows + 1
        .CellAlignment = 4 '表格居中对齐
        .TextMatrix(.Rows - 2, 1) = Trim(mrc.Fields(0))
        .TextMatrix(.Rows - 2, 2) = Trim(mrc.Fields(1))
        .TextMatrix(.Rows - 2, 3) = Trim(mrc.Fields(2))
        .TextMatrix(.Rows - 2, 4) = Trim(mrc.Fields(3))
        .TextMatrix(.Rows - 2, 5) = Trim(mrc.Fields(4))
    End With
    mrc.Close

 

展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 游动-白 设计师: 上身试试
应支付0元
点击重新获取
扫码支付

支付成功即可阅读