📄 frmcleanedit.frm
字号:
VERSION 5.00
Begin VB.Form FrmCleanEdit
BorderStyle = 1 'Fixed Single
Caption = "编辑小区保洁信息"
ClientHeight = 3375
ClientLeft = 45
ClientTop = 330
ClientWidth = 5790
Icon = "FrmCleanEdit.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3375
ScaleWidth = 5790
StartUpPosition = 2 '屏幕中心
Begin VB.Frame Frame1
Height = 2415
Left = 240
TabIndex = 7
Top = 120
Width = 5295
Begin VB.TextBox txtEnd
Height = 270
Left = 3840
MaxLength = 10
TabIndex = 4
Top = 1920
Width = 1215
End
Begin VB.TextBox txtStart
Height = 270
Left = 1200
MaxLength = 10
TabIndex = 3
Top = 1920
Width = 1215
End
Begin VB.TextBox txtDescribe
Height = 735
Left = 1200
MaxLength = 100
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 1
Top = 600
Width = 3855
End
Begin VB.TextBox txtName
Height = 270
Left = 1200
MaxLength = 100
TabIndex = 0
Top = 195
Width = 3855
End
Begin VB.TextBox txtWorker
Height = 270
Left = 1200
MaxLength = 20
TabIndex = 2
Top = 1515
Width = 3855
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "截止日期"
Height = 180
Left = 2880
TabIndex = 12
Top = 1965
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "开始日期"
Height = 180
Left = 240
TabIndex = 11
Top = 1965
Width = 720
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "任务描述"
Height = 180
Left = 240
TabIndex = 10
Top = 630
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "项目名称"
Height = 180
Left = 240
TabIndex = 9
Top = 240
Width = 720
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "负责人"
Height = 180
Left = 240
TabIndex = 8
Top = 1560
Width = 540
End
End
Begin VB.CommandButton Cmd_OK
Caption = "确 定"
Height = 400
Left = 1155
MouseIcon = "FrmCleanEdit.frx":0CCA
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 5
Top = 2760
Width = 1300
End
Begin VB.CommandButton Cmd_Cancel
Cancel = -1 'True
Caption = "取 消"
Height = 400
Left = 3315
MouseIcon = "FrmCleanEdit.frx":0FD4
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 6
Top = 2760
Width = 1300
End
End
Attribute VB_Name = "FrmCleanEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriId As Long
Public OriName As String
Private Function Check() As Boolean
If Trim(txtName) = "" Then
MsgBox "请输入保洁项目"
txtName.SetFocus
Check = False
Exit Function
End If
If Trim(txtWorker) = "" Then
MsgBox "请输入负责人"
txtWorker.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 MyClean
.ItemName = MakeStr(txtName)
.Describe = MakeStr(txtDescribe)
.Worker = MakeStr(txtWorker)
.StartDate = MakeStr(txtStart)
.EndDate = MakeStr(txtEnd)
'判断保洁名称是否存在
If Modify = False Or OriName <> Trim(txtName) Then
If .In_DB(MakeStr(txtName)) = True Then
MsgBox "保洁项目已经存在,请重新输入"
txtName.SetFocus
txtName.SelStart = 0
txtName.SelLength = Len(txtName)
Exit Sub
End If
End If
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 txtDescribe_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtEnd_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtName_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtStart_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
Private Sub txtWorker_KeyPress(KeyAscii As Integer)
EnterTAB (KeyAscii)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -