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

📄 form10.frm

📁 我的毕业设计课题为“光盘管理系统”
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form Form10 
   Caption         =   "Form10"
   ClientHeight    =   5625
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   10575
   LinkTopic       =   "Form10"
   ScaleHeight     =   5625
   ScaleWidth      =   10575
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command3 
      Caption         =   "返回"
      Height          =   495
      Left            =   8880
      TabIndex        =   6
      Top             =   5040
      Width           =   1455
   End
   Begin VB.TextBox Text3 
      BackColor       =   &H00FFC0FF&
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   615
      Left            =   2400
      TabIndex        =   5
      Top             =   360
      Width           =   6255
   End
   Begin VB.Timer Timer2 
      Interval        =   600
      Left            =   1200
      Top             =   840
   End
   Begin VB.Timer Timer1 
      Interval        =   600
      Left            =   480
      Top             =   840
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   3360
      TabIndex        =   4
      Text            =   "Text2"
      Top             =   5040
      Visible         =   0   'False
      Width           =   975
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "Form10.frx":0000
      Height          =   1815
      Left            =   3360
      TabIndex        =   3
      Top             =   2160
      Width           =   6015
      _ExtentX        =   10610
      _ExtentY        =   3201
      _Version        =   393216
      BackColor       =   16777152
      HeadLines       =   1
      RowHeight       =   16
      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            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Caption         =   "光盘信息表GP2"
      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
   Begin MSAdodcLib.Adodc Adodc2 
      Height          =   375
      Left            =   5880
      Top             =   5040
      Visible         =   0   'False
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   3
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "DSN=disk"
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   "disk"
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 借还表"
      Caption         =   "Adodc2"
      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 MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   4440
      Top             =   5040
      Visible         =   0   'False
      Width           =   1215
      _ExtentX        =   2143
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   3
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "DSN=disk"
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   "disk"
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 光盘信息表GP2"
      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.CommandButton Command1 
      Caption         =   "确定"
      Height          =   495
      Left            =   1200
      TabIndex        =   2
      Top             =   3840
      Width           =   1455
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   1080
      TabIndex        =   1
      Top             =   2640
      Width           =   1695
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "请输入还回光盘盘号"
      BeginProperty Font 
         Name            =   "新宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   615
      Left            =   720
      TabIndex        =   0
      Top             =   1680
      Width           =   2295
   End
End
Attribute VB_Name = "Form10"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Conn As ADODB.Connection
Private RS As ADODB.Recordset

Private Sub Command1_Click()
Dim str As String
Dim st As String
Set RS.ActiveConnection = Conn
RS.LockType = adLockOptimistic
RS.CursorType = adOpenKeyset
If Text1.Text = "" Then
MsgBox "请输入光盘编号!"
Adodc1.RecordSource = "select * from 光盘信息表GP2"
Adodc2.RecordSource = "select * from 借还表 "
Adodc1.Refresh
Adodc2.Refresh
Else
Adodc1.RecordSource = "select * from 光盘信息表GP2 where  盘号 =" & Text1.Text
Adodc2.RecordSource = "select * from 借还表 where  还回标记='借出' and 盘号 =" & Text1.Text
Adodc1.Refresh
Adodc2.Refresh
If Adodc2.Recordset.RecordCount = 0 Then
MsgBox "不存在这张光盘!"
Adodc1.RecordSource = "select * from 光盘信息表GP2"
Adodc2.RecordSource = "select * from 借还表 "
Adodc1.Refresh
Adodc2.Refresh
Else

str = "select * from 借还表 where 还回标记= '借出'and 盘号=" & Text1.Text
st = "select * from 光盘信息表GP2 where 出借标记= '是'and 盘号=" & Text1.Text
RS.Open str
RS.Fields("还回时间") = Text2.Text
RS.Fields("还回标记") = "还回"
RS.Update
RS.Close
RS.Open st
RS.Fields("出借标记") = "否"

RS.Update
RS.Close
Adodc1.Recordset.Update
Adodc1.Refresh
Adodc2.Refresh
End If
End If
End Sub

Private Sub Command2_Click()
Dim str As String
Set RS.ActiveConnection = Conn
RS.LockType = adLockOptimistic
RS.CursorType = adOpenKeyset
str = "select * from 借还表 where 还回标记= '借出'and 盘号=" & Text1.Text
RS.Open str
RS.Fields("还回时间") = Text2.Text
RS.Fields("还回标记") = "还回"
RS.Update
RS.Close
Adodc1.Recordset.Update
Adodc1.Refresh
Adodc2.Refresh
End Sub

Private Sub Command3_Click()
Form1.Show
Unload Me
End Sub

Private Sub Form_Load()
Set Conn = New ADODB.Connection
Set RS = New Recordset
Set comm = New ADODB.Command
Conn.CursorLocation = adUseClient
Conn.Open "dsn=disk", "", ""
Text2.Text = str(Date)

End Sub

Private Sub Timer1_Timer()
Text3.Text = "  还回光盘"
End Sub

Private Sub Timer2_Timer()
Text3.Text = "                       还回光盘  "
End Sub

⌨️ 快捷键说明

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