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

📄 frm1.frm

📁 班主任考核管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Begin VB.Label Label1 
         Caption         =   "班级"
         BeginProperty Font 
            Name            =   "楷体_GB2312"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   960
         TabIndex        =   8
         Top             =   360
         Width           =   735
      End
   End
   Begin VB.Frame Frame10 
      Caption         =   "考核学期"
      Height          =   1455
      Left            =   4560
      TabIndex        =   0
      Top             =   0
      Width           =   3735
      Begin VB.ComboBox Combo2 
         Height          =   300
         Index           =   1
         ItemData        =   "frm1.frx":0000
         Left            =   120
         List            =   "frm1.frx":0010
         TabIndex        =   38
         Top             =   960
         Width           =   1335
      End
      Begin VB.ComboBox Combo3 
         Height          =   300
         Index           =   1
         ItemData        =   "frm1.frx":002C
         Left            =   2040
         List            =   "frm1.frx":0054
         TabIndex        =   37
         Top             =   960
         Width           =   1095
      End
      Begin VB.ComboBox Combo2 
         Height          =   300
         Index           =   0
         ItemData        =   "frm1.frx":007F
         Left            =   120
         List            =   "frm1.frx":008F
         TabIndex        =   2
         Top             =   360
         Width           =   1335
      End
      Begin VB.ComboBox Combo3 
         Height          =   300
         Index           =   0
         ItemData        =   "frm1.frx":00AB
         Left            =   2040
         List            =   "frm1.frx":00D3
         TabIndex        =   1
         Top             =   360
         Width           =   1095
      End
      Begin VB.Label Label11 
         AutoSize        =   -1  'True
         Caption         =   "-----------起止日期-----------"
         ForeColor       =   &H0080FF80&
         Height          =   180
         Left            =   360
         TabIndex        =   41
         Top             =   720
         Width           =   2700
      End
      Begin VB.Label Label5 
         Caption         =   "年"
         Height          =   375
         Index           =   1
         Left            =   1560
         TabIndex        =   40
         Top             =   960
         Width           =   495
      End
      Begin VB.Label Label6 
         Caption         =   "月"
         Height          =   255
         Index           =   1
         Left            =   3240
         TabIndex        =   39
         Top             =   960
         Width           =   375
      End
      Begin VB.Label Label5 
         Caption         =   "年"
         Height          =   375
         Index           =   0
         Left            =   1560
         TabIndex        =   4
         Top             =   360
         Width           =   495
      End
      Begin VB.Label Label6 
         Caption         =   "月"
         Height          =   255
         Index           =   0
         Left            =   3240
         TabIndex        =   3
         Top             =   360
         Width           =   375
      End
   End
End
Attribute VB_Name = "frm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    Dim intcount, a, b, c, d, e, f As Integer
  Dim smg, smg1 As String
  Dim mr As ADODB.Recordset
  Dim msgtext As String
  a = 0
  b = 0
  c = 0
  d = 0
  e = 0
  f = 0
  If Trim(Combo1 & "") = "请选择" Then
   MsgBox "请选择班级", vbOKOnly + vbExclamation, "警告"
    Exit Sub
  End If
  If Trim(Combo2(0) & "") = "" Then
   MsgBox "请选择年份", vbOKOnly + vbExclamation, "警告"
    Exit Sub
  End If
  If Trim(Combo3(0) & "") = "" Then
   MsgBox "请选择月份", vbOKOnly + vbExclamation, "警告"
    Exit Sub
  End If
  If Trim(Combo2(1) & "") = "" Then
   MsgBox "请选择年份", vbOKOnly + vbExclamation, "警告"
    Exit Sub
  End If
  If Trim(Combo3(1) & "") = "" Then
   MsgBox "请选择月份", vbOKOnly + vbExclamation, "警告"
    Exit Sub
  End If
  smg = Format(CDate(Combo2(0) & "-" & Combo3(0) & "-" & "1"), "yyyy-mm-dd")
  smg1 = Format(CDate(Combo2(1) & "-" & Combo3(1) & "-" & "1"), "yyyy-mm-dd")
  If smg1 <= smg Then
     MsgBox "错误,结束日期晚于起始日期!请检查学期的日期是否输入正确", vbOKOnly + vbExclamation, "警告"
    Exit Sub
  End If
  txtSQL = "select sum(koufen),sum(lihui),sum(banhui),sum(tongbao),sum(qinshi) from kaohe where class='" & Combo1 & "' and yuefen<='" & smg1 & "' and yuefen>='" & smg & "'"
  Set mr = ExecuteSQL(txtSQL, msgtext)
  If Not mr.EOF Then
    Text2.Text = mr.Fields(0)
    Text7.Text = mr.Fields(1)
    Text8.Text = mr.Fields(2)
    Text3.Text = mr.Fields(3)
    Text5.Text = mr.Fields(4)
  Else: MsgBox "未找到符合条件的纪录", vbOKCancel + vbExclamation, "警告"
  End If
  txtSQL = "select * from kaohe where class='" & Combo1 & "' and yuefen<='" & smg1 & "' and yuefen>='" & smg & "' and jititongbao=1"
  Set mr = ExecuteSQL(txtSQL, msgtext)
  Do While Not mr.EOF
    a = a + 1
    mr.MoveNext
  Loop
  Text6.Text = a
  txtSQL = "select * from kaohe where class='" & Combo1 & "' and yuefen<='" & smg1 & "' and yuefen>='" & smg & "' and cailiao=0"
  Set mr = ExecuteSQL(txtSQL, msgtext)
  Do While Not mr.EOF
    b = b + 1
    mr.MoveNext
  Loop
  Text9.Text = b
  txtSQL = "select * from kaohe where class='" & Combo1 & "' and yuefen<='" & smg1 & "' and yuefen>='" & smg & "' and huodong=0"
  Set mr = ExecuteSQL(txtSQL, msgtext)
  Do While Not mr.EOF
    c = c + 1
    mr.MoveNext
  Loop
  Text13.Text = c
  txtSQL = "select * from kaohe where class='" & Combo1 & "' and yuefen<='" & smg1 & "' and yuefen>='" & smg & "' and shigu=1"
  Set mr = ExecuteSQL(txtSQL, msgtext)
  Do While Not mr.EOF
    d = d + 1
    mr.MoveNext
  Loop
  Text12.Text = d
  txtSQL = "select * from kaohe where class='" & Combo1 & "' and yuefen<='" & smg1 & "' and yuefen>='" & smg & "' and jiaoshiguifanhua=1"
  Set mr = ExecuteSQL(txtSQL, msgtext)
  Do While Not mr.EOF
    e = e + 1
    mr.MoveNext
  Loop
  Text10.Text = e
  txtSQL = "select * from kaohe where class='" & Combo1 & "' and yuefen<='" & smg1 & "' and yuefen>='" & smg & "' and wenmingqinshi=1"
  Set mr = ExecuteSQL(txtSQL, msgtext)
  Do While Not mr.EOF
    f = f + 1
    mr.MoveNext
  Loop
  Text11.Text = f
  txtSQL = "select sum(heji) from jintie where class='" & Combo1 & "' and riqi<='" & smg1 & "' and riqi>='" & smg & "'"
  Set mr = ExecuteSQL(txtSQL, msgtext)
  If Not mr.EOF Then
    Text4.Text = mr.Fields(0)
  Else: MsgBox "未找到符合条件的纪录", vbOKCancel + vbExclamation, "警告"
  End If
  txtSQL = "delete from banzhurenxueqi where 班级='" & Trim(Combo1) & "' and 学期1='" & smg & "' and 学期2='" & smg1 & "'"
  Set mr = ExecuteSQL(txtSQL, msgtext)
  
  txtSQL = "execute xueqi1setup'"
  txtSQL = txtSQL & Trim(Combo1) & "','"
  txtSQL = txtSQL & Trim(Text1.Text) & "','"
  txtSQL = txtSQL & smg & "','"
  txtSQL = txtSQL & smg1 & "','"
  txtSQL = txtSQL & Trim(Text2.Text) & "','"
  txtSQL = txtSQL & Trim(Text8.Text) & "','"
  txtSQL = txtSQL & Trim(Text7.Text) & "','"
  txtSQL = txtSQL & Trim(Text3.Text) & "','"
  txtSQL = txtSQL & Trim(Text6.Text) & "','"
  txtSQL = txtSQL & Trim(Text13.Text) & "','"
  txtSQL = txtSQL & Trim(Text12.Text) & "','"
  txtSQL = txtSQL & Trim(Text9.Text) & "','"
  txtSQL = txtSQL & Trim(Text5.Text) & "','"
  txtSQL = txtSQL & Trim(Text10.Text) & "','"
  txtSQL = txtSQL & Trim(Text11.Text) & "','"
  txtSQL = txtSQL & Trim(Text4.Text) & "'"
  Set mr = ExecuteSQL(txtSQL, msgtext)
  MsgBox "添加纪录成功!", vbOKOnly + vbExclamation, "添加纪录"
  
End Sub

Private Sub Command2_Click()
 Unload Me
End Sub

Private Sub Form_Load()
  Me.Height = 6690
  Me.Width = 8580
  Dim mrccc1 As ADODB.Recordset
  Dim msgtext1 As String
  Dim txtSQL As String
  
' Combo1.Clear
  txtSQL = "select class from teacher"
  Set mrccc1 = ExecuteSQL(txtSQL, msgtext1)

   Do While Not mrccc1.EOF
    Combo1.AddItem mrccc1.Fields(0)
    mrccc1.MoveNext
   Loop
   mrccc1.Close
End Sub
Private Sub Combo1_Click()
   Dim mrccc As ADODB.Recordset
  Dim msgtext As String
  Dim txtSQL As String
  
' Combo1.Clear
  txtSQL = "select name1 from teacher where class='" & Combo1 & "'"
  Set mrccc = ExecuteSQL(txtSQL, msgtext)
    Text1.Text = mrccc.Fields(0)
    mrccc.MoveNext
   mrccc.Close
  
End Sub

⌨️ 快捷键说明

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