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

📄 dellentcd.frm

📁 VB+ACCESS2000编写的VCD出租管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form DelLentCD 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "未还碟处理"
   ClientHeight    =   6075
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   10005
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   ScaleHeight     =   6075
   ScaleWidth      =   10005
   Begin VB.Frame Frame3 
      Caption         =   "报废回收押金"
      Height          =   4695
      Left            =   5280
      TabIndex        =   9
      Top             =   1200
      Width           =   4575
      Begin MSDataGridLib.DataGrid DataGrid2 
         Height          =   4335
         Left            =   120
         TabIndex        =   10
         Top             =   240
         Width           =   4335
         _ExtentX        =   7646
         _ExtentY        =   7646
         _Version        =   393216
         AllowUpdate     =   0   'False
         HeadLines       =   1
         RowHeight       =   15
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
      Begin MSAdodcLib.Adodc Adodc2 
         Height          =   375
         Left            =   1440
         Top             =   2280
         Width           =   2295
         _ExtentX        =   4048
         _ExtentY        =   661
         ConnectMode     =   0
         CursorLocation  =   3
         IsolationLevel  =   -1
         ConnectionTimeout=   15
         CommandTimeout  =   30
         CursorType      =   3
         LockType        =   3
         CommandType     =   8
         CursorOptions   =   0
         CacheSize       =   50
         MaxRecords      =   0
         BOFAction       =   0
         EOFAction       =   0
         ConnectStringType=   1
         Appearance      =   1
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         Orientation     =   0
         Enabled         =   -1
         Connect         =   ""
         OLEDBString     =   ""
         OLEDBFile       =   ""
         DataSourceName  =   ""
         OtherAttributes =   ""
         UserName        =   ""
         Password        =   ""
         RecordSource    =   ""
         Caption         =   "Adodc2"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _Version        =   393216
      End
   End
   Begin VB.Frame Frame2 
      Caption         =   "未还信息"
      Height          =   4695
      Left            =   120
      TabIndex        =   7
      Top             =   1200
      Width           =   5055
      Begin MSDataGridLib.DataGrid DataGrid1 
         Height          =   4335
         Left            =   120
         TabIndex        =   8
         Top             =   240
         Width           =   4815
         _ExtentX        =   8493
         _ExtentY        =   7646
         _Version        =   393216
         AllowUpdate     =   0   'False
         HeadLines       =   1
         RowHeight       =   15
         BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         BeginProperty Column01 
            DataField       =   ""
            Caption         =   ""
            BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
               Type            =   0
               Format          =   ""
               HaveTrueFalseNull=   0
               FirstDayOfWeek  =   0
               FirstWeekOfYear =   0
               LCID            =   2052
               SubFormatType   =   0
            EndProperty
         EndProperty
         SplitCount      =   1
         BeginProperty Split0 
            BeginProperty Column00 
            EndProperty
            BeginProperty Column01 
            EndProperty
         EndProperty
      End
      Begin MSAdodcLib.Adodc Adodc1 
         Height          =   330
         Left            =   1440
         Top             =   2400
         Width           =   2175
         _ExtentX        =   3836
         _ExtentY        =   582
         ConnectMode     =   0
         CursorLocation  =   3
         IsolationLevel  =   -1
         ConnectionTimeout=   15
         CommandTimeout  =   30
         CursorType      =   3
         LockType        =   3
         CommandType     =   8
         CursorOptions   =   0
         CacheSize       =   50
         MaxRecords      =   0
         BOFAction       =   0
         EOFAction       =   0
         ConnectStringType=   1
         Appearance      =   1
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         Orientation     =   0
         Enabled         =   -1
         Connect         =   ""
         OLEDBString     =   ""
         OLEDBFile       =   ""
         DataSourceName  =   ""
         OtherAttributes =   ""
         UserName        =   ""
         Password        =   ""
         RecordSource    =   ""
         Caption         =   "Adodc1"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _Version        =   393216
      End
   End
   Begin VB.Frame Frame1 
      Height          =   975
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   9735
      Begin VB.CommandButton Command3 
         Caption         =   "关闭(&C)"
         Height          =   375
         Left            =   8400
         TabIndex        =   11
         Top             =   360
         Width           =   1215
      End
      Begin VB.CommandButton Command2 
         Caption         =   "报废(&D)"
         Height          =   375
         Left            =   7080
         TabIndex        =   6
         Top             =   360
         Width           =   1215
      End
      Begin VB.CommandButton Command1 
         Caption         =   "查询(&S)"
         Height          =   375
         Left            =   5760
         TabIndex        =   5
         Top             =   360
         Width           =   1215
      End
      Begin VB.TextBox Text1 
         Appearance      =   0  'Flat
         BackColor       =   &H00C0E0FF&
         Height          =   375
         Left            =   1800
         TabIndex        =   2
         Top             =   360
         Width           =   855
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Height          =   180
         Left            =   3960
         TabIndex        =   4
         Top             =   480
         Width           =   90
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "实际日期:"
         Height          =   180
         Left            =   3000
         TabIndex        =   3
         Top             =   480
         Width           =   900
      End
      Begin VB.Label Label1 
         Caption         =   "输入查询天数:"
         Height          =   255
         Left            =   480
         TabIndex        =   1
         Top             =   480
         Width           =   1335
      End
   End
End
Attribute VB_Name = "DelLentCD"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit


Private Sub Command1_Click()
Dim SQL As String
If Text1.Text = "" Then
    MsgBox "请输入需要查询多少天以前的信息所必要的天数!", vbInformation + vbOKOnly, "提示"
    Text1.SetFocus
    Exit Sub
End If
SQL = "select * from lentinfo where 借碟时间<= #" & Label3.Caption & "# and 还碟时间 is null"
Adodc1.RecordSource = SQL
Set DataGrid1.DataSource = Adodc1
Adodc1.Refresh
End Sub

Private Sub Command2_Click()
Dim SQL As String
Dim id As String
Dim yj As Currency
Dim name As String
Dim jg As Currency
Dim sum As Integer
If Adodc1.Recordset.RecordCount > 0 Then
   DataGrid1.Col = 3
   yj = DataGrid1.Text
   DataGrid1.Col = 1
   id = DataGrid1.Text
   If MsgBox("你确认回收影碟名称为“" & id & "”的押金,并报废该影碟吗?", vbInformation + vbYesNo, "报废") = vbYes Then
    With Adodc1.Recordset
         .Delete
    End With
   Else
    Exit Sub
   End If
Else
   MsgBox "没有影碟可供报废!", vbInformation + vbOKOnly, "警告"
   Exit Sub
End If
SQL = "select * from cdinfo where 影碟编号=""" & id & """"
OpenDBFile
OpenRS (SQL)
If Not gRst.EOF Then
    name = gRst("影碟名称")
    sum = gRst("借出次数")
    jg = gRst("影碟价格")
CloseRS
Else
CloseRS
End If
SQL = "delete from cdinfo where 影碟编号=""" & id & """"
OpenDBFile
gCon.Execute SQL
SQL = "insert into scrapcd(影碟编号,影碟名称,影碟价格,借出次数,回收押金,报废原因,报废日期)values(""" _
                          & id & """,""" _
                          & name & """," _
                          & jg & ",""" & sum & """," _
                          & yj & ",""" & "影碟丢失" & """,#" _
                          & Format(Date, "yyyy-mm") & "#)"
gCon.Execute SQL
CloseDBFile
Adodc2.Refresh
End Sub

Private Sub Command3_Click()
Unload Me
End Sub

Private Sub Form_Load()
Dim SQL As String
Dim vbdatet As String
vbdatet = Format(Date, "yyyy-mm")
Adodc1.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" _
                          & App.Path & "\cdlent.mdb;Mode=ReadWrite;Persist Security Info=True;Jet OLEDB:Database Password=vcdglxt"
Adodc1.CursorLocation = adUseClient
Adodc1.CommandType = adCmdText
Adodc2.ConnectionString = "provider=microsoft.jet.oledb.4.0;data source=" _
                          & App.Path & "\cdlent.mdb;Mode=ReadWrite;Persist Security Info=True;Jet OLEDB:Database Password=vcdglxt"
Adodc2.CursorLocation = adUseClient
Adodc2.CommandType = adCmdText
SQL = "select * from scrapcd where 报废日期= #" & Format(vbdatet, "yyyy-mm-dd") & "#"
Adodc2.RecordSource = SQL
Set DataGrid2.DataSource = Adodc2
Adodc2.Refresh
End Sub



Private Sub Text1_Change()
On Error Resume Next
If Text1.Text = "" Then
Exit Sub
End If
Label3.Caption = CStr(CDate(Date) - Text1.Text)
End Sub

⌨️ 快捷键说明

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