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

📄 fakuan.frm

📁 这是我学生写的关于游戏系统的论文
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Width           =   735
         End
         Begin VB.TextBox Text4 
            Enabled         =   0   'False
            Height          =   270
            Left            =   1200
            TabIndex        =   21
            Top             =   1920
            Width           =   1455
         End
         Begin VB.TextBox Text2 
            Enabled         =   0   'False
            Height          =   270
            Left            =   1560
            TabIndex        =   19
            Top             =   2400
            Width           =   1095
         End
         Begin VB.OptionButton Option2 
            Caption         =   "丢失"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00FF0000&
            Height          =   300
            Left            =   2040
            TabIndex        =   9
            Top             =   1455
            Width           =   975
         End
         Begin VB.OptionButton Option1 
            Caption         =   "超期"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00FF0000&
            Height          =   300
            Left            =   1080
            TabIndex        =   8
            Top             =   1440
            Width           =   975
         End
         Begin VB.TextBox Text3 
            Height          =   270
            Left            =   1080
            TabIndex        =   5
            Top             =   960
            Width           =   1575
         End
         Begin VB.TextBox Text1 
            Height          =   270
            Left            =   1080
            TabIndex        =   4
            Top             =   360
            Width           =   1575
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            Caption         =   "单 价:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00C00000&
            Height          =   210
            Index           =   6
            Left            =   360
            TabIndex        =   20
            Top             =   1920
            Width           =   705
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            Caption         =   "超期天数:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00C00000&
            Height          =   210
            Index           =   2
            Left            =   360
            TabIndex        =   18
            Top             =   2400
            Width           =   1035
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            Caption         =   "类 型:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00C00000&
            Height          =   210
            Index           =   3
            Left            =   360
            TabIndex        =   10
            Top             =   1440
            Width           =   705
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            Caption         =   "书 号:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00C00000&
            Height          =   210
            Index           =   1
            Left            =   360
            TabIndex        =   3
            Top             =   960
            Width           =   705
         End
         Begin VB.Label Label1 
            AutoSize        =   -1  'True
            Caption         =   "卡 号:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   10.5
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            ForeColor       =   &H00C00000&
            Height          =   210
            Index           =   0
            Left            =   360
            TabIndex        =   2
            Top             =   360
            Width           =   705
         End
      End
   End
End
Attribute VB_Name = "fakuan1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
fakuan.Recordset.AddNew
  fakuan.Recordset.Fields("卡号") = Text1.Text
  fakuan.Recordset.Fields("书号") = Text3.Text
  fakuan.Recordset.Fields("罚金") = Text5.Text
  If Option1.Value = True Then
  fakuan.Recordset.Fields("罚款原因") = Option1.Caption
  Else
    fakuan.Recordset.Fields("罚款原因") = Option2.Caption
    
  End If
  fakuan.Recordset.Fields("日期") = Date
  fakuan.Recordset.Update
  MsgBox "罚款成功!"
End Sub

Private Sub Command2_Click()
Unload fakuan1
End Sub

Private Sub Command3_Click()
If Option1.Value = True Then
  Text5.Text = Val(Text2.Text) * 0.1

End If
If Option2.Value = True Then
   Text5.Text = Val(Text4.Text) * 3
   
End If
Command1.Enabled = True
End Sub

Private Sub Command4_Click()
lend.Recordset.MoveFirst
condition = "卡号='" & Text1.Text & "'"
Do
  lend.Recordset.FindFirst condition
  If Not lend.Recordset.NoMatch Then
    List1.AddItem "  " & lend.Recordset.Fields("书号") & "     " & book.Recordset.Fields("书名")
  End If
  lend.Recordset.MoveNext
Loop Until lend.Recordset.EOF

End Sub

Private Sub Command5_Click()
lend.Recordset.MoveFirst
condition4 = "卡号='" & Text1.Text & "' and 书号='" & Text3.Text & "'"
lend.Recordset.FindFirst condition4
If Not lend.Recordset.NoMatch Then
  fakuan.Recordset.Delete
End If
student.Recordset.MoveFirst
condition5 = "卡号='" & Text1.Text & "'"
student.Recordset.FindFirst condition5
If Not student.Recordset.NoMatch Then
   student.Recordset.Fields("已借书数") = student.Recordset.Fields("已借书数") - 1
End If
book.Recordset.MoveFirst
condition6 = "卡号='" & Text3.Text & "'"
 book.Recordset.FindFirst condition6
 If Not book.Recordset.NoMatch Then
    book.Recordset.Fields("在库数目") = book.Recordset.Fields("在库数目") + 1
 End If
 MsgBox "还书成功!"
End Sub

Private Sub Label2_Click(Index As Integer)

End Sub

Private Sub Option1_Click()
Text2.Enabled = True
lend.Recordset.MoveFirst
condition2 = "卡号='" & Text1.Text & "' and 书号='" & Text3.Text & "'"
lend.Recordset.FindFirst condition2

If Not lend.Recordset.NoMatch Then
    Text2.Text = Date - lend.Recordset.Fields("期限日期")
End If
Command3.Enabled = True
Command5.Enabled = True
End Sub

Private Sub Option2_Click()
Text4.Enabled = True
condition3 = "书号='" & Text3.Text & "'"
book.Recordset.MoveFirst
book.Recordset.FindFirst condition3
If Not book.Recordset.NoMatch Then
    Text4.Text = book.Recordset.Fields("单价")
Else
  MsgBox "该书号不存在,请重试!"
  Exit Sub
  Text3.SetFocus
End If
Command3.Enabled = True
End Sub

⌨️ 快捷键说明

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