📄 frmfixedtypelistcard.frm
字号:
VERSION 5.00
Object = "{F42BDC2B-FC9B-11D1-9ABD-444553540000}#3.3#0"; "ATLEDIT.OCX"
Begin VB.Form frmFixedTypeListCard
BorderStyle = 1 'Fixed Single
Caption = "新增固定资产类别"
ClientHeight = 3390
ClientLeft = 45
ClientTop = 330
ClientWidth = 5895
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MDIChild = -1 'True
ScaleHeight = 3390
ScaleWidth = 5895
ShowInTaskbar = 0 'False
Begin AtlEdit.TEdit txtInput
Height = 300
Index = 3
Left = 2100
TabIndex = 9
Top = 2280
Width = 2175
_ExtentX = 3836
_ExtentY = 529
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Text = ""
End
Begin VB.CommandButton cmdOKCancel
Height = 350
Index = 2
Left = 4560
Style = 1 'Graphical
TabIndex = 15
Tag = "1009"
Top = 1080
UseMaskColor = -1 'True
Width = 1215
End
Begin VB.CommandButton cmdOKCancel
Default = -1 'True
Height = 350
Index = 0
Left = 4560
Style = 1 'Graphical
TabIndex = 13
Tag = "1001"
Top = 120
UseMaskColor = -1 'True
Width = 1215
End
Begin VB.CommandButton cmdOKCancel
Cancel = -1 'True
Height = 350
Index = 1
Left = 4560
Style = 1 'Graphical
TabIndex = 14
Tag = "1002"
Top = 600
UseMaskColor = -1 'True
Width = 1215
End
Begin VB.ComboBox cboFixedType
Height = 300
Index = 1
ItemData = "frmFixedTypeListCard.frx":0000
Left = 2100
List = "frmFixedTypeListCard.frx":0002
Style = 2 'Dropdown List
TabIndex = 7
Top = 1800
Width = 2175
End
Begin VB.ComboBox cboFixedType
Height = 300
Index = 0
Left = 2100
Style = 2 'Dropdown List
TabIndex = 5
Top = 1320
Width = 2175
End
Begin VB.CheckBox chkPause
Caption = "停用"
Height = 225
Left = 4560
TabIndex = 12
Top = 3000
Width = 1215
End
Begin AtlEdit.TEdit txtInput
Height = 300
Index = 1
Left = 2100
TabIndex = 3
Top = 840
Width = 2175
_ExtentX = 3836
_ExtentY = 529
maxchar = 30
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Text = ""
End
Begin AtlEdit.TEdit txtInput
Height = 300
Index = 2
Left = 2100
TabIndex = 11
Top = 2760
Width = 2175
_ExtentX = 3836
_ExtentY = 529
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Text = ""
End
Begin AtlEdit.TEdit txtInput
Height = 300
Index = 0
Left = 2100
TabIndex = 1
Top = 360
Width = 2175
_ExtentX = 3836
_ExtentY = 529
maxchar = 16
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Text = ""
End
Begin VB.Label lblTitle
Caption = "预计使用年限(&Y)"
Height = 180
Index = 5
Left = 300
TabIndex = 8
Top = 2355
Width = 1695
End
Begin VB.Label lblTitle
Caption = "预计净残值率%(&R)"
Height = 180
Index = 4
Left = 300
TabIndex = 10
Top = 2835
Width = 1815
End
Begin VB.Label lblTitle
Caption = "常用折旧方法(&M)"
Height = 180
Index = 3
Left = 300
TabIndex = 6
Top = 1869
Width = 1815
End
Begin VB.Label lblTitle
Caption = "折旧类型(&T)"
Height = 180
Index = 2
Left = 300
TabIndex = 4
Top = 1386
Width = 1815
End
Begin VB.Label lblTitle
Caption = "固定资产类别名称(&N)"
Height = 180
Index = 1
Left = 300
TabIndex = 2
Top = 903
Width = 1815
End
Begin VB.Label lblTitle
Caption = "固定资产类别编码(&C)"
Height = 180
Index = 0
Left = 300
TabIndex = 0
Top = 420
Width = 1815
End
End
Attribute VB_Name = "frmFixedTypeListCard"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' 固定资产类别卡片
' 作者:邓江
' 日期:1998.06.23
'
' 功能:完成固定资产类别表的增、删、改操作
'
' 接口: AddCard 增加固定资产类别记录。
' 参数:intModal 显示模式,strName 用户输入值
' EditCard 修改固定资产类别记录。
' 参数: lngRecordID 被修改的记录的ID,intModal 显示模式
' DelCard 删除固定资产类别记录。
' 参数: lngRecordID 被删除的记录的ID
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
Private Type FixedTypeRecord '固定资产类别表的记录
lngFixedTypeID As Long '固定资产类别ID
strFixedTypeCode As String '固定资产类别编码
strFixedTypeName As String '固定资产类别名称
strFullName As String '固定资产类别全称
blnIsInActive As Boolean '封存标志
intLevel As Integer '编码层次
blnIsDetail As Boolean '末级标志
strDepreciationType As String '折旧类型
strDepreciationMethod As String '常用折旧方法
dblNetWorthRate As Double '预计净残值率%
intUseAge As Integer '预计使用年限
dblTotalWork As Double '预计总工作量
End Type
Private WithEvents mclsMainControl As MainControl '主控对象
Attribute mclsMainControl.VB_VarHelpID = -1
Private mblnIsChanged As Boolean '固资类型改变标志
Private mblnAddRecord As Boolean '是新增还是修改操作
Private mlngUniteID As Long '存储上级ID以便转业务
Private mftrFixedType As FixedTypeRecord '暂存读写记录的数据
Private mstrSQLBuffer() As String '暂时存储对数据库的增删改操作
Private mintSQLIndex As Integer 'mstrSQLBuffer的索引
Private mstrInitCode As String '暂存编码的初始值,以备判断是否修改
Private mblnChangeIsFirst As Boolean
Private ID As Long
'进入新增固定资产类别操作
Public Function AddCard(Optional strName As String = "", Optional intModal As Integer = vbModeless) As Long
Dim lngResult As Long
' If mblnIsChanged Then
' Me.ZOrder 0
' lngResult = ShowMsg(0, "上一次编辑的固定资产类别还未保存,是否继续编辑它?", _
' vbYesNo + vbQuestion + MB_TASKMODAL, "固定资产类别卡片提示信息")
' If lngResult = vbYes Then '继续编辑上一次的固定资产类别
' Me.Show
' Exit Function
' Else
' Unload Me
' End If
' End If
'Me.Hide
mblnAddRecord = True
frmFixedTypeListCard.Caption = "新增固定资产类别"
cmdOKCancel(2).Visible = True
cmdOKCancel(0).Default = False
cmdOKCancel(2).Default = True
InitComboBox
InitAddCard strName
mblnIsChanged = False
Show intModal
Me.Refresh
Me.ZOrder 0
AddCard = ID
End Function
'初始化暂存读写记录数据的自定义类型变量和卡片
Private Sub InitAddCard(Optional strName As String)
mblnChangeIsFirst = True
With mftrFixedType
.lngFixedTypeID = 0
.strFixedTypeName = ""
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -