📄 frmrepairedit.frm
字号:
VERSION 5.00
Begin VB.Form FrmRepairEdit
BorderStyle = 1 'Fixed Single
Caption = "编辑住户报修信息"
ClientHeight = 4035
ClientLeft = 45
ClientTop = 330
ClientWidth = 5415
Icon = "FrmRepairEdit.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4035
ScaleWidth = 5415
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame2
Height = 1815
Left = 240
TabIndex = 16
Top = 1320
Width = 4935
Begin VB.TextBox txtMaterial
Height = 270
Left = 3720
MaxLength = 20
TabIndex = 5
Top = 1440
Width = 1095
End
Begin VB.TextBox txtRepairEmp
Height = 270
Left = 1200
MaxLength = 20
TabIndex = 2
Top = 1035
Width = 1095
End
Begin VB.TextBox txtRecordDate
Height = 270
Left = 1200
MaxLength = 10
TabIndex = 1
Top = 640
Width = 1095
End
Begin VB.TextBox txtItem
Height = 270
Left = 1200
MaxLength = 20
TabIndex = 0
Top = 240
Width = 3615
End
Begin VB.TextBox txtFinishDate
Height = 270
Left = 3720
MaxLength = 10
TabIndex = 3
Top = 1040
Width = 1095
End
Begin VB.TextBox txtService
Height = 270
Left = 1200
MaxLength = 20
TabIndex = 4
Top = 1440
Width = 1095
End
Begin VB.Label Label9
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "材料费"
Height = 180
Left = 2760
TabIndex = 22
Top = 1485
Width = 540
End
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "维修人员"
Height = 180
Left = 240
TabIndex = 21
Top = 1080
Width = 720
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "报修日期"
Height = 180
Left = 240
TabIndex = 20
Top = 690
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "报修项目"
Height = 180
Left = 240
TabIndex = 19
Top = 285
Width = 720
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "维修日期"
Height = 180
Left = 2760
TabIndex = 18
Top = 1080
Width = 720
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "服务费"
Height = 180
Left = 240
TabIndex = 17
Top = 1485
Width = 540
End
End
Begin VB.CommandButton Cmd_Cancel
Cancel = -1 'True
Caption = "取 消"
Height = 400
Left = 3150
MouseIcon = "FrmRepairEdit.frx":0CCA
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 7
Top = 3360
Width = 1300
End
Begin VB.CommandButton Cmd_OK
Caption = "确 定"
Height = 400
Left = 990
MouseIcon = "FrmRepairEdit.frx":0FD4
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 6
Top = 3360
Width = 1300
End
Begin VB.Frame Frame1
Height = 975
Left = 240
TabIndex = 8
Top = 240
Width = 4935
Begin VB.CommandButton Cmd_RoomSel
Caption = "选择房间"
Height = 285
Left = 3720
MouseIcon = "FrmRepairEdit.frx":12DE
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 12
Top = 240
Width = 1065
End
Begin VB.TextBox txtBuilding
Enabled = 0 'False
Height = 270
Left = 1200
MaxLength = 20
TabIndex = 11
Top = 195
Width = 1095
End
Begin VB.TextBox txtUnit
Enabled = 0 'False
Height = 270
Left = 1200
MaxLength = 20
TabIndex = 10
Top = 605
Width = 1095
End
Begin VB.TextBox txtRoom
Enabled = 0 'False
Height = 270
Left = 3720
MaxLength = 20
TabIndex = 9
Top = 605
Width = 1095
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "楼房单元"
Height = 180
Left = 240
TabIndex = 15
Top = 650
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "楼房编号"
Height = 180
Left = 240
TabIndex = 14
Top = 240
Width = 720
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "房间号码"
Height = 180
Left = 2760
TabIndex = 13
Top = 650
Width = 720
End
End
End
Attribute VB_Name = "FrmRepairEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriId As Long
Private Function Check() As Boolean
If CurHouse.HouseId <= 0 Then
MsgBox "请选择报修住户居住的房屋"
Check = False
Exit Function
End If
If Trim(txtItem.Text) = "" Then
MsgBox "请输入报修项目"
txtItem.SetFocus
Check = False
Exit Function
End If
If Trim(txtRecordDate.Text) = "" Then
MsgBox "请输入报修日期"
txtRecordDate.SetFocus
Check = False
Exit Function
End If
Check = True
End Function
Private Sub Cmd_OK_Click()
If Check = False Then
Exit Sub
End If
With MyRepair
.HouseId = CurHouse.HouseId
.RepairItem = MakeStr(txtItem)
.RecordDate = MakeStr(txtRecordDate)
.RepairEmp = MakeStr(txtRepairEmp)
.FinishDate = MakeStr(txtFinishDate)
.Servicefee = Val(txtService)
.Materialfee = Val(txtMaterial)
If Modify = False Then
.Insert
MsgBox "添加成功"
Else
.Update (OriId)
MsgBox "修改成功"
End If
End With
Unload Me
End Sub
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub Cmd_RoomSel_Click()
FrmHouseSel.Show 1
MyBuilding.GetInfo (CurHouse.BuildingId)
txtBuilding = MyBuilding.BuildingNo
txtUnit = CurHouse.HouseUnit
txtRoom = CurHouse.RoomNo
End Sub
Private Sub Form_Load()
MyBuilding.GetInfo (CurHouse.BuildingId)
txtBuilding = MyBuilding.BuildingNo
txtUnit = CurHouse.HouseUnit
txtRoom = CurHouse.RoomNo
End Sub
Private Sub txtDealemp_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtFinishDate_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtItem_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtMaterial_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
If In_Single(KeyAscii) = False Then
KeyAscii = 0
End If
End Sub
Private Sub txtRecordDate_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtRepairEmp_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtService_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
If In_Single(KeyAscii) = False Then
KeyAscii = 0
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -