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

📄 dellentcd.frm

📁 VB影碟出租系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         EndProperty
      End
      Begin MSDataGridLib.DataGrid DataGrid1 
         Height          =   2295
         Left            =   120
         TabIndex        =   3
         Top             =   480
         Width           =   8655
         _ExtentX        =   15266
         _ExtentY        =   4048
         _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
         Caption         =   "未还情况"
         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 VB.Label Label1 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         BackStyle       =   0  'Transparent
         Caption         =   "请输入你要查询天数:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   255
         Left            =   240
         TabIndex        =   6
         Top             =   5520
         Width           =   2175
      End
      Begin VB.Label Label2 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         BackStyle       =   0  'Transparent
         Caption         =   "对应日期:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   255
         Left            =   3600
         TabIndex        =   5
         Top             =   5520
         Width           =   1095
      End
      Begin VB.Label Label3 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         BackStyle       =   0  'Transparent
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000008&
         Height          =   255
         Left            =   4680
         TabIndex        =   4
         Top             =   5520
         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
'Download by http://www.codefans.net
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=123456"
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=123456"
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

SkyGzForm1.Caption = Me.Caption
SkyGzForm1.hWnd = Me.hWnd
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


Private Sub Form_Resize()
SkyGzForm1.Left = 0
SkyGzForm1.Top = 0
Me.Width = SkyGzForm1.Width - 5
Me.Height = SkyGzForm1.Height
Call SkyGzForm1.SetRgn(Me, 5)
End Sub

Private Sub SkyGzForm1_UnloadClick()
Unload Me
End Sub

⌨️ 快捷键说明

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