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

📄 student.frm

📁 图书管理系统+论文 界面美观 适合学生课题设计之用
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Width           =   2175
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   11160
      Top             =   5880
      Width           =   1680
      _ExtentX        =   2963
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=图书馆管理系统.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=图书馆管理系统.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "读者信息"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Frame Frame1 
      Caption         =   "学生信息"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   3615
      Left            =   360
      TabIndex        =   0
      Top             =   120
      Width           =   12495
      Begin MSDataGridLib.DataGrid DataGrid1 
         Bindings        =   "student.frx":0000
         Height          =   2775
         Left            =   480
         TabIndex        =   21
         Top             =   360
         Width           =   11655
         _ExtentX        =   20558
         _ExtentY        =   4895
         _Version        =   393216
         AllowUpdate     =   0   'False
         HeadLines       =   1
         RowHeight       =   15
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
   End
   Begin VB.Label Label7 
      Caption         =   "搜索条件"
      Height          =   255
      Left            =   9120
      TabIndex        =   2
      Top             =   4320
      Width           =   1095
   End
   Begin VB.Line Line2 
      X1              =   9120
      X2              =   12960
      Y1              =   4080
      Y2              =   4080
   End
   Begin VB.Label Label6 
      Caption         =   "学生信息搜索"
      BeginProperty Font 
         Name            =   "幼圆"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   9480
      TabIndex        =   1
      Top             =   3840
      Width           =   1815
   End
End
Attribute VB_Name = "student"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub Command1_Click()
If Text1.Text <> "" And Text3.Text <> "" Then
  Adodc1.Recordset.Filter = "学号='" & Text2.Text & "'"
  If Adodc1.Recordset.EOF = True Then
    Adodc1.Recordset.AddNew
     Adodc1.Recordset.Fields("学号") = Text1.Text
      Adodc1.Recordset.Fields("姓名") = Text2.Text
    Adodc1.Recordset.Fields("借阅证号") = Text3.Text
    Adodc1.Recordset.Fields("班级") = Text4.Text
     Adodc1.Recordset.Fields("系别") = Combo1.Text
     Adodc1.Recordset.Update
  Else
    MsgBox "该学生已存在,不允许添加!"
   End If
Else
  MsgBox "学号(借阅证号)不能为空!"
  End If

  Adodc1.Recordset.Filter = ""
Set DataGrid1.DataSource = Adodc1.Recordset
End Sub

Private Sub Command2_Click()
If Adodc1.Recordset.EOF = False Then
    Adodc1.Recordset.Fields("姓名") = Text2.Text
    Adodc1.Recordset.Fields("借阅证号") = Text3.Text
    Adodc1.Recordset.Fields("班级") = Text4.Text
    Adodc1.Recordset.Fields("系别") = Combo1.Text
    Adodc1.Recordset.Update
    MsgBox "学生信息修改成功"
    Else
    MsgBox "请选择学生信息"
End If
End Sub

Private Sub command3_Click()
If Adodc1.Recordset.EOF = False Then
    Adodc2.Recordset.Find "学号='" & Text1.Text & "'"
  If Adodc2.Recordset.EOF = False Then
     Adodc1.Recordset.Delete
     Adodc1.Recordset.MoveNext
     Else
     MsgBox "该生仍有借阅书籍!不能删除!"
     End If
End If
End Sub

Private Sub Command4_Click()
Adodc1.Recordset.Filter = ""
Adodc1.Refresh

End Sub

Private Sub Command5_Click()
Adodc1.Recordset.Filter = ""
 Set DataGrid1.DataSource = Adodc1.Recordset
Dim sou As String
sou = Combo2.Text & "='" & Text5.Text & "'"

Adodc1.Recordset.Filter = sou
If Adodc1.Recordset.EOF = False Then
   Set DataGrid1.DataSource = Adodc1.Recordset
   Else
   MsgBox "没有您要找的信息"
   End If
End Sub

Private Sub Command6_Click()
Text5.Text = ""
End Sub

Private Sub Command7_Click()
Adodc1.Recordset.Filter = ""
Set DataGrid1.DataSource = Adodc1.Recordset
End Sub



Private Sub DataGrid1_SelChange(Cancel As Integer)
If Adodc1.Recordset.EOF = False Then
Text1.Text = Adodc1.Recordset.Fields("学号")
Text2.Text = Adodc1.Recordset.Fields("姓名")
Text3.Text = Adodc1.Recordset.Fields("借阅证号")
Text4.Text = Adodc1.Recordset.Fields("班级")
Combo1.Text = Adodc1.Recordset.Fields("系别")
 End If
End Sub

Private Sub Form_Load()
Text1.Enabled = False
Combo1.AddItem "计算机系"
Combo1.AddItem "外语系"
Combo1.AddItem "数艺系"
Combo1.AddItem "经管系"
Combo1.AddItem "通信系"
Combo2.AddItem "学号"
Combo2.AddItem "借阅证号"
Combo2.AddItem "姓名"

Combo2.AddItem "系别"
Combo2.AddItem "班级"
Adodc1.Refresh
Adodc2.Refresh

End Sub

⌨️ 快捷键说明

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