📄 违章租借纪录.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 违章租借纪录
Caption = "违章租借纪录"
ClientHeight = 4140
ClientLeft = 4935
ClientTop = 4860
ClientWidth = 7095
LinkTopic = "Form2"
ScaleHeight = 4140
ScaleWidth = 7095
Begin VB.TextBox Tmax_days
Height = 375
Left = 840
TabIndex = 2
Top = 3000
Visible = 0 'False
Width = 615
End
Begin VB.CommandButton 退出
Caption = "退出"
Height = 495
Left = 5040
TabIndex = 1
Top = 3600
Width = 1215
End
Begin MSAdodcLib.Adodc Adodc1
Height = 450
Left = 2160
Top = 3000
Visible = 0 'False
Width = 2055
_ExtentX = 3625
_ExtentY = 794
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=project"
OLEDBString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=project"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select Bar_code, Break_type, Mem_type, Card_ID, AdminID, Break_money from Break_Info"
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 = "违章租借纪录.frx":0000
Height = 3375
Left = 120
TabIndex = 0
Top = 120
Width = 6855
_ExtentX = 12091
_ExtentY = 5953
_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 = 6
BeginProperty Column00
DataField = "Bar_code"
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 = "Break_type"
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 = "Mem_type"
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 = "Card_ID"
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 = "AdminID"
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 = "Break_money"
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 = 1230.236
EndProperty
BeginProperty Column01
ColumnWidth = 1094.74
EndProperty
BeginProperty Column02
ColumnWidth = 989.858
EndProperty
BeginProperty Column03
ColumnWidth = 1140.095
EndProperty
BeginProperty Column04
ColumnWidth = 1035.213
EndProperty
BeginProperty Column05
ColumnWidth = 1049.953
EndProperty
EndProperty
End
End
Attribute VB_Name = "违章租借纪录"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private cnRecordSet As ADODB.Recordset
Private Sub Form_Load()
Dim sql As String
Dim sqlsel As String
Dim sqlup As String
Dim sqlinsert As String
Dim Bar_code As String
Dim CD_money As String
Dim Card_ID As String
Dim Mem_type As String
sql = "select * from Borrow_Info where getdate() - MustReturn_date > 30"
Set cnRecordSet = Form1.cnTest.Execute(sql)
If cnRecordSet.EOF = True Then
Exit Sub
End If
Bar_code = cnRecordSet.Fields(0).Value
Card_ID = cnRecordSet.Fields(5).Value
sqlsel = "select CD_money from CD_inInfo where Bar_code = '" + Bar_code + "'"
Set cnRecordSet = Form1.cnTest.Execute(sqlsel)
CD_money = cnRecordSet.Fields(0).Value
TMax_days.Text = Form1.Max_days
If Card_ID <> "" Then
sqlup = "update Member_dynamic_Info set Card_money = Card_money - '" + CD_money + "',Overdays = Overdays + 30 where Card_ID = '" + Card_ID + "'"
Set cnRecordSet = Form1.cnTest.Execute(sqlup)
sqlsel = "select Mem_type from Member_dynamic_Info where Card_ID = '" + Card_ID + "'"
Set cnRecordSet = Form1.cnTest.Execute(sqlsel)
Mem_type = cnRecordSet.Fields(0).Value
sqlinsert = "Insert into Break_Info values('" + Bar_code + "','" + Card_ID + "','" + TMax_days.Text + "','损坏或丢失','" + Form1.AdminID + "','" + Mem_type + "','" + CD_money + "')"
Set cnRecordSet = Form1.cnTest.Execute(sqlinsert)
sqlup = "update CD_Info set CD_state = '损坏或丢失' where Bar_code = '" + Bar_code + "'"
Set cnRecordSet = Form1.cnTest.Execute(sqlup)
sqlup = "update Borrow_Info set Return_bool = '归还' where Bar_code = '" + Bar_code + "'"
Set cnRecordSet = Form1.cnTest.Execute(sqlup)
Else
sqlinsert = "Insert into Break_Info values('" + Bar_code + "','','" + TMax_days.Text + "','损坏或丢失','" + Form1.AdminID + "','非会员'," + CD_money + "'"
Set cnRecordSet = Form1.cnTest.Execute(sqlinsert)
sqlup = "update CD_Info set CD_state = '损坏或丢失' where Bar_code = '" + Bar_code + "'"
Set cnRecordSet = Form1.cnTest.Execute(sqlup)
sqlup = "update Borrow_Info set Return_bool = '归还' where Bar_code = '" + Bar_code + "'"
Set cnRecordSet = Form1.cnTest.Execute(sqlup)
End If
End Sub
Private Sub 退出_Click()
Unload 违章租借纪录
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -