📄 tixesch.frm
字号:
Caption = "出租时间"
Height = 375
Left = 6550
TabIndex = 16
Top = 2950
Width = 1095
End
Begin VB.Label Label1
Caption = "内容简介:"
Height = 375
Left = 3480
TabIndex = 14
Top = 5520
Width = 1575
End
Begin VB.Label Label2
Caption = "查找输入"
Height = 375
Left = 720
TabIndex = 9
Top = 5160
Width = 1335
End
End
Attribute VB_Name = "rentsch"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim sql As String
Dim i As Integer
Private Sub Check1_Click()
If Check1.Value Then
Adodc2.Recordset("出租时间") = DTPicker1.Value
Adodc2.Recordset("出租标志") = True
Adodc2.Recordset.Update
Else
Adodc2.Recordset("出租时间") = Null
Adodc2.Recordset("出租标志") = False
Adodc2.Recordset.Update
End If
Adodc1.Refresh
End Sub
Private Sub Check1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "出租选择"
End Sub
Private Sub Combo1_Click()
If Option1(2) Then
If Trim(Combo1.Text) <> "" Then
sql = "select 盘号,电影名,主演,类型,语种,出租时间,出租标志,内容 from 出租管理 where 类型='" & Combo1.Text & "'"
Adodc1.RecordSource = sql
End If
Adodc1.Refresh
'-----------------------------------------------------------------------
combo3.clear
If Adodc1.Recordset.RecordCount <> 0 Then
Adodc1.Recordset.MoveFirst
While Not Adodc1.Recordset.EOF
For i = 0 To Adodc1.Recordset.RecordCount - 1
combo3.AddItem Adodc1.Recordset("盘号")
Adodc1.Recordset.MoveNext
Next
Wend
Adodc1.Recordset.MoveFirst
End If
End If
End Sub
Private Sub Combo2_Click()
If Option1(3) Then
If Trim(Combo2.Text) <> "" Then
sql = "select 盘号,电影名,主演,类型,语种,出租时间,出租标志,内容 from 出租管理 where 语种 ='" & Combo2.Text & "'"
Adodc1.RecordSource = sql
End If
Adodc1.Refresh
DataGrid2.Refresh
'---------------------------------------------------------------------------------------------------
combo3.clear
If Adodc1.Recordset.RecordCount <> 0 Then
Adodc1.Recordset.MoveFirst
While Not Adodc1.Recordset.EOF
For i = 0 To Adodc1.Recordset.RecordCount - 1
combo3.AddItem Adodc1.Recordset("盘号")
Adodc1.Recordset.MoveNext
Next
Wend
Adodc1.Recordset.MoveFirst
End If
End If
End Sub
Private Sub combo3_Click()
Adodc2.Recordset.MoveFirst
For i = 0 To Adodc2.Recordset.RecordCount - 1
Adodc2.Recordset.Find "盘号='" & combo3.Text & "'"
Next
End Sub
Private Sub combo3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Adodc2.Recordset.MoveFirst
For i = 0 To Adodc2.Recordset.RecordCount - 1
Adodc2.Recordset.Find "盘号='" & combo3.Text & "'"
Next
End If
End Sub
Private Sub Command1_Click()
Dim i As Integer
Adodc1.CommandType = adCmdText
'按电影名查寻**************************************************************
If Option1(0) Then
If Trim(Text1.Text) <> "" Then
sql = "select 盘号,电影名,主演,类型,语种,出租时间,出租标志,内容 from 出租管理 where 电影名 ='" & Text1.Text & "'"
Adodc1.RecordSource = sql
End If
Adodc1.Refresh
DataGrid2.Refresh
End If
'按主演查寻***************************************************************
If Option1(1) Then
If Trim(Text1.Text) <> "" Then
sql = "select 盘号,电影名,主演,类型,语种,出租时间,出租标志,内容 from 出租管理 where 主演 ='" & Text1.Text & "'"
Adodc1.RecordSource = sql
End If
Adodc1.Refresh
DataGrid2.Refresh
End If
'按类型查寻***************************************************************
If Option1(2) Then
If Trim(Combo1.Text) <> "" Then
sql = "select 盘号,电影名,主演,类型,语种,出租时间,出租标志,内容 from 出租管理 where 类型 ='" & Combo1.Text & "'"
Adodc1.RecordSource = sql
End If
Adodc1.Refresh
DataGrid2.Refresh
End If
'按语种查寻***************************************************************
If Option1(3) Then
If Trim(Combo2.Text) <> "" Then
sql = "select 盘号,电影名,主演,类型,语种,出租时间,出租标志,内容 from 出租管理 where 语种 ='" & Combo1.Text & "'"
Adodc1.RecordSource = sql
End If
Adodc1.Refresh
DataGrid1.Refresh
End If
'按产地查寻***************************************************************
If Option1(4) Then
If Trim(Text1.Text) <> "" Then
sql = "select 盘号,电影名,主演,类型,语种,出租时间,出租标志,内容 from 出租管理 where 产地 ='" & Text1.Text & "'"
Adodc1.RecordSource = sql
End If
Adodc1.Refresh
DataGrid2.Refresh
End If
'-----------------------------------------------------------------------------
combo3.clear
If Adodc1.Recordset.RecordCount <> 0 Then
Adodc1.Recordset.MoveFirst
While Not Adodc1.Recordset.EOF
For i = 0 To Adodc1.Recordset.RecordCount - 1
combo3.AddItem Adodc1.Recordset("盘号")
Adodc1.Recordset.MoveNext
Next
Wend
Adodc1.Recordset.MoveFirst
End If
End Sub
Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "查找"
End Sub
Private Sub DataGrid1_GotFocus()
Text4.Visible = True
Text2.Visible = False
End Sub
Private Sub DataGrid1_LostFocus()
Text4.Visible = False
Text2.Visible = True
End Sub
Private Sub DataGrid1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "影碟出租库存数据"
End Sub
Private Sub DataGrid2_DblClick()
combo3.Text = ""
If Adodc1.Recordset.RecordCount <> 0 Then
combo3.Text = Adodc1.Recordset("盘号")
If Adodc2.Recordset.RecordCount <> 0 Then
Adodc2.Recordset.MoveFirst
For i = 0 To Adodc2.Recordset.RecordCount - 1
Adodc2.Recordset.Find "盘号='" & combo3.Text & "'"
Next
End If
End If
End Sub
Private Sub DataGrid2_GotFocus()
Text4.Visible = False
Text2.Visible = True
End Sub
Private Sub DataGrid2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "查找出租库存结果"
End Sub
Private Sub DTPicker1_CallbackKeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer, ByVal CallbackField As String, CallbackDate As Date)
MDIForm1.StatusBar1.Panels(1) = "出租日期"
End Sub
Private Sub Form_GotFocus()
MDIForm1.Combo1.Text = "[出租管理信息]"
End Sub
Private Sub Form_Load()
MDIForm1.Combo1.Text = "[出租管理信息]"
DTPicker1.Value = Date
Combo1.clear
Combo1.AddItem "喜剧片"
Combo1.AddItem "武打片"
Combo1.AddItem "枪战片"
Combo1.AddItem "言情片"
Combo1.AddItem "恐怖片"
Combo1.AddItem "记实片"
Combo1.AddItem "纪录片"
Combo1.AddItem "科幻片"
Combo2.AddItem "英语"
Combo2.AddItem "法语"
Combo2.AddItem "国语"
Combo2.AddItem "日语"
Combo2.AddItem "台语"
Combo2.AddItem "闽南语"
Combo2.AddItem "俄语"
Combo2.AddItem "德语"
Option1(0).Value = True
End Sub
Private Sub Form_LostFocus()
Unload Me
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = ""
End Sub
Private Sub Option1_Click(Index As Integer)
Select Case Index
Case 0:
Combo1.Visible = False
Combo2.Visible = False
Text1.Text = ""
Text1.Visible = True
'Text1.SetFocus
Case 1:
Combo1.Visible = False
Combo2.Visible = False
Text1.Text = ""
Text1.Visible = True
Text1.SetFocus
Case 2:
Combo1.Text = ""
Combo1.Visible = True
Combo2.Visible = False
Text1.Visible = False
Combo1.SetFocus
Case 3:
Combo1.Visible = False
Combo2.Text = ""
Combo2.Visible = True
Text1.Visible = False
Combo2.SetFocus
Case 4:
Combo1.Visible = False
Combo2.Visible = False
Text1.Text = ""
Text1.Visible = True
Text1.SetFocus
End Select
End Sub
Private Sub Option1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Select Case Index
Case 0:
MDIForm1.StatusBar1.Panels(1) = "按电影名查找"
Case 1:
MDIForm1.StatusBar1.Panels(1) = "按主演查找"
Case 2:
MDIForm1.StatusBar1.Panels(1) = "按类型查找"
Case 3:
MDIForm1.StatusBar1.Panels(1) = "按语种查找"
Case 4:
MDIForm1.StatusBar1.Panels(1) = "按产地查找"
End Select
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command1.Value = True
End If
End Sub
Private Sub Text2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
MDIForm1.StatusBar1.Panels(1) = "影碟内容简介"
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Index
Case 1:
Option1(0).Value = True
Case 2:
Option1(1).Value = True
Case 3:
Option1(2).Value = True
Case 4:
Option1(3).Value = True
Case 5:
Option1(4).Value = True
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -