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

📄 frmmoneymodify.frm

📁 学生信息管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         TabIndex        =   10
         Top             =   1590
         Width           =   255
      End
      Begin VB.Label Label11 
         BackColor       =   &H00FFFFFF&
         Caption         =   "Label11"
         Height          =   255
         Left            =   1560
         TabIndex        =   9
         Top             =   1920
         Visible         =   0   'False
         Width           =   1455
      End
   End
   Begin ShockwaveFlashObjectsCtl.ShockwaveFlash ShockwaveFlash1 
      Height          =   1575
      Left            =   555
      TabIndex        =   35
      Top             =   -120
      Width           =   5655
      _cx             =   9975
      _cy             =   2778
      FlashVars       =   ""
      Movie           =   ""
      Src             =   ""
      WMode           =   "Window"
      Play            =   -1  'True
      Loop            =   -1  'True
      Quality         =   "High"
      SAlign          =   ""
      Menu            =   -1  'True
      Base            =   ""
      AllowScriptAccess=   ""
      Scale           =   "ShowAll"
      DeviceFont      =   0   'False
      EmbedMovie      =   0   'False
      BGColor         =   ""
      SWRemote        =   ""
      MovieData       =   ""
      SeamlessTabbing =   -1  'True
      Profile         =   0   'False
      ProfileAddress  =   ""
      ProfilePort     =   0
   End
End
Attribute VB_Name = "frmmoneymodify"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False



Private Sub cobclass_Click()
If Option1.Value = True Then
Option1.Value = False
End If
If Option2.Value = True Then
Option2.Value = False
End If

End Sub

Private Sub cobcollege_Click()
'专业
sql = ""
sql = "select 专业 from Spcollege where  学院='" & cobcollege.Text & "'"
Set adoRS = adoCon.Execute(sql)

cobsp.Clear
Do While Not adoRS.EOF
  cobsp.AddItem Trim(adoRS("专业"))
  adoRS.MoveNext
Loop

End Sub
Private Sub cobsp_Click()
'班级
sql = ""
sql = "select 班级 from Spclass where  专业='" & cobsp.Text & "'"
Set adoRS = adoCon.Execute(sql)

cobclass.Clear
Do While Not adoRS.EOF
  cobclass.AddItem Trim(adoRS("班级"))
  adoRS.MoveNext
Loop
Option1.Value = False
Option2.Value = False

End Sub

Private Sub cobyear_Click()
Dim sCon As String
Dim scon1 As String

sCon = "select * from Cost where 学号='" & Trim(txtnumber1.Text) & "' and 学年='" & Trim(cobyear.Text) & "'"
Set adoRS = adoCon.Execute(sCon)
If adoRS.EOF Then
MsgBox Trim(txtnumber1.Text) & "在" & Trim(cobyear.Text) & "年度的交费资料不存在!", vbOKOnly + vbExclamation, "系统提示"
   cobyear.SetFocus
   Exit Sub
Else
 txtmust.Text = Trim(adoRS("应交费"))
 txtat.Text = Trim(adoRS("实交"))
 txtqian.Text = Trim(adoRS("欠费"))
 txtmust.Enabled = True
 txtat.Enabled = True
 txtqian.Enabled = True
 End If
End Sub

Private Sub Command1_Click()
Dim sCon As String
Dim scon1 As String

If Option1.Value = True Then
sCon = "select * from Cost where 学号='" & Trim(List1.Text) & "'"
End If

If Option2.Value = True Then
sCon = "select * from Cost where 姓名='" & Trim(List1.Text) & "'"
End If
If Option1.Value = False And Option2.Value = False Then
MsgBox "请选择查询方式!", vbOKOnly + vbExclamation, "系统提示"
Exit Sub
End If

Set adoRS = adoCon.Execute(sCon)
If adoRS.EOF Then
MsgBox Trim(List1.Text) & "的学生的交费资料不存在!", vbOKOnly + vbExclamation, "系统提示"
   cobclass.SetFocus
   Exit Sub
Else
 txtnumber1.Text = Trim(adoRS("学号"))
   txtname1.Text = Trim(adoRS("姓名"))
sp = Trim(adoRS("专业"))
class = Trim(adoRS("班别"))
End If
End Sub

Private Sub Command2_Click()
sql = "select * from Cost  where 学号='" & Trim(txtnumber.Text) & "'"
Set adoRS = adoCon.Execute(sql)
If adoRS.EOF Then
MsgBox Trim(txtnumber.Text) & "的学生交费资料不存在!", vbOKOnly + vbExclamation, "系统提示"
   cobclass.SetFocus
   Exit Sub
Else
 txtnumber1.Text = adoRS("学号")
 txtname1.Text = adoRS("姓名")
'sp = adoRS("Speciality")
'class = adoRS("Class")

End If
End Sub

Private Sub Command3_Click()
'学年
If cobyear.Text = "" Then
   MsgBox "学年不能为空!", vbOKOnly + vbExclamation, "系统提示"
cobyear.SetFocus
Exit Sub
End If
'学号
If txtnumber1.Text = "" Then
   MsgBox "学号不能为空!", vbOKOnly + vbExclamation, "系统提示"
txtnumber1.SetFocus
Exit Sub
End If
'姓名
If txtname1.Text = "" Then
   MsgBox "姓名不能为空!", vbOKOnly + vbExclamation, "系统提示"
txtname1.SetFocus
Exit Sub
End If
'应交费
If txtmust.Text = "" Then
   MsgBox "应交费不能为空!", vbOKOnly + vbExclamation, "系统提示"
txtmust.SetFocus
Exit Sub
End If
'实际交费
If txtat.Text = "" Then
   MsgBox "实际交费不能为空!", vbOKOnly + vbExclamation, "系统提示"
txtat.SetFocus
Exit Sub
End If
'欠费
If txtqian.Text = "" Then
   MsgBox "欠费不能为空!", vbOKOnly + vbExclamation, "系统提示"
txtqian.SetFocus
Exit Sub
End If



Dim sql As String
If MsgBox("确定要修改吗?", vbYesNo + vbQuestion, "系统提示") = vbNo Then
Exit Sub
End If


sql = ""
sql = "update Cost set 应交费='" & Trim(txtmust.Text) & "',"
sql = sql & "实交='" & txtat.Text & "',"
sql = sql & "欠费='" & txtqian.Text & "',"
sql = sql & "学号='" & Trim(txtnumber1.Text) & "',"
sql = sql & "姓名='" & txtname1.Text & "',"
sql = sql & "学年='" & cobyear.Text & "'"
sql = sql & " Where 学号='" & Trim(txtnumber1.Text) & "' and 学年='" & Trim(cobyear.Text) & "'"

adoCon.Execute (sql)
MsgBox "修改成功!", vbOKOnly + vbInformation, "成功提示"
txtnumber1.Text = ""
txtname1.Text = ""
txtmust.Text = ""
txtat.Text = ""
txtqian.Text = ""
txtnumber.Text = ""
txtmust.Enabled = False
txtat.Enabled = False
txtqian.Enabled = False
End Sub

Private Sub Command4_Click()
Unload Me
End Sub

Private Sub Form_Load()
Me.Height = 10245
Me.Width = 6945
ShockwaveFlash1.Movie = App.Path & "\flash\top.swf"

Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2 - 200
'学院
Set adoRS = adoCon.Execute("Select Name From College Order By Name")
cobcollege.Clear
Do While Not adoRS.EOF
  cobcollege.AddItem Trim(adoRS("Name"))
  adoRS.MoveNext
Loop
cobcollege.ListIndex = 0
txtname1.Text = ""
txtnumber.Text = ""
txtnumber1.Text = ""
cobyear.Clear
For i = 1990 To 2050
With cobyear
.AddItem i
End With
Next i
txtmust.Text = ""
txtat.Text = ""
txtqian.Text = ""

End Sub

Private Sub Option1_Click()
'学号
sql = "select * from Student  where Class='" & Trim(cobclass.Text) & "' order by ID "
Set adoRS = adoCon.Execute(sql)
List1.Clear
Do While adoRS.EOF
MsgBox "无资料!", vbOKOnly + vbExclamation, "系统提示"
Exit Sub
Loop
If cobclass.Text = "" Then
MsgBox "请选择班级!", vbOKOnly + vbExclamation, "系统提示"
End If
Do While Not adoRS.EOF
  List1.AddItem adoRS("ID")
  adoRS.MoveNext
Loop

End Sub

Private Sub Option2_Click()
'姓名
sql = "select * from Student  where Class='" & Trim(cobclass.Text) & "' order by ID "
Set adoRS = adoCon.Execute(sql)
List1.Clear
Do While adoRS.EOF
MsgBox "无资料!", vbOKOnly + vbExclamation, "系统提示"
Exit Sub
Loop
If cobclass.Text = "" Then
MsgBox "请选择班级!", vbOKOnly + vbExclamation, "系统提示"
End If
Do While Not adoRS.EOF
  List1.AddItem adoRS("Name")
  adoRS.MoveNext
Loop

End Sub

Private Sub txtat_Change()
Label11.Visible = True
Label11.Caption = "输入后请按回车"

End Sub

Private Sub txtat_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
txtqian.Text = Val(Trim(txtmust.Text)) - Val(Trim(txtat.Text))
End If

End Sub

⌨️ 快捷键说明

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