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

📄 freturn.frm

📁 本程序是vb+access做的图书管管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form freturncheck 
   Caption         =   "还书管理"
   ClientHeight    =   5025
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6465
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   5025
   ScaleWidth      =   6465
   Begin VB.CommandButton cmdadd 
      Caption         =   "增加"
      Height          =   495
      Left            =   240
      TabIndex        =   4
      Top             =   3960
      Width           =   1215
   End
   Begin MSComctlLib.ListView lvw4 
      Height          =   3495
      Left            =   120
      TabIndex        =   3
      Top             =   120
      Width           =   6015
      _ExtentX        =   10610
      _ExtentY        =   6165
      View            =   3
      LabelEdit       =   1
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      GridLines       =   -1  'True
      _Version        =   393217
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   1
      NumItems        =   0
   End
   Begin VB.CommandButton cmdexit 
      Caption         =   "退出"
      Height          =   495
      Left            =   4800
      TabIndex        =   2
      Top             =   3960
      Width           =   1215
   End
   Begin VB.CommandButton cmddelete 
      Caption         =   "删除"
      Height          =   495
      Left            =   3360
      TabIndex        =   1
      Top             =   3960
      Width           =   1215
   End
   Begin VB.CommandButton cmdmodify 
      Caption         =   "修改"
      Height          =   495
      Left            =   1800
      TabIndex        =   0
      Top             =   3960
      Width           =   1215
   End
End
Attribute VB_Name = "freturncheck"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Function getallinformation() As Boolean
    On Error Resume Next
    Dim intindex As Long
    If runsql("select * from return") = False Then
         MsgBox "不能取得信息"
         Exit Function
    Else
        lvw4.ListItems.Clear
        If rct.EOF And rct.BOF Then
            Exit Function
        End If
        rct.MoveFirst
        Dim lstitem As ListItem
        Do While Not rct.EOF
            Set lstitem = lvw4.ListItems.add(, "k_" & rct.Fields("borrowid").Value, rct.Fields("borrowid").Value)
            lstitem.SubItems(1) = rct.Fields("returntime").Value
            lstitem.Tag = CStr(rct.Fields("borrowid").Value)
            rct.MoveNext
        Loop
    End If
End Function

Public Sub cmdadd_Click()
    Dim add As New freturnmodify
    add.isadd = True
    add.Show
End Sub

Private Sub cmddelete_Click()
If lvw4.SelectedItem Is Nothing Then
    Exit Sub
End If

If MsgBox("确认要删除" & lvw4.SelectedItem.Text & "吗?", vbYesNo + vbQuestion, "删除客户") = vbNo Then
    Exit Sub
End If

If runsql("delete from return where borrowid='" & lvw4.SelectedItem.Tag & "'") = True Then
    lvw4.ListItems.Remove (lvw4.SelectedItem.Key)
End If
End Sub

Private Sub cmdexit_Click()
    Unload Me
End Sub

Private Sub cmdmodify_Click()
    If lvw4.SelectedItem Is Nothing Then
        Exit Sub
    End If
    
 Dim modify As New freturnmodify
 modify.isadd = False
 modify.Tborrowid.Text = lvw4.SelectedItem.Text
 modify.Treturntime.Text = lvw4.SelectedItem.SubItems(1)
 
 modify.Show vbModal, Me
End Sub

Private Sub Form_Load()
    lvw4.ColumnHeaders.add , , "借书编号", 3000
    lvw4.ColumnHeaders.add , , "还书日期", 3000
    Call connecttoserver
    Call getallinformation
If grade = 2 Then
 freturncheck.cmdadd.Enabled = False
 freturncheck.cmdmodify.Enabled = False
 freturncheck.cmddelete.Enabled = False
 End If
 
End Sub

Private Sub Form_Unload(Cancel As Integer)
    Call closeconnect
End Sub

⌨️ 快捷键说明

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