📄 tjxx.frm
字号:
VERSION 5.00
Begin VB.Form tjxx
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 4620
ClientLeft = 0
ClientTop = 0
ClientWidth = 4515
LinkTopic = "Form1"
Picture = "tjxx.frx":0000
ScaleHeight = 4620
ScaleWidth = 4515
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
BackColor = &H00D8D7D5&
Height = 3975
Left = 120
TabIndex = 0
Top = 480
Width = 4215
Begin VB.CheckBox Check4
BackColor = &H00D8D7D5&
Caption = "删除职务"
Height = 375
Left = 2040
TabIndex = 10
Top = 960
Width = 1455
End
Begin VB.CheckBox Check3
BackColor = &H00D8D7D5&
Caption = "删除部门"
Height = 375
Left = 480
TabIndex = 9
Top = 960
Width = 1215
End
Begin VB.CheckBox Check2
BackColor = &H00D8D7D5&
Caption = "添加职务"
Height = 375
Left = 2040
TabIndex = 8
Top = 360
Width = 1455
End
Begin VB.CheckBox Check1
BackColor = &H00D8D7D5&
Caption = "添加部门"
Height = 375
Left = 480
TabIndex = 7
Top = 360
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 2280
TabIndex = 6
Top = 3120
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 360
TabIndex = 5
Top = 3120
Width = 975
End
Begin VB.TextBox txtname
Height = 375
Left = 1920
TabIndex = 2
Top = 2280
Width = 1455
End
Begin VB.TextBox txtbh
Height = 375
Left = 1920
TabIndex = 1
Top = 1680
Width = 1455
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "名称:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 600
TabIndex = 4
Top = 2280
Width = 975
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "编号:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 720
TabIndex = 3
Top = 1680
Width = 735
End
End
Begin VB.Image Image1
Height = 345
Left = 4080
Picture = "tjxx.frx":1DE5
Top = 0
Width = 345
End
End
Attribute VB_Name = "tjxx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Label1_Click()
End Sub
Private Sub Check1_Click()
Check3.Value = False
Check2.Value = False
Check4.Value = False
End Sub
Private Sub Check2_Click()
Check1.Value = False
Check4.Value = False
Check3.Value = False
End Sub
Private Sub Check3_Click()
Check1.Value = False
Check2.Value = False
Check4.Value = False
End Sub
Private Sub Check4_Click()
Check1.Value = False
Check2.Value = False
Check3.Value = False
End Sub
Private Sub Command1_Click()
If Check1.Value Then
SqlStmt = "select * from Department where Depart_NO='" + Trim(txtbh.Text) + "'"
mydb.opendb
b = mydb.exesql(SqlStmt, rs5, True)
If rs5.RecordCount <> 0 Then
MsgBox "此编号已经存在", 48, "提示"
Call infor
Else
SqlStmt = "insert into Department values('" + Trim(txtbh.Text) + "','" + Trim(txtName.Text) + "')"
b = mydb.exesql(SqlStmt, rs5, True)
Call infor
End If
End If
If Check2.Value Then
SqlStmt = "select * from ZW where zhiwu_no='" + Trim(txtbh.Text) + "'"
mydb.opendb
b = mydb.exesql(SqlStmt, rs5, True)
If rs5.RecordCount <> 0 Then
MsgBox "此编号已经存在", 48, "提示"
Call infor
Else
SqlStmt = "insert into ZW values('" + Trim(txtbh.Text) + "','" + Trim(txtName.Text) + "')"
b = mydb.exesql(SqlStmt, rs5, True)
Call infor
End If
End If
If Check3.Value Then
SqlStmt = "delete from Department where Depart_NO='" + Trim(txtbh.Text) + "'"
mydb.opendb
b = mydb.exesql(SqlStmt, rs5, True)
If b Then
MsgBox "删除成功", 48, "提示"
Call clear
End If
mydb.closedb
End If
If Check4.Value Then
SqlStmt = "delete from ZW where zhiwu_no='" + Trim(txtbh.Text) + "'"
mydb.opendb
b = mydb.exesql(SqlStmt, rs5, True)
If b Then
MsgBox "删除成功", 48, "提示"
Call clear
End If
mydb.closedb
End If
End Sub
Public Sub infor()
If b Then
MsgBox "添加成功", 48, "提示"
Else
MsgBox "操作失败", 48, "提示"
End If
Call clear
mydb.closedb
End Sub
Public Sub clear()
txtbh.Text = ""
txtName.Text = ""
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Image1_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -