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

📄 formother.frm

📁 学生信息管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFlxGrd.Ocx"
Begin VB.Form FormOther 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "其它管理"
   ClientHeight    =   4440
   ClientLeft      =   4575
   ClientTop       =   1995
   ClientWidth     =   6255
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   14.25
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "FormOther.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   4440
   ScaleWidth      =   6255
   Begin VB.Frame Frame4 
      Caption         =   "添加信息"
      Height          =   4335
      Left            =   120
      TabIndex        =   14
      Top             =   0
      Visible         =   0   'False
      Width           =   6015
      Begin VB.TextBox Text2 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   2520
         TabIndex        =   23
         Top             =   600
         Width           =   1935
      End
      Begin VB.CommandButton Command8 
         Caption         =   "取消"
         Height          =   495
         Left            =   4200
         TabIndex        =   12
         Top             =   3600
         Width           =   1335
      End
      Begin VB.CommandButton Command7 
         Caption         =   "确定"
         Height          =   495
         Left            =   600
         TabIndex        =   11
         Top             =   3600
         Width           =   1335
      End
      Begin VB.OptionButton Option1 
         Caption         =   "否"
         Height          =   375
         Left            =   2520
         TabIndex        =   8
         Top             =   1800
         Value           =   -1  'True
         Width           =   615
      End
      Begin VB.OptionButton Option2 
         Caption         =   "是"
         Height          =   375
         Left            =   4560
         TabIndex        =   9
         Top             =   1800
         Width           =   615
      End
      Begin VB.Frame Frame6 
         BorderStyle     =   0  'None
         Height          =   495
         Left            =   2280
         TabIndex        =   16
         Top             =   960
         Width           =   2895
         Begin VB.OptionButton Option3 
            Caption         =   "是"
            Height          =   495
            Left            =   2280
            TabIndex        =   5
            Top             =   0
            Width           =   615
         End
         Begin VB.OptionButton Option4 
            Caption         =   "否"
            Height          =   495
            Left            =   240
            TabIndex        =   4
            Top             =   0
            Value           =   -1  'True
            Width           =   855
         End
      End
      Begin VB.Frame Frame5 
         BorderStyle     =   0  'None
         Height          =   495
         Left            =   2280
         TabIndex        =   15
         Top             =   1320
         Width           =   2895
         Begin VB.OptionButton Option5 
            Caption         =   "否"
            Height          =   375
            Left            =   240
            TabIndex        =   6
            Top             =   120
            Value           =   -1  'True
            Width           =   735
         End
         Begin VB.OptionButton Option6 
            Caption         =   "是"
            Height          =   375
            Left            =   2280
            TabIndex        =   7
            Top             =   120
            Width           =   615
         End
      End
      Begin VB.TextBox Text3 
         Enabled         =   0   'False
         Height          =   855
         Left            =   360
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   10
         Top             =   2520
         Visible         =   0   'False
         Width           =   5295
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "学号:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1680
         TabIndex        =   22
         Top             =   600
         Width           =   735
      End
      Begin VB.Label Label26 
         BackStyle       =   0  'Transparent
         Caption         =   "是否获得奖学金:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   480
         TabIndex        =   20
         Top             =   1800
         Width           =   1935
      End
      Begin VB.Label Label25 
         BackStyle       =   0  'Transparent
         Caption         =   "是否申请助学贷款:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   240
         TabIndex        =   19
         Top             =   1440
         Width           =   2175
      End
      Begin VB.Label Label24 
         BackStyle       =   0  'Transparent
         Caption         =   "是否参加勤工俭学:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   240
         TabIndex        =   18
         Top             =   1080
         Width           =   2175
      End
      Begin VB.Label Label29 
         Caption         =   "请输入获奖年份和等级 例:2005年校级一等"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   255
         Left            =   360
         TabIndex        =   17
         Top             =   2280
         Visible         =   0   'False
         Width           =   4095
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "其它信息查询"
      Height          =   4335
      Left            =   120
      TabIndex        =   0
      Top             =   0
      Visible         =   0   'False
      Width           =   6015
      Begin VB.CommandButton Command3 
         Caption         =   "打印"
         Enabled         =   0   'False
         Height          =   495
         Left            =   3960
         TabIndex        =   21
         Top             =   3480
         Width           =   1215
      End
      Begin VB.CommandButton Command2 
         Caption         =   "取消"
         Height          =   495
         Left            =   2160
         TabIndex        =   3
         Top             =   3480
         Width           =   1215
      End
      Begin VB.CommandButton Command1 
         Caption         =   "查询"
         Height          =   495
         Left            =   360
         TabIndex        =   2
         Top             =   3480
         Width           =   1215
      End
      Begin VB.TextBox Text1 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1320
         TabIndex        =   1
         Top             =   600
         Width           =   1935
      End
      Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
         Height          =   1575
         Left            =   0
         TabIndex        =   24
         Top             =   1680
         Visible         =   0   'False
         Width           =   5895
         _ExtentX        =   10398
         _ExtentY        =   2778
         _Version        =   393216
         Cols            =   4
         BackColor       =   16777215
         BackColorBkg    =   16777215
         Appearance      =   0
      End
      Begin VB.Label Label1 
         Caption         =   "学号:"
         Height          =   495
         Left            =   240
         TabIndex        =   13
         Top             =   600
         Width           =   855
      End
   End
End
Attribute VB_Name = "FormOther"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Mrc As ADODB.Recordset
Dim Msgtext As String
Dim txtSQL As String
Private Sub Command1_Click()
    If Not IsNumeric(Text1) Then
      MsgBox "学号输入有误!", vbOKOnly + vbExclamation, "提示"
      Text1.SetFocus
      Exit Sub
    End If
    txtSQL = "select * from 杂项 where 学号='" & Trim(Text1) & "'"
    Set Mrc = ExecuteSQL(txtSQL, Msgtext)
    If Mrc.EOF = True Then
        MsgBox "无此学生记录!", vbOKOnly + vbExclamation, "提示"
        Text1.SetFocus
        Exit Sub
    End If
    MSFlexGrid1.ColWidth(0) = 2000
    MSFlexGrid1.ColWidth(1) = 1200
    MSFlexGrid1.ColWidth(2) = 1200
    MSFlexGrid1.ColWidth(3) = 2000
    MSFlexGrid1.TextMatrix(0, 0) = "学号"
    MSFlexGrid1.TextMatrix(0, 1) = "勤工俭学"
    MSFlexGrid1.TextMatrix(0, 2) = "助学贷款"
    MSFlexGrid1.TextMatrix(0, 3) = "奖学金信息"
    MSFlexGrid1.Rows = 1
        Do While Not Mrc.EOF
            MSFlexGrid1.Rows = MSFlexGrid1.Rows + 1
            For i = 0 To Mrc.Fields.Count - 1
                MSFlexGrid1.TextMatrix(MSFlexGrid1.Rows - 1, i) = Mrc.Fields(i) & ""
            Next i
            Mrc.MoveNext
        Loop
    Mrc.Close
End Sub

Private Sub Command2_Click()
        Text1.Text = ""
End Sub


Private Sub Command7_Click()
    Dim op1 As Boolean
    Dim op2 As Boolean
    Dim op3 As Boolean
    If Option1.Value = True Then
        op1 = False
    Else
        op1 = True
    End If
    If Option5.Value = True Then
        op2 = False
    Else
        op2 = True
    End If
    If Option4.Value = True Then
        op3 = False
    Else
        op3 = True
    End If
    If Not IsNumeric(Text2.Text) Then
      MsgBox "学号输入有误!", vbOKOnly + vbExclamation, "提示"
      Text2.SetFocus
      Exit Sub
    End If
    txtSQL = "select * from 基本信息 where 学号='" & Trim(Text2.Text) & "'"
    Set Mrc = ExecuteSQL(txtSQL, Msgtext)
    If Mrc.EOF = True Then
        MsgBox "无此学号!", vbOKOnly + vbExclamation, "提示"
        Text2.SetFocus
        Exit Sub
    End If
    Mrc.Close
    txtSQL = "delete from 杂项 where 学号='" & Trim(Text2.Text) & "'"
    Set Mrc = ExecuteSQL(txtSQL, Msgtext)
    txtSQL = "select * from 杂项"
    Set Mrc = ExecuteSQL(txtSQL, Msgtext)
    Mrc.AddNew
    Mrc.Fields(0) = Trim(Text2)
    If op3 Then
        Mrc.Fields(1) = "是"
    Else
        Mrc.Fields(1) = "否"
    End If
    If op2 Then
        Mrc.Fields(2) = "是"
    Else
        Mrc.Fields(2) = "否"
    End If
    If op1 Then
        Mrc.Fields(3) = Trim(Text3.Text)
    Else
        Mrc.Fields(3) = ""
    End If
    Mrc.Update
    Mrc.Close
    MsgBox "添加成功!", vbOKOnly, "提示"
    Option1.Value = True
    Option4.Value = True
    Option5.Value = True
    Text3.Visible = False

End Sub




Private Sub Form_Load()
    Dim txSQL As String
    Dim Mrcc As ADODB.Recordset
    txSQL = "select * from 杂项"
    Set Mrcc = ExecuteSQL(txSQL, Msgtext)
    MSFlexGrid1.ColWidth(0) = 2000
    MSFlexGrid1.ColWidth(1) = 1200
    MSFlexGrid1.ColWidth(2) = 1200
    MSFlexGrid1.ColWidth(3) = 2000
    MSFlexGrid1.TextMatrix(0, 0) = "学号"
    MSFlexGrid1.TextMatrix(0, 1) = "勤工俭学"
    MSFlexGrid1.TextMatrix(0, 2) = "助学贷款"
    MSFlexGrid1.TextMatrix(0, 3) = "奖学金信息"
    MSFlexGrid1.Rows = 1
        Do While Not Mrcc.EOF
           MSFlexGrid1.Rows = MSFlexGrid1.Rows + 1
            For i = 0 To Mrcc.Fields.Count - 1
                MSFlexGrid1.TextMatrix(MSFlexGrid1.Rows - 1, i) = Mrcc.Fields(i) & ""
            Next i
            Mrcc.MoveNext
        Loop
    
    Mrcc.Close
End Sub


Private Sub Option1_GotFocus()
    If Option1.Visible = True Then
        Text3.Visible = False
        Text3.Enabled = False
        Label29.Visible = False
    End If
End Sub

Private Sub Option2_GotFocus()
    If Option2.Visible = True Then
        Text3.Visible = True
        Text3.Enabled = True
        Label29.Visible = True
    End If
End Sub

⌨️ 快捷键说明

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