?? punish.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 punish
BackColor = &H80000004&
Caption = "罰款記錄單"
ClientHeight = 6135
ClientLeft = 5310
ClientTop = 1410
ClientWidth = 6300
LinkTopic = "Form1"
ScaleHeight = 6135
ScaleWidth = 6300
Begin MSAdodcLib.Adodc Adodc2
Height = 375
Left = 3240
Top = 0
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_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 = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=圖書管理數據庫;Data Source=(local)"
OLEDBString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=圖書管理數據庫;Data Source=(local)"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select 圖書編號 from 罰款記錄表 "
Caption = "Adodc2"
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
_Version = 393216
End
Begin VB.CommandButton Command1
Caption = "取消罰款"
Height = 375
Left = 480
TabIndex = 1
Top = 5400
Width = 2055
End
Begin VB.CommandButton Command2
Caption = "返回"
Height = 375
Left = 3360
TabIndex = 2
Top = 5400
Width = 2055
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 960
Top = 0
Visible = 0 'False
Width = 1815
_ExtentX = 3201
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=圖書管理數據庫;Data Source=(local)"
OLEDBString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=圖書管理數據庫;Data Source=(local)"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "罰款記錄表"
Caption = "Adodc1"
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
_Version = 393216
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "punish.frx":0000
Height = 5055
Left = 0
TabIndex = 0
Top = 0
Width = 6255
_ExtentX = 11033
_ExtentY = 8916
_Version = 393216
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 = "圖書編號"
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
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
ColumnWidth = 1140.095
EndProperty
BeginProperty Column02
ColumnWidth = 1739.906
EndProperty
BeginProperty Column03
ColumnWidth = 915.024
EndProperty
EndProperty
End
End
Attribute VB_Name = "punish"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim str As String
Dim n As Integer
Private Sub Command1_Click()
If MsgBox("取消罰款嗎?", vbYesNo, "信息提示") = vbYes Then
str = "update 圖書借閱表 set 還書日期= getdate() where 圖書編號='" & Trim(DataGrid1.Text) & "'"
exesql (str)
str = "insert 圖書借閱歷史表 select * from 圖書借閱表 where 還書日期 is not null"
exesql (str)
str = "update 圖書基本信息表 set 是否在庫='1' where 圖書編號='" & Trim(DataGrid1.Text) & "'"
exesql (str)
str = "delete 圖書借閱表 where 圖書編號='" & Trim(DataGrid1.Text) & "'"
exesql (str)
str = "delete 催還通知單 where 圖書編號='" & Trim(DataGrid1.Text) & "'"
exesql (str)
Adodc1.Recordset.Delete
Adodc1.Refresh
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub DataGrid1_HeadClick(ByVal ColIndex As Integer)
If n = 0 Then
With Adodc1.Recordset
.Sort = .Fields(ColIndex).Name & " DESC"
End With
DataGrid1.Refresh
n = 1
Else
With Adodc1.Recordset
.Sort = .Fields(ColIndex).Name & " ASC"
End With
DataGrid1.Refresh
n = 0
End If
End Sub
Private Sub Form_Load()
n = 0
End Sub
Private Sub Form_Resize()
DataGrid1.Height = punish.Height - 1800
DataGrid1.Width = punish.Width
Command1.Top = punish.Height - 1200
Command2.Top = punish.Height - 1200
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -