Frmxuefei3.frm
上传用户:bubble
上传日期:2007-03-02
资源大小:403k
文件大小:7k
- VERSION 5.00
- Begin VB.Form Frmxuefei3
- BorderStyle = 1 'Fixed Single
- Caption = "学费查询"
- ClientHeight = 3870
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 5370
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MDIChild = -1 'True
- MinButton = 0 'False
- ScaleHeight = 3870
- ScaleWidth = 5370
- Begin VB.ComboBox Combo1
- Height = 300
- Index = 2
- ItemData = "Frmxuefei3.frx":0000
- Left = 2040
- List = "Frmxuefei3.frx":0002
- TabIndex = 9
- Top = 1920
- Width = 1215
- End
- Begin VB.ComboBox Combo1
- Height = 300
- Index = 0
- Left = 2040
- TabIndex = 8
- Top = 960
- Width = 1215
- End
- Begin VB.ComboBox Combo1
- Height = 300
- Index = 1
- Left = 2040
- TabIndex = 7
- Top = 1440
- Width = 1215
- End
- Begin VB.ComboBox Combo1
- Height = 300
- Index = 3
- Left = 2040
- TabIndex = 6
- Top = 2400
- Width = 2775
- End
- Begin VB.CommandButton Command1
- Caption = "确定"
- Height = 255
- Left = 1800
- TabIndex = 0
- Top = 3240
- Width = 1095
- End
- Begin VB.Label Label5
- Caption = "学期:"
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 1320
- TabIndex = 5
- Top = 2520
- Width = 1575
- End
- Begin VB.Label Label3
- Caption = "学费设置查询"
- BeginProperty Font
- Name = "华文中宋"
- Size = 15.75
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 375
- Left = 1320
- TabIndex = 4
- Top = 240
- Width = 2175
- End
- Begin VB.Label Label1
- Caption = "年级:"
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 1320
- TabIndex = 3
- Top = 980
- Width = 975
- End
- Begin VB.Label Label2
- Caption = "年制:"
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 1320
- TabIndex = 2
- Top = 2040
- Width = 735
- End
- Begin VB.Label Label4
- Caption = "专业:"
- BeginProperty Font
- Name = "宋体"
- Size = 10.5
- Charset = 134
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 1320
- TabIndex = 1
- Top = 1560
- Width = 1575
- End
- End
- Attribute VB_Name = "Frmxuefei3"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Private Sub Combo1_Click(Index As Integer)
- If Index <> 2 Then
- Exit Sub
- End If
- Dim mrc As ADODB.Recordset
- txtsql = "select * from class where 班级='" & Trim(Combo1(2).Text) & "'"
- Set mrc = ExecuteSQL(txtsql)
- If mrc.EOF = True Then
- Combo1(0).Text = ""
- Combo1(1).Text = ""
- Exit Sub
- End If
- Combo1(0).Text = mrc.Fields(0)
- Combo1(1).Text = mrc.Fields(4)
- End Sub
- Private Sub Command1_Click()
- txtsql = ""
- If Combo1(0).Text <> "" Then
-
- If txtsql = "" Then
- txtsql = "年级='" & Trim(Combo1(0).Text) & "'"
- Else
- txtsql = txtsql & "and 年级='" & Trim(Combo1(0).Text) & "'"
- End If
- End If
- If Combo1(2).Text <> "" Then
- If txtsql = "" Then
- txtsql = "年制='" & Trim(Combo1(2).Text) & "'"
- Else
- txtsql = txtsql & "and 年制='" & Trim(Combo1(2).Text) & "'"
- End If
- End If
- If Combo1(1).Text <> "" Then
- aa = 1
- If txtsql = "" Then
- txtsql = "专业='" & Trim(Combo1(1).Text) & "'"
- Else
- txtsql = txtsql & "and 专业='" & Trim(Combo1(1).Text) & "'"
- End If
- End If
- If Combo1(3).Text <> "" Then
- aa = 1
- If txtsql = "" Then
- txtsql = "学期='" & Trim(Combo1(3).Text) & "'"
- Else
- txtsql = txtsql & "and 学期='" & Trim(Combo1(3).Text) & "'"
- End If
- End If
- If txtsql = "" Then
- ss = MsgBox("你至少要输入一个条件以上才能查询!", , " 警告")
-
- Exit Sub
-
- End If
- txtsql = "select * from xuefei where " & txtsql
- xuefeifind = True
- Frmxuefei2.Show
- Frmxuefei2.xuefeishowtitle
- Frmxuefei2.xuefeishowdata
- Frmxuefei2.Caption = "班级学费设置查询结果"
- 'Frmxuefei2.ZOrder (0)
- End Sub
- Private Sub Form_Deactivate()
- Unload Me
- End Sub
- Private Sub Form_Load()
- Dim mrc As ADODB.Recordset
-
- txtsql = "select DISTINCT 年级 from class "
- Set mrc = ExecuteSQL(txtsql)
- mrc.MoveFirst
- Combo1(0).Clear
- Combo1(0).AddItem ""
- Do While Not mrc.EOF
- Combo1(0).AddItem mrc.Fields(0)
-
- mrc.MoveNext
- Loop
-
- txtsql = "select DISTINCT 专业 from class "
- Set mrc = ExecuteSQL(txtsql)
- mrc.MoveFirst
- Combo1(1).Clear
- Combo1(1).AddItem ""
- Do While Not mrc.EOF
-
- Combo1(1).AddItem mrc.Fields(0)
-
- mrc.MoveNext
- Loop
-
- txtsql = "select DISTINCT 年制 from class "
- Set mrc = ExecuteSQL(txtsql)
- mrc.MoveFirst
- Combo1(2).Clear
- Combo1(2).AddItem ""
- Do While Not mrc.EOF
-
- Combo1(2).AddItem mrc.Fields(0)
-
- mrc.MoveNext
- Loop
- mrc.Close
- Combo1(0).ListIndex = 0
- Combo1(1).ListIndex = 0
- Combo1(2).ListIndex = 0
- Combo1(3).AddItem ""
- Combo1(3).AddItem Val(Format(Date, "yyyy")) - 1 & "---" & Val(Format(Date, "yyyy")) & "年级第一学期"
- Combo1(3).AddItem Val(Format(Date, "yyyy")) - 1 & "---" & Val(Format(Date, "yyyy")) & "年级第二学期"
- Combo1(3).AddItem Format(Date, "yyyy") & "---" & Val(Format(Date, "yyyy")) + 1 & "年级第一学期"
- Combo1(3).AddItem Format(Date, "yyyy") & "---" & Val(Format(Date, "yyyy")) + 1 & "年级第二学期"
- Combo1(3).AddItem Val(Format(Date, "yyyy")) + 1 & "---" & Val(Format(Date, "yyyy")) + 2 & "年级第一学期"
- Combo1(3).AddItem Val(Format(Date, "yyyy")) + 1 & "---" & Val(Format(Date, "yyyy")) + 2 & "年级第二学期"
-
-
- Combo1(3).ListIndex = 0
- End Sub