📄 frmfaqedit.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form FrmFaqEdit
Caption = "编辑常见问题"
ClientHeight = 4980
ClientLeft = 60
ClientTop = 345
ClientWidth = 5745
LinkTopic = "Form1"
ScaleHeight = 4980
ScaleWidth = 5745
StartUpPosition = 2 '屏幕中心
Begin MSAdodcLib.Adodc Ado_Emps
Height = 330
Left = 120
Top = 4440
Visible = 0 'False
Width = 1680
_ExtentX = 2963
_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 = "Ado_Emps"
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.CommandButton Cmd_Cancel
Caption = "取 消"
Height = 375
Left = 3120
TabIndex = 11
Top = 4440
Width = 1095
End
Begin VB.CommandButton Cmd_OK
Caption = "确 定"
Height = 375
Left = 1560
TabIndex = 10
Top = 4440
Width = 1095
End
Begin VB.Frame Frame1
Height = 4215
Left = 0
TabIndex = 0
Top = 0
Width = 5535
Begin MSAdodcLib.Adodc Adotypes
Height = 330
Left = 3360
Top = 120
Visible = 0 'False
Width = 1815
_ExtentX = 3201
_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 = "Adotypes"
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.TextBox txtDetail
Height = 2460
Left = 1080
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 9
Top = 1560
Width = 4215
End
Begin VB.TextBox txtDate
Height = 300
Left = 4080
Locked = -1 'True
TabIndex = 7
Top = 1140
Width = 1215
End
Begin VB.TextBox txtTitle
Height = 300
Left = 1080
TabIndex = 4
Top = 720
Width = 4215
End
Begin MSDataListLib.DataCombo dco_Types
Height = 330
Left = 1080
TabIndex = 2
Top = 285
Width = 1215
_ExtentX = 2143
_ExtentY = 582
_Version = 393216
Style = 2
Text = ""
End
Begin MSDataListLib.DataCombo dco_Emps
Height = 330
Left = 1080
TabIndex = 12
Top = 1120
Width = 1215
_ExtentX = 2143
_ExtentY = 582
_Version = 393216
Style = 2
Text = ""
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "问题解答"
Height = 180
Left = 240
TabIndex = 8
Top = 1620
Width = 720
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "创建日期"
Height = 180
Left = 3240
TabIndex = 6
Top = 1200
Width = 720
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "创建人"
Height = 180
Left = 240
TabIndex = 5
Top = 1200
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "问题题目"
Height = 180
Left = 240
TabIndex = 3
Top = 780
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "问题类型"
Height = 180
Left = 240
TabIndex = 1
Top = 360
Width = 720
End
End
End
Attribute VB_Name = "FrmFaqEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public OriFaqId As Long
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub Cmd_OK_Click()
If Len(Trim(dco_Types.Text)) = 0 Then
MsgBox "请选择问题类型"
Exit Sub
dco_Types.SetFocus
End If
If Len(Trim(txtTitle)) = 0 Then
MsgBox "请输入问题题目"
Exit Sub
txtTitle.SetFocus
End If
If Len(Trim(dco_Emps.Text)) = 0 Then
MsgBox "请选择问题创建人"
Exit Sub
dco_Emps.SetFocus
End If
If Len(Trim(txtDetail)) = 0 Then
MsgBox "请输入问题解答"
Exit Sub
txtDetail.SetFocus
End If
With MyFaq
.Title = Trim(txtTitle)
.TypeId = Val(dco_Types.BoundText)
.Poster = Trim(dco_Emps.BoundText)
.Createdate = Trim(txtDate)
.Detail = Trim(txtDetail)
If Modify = False Then
.Insert
Else
.Update (OriFaqId)
End If
End With
Unload Me
End Sub
Private Sub Form_Load()
LoadData
End Sub
Private Sub LoadData()
AdoTypes.ConnectionString = Conn
AdoTypes.RecordSource = "SELECT * FROM BaseInfo WHERE Flag=1 ORDER BY Id"
AdoTypes.Refresh
Set dco_Types.RowSource = AdoTypes
dco_Types.ListField = "BaseName"
dco_Types.BoundColumn = "Id"
Ado_Emps.ConnectionString = Conn
Ado_Emps.RecordSource = "SELECT * FROM Users ORDER BY EmpName"
Ado_Emps.Refresh
Set dco_Emps.RowSource = Ado_Emps
dco_Emps.ListField = "EmpName"
dco_Emps.BoundColumn = "UserName"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -