【VB开源代码栏目提醒】:网学会员,鉴于大家对VB开源代码十分关注,论文会员在此为大家搜集整理了“device_borrow.frm”一文,供大家参考学习!
VERSION 5.00
Begin VB.Form device_borrow
Caption = "设备借出与归还"
ClientHeight = 6210
ClientLeft = 60
ClientTop = 345
ClientWidth = 8475
LinkTopic = "Form1"
ScaleHeight = 6210
ScaleWidth = 8475
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command4
Caption = "取消"
Height = 495
Left = 5520
TabIndex = 27
Top = 5400
Width = 1095
End
Begin VB.CommandButton Command3
Caption = "归还"
Height = 495
Left = 3720
TabIndex = 26
Top = 5400
Width = 1095
End
Begin VB.TextBox Text10
Height = 375
Left = 6120
TabIndex = 3
Top = 4560
Width = 1455
End
Begin VB.ComboBox Combo1
Height = 300
Left = 1920
TabIndex = 2
Text = "Combo1"
Top = 4560
Width = 2175
End
Begin VB.CommandButton Command2
Caption = "借出"
Height = 495
Left = 1800
TabIndex = 23
Top = 5400
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确认"
Height = 375
Left = 6240
TabIndex = 1
Top = 240
Width = 975
End
Begin VB.TextBox Text9
Enabled = 0 'False
Height = 375
Left = 1920
TabIndex = 22
Top = 1920
Width = 2295
End
Begin VB.TextBox Text6
Enabled = 0 'False
Height = 375
Left = 1920
TabIndex = 21
Top = 1440
Width = 2295
End
Begin VB.TextBox Text1
Height = 375
Left = 3360
TabIndex = 0
Top = 240
Width = 2295
End
Begin VB.TextBox Text2
Enabled = 0 'False
Height = 375
Left = 1920
TabIndex = 9
Top = 2520
Width = 1095
End
Begin VB.TextBox Text3
Enabled = 0 'False
Height = 375
Left = 1920
TabIndex = 8
Top = 840
Width = 2295
End
Begin VB.TextBox Text4
Enabled = 0 'False
Height = 375
Left = 5760
TabIndex = 7
Top = 2520
Width = 1815
End
Begin VB.TextBox Text5
Enabled = 0 'False
Height = 375
Left = 1920
TabIndex = 6
Top = 3120
Width = 2175
End
Begin VB.TextBox Text8
Enabled = 0 'False
Height = 375
Left = 5880
TabIndex = 5
Top = 840
Width = 1695
End
Begin VB.TextBox Text7
Enabled = 0 'False
Height = 375
Left = 1920
TabIndex = 4
Top = 3840
Width = 2175
End
Begin VB.Label Label13
Caption = "经手人:"
Height = 375
Left = 4920
TabIndex = 25
Top = 4560
Width = 975
End
Begin VB.Label Label12
Caption = "借出系部:"
Height = 375
Left = 600
TabIndex = 24
Top = 4560
Width = 1095
End
Begin VB.Label Label11
ForeColor = &H000000FF&
Height = 375
Left = 6600
TabIndex = 20
Top = 3840
Width = 735
End
Begin VB.Label Label7
Caption = "目前状态:"
Height = 375
Left = 4800
TabIndex = 19
Top = 3840
Width = 1575
End
Begin VB.Label Label2
Caption = "类别:"
Height = 375
Left = 600
TabIndex = 18
Top = 1440
Width = 1215
End
Begin VB.Label Label1
Caption = "设备编号:"
Height = 375
Left = 2040
TabIndex = 17
Top = 240
Width = 1095
End
Begin VB.Label Label3
Caption = "名称"
Height = 375
Left = 600
TabIndex = 16
Top = 840
Width = 1095
End
Begin VB.Label Label4
Caption = "折旧率:"
Height = 375
Left = 600
TabIndex = 15
Top = 2640
Width = 855
End
Begin VB.Label Label5
Caption = "购买日期:"
Height = 375
Left = 600
TabIndex = 14
Top = 3240
Width = 1095
End
Begin VB.Label Label6
Caption = "价格:"
Height = 375
Left = 5040
TabIndex = 13
Top = 2520
Width = 1095
End
Begin VB.Label Label9
Caption = "型号:"
Height = 375
Left = 5040
TabIndex = 12
Top = 840
Width = 1095
End
Begin VB.Label Label10
Caption = "所属系部:"
Height = 375
Left = 600
TabIndex = 11
Top = 2040
Width = 1215
End
Begin VB.Label Label8
Caption = "进库日期:"
Height = 375
Left = 600
TabIndex = 10
Top = 3840
Width = 1095
End
End
Attribute VB_Name = "device_borrow"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " & App.Path & "\file.mdb;Persist Security Info=False"
sql = "select * from info_device where dno='" & Text1.Text & "'"
rs.Open sql, cn, 1, 1
If rs.EOF = True Then
MsgBox "没有找到该设备编号"
Else
Text3.Text = rs("dname")
Text8.Text = rs("dmodule")
Text6.Text = rs("dtype")
Text9.Text = rs("ddept")
Text2.Text = rs("dzj")
Text4.Text = rs("dprice")
Text5.Text = rs("dbdate")
Text7.Text = rs("ddate")
If rs("dflag") = 1 Then
Label11.Caption = "在库"
Command2.Enabled = True
Command3.Enabled = False
Combo1.Text = ""
Text10.Text = ""
Combo1.SetFocus
Else
rs.Close
Label11.Caption = "不在库"
Command2.Enabled = False
Command3.Enabled = True
sql = "select * from borrow where dno='" & Text1.Text & "'"
rs.Open sql, cn, 1, 1
Combo1.Text = rs("ddept")
Text10.Text = rs("doperator")
Combo1.Enabled = False
Text10.Enabled = False
End If
End If
End Sub
Private Sub Command2_Click()
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
If (Combo1.Text = "" Or Text10.Text = "") Then
MsgBox "请输入借出单位信息"
Else
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\file.mdb;Persist Security Info=False"
sql = "select * from borrow"
rs.Open sql, cn, 3, 2
rs.AddNew
rs("dno") = Trim(Text1.Text)
rs("dname") = Trim(Text
上一篇:
CtrlAnimateDlg.cpp
下一篇:
群体性突发事件论文:“边界冲突”:农村群体性事件的县域分析