⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gzl_tj.frm

📁 这是一个非常 好的一个程序进行体会一下学生管理系统
💻 FRM
📖 第 1 页 / 共 3 页
字号:
            mrc1.MoveNext
        Wend
        mrc1.Close
        
        '查询著作表(zhuzuo_info)
        sql1 = "select title,equival from zhuzuo_info where  " & _
               " Tea_id = " & "'" & tno & "'" & _
               " and term = " & "'" & Trim(Text2.Text) & "'"
        Set mrc1 = ExecuteSQL(sql1, MsgText)
        While Not mrc1.EOF
            .Rows = .Rows + 1
            .TextMatrix(.Rows - 1, 0) = "编写著作"
            For i = 0 To 1
                If Not IsNull(mrc1.Fields(i)) Then
                    .TextMatrix(.Rows - 1, i + 1) = mrc1.Fields(i)
                End If
            Next i
            If Not IsNull(mrc1.Fields(1)) Then
                .TextMatrix(.Rows - 1, 3) = mrc1.Fields(1) * 30
                sum = sum + mrc1.Fields(1) * 30
            End If
            mrc1.MoveNext
        Wend
        mrc1.Close
        Set mrc1 = Nothing
        
        If .Rows = 1 Then
            MsgBox "没有" & Trim(Combo2.Text) & "老师在" & Trim(Text2.Text) & "学期的科研工作记录!", 0 + 48, "注意!"
            Text2.SetFocus
            SendKeys "{home}+{end}"
            Exit Sub
        End If
        .Rows = .Rows + 1
        .TextMatrix(.Rows - 1, 0) = "总计:"
        .TextMatrix(.Rows - 1, 1) = sum
    End With
    mrc.Fields(3) = sum
    mrc.Update
    mrc.Close
    Set mrc = Nothing
    Command4.Enabled = False
    Command3.Enabled = True
    Command_dc2.Enabled = True
End Sub

Private Sub Command5_Click() '重置按钮(总工作量计算)
    zjFlexGrid.Rows = 1
    Text3.Text = ""
    Text4.Text = ""
    Combo3.Text = ""
    Command6.Enabled = True
    Command_dc3.Enabled = False
    Command5.Enabled = False
End Sub

Private Sub Command6_Click() ' 确定按钮(总工作量计算)
    If Text3.Text = "" Then
        MsgBox "请输入学期!", 0 + 48, "注意!"
        Text3.SetFocus
        Exit Sub
    End If
    If Not IsNumeric(Text3.Text) Then
        MsgBox "输入的学期格式不对!", 0 + 48, "注意!"
        Text3.SetFocus
        SendKeys "{home}+{end}"
        Exit Sub
    End If
    If Combo3.Text = "" Then
        MsgBox "请选择教师姓名!", 0 + 48, "注意!"
        Combo3.SetFocus
        Exit Sub
    End If
    If Text4.Text <> "" And Not IsNumeric(Text3.Text) Then
        MsgBox "输入的附加工作量格式不对!", 0 + 48, "注意!"
        Text3.SetFocus
        SendKeys "{home}+{end}"
        Exit Sub
    End If
    
    
    Dim tno, cno As String '用来保存所选教师的职工号和课程号
    Dim sum As Single  '用来保存工作量之和
    sum = 0
    SQL = "select Tea_id from Tea_info where Tea_name = " & "'" & Trim(Combo3.Text) & "'"
    Set mrc = ExecuteSQL(SQL, MsgText)
    tno = mrc.Fields(0)
    mrc.Close
    SQL = "select * from quanti_info where Tea_id = " & "'" & tno & "'" & _
          " and term = " & "'" & Trim(Text3.Text) & "'"
    Set mrc = ExecuteSQL(SQL, MsgText)
    If mrc.EOF Then
        mrc.AddNew
        mrc.Fields(0) = Trim(Text3.Text)
        mrc.Fields(1) = tno
    End If
    With zjFlexGrid
        .Rows = 1
                
        '查询本专科授课表(bzhk_info)
        sql1 = "select Cou_name,class,class_hour from Cou_info,bzhk_info where  " & _
               " Cou_info.Cou_no=bzhk_info.Cou_no and Tea_id = " & "'" & tno & "'" & _
               " and term = " & "'" & Trim(Text3.Text) & "'"
        Set mrc1 = ExecuteSQL(sql1, MsgText)
        While Not mrc1.EOF
            .Rows = .Rows + 1
            .TextMatrix(.Rows - 1, 0) = "本专科授课"
            For i = 0 To 2
                If Not IsNull(mrc1.Fields(i)) Then
                    .TextMatrix(.Rows - 1, i + 1) = mrc1.Fields(i)
                End If
            Next i
            If Not IsNull(mrc1.Fields(2)) Then
                sum = sum + mrc1.Fields(2)
            End If
            mrc1.MoveNext
        Wend
        mrc1.Close
        
        '查询研究生授课表(yjsh_info)
        sql1 = "select Cou_name,class,class_hour from Cou_info, yjsh_info where  " & _
               " Cou_info.Cou_no=yjsh_info.Cou_no and Tea_id = " & "'" & tno & "'" & _
               " and term = " & "'" & Trim(Text2.Text) & "'"
        Set mrc1 = ExecuteSQL(sql1, MsgText)
        While Not mrc1.EOF
            .Rows = .Rows + 1
            .TextMatrix(.Rows - 1, 0) = "研究生授课"
            For i = 0 To 2
                If Not IsNull(mrc1.Fields(i)) Then
                    .TextMatrix(.Rows - 1, i + 1) = mrc1.Fields(i)
                End If
            Next i
            If Not IsNull(mrc1.Fields(2)) Then
                sum = sum + mrc1.Fields(2)
            End If
            mrc1.MoveNext
        Wend
        mrc1.Close
        
        '查询实验与上机表(shyshj_info)
        sql1 = "select Cou_name,class,class_hour from Cou_info ,shyshj_info where  " & _
               " Cou_info.Cou_no=shyshj_info.Cou_no and Tea_id = " & "'" & tno & "'" & _
               " and term = " & "'" & Trim(Text3.Text) & "'"
        Set mrc1 = ExecuteSQL(sql1, MsgText)
        While Not mrc1.EOF
            .Rows = .Rows + 1
            .TextMatrix(.Rows - 1, 0) = "指导实验与上机"
            For i = 0 To 2
                If Not IsNull(mrc1.Fields(i)) Then
                    .TextMatrix(.Rows - 1, i + 1) = mrc1.Fields(i)
                End If
            Next i
            If Not IsNull(mrc1.Fields(2)) Then
                sum = sum + mrc1.Fields(2)
            End If
            mrc1.MoveNext
        Wend
        mrc1.Close
        
        '查询生产实习表(shchshx_info)
        sql1 = "select class,class_hour from  shchshx_info where  " & _
               "  Tea_id = " & "'" & tno & "'" & _
               " and term = " & "'" & Trim(Text3.Text) & "'"
        Set mrc1 = ExecuteSQL(sql1, MsgText)
        While Not mrc1.EOF
            .Rows = .Rows + 1
            .TextMatrix(.Rows - 1, 0) = "指导生产实习"
            .TextMatrix(.Rows - 1, 1) = "生产实习"
            For i = 0 To 1
                If Not IsNull(mrc1.Fields(i)) Then
                    .TextMatrix(.Rows - 1, i + 2) = mrc1.Fields(i)
                End If
            Next i
            If Not IsNull(mrc1.Fields(1)) Then
                sum = sum + mrc1.Fields(1)
            End If
            mrc1.MoveNext
        Wend
        mrc1.Close
        
         '查询毕业设计表(bishe_info)
        sql1 = "select Stu_num,class_hour from  bishe_info where  " & _
               "  Tea_id = " & "'" & tno & "'" & _
               " and term = " & "'" & Trim(Text3.Text) & "'"
        Set mrc1 = ExecuteSQL(sql1, MsgText)
        While Not mrc1.EOF
            .Rows = .Rows + 1
            .TextMatrix(.Rows - 1, 0) = "指导毕业设计"
            .TextMatrix(.Rows - 1, 1) = "毕业设计"
            .TextMatrix(.Rows - 1, 2) = "学生数:" & mrc1.Fields(0)
            If Not IsNull(mrc1.Fields(1)) Then
                .TextMatrix(.Rows - 1, 3) = mrc1.Fields(1)
                sum = sum + mrc1.Fields(1)
            End If
            mrc1.MoveNext
        Wend
        mrc1.Close
        
         '查询课程设计表(kchshj_info)
        sql1 = "select Cou_name,class,class_hour from Cou_info, kchshj_info where  " & _
               " Cou_info.Cou_no=kchshj_info.Cou_no and Tea_id = " & "'" & tno & "'" & _
               " and term = " & "'" & Trim(Text3.Text) & "'"
        Set mrc1 = ExecuteSQL(sql1, MsgText)
        While Not mrc1.EOF
            .Rows = .Rows + 1
            .TextMatrix(.Rows - 1, 0) = "指导课程设计"
            For i = 0 To 2
                If Not IsNull(mrc1.Fields(i)) Then
                    .TextMatrix(.Rows - 1, i + 1) = mrc1.Fields(i)
                End If
            Next i
            If Not IsNull(mrc1.Fields(2)) Then
                sum = sum + mrc1.Fields(2)
            End If
            mrc1.MoveNext
        Wend
        mrc1.Close
        
         '查询指导学位研究生表(xwyjsh_info)
        sql1 = "select Stu_id,class_hour from  xwyjsh_info where  " & _
               "  Tea_id = " & "'" & tno & "'" & _
               " and term = " & "'" & Trim(Text3.Text) & "'"
        Set mrc1 = ExecuteSQL(sql1, MsgText)
        While Not mrc1.EOF
            .Rows = .Rows + 1
            .TextMatrix(.Rows - 1, 0) = "指导学位研究生"
            .TextMatrix(.Rows - 1, 1) = "研究生"
            .TextMatrix(.Rows - 1, 2) = "学生学号:" & mrc1.Fields(0)
            If Not IsNull(mrc1.Fields(1)) Then
                .TextMatrix(.Rows - 1, 3) = mrc1.Fields(1)
                sum = sum + mrc1.Fields(1)
            End If
            mrc1.MoveNext
        Wend
        mrc1.Close
                
        '查询科研课题与经费表(kyktjf_info)
        sql1 = "select title,equival from kyktjf_info where  " & _
               " Tea_id = " & "'" & tno & "'" & _
               " and term = " & "'" & Trim(Text3.Text) & "'"
        Set mrc1 = ExecuteSQL(sql1, MsgText)
        While Not mrc1.EOF
            .Rows = .Rows + 1
            .TextMatrix(.Rows - 1, 0) = "科研课题与经费"
            For i = 0 To 1
                If Not IsNull(mrc1.Fields(i)) Then
                    .TextMatrix(.Rows - 1, i + 1) = mrc1.Fields(i)
                End If
            Next i
            If Not IsNull(mrc1.Fields(1)) Then
                .TextMatrix(.Rows - 1, 3) = mrc1.Fields(1) * 30
                sum = sum + mrc1.Fields(1) * 30
            End If
            mrc1.MoveNext
        Wend
        mrc1.Close
        
        '查询科研成果表(kychg_info)
        sql1 = "select title,equival from kychg_info where  " & _
               " Tea_id = " & "'" & tno & "'" & _
               " and term = " & "'" & Trim(Text3.Text) & "'"
        Set mrc1 = ExecuteSQL(sql1, MsgText)
        While Not mrc1.EOF
            .Rows = .Rows + 1
            .TextMatrix(.Rows - 1, 0) = "科研成果"
            For i = 0 To 1
                If Not IsNull(mrc1.Fields(i)) Then
                    .TextMatrix(.Rows - 1, i + 1) = mrc1.Fields(i)
                End If
            Next i
            If Not IsNull(mrc1.Fields(1)) Then
                .TextMatrix(.Rows - 1, 3) = mrc1.Fields(1) * 30
                sum = sum + mrc1.Fields(1) * 30
            End If
            mrc1.MoveNext
        Wend
        mrc1.Close
        
        '查询论文表(lunwen_info)
        sql1 = "select title,equival from lunwen_info where  " & _
               " Tea_id = " & "'" & tno & "'" & _
               " and term = " & "'" & Trim(Text3.Text) & "'"
        Set mrc1 = ExecuteSQL(sql1, MsgText)
        While Not mrc1.EOF
            .Rows = .Rows + 1
            .TextMatrix(.Rows - 1, 0) = "发表论文"
            For i = 0 To 1
                If Not IsNull(mrc1.Fields(i)) Then
                    .TextMatrix(.Rows - 1, i + 1) = mrc1.Fields(i)
                End If
            Next i
            If Not IsNull(mrc1.Fields(1)) Then
                .TextMatrix(.Rows - 1, 3) = mrc1.Fields(1) * 30
                sum = sum + mrc1.Fields(1) * 30
            End If
            mrc1.MoveNext
        Wend
        mrc1.Close
        
        '查询著作表(zhuzuo_info)
        sql1 = "select title,equival from zhuzuo_info where  " & _
               " Tea_id = " & "'" & tno & "'" & _
               " and term = " & "'" & Trim(Text3.Text) & "'"
        Set mrc1 = ExecuteSQL(sql1, MsgText)
        While Not mrc1.EOF
            .Rows = .Rows + 1
            .TextMatrix(.Rows - 1, 0) = "编写著作"
            For i = 0 To 1
                If Not IsNull(mrc1.Fields(i)) Then
                    .TextMatrix(.Rows - 1, i + 1) = mrc1.Fields(i)
                End If
            Next i
            If Not IsNull(mrc1.Fields(1)) Then
                .TextMatrix(.Rows - 1, 3) = mrc1.Fields(1) * 30
                sum = sum + mrc1.Fields(1) * 30
            End If
            mrc1.MoveNext
        Wend
        mrc1.Close
        Set mrc1 = Nothing
         
        '附加工作量
        If Text4.Text <> "" Then
            .Rows = .Rows + 1
            .TextMatrix(.Rows - 1, 0) = "附加工作量:"
            .TextMatrix(.Rows - 1, 1) = Val(Text4.Text)
            mrc.Fields(4) = Val(Text4.Text)
            sum = sum + Val(Text4.Text)
        End If
        
        If .Rows = 1 Then
            MsgBox "没有" & Trim(Combo3.Text) & "老师在" & Trim(Text3.Text) & "学期的工作记录!", 0 + 48, "注意!"
            Text3.SetFocus
            SendKeys "{home}+{end}"
            Exit Sub
        End If
                
        .Rows = .Rows + 1
        .TextMatrix(.Rows - 1, 0) = "总计:"
        .TextMatrix(.Rows - 1, 1) = sum
    End With
    mrc.Fields(5) = sum
    mrc.Update
    mrc.Close
    Set mrc = Nothing
    Command6.Enabled = False
    Command5.Enabled = True
    Command_dc3.Enabled = True
End Sub

Private Sub Form_Load()
    Option1(0).Value = True
    Frame_gzl(0).Visible = True
    
    With jxFlexGrid
        .Rows = 1
        .TextMatrix(0, 0) = "类别"
        .TextMatrix(0, 1) = "具体内容"
        .TextMatrix(0, 2) = "教学对象"
        .TextMatrix(0, 3) = "相应工作量"
        For i = 0 To 3
            .ColAlignment(i) = 3
            .ColWidth(i) = 1600
        Next i
    End With
    
    With kyFlexGrid
        .Rows = 1
        .TextMatrix(0, 0) = "类别"
        .TextMatrix(0, 1) = "具体内容"
        .TextMatrix(0, 2) = "相应当量"
        .TextMatrix(0, 3) = "相应工作量"
        For i = 0 To 3
            .ColAlignment(i) = 3
            .ColWidth(i) = 1600
        Next i
    End With
    
    With zjFlexGrid
        .Rows = 1
        .TextMatrix(0, 0) = "类别"
        .TextMatrix(0, 1) = "具体内容"
        .TextMatrix(0, 2) = "教学对象/相应当量"
        .TextMatrix(0, 3) = "相应工作量"
        For i = 0 To 3
            .ColAlignment(i) = 3
            .ColWidth(i) = 1600
        Next i
    End With
    
    '初始化教师姓名对话框
    SQL = "select Tea_name from Tea_info "
    Set mrc = ExecuteSQL(SQL, MsgText)
    While Not mrc.EOF
        Combo1.AddItem mrc.Fields(0)
        Combo2.AddItem mrc.Fields(0)
        Combo3.AddItem mrc.Fields(0)
        mrc.MoveNext
    Wend
    mrc.Close
    Set mrc = Nothing
End Sub

Private Sub Option1_Click(Index As Integer)
    For i = 0 To 2
        Frame_gzl(i).Visible = False
    Next i
    Frame_gzl(Index).Visible = True
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -