📄 frmstsc.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form frmSTSC
ClientHeight = 5580
ClientLeft = 48
ClientTop = 48
ClientWidth = 7344
ControlBox = 0 'False
BeginProperty Font
Name = "宋体"
Size = 10.8
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
LockControls = -1 'True
ScaleHeight = 5580
ScaleWidth = 7344
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
Caption = "试卷生成方案"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 5376
Left = 108
TabIndex = 0
Top = 108
Width = 7176
Begin VB.CommandButton Command8
Caption = "查看试卷"
Height = 360
Left = 1320
TabIndex = 25
Top = 4872
Width = 1188
End
Begin VB.TextBox Text5
Height = 324
Left = 1140
Locked = -1 'True
TabIndex = 23
Top = 4428
Width = 936
End
Begin VB.TextBox Text4
Height = 372
Left = 1080
TabIndex = 21
Top = 1260
Width = 5808
End
Begin VB.CommandButton Command7
Caption = "新建"
Height = 360
Left = 2856
TabIndex = 20
Top = 4872
Width = 948
End
Begin VB.CommandButton Command6
Caption = "删除"
Height = 360
Left = 3888
TabIndex = 19
Top = 4872
Width = 948
End
Begin VB.CommandButton Command3
Caption = "生成试卷"
Height = 360
Left = 96
TabIndex = 18
Top = 4872
Width = 1188
End
Begin VB.CommandButton Command4
Caption = "保存"
Height = 360
Left = 4920
TabIndex = 17
Top = 4872
Width = 948
End
Begin VB.CommandButton Command5
Caption = "取消"
Height = 360
Left = 5952
TabIndex = 16
Top = 4872
Width = 948
End
Begin MSComctlLib.ListView List1
Height = 2268
Left = 228
TabIndex = 15
Top = 2148
Width = 6720
_ExtentX = 11853
_ExtentY = 4001
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = 0 'False
FullRowSelect = -1 'True
GridLines = -1 'True
_Version = 393217
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
NumItems = 0
End
Begin VB.TextBox Text3
Height = 324
Left = 3864
TabIndex = 13
Top = 1704
Width = 1104
End
Begin VB.ComboBox Combo2
Height = 312
ItemData = "frmSTSC.frx":0000
Left = 1092
List = "frmSTSC.frx":000D
Style = 2 'Dropdown List
TabIndex = 12
Top = 1692
Width = 1632
End
Begin VB.TextBox Text2
Height = 324
Left = 1104
TabIndex = 10
Top = 468
Width = 5772
End
Begin VB.TextBox Text1
Height = 324
Left = 5940
TabIndex = 8
Top = 888
Width = 936
End
Begin VB.CommandButton Command2
Caption = "移出"
Height = 324
Left = 6204
TabIndex = 7
Top = 1764
Width = 684
End
Begin VB.CommandButton Command1
Caption = "加入"
Height = 324
Left = 5328
TabIndex = 6
Top = 1752
Width = 684
End
Begin VB.ComboBox Combo1
Height = 312
ItemData = "frmSTSC.frx":001A
Left = 3852
List = "frmSTSC.frx":0027
Style = 2 'Dropdown List
TabIndex = 3
Top = 876
Width = 1128
End
Begin VB.ComboBox Combo3
Height = 312
ItemData = "frmSTSC.frx":0034
Left = 1092
List = "frmSTSC.frx":0041
Style = 2 'Dropdown List
TabIndex = 1
Top = 864
Width = 1632
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "试卷总分"
Height = 216
Left = 228
TabIndex = 24
Top = 4488
Width = 864
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "备 注"
Height = 216
Left = 144
TabIndex = 22
Top = 1332
Width = 864
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "题型分值"
Height = 216
Left = 2856
TabIndex = 14
Top = 1740
Width = 864
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "方案名称"
Height = 216
Left = 168
TabIndex = 11
Top = 504
Width = 864
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "生成套数"
Height = 216
Left = 5052
TabIndex = 9
Top = 924
Width = 864
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "试卷题型"
Height = 216
Left = 168
TabIndex = 5
Top = 1752
Width = 864
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "试卷难度"
Height = 216
Left = 2856
TabIndex = 4
Top = 912
Width = 864
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "考试类型"
Height = 216
Left = 132
TabIndex = 2
Top = 888
Width = 864
End
End
End
Attribute VB_Name = "frmSTSC"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public m_ID As String
Public m_Type As String
Private SJ_ID As String
Private xml_txt As String
Private Sub Combo2_Click()
Text3.Text = ""
End Sub
Private Sub Command1_Click()
AddTxfz
End Sub
Private Sub Command2_Click()
DeleteTxfz
End Sub
Private Sub Command3_Click()
If m_Type = SNEW Then
MsgMsg "请选保存方案!"
Exit Sub
End If
Dim BC_ID As String
BC_ID = GetID
Dim sSQL As String
Dim i_ts As Long
Dim icount As Long
i_ts = CInt(Text1.Text)
For icount = 1 To i_ts
sSQL = "update stk set XZ=-1"
dbcon.Execute sSQL
CreateST_ONE icount, BC_ID
Next
sSQL = "update stk set XZ=-1"
dbcon.Execute sSQL
MsgMsg "生成完毕!"
End Sub
Private Sub CreateST_ONE(ByVal i_t As Long, ByVal BC_ID As String)
Dim sSQL As String
Dim Rs As New ADODB.Recordset
Dim SJ_ID As String
Dim SJ_ND As String
Dim SJ_MC As String
Dim SJ_LX As String
SJ_ND = Combo1.Text
SJ_MC = Text2.Text
SJ_LX = Combo3.Text
SJ_ID = GetID
sSQL = "select * from sjk where ID='" & SJ_ID & "'"
Rs.Open sSQL, dbcon, adOpenKeyset, adLockOptimistic, adCmdText
Rs.AddNew
Rs("ID") = SJ_ID
Rs("SJMC") = SJ_MC & "---" & i_t
Rs("SJND") = SJ_ND
Rs("SJLX") = SJ_LX
Rs("ZF") = Text5.Text
Rs("FAID") = m_ID
Rs("SCRQ") = Date
Rs("ZTS") = Text1.Text
Rs("TS") = i_t
Rs.Update
Rs.Close
Dim tmp_item As ListItem
For Each tmp_item In List1.ListItems
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -