- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
frmReader2.frm
资源名称:图书馆管理系统11.rar [点击查看]
上传用户:wang_li173
上传日期:2007-06-22
资源大小:43k
文件大小:6k
源码类别:
系统设计方案
开发平台:
Visual Basic
- VERSION 5.00
- Begin VB.Form frmReader2
- BorderStyle = 3 'Fixed Dialog
- Caption = "读者信息查询"
- ClientHeight = 2256
- ClientLeft = 48
- ClientTop = 336
- ClientWidth = 4068
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2256
- ScaleWidth = 4068
- ShowInTaskbar = 0 'False
- StartUpPosition = 1 'CenterOwner
- Begin VB.TextBox txtItem
- Height = 270
- Index = 1
- Left = 1560
- TabIndex = 9
- Top = 720
- Width = 2172
- End
- Begin VB.CheckBox chkItem
- Caption = "Check1"
- Height = 180
- Index = 2
- Left = 240
- TabIndex = 8
- TabStop = 0 'False
- Top = 1080
- Width = 132
- End
- Begin VB.CheckBox chkItem
- Caption = "Check1"
- Height = 180
- Index = 1
- Left = 240
- TabIndex = 7
- TabStop = 0 'False
- Top = 720
- Width = 132
- End
- Begin VB.ComboBox Combo1
- Height = 288
- Left = 1560
- Style = 2 'Dropdown List
- TabIndex = 5
- Top = 1080
- Width = 2172
- End
- Begin VB.CheckBox chkItem
- Caption = "Check1"
- Height = 180
- Index = 0
- Left = 240
- TabIndex = 4
- TabStop = 0 'False
- Top = 360
- Value = 1 'Checked
- Width = 132
- End
- Begin VB.CommandButton cmdOk
- Caption = "确定 (&O)"
- Default = -1 'True
- Height = 375
- Left = 720
- TabIndex = 1
- Top = 1680
- Width = 1215
- End
- Begin VB.CommandButton cmdExit
- Caption = "取消 (&X)"
- Height = 375
- Left = 2280
- TabIndex = 2
- Top = 1680
- Width = 1215
- End
- Begin VB.TextBox txtItem
- Height = 270
- Index = 0
- Left = 1560
- TabIndex = 0
- Top = 360
- Width = 2172
- End
- Begin VB.Label lblitem
- Caption = "读者姓名:"
- Height = 252
- Index = 2
- Left = 600
- TabIndex = 10
- Top = 720
- Width = 1092
- End
- Begin VB.Label lblitem
- Caption = "读者种类:"
- Height = 252
- Index = 1
- Left = 600
- TabIndex = 6
- Top = 1080
- Width = 1092
- End
- Begin VB.Label lblitem
- Caption = "读者编号:"
- Height = 252
- Index = 0
- Left = 600
- TabIndex = 3
- Top = 360
- Width = 1092
- End
- End
- Attribute VB_Name = "frmReader2"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- '用于传递查询块
- Private Sub chkItem_Click(Index As Integer)
- If Index = 0 Then
- txtItem(0).SetFocus
- ElseIf Index = 1 Then
- txtItem(1).SetFocus
- Else
- Combo1.SetFocus
- End If
- End Sub
- Private Sub cmdExit_Click()
- Me.Hide
- End Sub
- Private Sub cmdOK_Click()
- Dim sQSql As String
- If chkItem(0).Value = vbChecked Then
- sQSql = " readerno = '" & Trim(txtItem(0) & " ") & "'"
- End If
- If chkItem(1).Value = vbChecked Then
- If Trim(sQSql & " ") = "" Then
- sQSql = " readername ='" & Trim(txtItem(1) & " ") & "'"
- Else
- sQSql = sQSql & " and readername ='" & Trim(txtItem(1) & " ") & "'"
- End If
- End If
- If chkItem(2).Value = vbChecked Then
- If Trim(sQSql & " ") = "" Then
- sQSql = " readertype ='" & Trim(Combo1 & " ") & "'"
- Else
- sQSql = sQSql & " and readertype ='" & Trim(Combo1 & " ") & "'"
- End If
- End If
- If Trim(sQSql) = "" Then
- MsgBox "请设置查询条件!", vbOKOnly + vbExclamation, "警告"
- Exit Sub
- Else
- If flagRedit Then
- Unload frmReader
- End If
- frmReader.txtSQL = "select * from readers where" & sQSql
- frmReader.Show
- End If
- Me.Hide
- End Sub
- Private Sub Form_Load()
- Dim i As Integer
- Dim j As Integer
- Dim sSql As String
- Dim txtSQL As String
- Dim MsgText As String
- Dim mrc As ADODB.Recordset
- '初始化物资名称
- txtSQL = "select DISTINCT typename from readertype"
- Set mrc = ExecuteSQL(txtSQL, MsgText)
- If Not mrc.EOF Then
- Do While Not mrc.EOF
- Combo1.AddItem Trim(mrc.Fields(0))
- mrc.MoveNext
- Loop
- Combo1.ListIndex = 0
- Else
- MsgBox "请先进行读者种类设置!", vbOKOnly + vbExclamation, "警告"
- Exit Sub
- End If
- mrc.Close
- End Sub
- Private Sub lblitem_Click(Index As Integer)
- chkItem(Index).Value = vbChecked
- End Sub
- Private Sub txtItem_GotFocus(Index As Integer)
- txtItem(Index).SelStart = 0
- txtItem(Index).SelLength = Len(txtItem(Index))
- End Sub