📄 menu11.frm
字号:
Top = 1800
Width = 735
End
Begin VB.Label xttime
BackStyle = 0 'Transparent
Caption = "系统日期"
Height = 255
Left = 240
TabIndex = 15
Top = 1080
Width = 2895
End
Begin VB.Label Label40
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "期限"
Height = 180
Left = 8520
TabIndex = 14
Top = 2280
Width = 360
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "流水号:"
Height = 255
Left = 8880
TabIndex = 13
Top = 1080
Width = 735
End
Begin VB.Label lalsh
AutoSize = -1 'True
BackStyle = 0 'Transparent
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 9720
TabIndex = 12
Top = 1080
Width = 1800
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "证件"
Height = 255
Left = 5880
TabIndex = 11
Top = 1800
Width = 975
End
End
End
Attribute VB_Name = "winmenu11"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim whattodo As String '判定执行的是毛重还是皮重
Private Sub bgclear()
Do While bg.Rows - 1 > 1
bg.RemoveItem (1)
Loop
bg.Row = 1
bg.Col = 0: bg.Text = ""
bg.Col = 1: bg.Text = ""
bg.Col = 2: bg.Text = ""
bg.Col = 3: bg.Text = ""
bg.Col = 4: bg.Text = ""
bg.Col = 5: bg.Text = ""
bg.Col = 6: bg.Text = ""
bg.Col = 7: bg.Text = ""
bg.Col = 8: bg.Text = ""
End Sub
Private Sub intobg()
Do Until tab3.EOF
b0 = tab3("bh")
b1 = tab3("bookname")
b2 = tab3("name")
b3 = tab3("dw")
b4 = tab3("zjlb")
b5 = tab3("zjhm")
b6 = tab3("pay")
b7 = tab3("howtime")
b8 = tab3("endyn")
bg.Row = 1
bg.Col = 0
If bg.Text = "" Then
bg.Row = 1
bg.Col = 0: bg.Text = b0
bg.Col = 1: bg.Text = b1
bg.Col = 2: bg.Text = b2
bg.Col = 3: bg.Text = b3
bg.Col = 4: bg.Text = b4
bg.Col = 5: bg.Text = b5
bg.Col = 6: bg.Text = b6
bg.Col = 7: bg.Text = b7
bg.Col = 8: bg.Text = b8
Else
bg.AddItem (b0 & vbTab & b1 & vbTab & b2 & vbTab & b3 & vbTab & b4 & vbTab & b5 & vbTab & b6 & vbTab & b7 & vbTab & b8)
End If
tab3.MoveNext
Loop
End Sub
Private Sub lrok()
tedw.Locked = False
tename.Locked = False
cozjlb.Locked = False
tezjhm.Locked = False
tebookbh.Locked = False
cobookname.Locked = False
copay.Locked = False
cohowtime.Locked = False
teremark.Locked = False
End Sub
Private Sub lrcancel()
'设定可录入的TEXT框为不可用
tedw.Locked = True
tedw = ""
tename.Locked = True
tename = ""
cozjlb.Locked = True
cozjlb = ""
tezjhm.Locked = True
tezjhm = ""
tebookbh.Locked = True
tebookbh = ""
cobookname.Locked = True
cobookname = ""
copay.Locked = True
copay = ""
cohowtime.Locked = True
cohowtime = ""
teremark.Locked = True
teremark = ""
lalsh = ""
End Sub
Private Sub coadd_Click()
whattodo = "add"
lrok
coadd.Enabled = False
comodi.Enabled = False
cocancel.Enabled = True
cosave.Enabled = True
Set tab1 = data2.OpenRecordset("select * from cuku order by val(bh) ")
If tab1.EOF Then
lalsh.Caption = "1"
Else
tab1.MoveLast
lalsh.Caption = Val(tab1("bh")) + 1
End If
tename.SetFocus
End Sub
Private Sub cocancel_Click()
coadd.Enabled = True
comodi.Enabled = True
cocancel.Enabled = False
cosave.Enabled = False
lrcancel
End Sub
Private Sub comodi_Click()
Set tab1 = data2.OpenRecordset("select * from cuku order by val(bh)")
If tab1.EOF Then MsgBox "库中无数据,请首先作录入!": Exit Sub
sta:
s1 = mainboot.Left + 2200
s2 = mainboot.Top + 3800
ss = InputBox("请输入要进行还书的流水编号:", "修改", , s1, s2)
If ss = "" Then Exit Sub
Set tab1 = data2.OpenRecordset("select * from cuku where bh='" + ss + "'")
If tab1.EOF Then
YesNo = MsgBox("无此流水编号,是否继续进行录入?", vbYesNo + vbQuestion, "图书管理系统")
If YesNo = vbYes Then
GoTo sta:
Exit Sub
Else
Exit Sub
End If
Else
tedw = tab1("dw")
tename = tab1("name")
cozjlb = tab1("zjlb")
tezjhm = tab1("zjhm")
tebookbh = tab1("bookbh")
cobookname = tab1("bookname")
copay = tab1("pay")
cohowtime = tab1("howtime")
tebh = tab1("bh")
teremark = tab1("remark")
End If
ss1 = MsgBox("请问此书确认已经还了吗:", vbQuestion + vbYesNo, "还书")
If ss1 = vbYes Then
data2.Execute "update cuku set endyn='已还' where bh ='" + ss + "'"
End If
lrcancel
End Sub
Private Sub coquit_Click()
Unload Me
End Sub
Private Sub cosave_Click()
If Trim(cobookname) = "" Then
MsgBox "对不起,书名不能为空!", vbExclamation + vbOKOnly, "图书管理系统"
tename.SetFocus
Exit Sub
End If
If Trim(tename) = "" Then
MsgBox "对不起,借书人姓名不能为空!", vbExclamation + vbOKOnly, "图书管理系统"
tename.SetFocus
Exit Sub
End If
If tedw = "" Then tedw = " "
If cozjlb = "" Then cozjlb = " "
If tezjhm = "" Then tezjhm = " "
If tenumber = "" Then tenumber = " "
If tebookbh = "" Then tebookbh = " "
If tepay = "" Then tepay = " "
If cohowtime = "" Then cohowtime = " "
If teremark = "" Then teremark = " "
If tecbrq = "" Then tecbrq = " "
data2.Execute "insert into cuku (dw,name,zjlb,zjhm,bookbh,bookname,pay,howtime,remark,bh,rq,time1,czy,endyn) values ('" + tedw + "','" + tename + "','" + cozjlb + "','" + tezjhm + "','" + tebookbh + "','" + cobookname + "','" + copay + "','" + cohowtime + "','" + teremark + "','" + lalsh + " ','" + Date$ + "','" + Time$ + "','" + teczy + "','未还' ) "
lrcancel
coadd.Enabled = True
comodi.Enabled = True
cocancel.Enabled = False
cosave.Enabled = False
End Sub
Private Sub Form_Load()
Set myname = data1.OpenRecordset("table1")
Me.Caption = myname("mainame") + "图书管理系统"
Frame1.Visible = True
Me.Left = 0
Me.Top = 0
Me.Width = 12120 - 190 '9540
Me.Height = 8700 - 750 '6144
Frame1.Left = 0
Frame1.Top = 0
Frame1.Width = 12120 - 190
Frame1.Height = 8700 - 450
xttime.Caption = Str$(Year(DateValue(Date$))) + "年" + Str$(Month(DateValue(Date$))) + "月" + Str$(Day(DateValue(Date$))) + "日" + Str$(Hour(Time())) + "时" + Str$(Minute(Time())) + "分" + Str$(Second(Time())) + "秒"
Set tab3 = data2.OpenRecordset("select * from cuku order by val(bh)")
If Not tab3.EOF Then intobg
Set tab2 = data1.OpenRecordset("QXK")
teczy.Text = tab2.Fields("cjyxm")
cozjlb.Clear '车型
Set tab1 = data1.OpenRecordset("zjlb")
Do Until tab1.EOF
cozjlb.AddItem tab1("zjlb")
tab1.MoveNext
Loop
cobookname.Clear '车型
Set tab1 = data2.OpenRecordset("ruku")
Do Until tab1.EOF
cobookname.AddItem tab1("name")
tab1.MoveNext
Loop
copay.AddItem "100"
copay.AddItem "200"
copay.AddItem "300"
copay.AddItem "400"
cohowtime.AddItem "一个月"
cohowtime.AddItem "两个月"
cohowtime.AddItem "三个月"
cohowtime.AddItem "四个月"
cohowtime.AddItem "六个月"
cohowtime.AddItem "一年"
cohowtime.AddItem "不限时"
coadd.Enabled = True
comodi.Enabled = True
cocancel.Enabled = False
cosave.Enabled = False
lrcancel
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
mainboot.Picture1.Visible = True
End Sub
Private Sub Timer1_Timer()
xttime.Caption = Str$(Year(DateValue(Date$))) + "年" + Str$(Month(DateValue(Date$))) + "月" + Str$(Day(DateValue(Date$))) + "日" + Str$(Hour(Time())) + "时" + Str$(Minute(Time())) + "分" + Str$(Second(Time())) + "秒"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -