📄 gnxmchshh.frm
字号:
Text = "Combo1"
Top = 1680
Width = 1935
End
Begin VB.CommandButton Command1
Caption = "添加"
Height = 420
Left = 120
TabIndex = 21
Top = 4080
Width = 1935
End
Begin VB.CommandButton Command2
Caption = "删除"
Height = 420
Left = 120
TabIndex = 20
Top = 4560
Width = 1935
End
Begin VB.CommandButton Command3
Caption = "修改"
Height = 420
Left = 120
TabIndex = 19
Top = 5040
Width = 1935
End
Begin VB.CommandButton Command4
Caption = "保存"
Enabled = 0 'False
Height = 420
Left = 120
TabIndex = 18
Top = 5520
Width = 1935
End
Begin VB.CommandButton Command5
Caption = "查找"
Height = 420
Left = 120
TabIndex = 17
Top = 6000
Width = 1935
End
Begin VB.TextBox Text4
Height = 300
Left = 120
Locked = -1 'True
TabIndex = 16
Text = "Text4"
Top = 2880
Width = 1940
End
Begin VB.TextBox Text3
Height = 300
Left = 120
Locked = -1 'True
TabIndex = 15
Text = "Text3"
Top = 2280
Width = 1940
End
Begin VB.TextBox Text2
Height = 300
Left = 120
Locked = -1 'True
TabIndex = 14
Text = "Text2"
Top = 1080
Width = 1940
End
Begin VB.TextBox Text1
Height = 300
Left = 120
Locked = -1 'True
TabIndex = 13
Text = "Text1"
Top = 480
Width = 1940
End
Begin VB.Label Label17
AutoSize = -1 'True
Caption = "类别:"
Height = 180
Left = 120
TabIndex = 66
Top = 3240
Width = 540
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "备注:"
Height = 180
Left = 120
TabIndex = 12
Top = 2640
Width = 540
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "价格:"
Height = 180
Left = 120
TabIndex = 11
Top = 2040
Width = 540
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "单位:"
Height = 180
Left = 120
TabIndex = 10
Top = 1440
Width = 540
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "项目名称:"
Height = 180
Left = 120
TabIndex = 9
Top = 840
Width = 900
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "项目代码:"
Height = 180
Left = 120
TabIndex = 8
Top = 240
Width = 900
End
End
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "系统功能项目初始化"
BeginProperty Font
Name = "隶书"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00008000&
Height = 435
Left = 2880
TabIndex = 0
Top = 0
Width = 4185
End
End
Attribute VB_Name = "gnxmchshh"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim zz As Integer
Dim xx As Integer
Dim yy As Integer
Private Sub Combo2_Click()
Text9.SetFocus
End Sub
Private Sub Combo2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Text9.SetFocus
End Sub
Private Sub Combo3_Click()
Text11.SetFocus
End Sub
Private Sub Combo3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Text11.SetFocus
End Sub
Private Sub Combo4_Click()
Command4.SetFocus
End Sub
Private Sub Combo4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Command4.SetFocus
KeyAscii = 0
End Sub
Private Sub Command1_Click()
Text2.Text = ""
Text2.Locked = False
Text3.Text = ""
Text3.Locked = False
Text4.Text = ""
Text4.Locked = False
Combo1.Text = ""
Combo4.Enabled = True
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = True
Command5.Enabled = False
'Adodc1.Refresh
If Adodc1.Recordset.EOF = False Then
Adodc1.Recordset.MoveLast
bh = Mid(Adodc1.Recordset.Fields(0), 1, 4) & Trim(Str(Val(Mid(Adodc1.Recordset.Fields(0), 5)) + 1))
Text1.Text = bh
Else
Text1.Text = "sfbz1"
End If
Text2.SetFocus
zz = 111
End Sub
Private Sub Combo1_Click()
Text3.SetFocus
End Sub
Private Sub Combo1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Text3.SetFocus
End Sub
Private Sub Command10_Click()
Text6.Text = ""
Text6.Locked = False
Text7.Text = ""
Text7.Locked = False
Text8.Text = ""
Text8.Locked = False
Combo2.Text = ""
Text9.Locked = False
Text9.Text = ""
Text10.Locked = False
Text10.Text = ""
Command10.Enabled = False
Command9.Enabled = False
Command8.Enabled = False
Command7.Enabled = True
Command6.Enabled = False
'Adodc1.Refresh
If Adodc2.Recordset.EOF = False Then
Adodc2.Recordset.MoveLast
bh = Mid(Adodc2.Recordset.Fields(0), 1, 4) & Trim(Str(Val(Mid(Adodc2.Recordset.Fields(0), 5)) + 1))
Text5.Text = bh
Else
Text5.Text = "gnxm1"
End If
Text6.SetFocus
xx = 111
End Sub
Private Sub Command11_Click()
Unload Me
End Sub
Private Sub Command12_Click()
yp = InputBox("请输入您要查找的名称?")
Adodc3.Refresh
Adodc3.Recordset.Find ("名称=" + "'" + yp + "'")
If Adodc3.Recordset.EOF = False Then
Call disp6
Else
MsgBox "没有找到 “" + yp + "”,可能是没有初始化!"
End If
End Sub
Private Sub Command13_Click()
If Text11.Text = "" Or Text12.Text = "" Or Combo3.Text = "" Then
MsgBox "不能保存空数据!请输入数据后再保存!"
Exit Sub
End If
If yy = 111 Then
Adodc3.Refresh
Adodc3.Recordset.Find ("输入码=" + "'" + Text11.Text + "'")
If Adodc3.Recordset.EOF = False Then
MsgBox "项目输入码已经存在,请编写一个唯一的输入码!"
Text11.Text = ""
Text11.SetFocus
Exit Sub
Else
Adodc3.Refresh
Adodc3.Recordset.Find ("名称=" + "'" + Text12.Text + "'")
If Adodc3.Recordset.EOF = False Then
MsgBox "此项目已经初始化,请输入其他项目"
Text11.Text = ""
Text12.Text = ""
Text11.SetFocus
Exit Sub
Else
Adodc3.Recordset.AddNew
Adodc3.Recordset.Fields(0) = Text11.Text
Adodc3.Recordset.Fields(1) = Text12.Text
Adodc3.Recordset.Fields(2) = Combo3.Text
Adodc3.Recordset.Update
End If
End If
End If
If yy = 222 Then
Adodc3.Recordset.Fields(0) = Text11.Text
Adodc3.Recordset.Fields(1) = Text12.Text
Adodc3.Recordset.Fields(2) = Combo3.Text
Adodc3.Recordset.Update
End If
Command16.Enabled = True
Command15.Enabled = True
Command14.Enabled = True
Command13.Enabled = False
Command12.Enabled = True
Command16.SetFocus
Text11.Locked = True
Text12.Locked = True
DataGrid3.Columns(0).Width = 1120
DataGrid3.Columns(1).Width = 2600
End Sub
Private Sub Command14_Click()
yy = 222
Text11.Locked = False
Text12.Locked = False
Text11.SetFocus
Text11.SelStart = 0
Text11.SelLength = Len(Text11.Text)
Command16.Enabled = False
Command15.Enabled = False
Command14.Enabled = False
Command13.Enabled = True
Command12.Enabled = False
End Sub
Private Sub Command15_Click()
If Adodc3.Recordset.EOF = False Then
k = MsgBox("确认要删除吗?", vbYesNo)
If k = 6 Then
Adodc3.Recordset.Delete
MsgBox "删除操作成功"
Call disp6
End If
End If
End Sub
Private Sub Command16_Click()
Text11.Locked = False
Text11.Text = ""
Text12.Locked = False
Text12.Text = ""
Text11.SetFocus
Command16.Enabled = False
Command15.Enabled = False
Command14.Enabled = False
Command13.Enabled = True
Command12.Enabled = False
yy = 111
End Sub
Private Sub Command17_Click()
Command16.Enabled = True
Command15.Enabled = True
Command14.Enabled = True
Command13.Enabled = False
Command12.Enabled = True
Text11.Text = ""
Text12.Text = ""
Text11.Locked = True
Text12.Locked = True
Command16.SetFocus
Call disp6
End Sub
Private Sub Command2_Click()
Adodc1.Recordset.Delete
DataGrid1.Refresh
Text1.Text = ""
Text2.Text = ""
Combo1.Text = ""
Text3.Text = ""
Text4.Text = ""
MsgBox "已经成功删除了您所要删除的收费标准!"
End Sub
Private Sub Command3_Click()
Text2.Locked = False
Text2.SelStart = Len(Text2.Text)
Text2.SetFocus
zz = 222
Text3.Locked = False
Text4.Locked = False
Combo4.Enabled = True
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = True
Command5.Enabled = False
End Sub
Private Sub Command4_Click()
If zz = 111 Then
If Text2.Text = "" Or Combo1.Text = "" Or Text3.Text = "" Or Combo4.Text = "" Then
MsgBox "您输入的数据不完整,请输入完整的数据后再保存!"
If Text2.Text = "" Then
Text2.SetFocus
Exit Sub
End If
If Combo1.Text = "" Then
Combo1.SetFocus
Exit Sub
End If
If Text3.Text = "" Then
Text3.SetFocus
Exit Sub
End If
If Combo4.Text = "" Then
Combo4.SetFocus
Exit Sub
End If
End If
Adodc1.Refresh
Adodc1.Recordset.Find ("项目名称=" + "'" + Text2.Text + "'")
If Adodc1.Recordset.EOF = False Then
MsgBox "项目名称已经存在,请输入其他项目名称!"
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Combo1.Text = ""
Text2.SetFocus
DataGrid1.Columns(0).Width = 950
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -