📄 frmmoduleedit.frm
字号:
VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form FrmModuleEdit
Caption = "编辑模块信息"
ClientHeight = 2430
ClientLeft = 60
ClientTop = 345
ClientWidth = 4305
LinkTopic = "Form1"
ScaleHeight = 2430
ScaleWidth = 4305
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox txtDate
Height = 330
Left = 1200
TabIndex = 6
Top = 1245
Width = 1695
End
Begin VB.TextBox txtName
Height = 330
Left = 1200
TabIndex = 2
Top = 240
Width = 2775
End
Begin VB.CommandButton Cmd_OK
Caption = "确 定"
Height = 450
Left = 720
TabIndex = 1
Top = 1800
Width = 1095
End
Begin VB.CommandButton Cmd_Cancel
Caption = "取 消"
Height = 450
Left = 2520
TabIndex = 0
Top = 1800
Width = 1095
End
Begin MSDataListLib.DataCombo dco_SType
Height = 330
Left = 1200
TabIndex = 4
Top = 765
Width = 1695
_ExtentX = 2990
_ExtentY = 582
_Version = 393216
Style = 2
Text = ""
End
Begin MSAdodcLib.Adodc AdoSType
Height = 330
Left = 0
Top = 1800
Visible = 0 'False
Width = 1695
_ExtentX = 2990
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "AdoSType"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "开始日期"
Height = 180
Left = 240
TabIndex = 7
Top = 1320
Width = 720
End
Begin VB.Label Label11
AutoSize = -1 'True
Caption = "项目状态"
Height = 180
Left = 240
TabIndex = 5
Top = 840
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "模块名称"
Height = 180
Left = 240
TabIndex = 3
Top = 315
Width = 720
End
End
Attribute VB_Name = "FrmModuleEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriMId As Long
Public OriProId As Long
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub Cmd_OK_Click()
If Trim(txtName) = "" Then
MsgBox "请输入模块姓名"
txtName.SetFocus
Exit Sub
End If
If Trim(dco_SType.Text) = "" Then
MsgBox "请选择模块状态"
dco_SType.SetFocus
Exit Sub
End If
If Trim(txtDate) = "" Then
MsgBox "请输入开始日期"
txtDate.SetFocus
Exit Sub
End If
With MyModule
.ModuleName = Trim(txtName)
.ProId = OriProId
.StatusId = Trim(dco_SType.BoundText())
.StartDate = Trim(txtDate)
If Modify Then
.Update (OriMId)
MsgBox "修改成功"
Else
.Insert
MsgBox "添加成功"
End If
End With
Unload Me
End Sub
Private Sub Form_Load()
'装入模块状态信息
AdoSType.ConnectionString = Conn
AdoSType.RecordSource = "Select * From Types Where Flag=3 Order By TypeId"
AdoSType.Refresh
Set dco_SType.RowSource = AdoSType
dco_SType.BoundColumn = "TypeId"
dco_SType.ListField = "TypeName"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -