?? frmmodifyequipment.frm
字號(hào):
VERSION 5.00
Begin VB.Form frmModifyEquipment
BorderStyle = 1 'Fixed Single
Caption = "編輯物業(yè)設(shè)備信息"
ClientHeight = 6060
ClientLeft = 45
ClientTop = 330
ClientWidth = 8010
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 6060
ScaleWidth = 8010
Begin VB.Frame Frame1
Caption = "編輯物業(yè)設(shè)備信息"
Height = 2055
Left = 120
TabIndex = 10
Top = 240
Width = 7695
Begin VB.TextBox txtEquipmentName
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 1560
TabIndex = 13
Top = 480
Width = 2175
End
Begin VB.TextBox txtEquipmentValue
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 372
Left = 5160
TabIndex = 12
Top = 480
Width = 2295
End
Begin VB.TextBox txtComment
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 1560
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 11
Top = 1110
Width = 5895
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "設(shè)備名稱(chēng):"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 240
TabIndex = 16
Top = 510
Width = 1305
End
Begin VB.Label Label2
Alignment = 2 'Center
Caption = "價(jià)值:"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3840
TabIndex = 15
Top = 510
Width = 1095
End
Begin VB.Label Label9
Alignment = 2 'Center
Caption = "備注:"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 14
Top = 1110
Width = 1095
End
End
Begin VB.Frame Frame3
Caption = "修改物業(yè)設(shè)備信息"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1092
Left = 120
TabIndex = 5
Top = 4200
Width = 7695
Begin VB.CommandButton editCommand
Caption = "修改記錄"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 270
TabIndex = 9
Top = 390
Width = 1350
End
Begin VB.CommandButton updateCommand
Caption = "保存記錄"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 2160
TabIndex = 8
Top = 360
Width = 1455
End
Begin VB.CommandButton cancelCommand
Caption = "關(guān)閉退出"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 5880
TabIndex = 7
Top = 360
Width = 1575
End
Begin VB.CommandButton deleteCommand
Caption = "刪除記錄"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 3960
TabIndex = 6
Top = 360
Width = 1440
End
End
Begin VB.Frame Frame2
Caption = "查看物業(yè)設(shè)備信息"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1092
Left = 120
TabIndex = 0
Top = 2520
Width = 7695
Begin VB.CommandButton firstCommand
Caption = "第一條記錄"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 240
TabIndex = 4
Top = 360
Width = 1452
End
Begin VB.CommandButton previousCommand
Caption = "上一條記錄"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 2080
TabIndex = 3
Top = 360
Width = 1452
End
Begin VB.CommandButton nextCommand
Caption = "下一條記錄"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 3920
TabIndex = 2
Top = 360
Width = 1452
End
Begin VB.CommandButton lastCommand
Caption = "最后一條記錄"
BeginProperty Font
Name = "宋體"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 492
Left = 5760
TabIndex = 1
Top = 360
Width = 1692
End
End
End
Attribute VB_Name = "frmModifyEquipment"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim tempEqipment As clsEquipment
Private Sub cancelCommand_Click()
Unload Me
End Sub
Private Sub deleteCommand_Click()
tempEqipment.DelRecord
End Sub
Private Sub editCommand_Click()
tempEqipment.EditRecord
Frame2.Enabled = False
firstCommand.Enabled = False
previousCommand.Enabled = False
nextCommand.Enabled = False
lastCommand.Enabled = False
txtEquipmentName.Enabled = True
txtEquipmentValue.Enabled = True
txtComment.Enabled = True
End Sub
Private Sub firstCommand_Click()
tempEqipment.mrc.MoveFirst
Call viewData
End Sub
Private Sub Form_Load()
Set tempEqipment = New clsEquipment
tempEqipment.LoadRecord
Frame2.Enabled = False
firstCommand.Enabled = False
previousCommand.Enabled = False
nextCommand.Enabled = False
lastCommand.Enabled = False
txtEquipmentName.Enabled = False
txtEquipmentValue.Enabled = False
txtComment.Enabled = False
End Sub
Public Sub viewData()
txtEquipmentName.Text = tempEqipment.mrc.Fields(1)
txtEquipmentValue.Text = tempEqipment.mrc.Fields(2)
txtComment.Text = tempEqipment.mrc.Fields(3)
End Sub
Private Sub lastCommand_Click()
tempEqipment.mrc.MoveLast
Call viewData
End Sub
Private Sub nextCommand_Click()
tempEqipment.mrc.MoveNext
If tempEqipment.mrc.EOF Then
tempEqipment.mrc.MoveFirst
End If
Call viewData
End Sub
Private Sub previousCommand_Click()
tempEqipment.mrc.MovePrevious
If tempEqipment.mrc.BOF Then
tempEqipment.mrc.MoveLast
End If
Call viewData
End Sub
Private Sub updateCommand_Click()
Dim txtSQL As String
Dim MsgText As String
Dim mrcc As ADODB.Recordset
If tempEqipment.mcclean Then
MsgBox "請(qǐng)先修物業(yè)設(shè)備資料信息", vbOKOnly + vbExclamation, "警告"
Exit Sub
End If
If Not Testtxt(txtEquipmentName.Text) Then
MsgBox "請(qǐng)輸入設(shè)備名稱(chēng)!", vbOKOnly + vbExclamation, "警告"
txtEquipmentName.SetFocus
Exit Sub
End If
If Not IsNumeric(txtEquipmentValue.Text) Then
MsgBox "請(qǐng)輸入設(shè)備價(jià)值!", vbOKOnly + vbExclamation, "警告"
txtEquipmentValue.SetFocus
Exit Sub
End If
tempEqipment.Update Me.txtEquipmentName.Text, Me.txtEquipmentValue.Text, Me.txtComment.Text
Call viewData
Frame2.Enabled = True
firstCommand.Enabled = True
previousCommand.Enabled = True
nextCommand.Enabled = True
lastCommand.Enabled = True
txtEquipmentName.Enabled = False
txtEquipmentValue.Enabled = False
tempEqipment.mcclean = True
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -