📄 frmmoney.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 frmMoney
Caption = "图书罚款"
ClientHeight = 4290
ClientLeft = 60
ClientTop = 345
ClientWidth = 9045
Icon = "frmMoney.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 4290
ScaleWidth = 9045
Begin VB.TextBox txbMoney
Height = 375
Left = 3360
TabIndex = 11
Top = 3840
Width = 1455
End
Begin VB.CommandButton btnSubmit
Caption = "收回罚款金额"
Height = 375
Left = 600
TabIndex = 9
Top = 3840
Width = 1455
End
Begin VB.Frame Frame1
Height = 615
Left = 0
TabIndex = 0
Top = 0
Width = 9015
Begin VB.TextBox txbThree
Height = 270
Left = 6600
TabIndex = 4
Top = 240
Width = 1215
End
Begin VB.TextBox txbOne
Height = 270
Left = 2040
TabIndex = 3
Top = 240
Width = 1215
End
Begin VB.CommandButton btnSearch
Caption = "搜索"
Height = 255
Left = 120
TabIndex = 2
Top = 240
Width = 615
End
Begin VB.TextBox txbTwo
Height = 270
Left = 4320
TabIndex = 1
Top = 240
Width = 1215
End
Begin VB.Label Label3
Caption = "图书编号"
Height = 255
Left = 5760
TabIndex = 7
Top = 240
Width = 1095
End
Begin VB.Label Label2
Caption = "读者条码"
Height = 255
Left = 3480
TabIndex = 6
Top = 240
Width = 855
End
Begin VB.Label Label1
Caption = "读者编号"
Height = 255
Left = 1200
TabIndex = 5
Top = 240
Width = 855
End
End
Begin MSDataGridLib.DataGrid grdDataGrid
Bindings = "frmMoney.frx":0442
Height = 2895
Left = 0
TabIndex = 8
Top = 720
Width = 9015
_ExtentX = 15901
_ExtentY = 5106
_Version = 393216
HeadLines = 1
RowHeight = 15
FormatLocked = -1 'True
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 = 8
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
BeginProperty Column02
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 Column03
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 Column04
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 Column05
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 Column06
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 Column07
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
ColumnWidth = 1005.165
EndProperty
BeginProperty Column01
ColumnWidth = 945.071
EndProperty
BeginProperty Column02
ColumnWidth = 929.764
EndProperty
BeginProperty Column03
ColumnWidth = 915.024
EndProperty
BeginProperty Column04
ColumnWidth = 900.284
EndProperty
BeginProperty Column05
ColumnWidth = 915.024
EndProperty
BeginProperty Column06
ColumnWidth = 915.024
EndProperty
BeginProperty Column07
ColumnWidth = 2085.166
EndProperty
EndProperty
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 5280
Top = 3720
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_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= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=liblink"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "liblink"
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 图书罚款 where 是否交款=0"
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
Begin VB.Label Label4
Caption = "实收金额"
Height = 255
Left = 2520
TabIndex = 10
Top = 3960
Width = 1095
End
End
Attribute VB_Name = "frmMoney"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub LoadData()
Dim strFilter As String
If Len(Trim(txbOne.Text)) = 0 Then
If Len(Trim(txbTwo.Text)) = 0 Then
If Len(Trim(txbThree.Text)) = 0 Then
strFilter = ""
Else
strFilter = "where 图书编号 like '"
strFilter = strFilter + Trim(txbThree.Text) + "%'"
End If
Else
strFilter = "where 读者条码 like '"
strFilter = strFilter + Trim(txbTwo.Text) + "%'"
If Len(Trim(txbThree.Text)) <> 0 Then
strFilter = strFilter + " and 图书编号 like '"
strFilter = strFilter + Trim(txbThree.Text) + "%'"
End If
End If
Else
strFilter = "where 读者编号 like '"
strFilter = strFilter + Trim(txbOne.Text) + "%'"
If Len(Trim(txbTwo.Text)) <> 0 Then
strFilter = strFilter + " and 读者条码 like '"
strFilter = strFilter + Trim(txbTwo.Text) + "%'"
If Len(Trim(txbThree.Text)) <> 0 Then
strFilter = strFilter + " and 图书编号 like '"
strFilter = strFilter + Trim(txbThree.Text) + "%'"
End If
Else
If Len(Trim(txbThree.Text)) <> 0 Then
strFilter = strFilter + " and 图书编号 like '"
strFilter = strFilter + Trim(txbThree.Text) + "%'"
End If
End If
End If
If Len(strFilter) = 0 Then
strFilter = " where 是否交款=0 "
Else
strFilter = strFilter + " and 是否交款=0 "
End If
Dim db As New DataBases
Dim rs As New Recordset
Dim strSQL As String
strSQL = "select * from 图书罚款 " + strFilter
Set rs = db.RunSelectSQL(strSQL)
Set Adodc1.Recordset = rs
End Sub
Private Sub btnSearch_Click()
LoadData
End Sub
Private Sub btnSubmit_Click()
Dim db As New DataBases
'更新图书罚款表
Dim strSQL As String
strSQL = "update 图书罚款 set 是否交款=1 where 罚款编号="
strSQL = strSQL + Trim(Adodc1.Recordset("罚款编号"))
db.RunSelectSQL (strSQL)
db.CloseConn
LoadData
End Sub
Private Sub Form_Load()
Dim db As New DataBases
Adodc1.ConnectionString = db.sConn
LoadData
End Sub
Private Sub grdDataGrid_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
Dim rs As Recordset
Set rs = Adodc1.Recordset
txbMoney.Text = rs("应罚金额")
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -