📄 frmotherstandardcode.frm
字号:
FixedCols = 1
RowHeightMin = 0
RowHeightMax = 0
ColWidthMin = 0
ColWidthMax = 0
ExtendLastCol = 0 'False
FormatString = ""
ScrollTrack = 0 'False
ScrollBars = 3
ScrollTips = 0 'False
MergeCells = 0
MergeCompare = 0
AutoResize = -1 'True
AutoSizeMode = 0
AutoSearch = 0
AutoSearchDelay = 2
MultiTotals = -1 'True
SubtotalPosition= 1
OutlineBar = 0
OutlineCol = 0
Ellipsis = 0
ExplorerBar = 0
PicturesOver = 0 'False
FillStyle = 0
RightToLeft = 0 'False
PictureType = 0
TabBehavior = 0
OwnerDraw = 0
Editable = 0
ShowComboButton = -1 'True
WordWrap = 0 'False
TextStyle = 0
TextStyleFixed = 0
OleDragMode = 0
OleDropMode = 0
DataMode = 0
VirtualData = -1 'True
DataMember = ""
ComboSearch = 3
AutoSizeMouse = -1 'True
FrozenRows = 0
FrozenCols = 0
AllowUserFreezing= 0
BackColorFrozen = 0
ForeColorFrozen = 0
WallPaperAlignment= 9
End
End
Begin vsOcx6LibCtl.vsElastic vsElastic2
Height = 390
Left = 90
TabIndex = 1
TabStop = 0 'False
Top = 4575
Width = 9240
_ExtentX = 16298
_ExtentY = 688
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Enabled = -1 'True
Appearance = 0
MousePointer = 0
_ConvInfo = -1
Version = 600
BackColor = -2147483633
ForeColor = -2147483630
FloodColor = 192
ForeColorDisabled= -2147483631
Caption = ""
Align = 0
Appearance = 0
AutoSizeChildren= 8
BorderWidth = 0
ChildSpacing = 4
Splitter = 0 'False
FloodDirection = 0
FloodPercent = 0
CaptionPos = 1
WordWrap = -1 'True
MaxChildSize = 0
MinChildSize = 0
TagWidth = 0
TagPosition = 0
Style = 0
TagSplit = 0 'False
PicturePos = 4
CaptionStyle = 0
ResizeFonts = 0 'False
GridRows = 1
GridCols = 6
_GridInfo = $"frmOtherStandardCode.frx":010B
Begin VB.CommandButton Command4Save
Caption = "保存(&S)"
Height = 390
Left = 6195
TabIndex = 9
Top = 0
Width = 1485
End
Begin VB.CommandButton Command4Add
Caption = "增加(&A)"
Height = 390
Left = 3090
TabIndex = 4
Top = 0
Width = 1500
End
Begin VB.CommandButton Command4Delete
Caption = "删除(&D)"
Height = 390
Left = 4650
TabIndex = 3
Top = 0
Width = 1485
End
Begin VB.CommandButton Command4Close
Caption = "关闭(&C)"
Height = 390
Left = 7740
TabIndex = 2
Top = 0
Width = 1500
End
End
End
End
Attribute VB_Name = "frmOtherStandardCode"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim oRs4This As New ADODB.Recordset
Dim oRs4That As New ADODB.Recordset
Dim oRs4ColumnName As New ADODB.Recordset
Dim m_strSQL As String
Dim m_str4temp As String
Dim m_l4SelectRow As Long
Dim m_l4Table As String
Dim m_l4RowContent As Long
Dim VarCode As Variant
Dim Add_Click As Boolean
Dim Is_AddError As Boolean
Dim Is_Edit As Boolean
Dim Is_SaveError As Boolean
Dim Is_Init_Edit As Boolean
Private Sub Command4Add_Click()
Is_AddError = True
With Me.VSFlexGrid4Content
If .Row > 0 Then
Select Case Me.VSFlexGrid4Name.TextMatrix(m_l4SelectRow, 4)
Case 13
If Trim(.TextMatrix(.Row, .Cols - 1)) = "" Then
MsgBox "请输入代码编号!", vbOKOnly, "警告"
.Select .Row, .Cols - 1
.EditCell
Exit Sub
End If
If Trim(.TextMatrix(.Row, 2)) = "" Then
MsgBox "请输入代码名称!", vbOKOnly, "警告"
.Select .Row, 2
.EditCell
Exit Sub
End If
Case 14
If Trim(.TextMatrix(.Row, .Cols - 1)) = "" Then
MsgBox "请输入代码编号!", vbOKOnly, "警告"
.Select .Row, .Cols - 1
.EditCell
Exit Sub
End If
If Trim(.TextMatrix(.Row, 2)) = "" Then
MsgBox "请输入名称或类别!", vbOKOnly, "警告"
.Select .Row, 2
.EditCell
Exit Sub
End If
If Trim(.TextMatrix(.Row, 3)) = "" Then
MsgBox "请输入名称或类别!", vbOKOnly, "警告"
.Select .Row, 3
.EditCell
Exit Sub
End If
Case 15
If Trim(.TextMatrix(.Row, .Cols - 1)) = "" Then
MsgBox "请输入技术职务代码!", vbOKOnly, "警告"
.Select .Row, .Cols - 1
.EditCell
Exit Sub
End If
If Trim(.TextMatrix(.Row, 2)) = "" Then
MsgBox "请输入技术职务名称!", vbOKOnly, "警告"
.Select .Row, 2
.EditCell
Exit Sub
End If
If Trim(.TextMatrix(.Row, 3)) = "" Then
MsgBox "请输入技术职务种类!", vbOKOnly, "警告"
.Select .Row, 3
.EditCell
Exit Sub
End If
If Trim(.TextMatrix(.Row, 4)) = "" Then
MsgBox "请输入技术职务级别!", vbOKOnly, "警告"
.Select .Row, 4
.EditCell
Exit Sub
End If
Case 2
If Trim(.TextMatrix(.Row, 1)) = "" Or Not IsNumeric(.TextMatrix(.Row, 1)) Then
MsgBox "请输入数字型代码编号!", vbOKOnly, "警告"
.Select .Row, 1
.EditCell
Exit Sub
End If
If Trim(.TextMatrix(.Row, 2)) = "" Then
MsgBox "请输入代码名称!", vbOKOnly, "警告"
.Select .Row, 2
.EditCell
Exit Sub
End If
Case 3
If m_l4Table = "T_DUTY_LEVEL" Then
If Trim(.TextMatrix(.Row, 1)) = "" Or Not IsNumeric(.TextMatrix(.Row, 1)) Then
MsgBox "请输入数字型代码编号!", vbOKOnly, "警告"
.Select .Row, 1
.EditCell
Exit Sub
End If
If Trim(.TextMatrix(.Row, 2)) = "" Then
MsgBox "请输入名称或类别!", vbOKOnly, "警告"
.Select .Row, 2
.EditCell
Exit Sub
End If
Else
If Trim(.TextMatrix(.Row, 1)) = "" Or Not IsNumeric(.TextMatrix(.Row, 1)) Then
MsgBox "请输入数字型代码编号!", vbOKOnly, "警告"
.Select .Row, 1
.EditCell
Exit Sub
End If
If Trim(.TextMatrix(.Row, 2)) = "" Or Trim(.TextMatrix(.Row, 3)) = "" Then
MsgBox "请输入名称或类别!", vbOKOnly, "警告"
.Select .Row, 2
.EditCell
Exit Sub
End If
End If
End Select
End If
If (.RowData(.Row) = C_Insert Or .RowData(.Row) = C_Update) And Add_Click = False Then
If InsertOrUpdate(.Row) = 0 Then Exit Sub
End If
Add_Click = True
.AddItem ""
.Row = .Rows - 1
.RowData(.Row) = C_Init
.TextMatrix(.Rows - 1, 1) = GetMaxNo(VSFlexGrid4Name.TextMatrix(m_l4SelectRow, 0), VSFlexGrid4Name.TextMatrix(m_l4SelectRow, 2))
End With
Add_Click = False
Is_AddError = False
End Sub
Private Sub Command4Close_Click()
Unload Me
End Sub
Private Sub Command4Delete_Click()
If m_l4RowContent = 0 Then Exit Sub
If vbOK = MsgBox("你确定要删除此记录吗?", vbOKCancel, "警告") Then
m_strSQL = "delete from " & VSFlexGrid4Name.TextMatrix(m_l4SelectRow, 0) & " where " & VSFlexGrid4Name.TextMatrix(m_l4SelectRow, 2) & "='" & VSFlexGrid4Content.TextMatrix(m_l4RowContent, 1) & "'"
If ExcuteSQL(m_strSQL) <> 0 Then Exit Sub
m_l4RowContent = m_l4RowContent - 1
End If
SearchData m_l4SelectRow
End Sub
Private Sub Command4Save_Click()
With VSFlexGrid4Content
If (.RowData(m_l4RowContent) = C_Insert Or .RowData(m_l4RowContent) = C_Update) And Add_Click = False Then
If InsertOrUpdate(m_l4RowContent) = 0 Then Exit Sub
SearchData m_l4SelectRow
MsgBox "保存成功", vbOKOnly, "提示"
End If
End With
End Sub
Private Sub Form_Load()
Me.Height = 5460
Me.Width = 9540
Me.Command4Close.Enabled = False
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -