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

📄 光盘详细信息.frm

📁 一个以SQL Server 2000为数据库
💻 FRM
字号:
VERSION 5.00
Begin VB.Form 光盘详细信息 
   Caption         =   "光盘详细信息"
   ClientHeight    =   6840
   ClientLeft      =   2115
   ClientTop       =   2175
   ClientWidth     =   9015
   LinkTopic       =   "Form3"
   ScaleHeight     =   6840
   ScaleWidth      =   9015
   Begin VB.CommandButton Comman_close 
      Caption         =   "关闭"
      Height          =   495
      Left            =   6240
      TabIndex        =   20
      Top             =   6120
      Width           =   1575
   End
   Begin VB.CommandButton Command_borrow 
      Caption         =   "租借该盘"
      Height          =   495
      Left            =   600
      TabIndex        =   19
      Top             =   6120
      Width           =   1455
   End
   Begin VB.Frame Frame1 
      Caption         =   "光盘详细信息"
      Height          =   5415
      Left            =   240
      TabIndex        =   0
      Top             =   360
      Width           =   8175
      Begin VB.TextBox Text_num 
         Height          =   495
         Left            =   5160
         TabIndex        =   22
         Top             =   480
         Width           =   1935
      End
      Begin VB.TextBox Text_intor 
         Alignment       =   2  'Center
         Height          =   1575
         Left            =   4080
         TabIndex        =   18
         Top             =   3360
         Width           =   3975
      End
      Begin VB.TextBox Text_return_date 
         Height          =   495
         Left            =   5160
         TabIndex        =   17
         Top             =   2160
         Width           =   1935
      End
      Begin VB.TextBox Text_state 
         Height          =   495
         Left            =   5160
         TabIndex        =   16
         Top             =   1320
         Width           =   1935
      End
      Begin VB.TextBox Text_make_date 
         Height          =   495
         Left            =   1320
         TabIndex        =   15
         Top             =   4560
         Width           =   1935
      End
      Begin VB.TextBox Text_address 
         Height          =   495
         Left            =   1320
         TabIndex        =   10
         Top             =   3840
         Width           =   1935
      End
      Begin VB.TextBox Text_type 
         Height          =   495
         Left            =   1320
         TabIndex        =   9
         Top             =   3000
         Width           =   1935
      End
      Begin VB.TextBox Text_director 
         Height          =   495
         Left            =   1320
         TabIndex        =   8
         Top             =   2160
         Width           =   1935
      End
      Begin VB.TextBox Text_lead 
         Height          =   495
         Left            =   1320
         TabIndex        =   7
         Top             =   1320
         Width           =   1935
      End
      Begin VB.TextBox Text_name 
         Height          =   495
         Left            =   1320
         TabIndex        =   6
         Top             =   480
         Width           =   1935
      End
      Begin VB.Label Labe_CD_num 
         Caption         =   "编号"
         Height          =   495
         Left            =   3840
         TabIndex        =   21
         Top             =   600
         Width           =   1335
      End
      Begin VB.Label Label_CD_intor 
         Caption         =   "简介"
         Height          =   375
         Left            =   3600
         TabIndex        =   14
         Top             =   3120
         Width           =   855
      End
      Begin VB.Label Label_return_date 
         Caption         =   "归还日期"
         Height          =   495
         Left            =   3840
         TabIndex        =   13
         Top             =   2160
         Width           =   1335
      End
      Begin VB.Label Label_CD_date 
         Caption         =   "出品日期"
         Height          =   495
         Left            =   360
         TabIndex        =   12
         Top             =   4560
         Width           =   1335
      End
      Begin VB.Label Label_CD_state 
         Caption         =   "状态"
         Height          =   495
         Left            =   3840
         TabIndex        =   11
         Top             =   1320
         Width           =   1335
      End
      Begin VB.Label Label_CD_area 
         Caption         =   "产地"
         Height          =   495
         Left            =   480
         TabIndex        =   5
         Top             =   3840
         Width           =   1335
      End
      Begin VB.Label Label_CD_type 
         Caption         =   "类型"
         Height          =   495
         Left            =   480
         TabIndex        =   4
         Top             =   3000
         Width           =   1335
      End
      Begin VB.Label Label_director 
         Caption         =   "导演"
         Height          =   495
         Left            =   480
         TabIndex        =   3
         Top             =   2160
         Width           =   1335
      End
      Begin VB.Label Label_lead_role 
         Caption         =   "主演"
         Height          =   495
         Left            =   480
         TabIndex        =   2
         Top             =   1320
         Width           =   1335
      End
      Begin VB.Label Label_CD_name 
         Caption         =   "片名"
         Height          =   495
         Left            =   480
         TabIndex        =   1
         Top             =   480
         Width           =   1335
      End
   End
End
Attribute VB_Name = "光盘详细信息"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public rs As ADODB.Recordset
Public bar_code As String


Private Sub Comman_close_Click()
On Error GoTo quit

rs.Close
Set rs = Nothing

quit:
Unload 光盘详细信息
End Sub

Private Sub Command_borrow_Click()
If Text_state.Text = "被借      " Then
    MsgBox "光盘被借", 0 + vbInformation, "sorry"
    Exit Sub
End If

If Text_state.Text = "损坏或丢失" Then
    MsgBox "对不起,光盘已损坏或丢失", 0 + vbInformation, "sorry"
    Exit Sub
End If


bar_code = "" & rs!cd_b_num
光盘租借.Borrow_Bar_code.Text = "" & rs!bar_code
On Error GoTo quit

rs.Close
Set rs = Nothing

quit:
Unload 光盘详细信息
End Sub

Private Sub Form_Load()
Text_name.Text = ""

Call get_Publishers
End Sub

Private Sub get_Publishers()

Dim sql As String

'sql = " select * from CD_Info where Bar_code = '" + 光盘租借.bar_code + "'"
sql = "exec select_cd_info2 '" + 光盘租借.bar_code + "'"

'Set rs = New ADODB.Recordset

    'rs.Open sql, Form2, adOpenKeyset, adLockBatchOptimistic
    'rs.Open sql, Form1.cnCon, adOpenDynamic, adLockBatchOptimistic
Set rs = Form1.cnTest.Execute(sql)
    
Text_name.Text = rs.Fields.item(2).Value
Text_lead.Text = rs.Fields.item(3).Value
Text_director.Text = rs.Fields.item(5).Value
Text_type.Text = rs.Fields.item(4).Value
Text_address.Text = rs.Fields.item(8).Value
Text_num.Text = rs.Fields.item(1).Value
Text_state.Text = rs.Fields.item(7).Value
Text_intor.Text = rs.Fields.item(6).Value


    
If Text_state.Text = "被借      " Then
    sql = "select * from Borrow_Info where CD_b_num = '" + Text_num.Text + "'"
    Set rs = Form1.cnTest.Execute(sql)
    Text_return_date.Text = rs.Fields.item(4).Value
Else
    Text_return_date.Text = ""



End If





End Sub


















⌨️ 快捷键说明

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