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

📄 frmsearch.frm

📁 中小型图书会员制租赁管理系统,采用ACCESS数据库。
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Top             =   840
            Value           =   -1  'True
            Width           =   855
         End
         Begin VB.ComboBox cboMembersSortField 
            Height          =   300
            ItemData        =   "frmSearch.frx":6338
            Left            =   1320
            List            =   "frmSearch.frx":6366
            Style           =   2  'Dropdown List
            TabIndex        =   27
            Top             =   240
            Width           =   2055
         End
         Begin VB.Label Label6 
            Caption         =   "排列要素:"
            Height          =   255
            Left            =   360
            TabIndex        =   26
            Top             =   240
            Width           =   1215
         End
      End
      Begin VB.Frame frameMembersSearchFilter 
         Caption         =   " 过滤选择:"
         Height          =   1335
         Left            =   240
         TabIndex        =   18
         Top             =   4680
         Width           =   5895
         Begin VB.OptionButton optUsePatternMatching 
            Caption         =   "部分匹配"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   9
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   1560
            TabIndex        =   24
            Top             =   840
            Value           =   -1  'True
            Width           =   1215
         End
         Begin VB.OptionButton optMembersFindWholeWordOnly 
            Caption         =   "整体匹配"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   9
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   360
            TabIndex        =   23
            Top             =   840
            Width           =   1095
         End
         Begin VB.ComboBox cboMembersSearchField 
            Height          =   300
            ItemData        =   "frmSearch.frx":63EA
            Left            =   3240
            List            =   "frmSearch.frx":6415
            Style           =   2  'Dropdown List
            TabIndex        =   22
            Top             =   240
            Width           =   2535
         End
         Begin VB.TextBox txtMembersSearchString 
            Height          =   285
            Left            =   840
            TabIndex        =   19
            Text            =   "6"
            Top             =   240
            Width           =   1815
         End
         Begin VB.Label Label5 
            Caption         =   "从:"
            Height          =   255
            Left            =   2880
            TabIndex        =   21
            Top             =   240
            Width           =   375
         End
         Begin VB.Label Label4 
            Caption         =   "搜索:"
            Height          =   255
            Left            =   240
            TabIndex        =   20
            Top             =   240
            Width           =   615
         End
      End
      Begin VB.CommandButton cmdRefreshMembers 
         Caption         =   "刷新&R"
         Height          =   615
         Left            =   10440
         TabIndex        =   17
         Top             =   4800
         Width           =   1455
      End
   End
   Begin MSComctlLib.TabStrip TabStrip1 
      Height          =   6855
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   15975
      _ExtentX        =   28178
      _ExtentY        =   12091
      _Version        =   393216
      BeginProperty Tabs {1EFB6598-857C-11D1-B16A-00C0F0283628} 
         NumTabs         =   3
         BeginProperty Tab1 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "文籍"
            Key             =   "Movie"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab2 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "会员"
            Key             =   "Members"
            ImageVarType    =   2
         EndProperty
         BeginProperty Tab3 {1EFB659A-857C-11D1-B16A-00C0F0283628} 
            Caption         =   "在租项目"
            Key             =   "UnreturnedItems"
            ImageVarType    =   2
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "frmSearch"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cboMembersSearchField_Click()
If cboMembersSearchField.Text = "Date Entered" Or cboMembersSearchField.Text = "生日" Then
    optMembersFindWholeWordOnly.Enabled = False
    optUsePatternMatching.Value = True
Else
    optMembersFindWholeWordOnly.Enabled = True
End If
End Sub
Private Sub cboMovieSearch_click()
If cboMovieSearch.Text = "Date Entered" Then
   optMoviesWholeWord.Enabled = False
   optMoviesUsePatternMatching.Value = True
Else
   optMoviesWholeWord.Enabled = True
End If
End Sub
Private Sub cmdFleMembersToExcel_Click()
MousePointer = vbHourglass
Dim vr_engine As VRENTAL_ENGINE
Set vr_engine = New VRENTAL_ENGINE
Call vr_engine.CopyFlexDataToExcel(FlexMembers)
MousePointer = vbDefault
FlexMembers.SetFocus
End Sub
Private Sub cmdFlexMovieToExcel_Click()
MousePointer = vbHourglass
Dim vr_engine As VRENTAL_ENGINE
Set vr_engine = New VRENTAL_ENGINE
Call vr_engine.CopyFlexDataToExcel(FlexMovies)
MousePointer = vbDefault
FlexMovies.SetFocus
End Sub
Private Sub cmdFlexToExcel_Click()
MousePointer = vbHourglass
Dim vr_engine As VRENTAL_ENGINE
Set vr_engine = New VRENTAL_ENGINE
Call vr_engine.CopyFlexDataToExcel(MSFlexGrid1)
MousePointer = vbDefault
MSFlexGrid1.SetFocus
End Sub
Private Sub cmdMovies_Refresh_Click()
Dim vr_engine As VRENTAL_ENGINE
Set vr_engine = New VRENTAL_ENGINE
Call vr_engine.Search_Movies(FlexMovies, Trim(txtMovieSearch.Text), cboMovieSearch.Text, optMoviesUsePatternMatching.Value, cboMoviesSort.Text, optMovieSortAscending.Value)
FlexMovies.SetFocus
End Sub
Private Sub cmdRefresh_Click()
    MousePointer = vbHourglass
    Dim vr_engine As VRENTAL_ENGINE
    Set vr_engine = New VRENTAL_ENGINE
    Call vr_engine.Report_LoadUnreturnedItems(MSFlexGrid1, cboUnreturnedItemsSortBy, UnreturnedItems_SQL(), Opt1.Value, Check1.Value, cboUnreturnedItemsSortBy)
    MousePointer = vbDefault
    MSFlexGrid1.SetFocus
End Sub
Private Sub cmdRefreshMembers_Click()
    Dim vr_engine As VRENTAL_ENGINE
    Set vr_engine = New VRENTAL_ENGINE
    If Trim(cboMembersSortField.Text) = "年龄" Then           'Trim(cboMembersSortField.Text) = "生日"
    Call vr_engine.Search_Members(FlexMembers, Trim(txtMembersSearchString.Text), Trim(cboMembersSearchField.Text), optUsePatternMatching.Value, "生日", Not optMembersSortAscending.Value)
    Else
    Call vr_engine.Search_Members(FlexMembers, Trim(txtMembersSearchString.Text), Trim(cboMembersSearchField.Text), optUsePatternMatching.Value, Trim(cboMembersSortField.Text), optMembersSortAscending.Value)
    'Call vr_engine.Search_Movies(FlexMembers, Trim(txtMovieSearch.Text), cboMovieSearch.Text, optMoviesUsePatternMatching.Value, cboMoviesSort.Text, optMovieSortAscending.Value)
    End If
    If FlexMembers.Visible = True Then FlexMembers.SetFocus
End Sub
Private Sub Command1_Click()
MSFlexGrid1.SetFocus
End Sub
Private Sub Form_Activate()
If FlexMovies.Visible = True Then FlexMovies.SetFocus
End Sub
Private Sub Form_Load()
Dim vr_engine As VRENTAL_ENGINE
Set vr_engine = New VRENTAL_ENGINE
  
  txtMovieSearch.Text = "No"
  cboMovieSearch.Text = "是否可租"
  cboMoviesSort.Text = "标题"
  cboMembersSearchField.Text = "会员等级"
  cboMembersSortField.Text = "姓氏"
End Sub
Private Sub OptUnreturnedItemsAsc_Click()
 Call cmdRefresh_Click
End Sub
Private Sub OptUnreturnedItemsDesc_Click()
Call cmdRefresh_Click
End Sub
Private Sub TabStrip1_Click()
Dim vr_engine As VRENTAL_ENGINE
Set vr_engine = New VRENTAL_ENGINE
'--------------------------------------------------
If TabStrip1.SelectedItem.Caption = "文籍" Then
    frameMovies.Visible = True
    frameMembers.Visible = False
    frameUnreturnedItems.Visible = False
    FlexMovies.SetFocus
End If
'--------------------------------------------------
'--------------------------------------------------
If TabStrip1.SelectedItem.Caption = "会员" Then
    frameMovies.Visible = False
    frameUnreturnedItems.Visible = False
    frameMembers.Visible = True
    Call cmdRefreshMembers_Click

End If
'-------------------------------------------------
'-------------------------------------------------
If TabStrip1.SelectedItem.Caption = "在租项目" Then
    frameMovies.Visible = False
    frameUnreturnedItems.Visible = True
    frameMembers.Visible = False
    MSFlexGrid1.SetFocus
    Call UnreturnedItems_initializeFLEXGRID(MSFlexGrid1)
    Call vr_engine.Report_Loaditemcodecob(cboUnreturnedItemsSortBy)
End If
'-------------------------------------------------
End Sub
Sub UnreturnedItems_initializeFLEXGRID(Flex As MSFlexGrid)
Dim vr_engine As VRENTAL_ENGINE
Set vr_engine = New VRENTAL_ENGINE
Dim mySQL As String
      
With Flex
     .ColWidth(0) = 600 'No.
     .ColWidth(1) = 1000 'Item Code
     .ColWidth(2) = 3000 '标题
     .ColWidth(3) = 1100 'Date Borrowed
     .ColWidth(4) = 1000 'Date Due
     .ColWidth(5) = 1000 'Overdue (Days)
     .ColWidth(6) = 1300 'Overdue Charges
     .ColWidth(7) = 900 'Overdue Charges
     .ColWidth(8) = 2700 'Additional Info
     .ColAlignment(0) = 5 'No.
     .ColAlignment(1) = 5 'Item Code
     .ColAlignment(2) = 5 '标题
     .ColAlignment(3) = 5 'Date Borrowed
     .ColAlignment(4) = 5
     .ColAlignment(5) = 5 'Overdue (Days)
     .ColAlignment(6) = 5 'Overdue Charges
     .ColAlignment(7) = 5
     .ColAlignment(8) = 2
     '.ColAlignment(4) = 5 'Additional Info
     .TextMatrix(0, 0) = " No. "
     .TextMatrix(0, 1) = "项目编号"
     .TextMatrix(0, 2) = "标题"
     .TextMatrix(0, 3) = "租借日期"
     .TextMatrix(0, 4) = "过期时间"
     .TextMatrix(0, 5) = "过期天数为"
     .TextMatrix(0, 6) = "过期支付金"
     .TextMatrix(0, 7) = "交易量"
     .TextMatrix(0, 8) = "             补充说明"
End With
     'mySQL = "SELECT * FROM [CD TAPES TABLE] WHERE Available = 'No' ORDER BY [LastDateBorrowed] "
     'Call vr_engine.Report_LoadUnreturnedItems(MSFlexGrid1, UnreturnedItems_SQL())   为保持浏览的速度,先屏蔽了这句
End Sub
Function UnreturnedItems_SQL() As String
  If OptUnreturnedItemsAsc = True Then
    UnreturnedItems_SQL = "SELECT * FROM [Transaction] WHERE [是否归还] = 'No' ORDER BY [" & Trim(cboUnreturnedItemsSortBy.Text) & "]"
  Else
    UnreturnedItems_SQL = "SELECT * FROM [Transaction] WHERE [是否归还] = 'No' ORDER BY [" & Trim(cboUnreturnedItemsSortBy.Text) & "] Desc"
  End If
End Function

⌨️ 快捷键说明

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