www.pudn.com > opy_LMS.rar > frmFine.frm
VERSION 5.00
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmFine
BorderStyle = 1 'Fixed Single
Caption = "罚款信息"
ClientHeight = 4230
ClientLeft = 45
ClientTop = 330
ClientWidth = 4680
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4230
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton cmd_back
Default = -1 'True
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 3480
MouseIcon = "frmFine.frx":0000
MousePointer = 99 'Custom
Picture = "frmFine.frx":0152
Style = 1 'Graphical
TabIndex = 4
ToolTipText = "Back to Returnform"
Top = 3240
Width = 1095
End
Begin VB.CommandButton cmdFirst
Appearance = 0 'Flat
Height = 345
Left = 120
MouseIcon = "frmFine.frx":075B
MousePointer = 99 'Custom
Picture = "frmFine.frx":08AD
Style = 1 'Graphical
TabIndex = 3
ToolTipText = "Move First"
Top = 3165
UseMaskColor = -1 'True
Width = 345
End
Begin VB.CommandButton cmdPrevious
Appearance = 0 'Flat
Height = 345
Left = 480
MouseIcon = "frmFine.frx":0AFC
MousePointer = 99 'Custom
Picture = "frmFine.frx":0C4E
Style = 1 'Graphical
TabIndex = 2
ToolTipText = "Move Previous"
Top = 3165
UseMaskColor = -1 'True
Width = 345
End
Begin VB.CommandButton cmdNext
Appearance = 0 'Flat
Height = 345
Left = 1800
MouseIcon = "frmFine.frx":0E5D
MousePointer = 99 'Custom
Picture = "frmFine.frx":0FAF
Style = 1 'Graphical
TabIndex = 1
ToolTipText = "Move Next"
Top = 3165
UseMaskColor = -1 'True
Width = 345
End
Begin VB.CommandButton cmdLast
Appearance = 0 'Flat
Height = 345
Left = 2160
MouseIcon = "frmFine.frx":11BB
MousePointer = 99 'Custom
Picture = "frmFine.frx":130D
Style = 1 'Graphical
TabIndex = 0
ToolTipText = "Move Last"
Top = 3165
UseMaskColor = -1 'True
Width = 345
End
Begin MSDataGridLib.DataGrid Datagrid
Height = 2535
Left = 120
TabIndex = 5
ToolTipText = "All fine Information"
Top = 600
Width = 4455
_ExtentX = 7858
_ExtentY = 4471
_Version = 393216
AllowUpdate = 0 'False
BackColor = -2147483633
HeadLines = 1
RowHeight = 15
FormatLocked = -1 'True
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 4
BeginProperty Column00
DataField = "Memid"
Caption = "借书证号"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = "Bookid"
Caption = "书号"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column02
DataField = "Fine"
Caption = "罚款数额"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column03
DataField = "Areturndate"
Caption = "还书日期"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 1033
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
ColumnWidth = 824.882
EndProperty
BeginProperty Column01
ColumnWidth = 750.047
EndProperty
BeginProperty Column02
ColumnWidth = 1005.165
EndProperty
BeginProperty Column03
ColumnWidth = 1470.047
EndProperty
EndProperty
End
Begin VB.Label lbl_rec
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 240
TabIndex = 10
Top = 3600
Width = 855
End
Begin VB.Label lbl_total
BackStyle = 0 'Transparent
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1440
TabIndex = 9
Top = 3600
Width = 975
End
Begin VB.Image Image1
Height = 480
Left = 120
Top = 0
Width = 600
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "管理员能在""系统设置""删除罚款信息"
Height = 615
Left = 840
TabIndex = 8
Top = 45
Width = 3855
End
Begin VB.Label Label10
BackStyle = 0 'Transparent
Caption = "of"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1200
TabIndex = 7
Top = 3645
Width = 255
End
Begin VB.Label Label2
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "跳到归还处理"
Height = 255
Left = 3480
TabIndex = 6
Top = 3960
Width = 1095
End
End
Attribute VB_Name = "frmFine"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim str As String
Dim Fineconn As ADODB.Connection
Dim Finerecord As ADODB.Recordset
Private Sub cmd_back_Click()
Load frmReturn
frmReturn.Show
Unload Me
End Sub
Private Sub Form_Load()
On Error GoTo errlable
If (view = 1) Then
Me.Top = 50
Me.Left = 50
ElseIf (view = 2) Then
Me.Top = 700
Me.Left = (Screen.Width - Me.Width) / 2
End If
'Image1.Picture = mdi_start.ImageList1.ListImages(14).Picture
Set Fineconn = New ADODB.Connection
Fineconn.CursorLocation = adUseClient
Fineconn.ConnectionString = "DSN=library;UID=sa;PWD=;"
Fineconn.Open
str = "Select Memid,Bookid,Fine,Areturndate from Fine order by Memid"
Set Finerecord = New ADODB.Recordset
'Set Finerecord = exesql(str)
Finerecord.Open str, Fineconn, adOpenStatic, adLockOptimistic
Datagrid.Visible = True
Set Datagrid.DataSource = Finerecord
Datagrid.ReBind
Call locate
Exit Sub
errlable:
MsgBox Err.Number & Err.Description & Err.Source
End Sub
Private Sub cmdFirst_Click()
On Error GoTo GoFirstError
Finerecord.MoveFirst
Call locate
Exit Sub
GoFirstError:
MsgBox Err.Description
End Sub
Private Sub cmdLast_Click()
On Error GoTo GoLastError
Finerecord.MoveLast
Call locate
Exit Sub
GoLastError:
MsgBox Err.Description
End Sub
Private Sub cmdNext_Click()
On Error GoTo GoNextError
If Not Finerecord.EOF Then Finerecord.MoveNext
If Finerecord.EOF And Finerecord.RecordCount > 0 Then
Beep
'moved off the end so go back
Finerecord.MoveLast
End If
Call locate
Exit Sub
GoNextError:
MsgBox Err.Description
End Sub
Private Sub locate()
lbl_total.Caption = Finerecord.RecordCount
lbl_rec.Caption = Finerecord.AbsolutePosition
End Sub
Private Sub cmdPrevious_Click()
On Error GoTo GoPrevError
If Not Finerecord.BOF Then Finerecord.MovePrevious
If Finerecord.BOF And Finerecord.RecordCount > 0 Then
Beep
Finerecord.MovePrevious
End If
Call locate
Exit Sub
GoPrevError:
If Err.Number = 3021 Then
MsgBox ("这是第一条记录."), vbInformation, "第一条记录"
Finerecord.MoveNext
ElseIf Err.Number <> 0 Then
MsgBox Err.Number & Err.Description
End If
End Sub