📄 h_f1_tjspxx2.frm
字号:
TabIndex = 17
Top = 2160
Width = 840
End
Begin VB.Label Label4
AutoSize = -1 'True
BackColor = &H8000000B&
BackStyle = 0 'Transparent
Caption = "类型"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0045532B&
Height = 210
Left = 3960
TabIndex = 16
Top = 1200
Width = 420
End
Begin VB.Label Label3
AutoSize = -1 'True
BackColor = &H8000000B&
BackStyle = 0 'Transparent
Caption = "出版社"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0045532B&
Height = 210
Left = 360
TabIndex = 15
Top = 2520
Width = 630
End
Begin VB.Label Label2
AutoSize = -1 'True
BackColor = &H8000000B&
BackStyle = 0 'Transparent
Caption = "作者"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0045532B&
Height = 210
Left = 480
TabIndex = 14
Top = 1920
Width = 420
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H8000000B&
BackStyle = 0 'Transparent
Caption = "书籍名称"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0045532B&
Height = 210
Left = 120
TabIndex = 13
Top = 1320
Width = 840
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 4920
Top = 5520
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= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
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 MSAdodcLib.Adodc Adodc2
Height = 330
Left = 4080
Top = 5520
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= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc2"
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
End
Attribute VB_Name = "f1_tjxxx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Call Form_Load
End Sub
Private Sub Command2_Click()
If Text1 = "" Then
msg0 = MsgBox("请填写书名?", vbOKOnly + vbQuestion, "询问")
If msg0 = vbOK Then
Text1.SetFocus: Exit Sub
End If
End If
If Text2 = "" Then
msg0 = MsgBox("请填写作者?", vbOKOnly + vbQuestion, "询问")
If msg0 = vbOK Then
Text2.SetFocus: Exit Sub
End If
End If
If Text3 = "" Then
msg0 = MsgBox("请填写出版社?", vbOKOnly + vbQuestion, "询问")
If msg0 = vbOK Then
Text3.SetFocus: Exit Sub
End If
End If
If Text6 = "" Then
msg0 = MsgBox("请填写最高价格?", vbOKOnly + vbQuestion, "询问")
If msg0 = vbOK Then
Text6.SetFocus: Exit Sub
End If
End If
If Combo1.Text <> ("计算机") And Combo1.Text <> ("经济") And Combo1.Text <> ("数学") And Combo1.Text <> ("外语") And Combo1.Text <> ("文学") And Combo1.Text <> ("其他") Then
MsgBox "类型选择有误!", vbOKOnly, "提示"
Combo1 = "计算机"
Combo1.SetFocus: Exit Sub
End If
nr = Text6
For l = 1 To Len(nr)
le = Mid(nr, l, 1)
If Not (Asc(le) = 46 Or (Asc(le) >= 48 And Asc(le) <= 57)) Then
MsgBox "价钱输入有误!", vbOKOnly, "提示"
Text6 = ""
Text6.SetFocus: Exit Sub
End If
Next l
'If Adodc1.Recordset.RecordCount = 0 Then
'temp = 0
'Else
'Adodc1.Recordset.MoveLast
'temp = Adodc1.Recordset.Fields("wanted_book_ID")
'End If
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("name") = Text1.Text 'ok
Adodc1.Recordset.Fields("publisher") = Text3.Text 'ok
Adodc1.Recordset.Fields("author") = Text2.Text 'ok
If Text5 = "" Then
Adodc1.Recordset.Fields("description") = "这家伙很懒,什么也没写"
Else
Adodc1.Recordset.Fields("description") = Text5.Text
End If 'ok
If Text4 = "" Then
Adodc1.Recordset.Fields("theme") = "这家伙很懒,什么也没写"
Else
Adodc1.Recordset.Fields("theme") = Text4.Text
End If 'ok
Adodc1.Recordset.Fields("kind") = Combo1 'ok
Adodc1.Recordset.Fields("highest_price") = Text6.Text 'ok
Adodc1.Recordset.Fields("user_ID") = yhid
Adodc1.Recordset.Fields("user_credit") = 100 ' 有问题
Adodc1.Recordset.Fields("release_time") = Date + 1
Adodc1.Recordset.Fields("time_limit") = Date + 1 '有问题
Adodc1.Recordset.Fields("handled") = 0
Adodc1.Recordset.Fields("dealed") = 0
If Option1 = True Then
Adodc1.Recordset.Fields("clfs") = 0
Else
Adodc1.Recordset.Fields("clfs") = 1
End If
Adodc1.Recordset.Update
Adodc1.Refresh
Adodc1.Recordset.MoveLast
Text7 = Adodc1.Recordset.Fields("idz")
Adodc1.Recordset.Fields("supplied_book_ID") = Text7.Text
Adodc1.Recordset.Update
Adodc1.Refresh
MsgBox "提交成功,欢迎下次使用", , "结果"
Call Form_Load
Text1.SetFocus
End Sub
Private Sub Command3_Click()
main.Enabled = True
main.Show
Unload Me
End Sub
Private Sub Form_Load()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text6 = ""
Combo1 = "选择书籍类型"
Option1 = True
Adodc1.ConnectionString = cns1 & App.Path & cns2
Adodc1.RecordSource = "select * from wanb"
Adodc1.Refresh
'Adodc1.Recordset.MoveLast
'temp2 = Adodc1.Recordset.Fields("wanted_book_ID") + 1
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -