📄 fborrowadd.frm
字号:
VERSION 5.00
Begin VB.Form fborrowmodify
Caption = "Form1"
ClientHeight = 4920
ClientLeft = 60
ClientTop = 345
ClientWidth = 6285
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 4920
ScaleWidth = 6285
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 4320
TabIndex = 11
Top = 2760
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 495
Left = 4320
TabIndex = 10
Top = 1440
Width = 1215
End
Begin VB.TextBox Treturntime
Height = 495
Left = 2280
TabIndex = 9
Top = 3840
Width = 1215
End
Begin VB.TextBox Treaderid
Height = 495
Left = 2280
TabIndex = 7
Top = 2970
Width = 1215
End
Begin VB.TextBox Tbookid
Height = 495
Left = 2280
TabIndex = 6
Top = 2100
Width = 1215
End
Begin VB.TextBox Tborrowtime
Height = 495
Left = 2280
TabIndex = 5
Top = 1230
Width = 1215
End
Begin VB.TextBox Tborrowid
Height = 495
Left = 2280
TabIndex = 4
Top = 360
Width = 1215
End
Begin VB.Label Label7
Caption = "还书日期:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 480
TabIndex = 8
Top = 3840
Width = 1215
End
Begin VB.Label Label6
Caption = "读者编号:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 480
TabIndex = 3
Top = 2970
Width = 1215
End
Begin VB.Label Label3
Caption = "书目编号:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 480
TabIndex = 2
Top = 2100
Width = 1215
End
Begin VB.Label Label2
Caption = "借书时间:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 480
TabIndex = 1
Top = 1230
Width = 1215
End
Begin VB.Label Label1
Caption = "借书编号:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 480
TabIndex = 0
Top = 360
Width = 1215
End
End
Attribute VB_Name = "fborrowmodify"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public isadd As Boolean
Private Sub Text6_Change()
End Sub
Private Sub Command1_Click()
Dim strsql As String
If isadd Then
strsql = "insert into borrow(borrowid,borrowtime,bookid,readerid,returntime) values('" & Trim(Tborrowid) & "','" & Trim(Tborrowtime) & "','" & Trim(Tbookid) & "','" & Trim(Treaderid) & "','" & Trim(Treturntime) & "')"
If runsql(strsql) = True Then
Dim lstitem As ListItem
strsql = "select * from borrow where borrowid='" & Tborrowid.Text & "'"
runsql (strsql)
Set lstitem = fborrowcheck.lvw3.ListItems.add(, "k_" & Tborrowid.Text, Tborrowid.Text)
lstitem.SubItems(1) = rct.Fields("borrowtime").Value
lstitem.SubItems(2) = rct.Fields("bookid").Value
lstitem.SubItems(3) = rct.Fields("readerid").Value
lstitem.SubItems(4) = rct.Fields("returntime").Value
lstitem.Tag = CStr(rct.Fields("borrowid").Value)
Unload Me
End If
Else
strsql = "update borrow set borrowid='" & Trim(Tborrowid) & "',borrowtime='" & Trim(Tborrowtime) & "',bookid='" & Trim(Tbookid) & "',readerid='" & Trim(Treaderid) & "',returntime='" & Trim(Treturntime) & "' where borrowid= '" & Trim(Tborrowid) & "'"
If runsql(strsql) = True Then
strsql = "select * from borrow where borrowid='" & Tborrowid.Text & "'"
runsql (strsql)
fborrowcheck.lvw3.SelectedItem.Text = Trim(Tborrowid)
fborrowcheck.lvw3.SelectedItem.SubItems(1) = Trim(Tborrowtime)
fborrowcheck.lvw3.SelectedItem.SubItems(2) = Trim(Tbookid)
fborrowcheck.lvw3.SelectedItem.SubItems(3) = Trim(Treaderid)
fborrowcheck.lvw3.SelectedItem.SubItems(4) = Trim(Treturntime)
Unload Me
End If
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
If isadd Then
Me.Caption = "增加借书记录"
Else
Me.Caption = "修改借书记录"
End If
Tborrowtime.Text = Data
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -