?? frm_kq_zqsetup_02.frm
字號:
VERSION 5.00
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form frm_KQ_ZQSetup_02
Caption = "新增班次周期"
ClientHeight = 4545
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4545
ScaleWidth = 4680
StartUpPosition = 1 '所有者中心
Begin VB.ListBox List1
Height = 2940
Left = 360
TabIndex = 9
Top = 1320
Width = 3135
End
Begin VB.CommandButton Command2
Caption = "確定"
Height = 500
Index = 0
Left = 3840
Picture = "frm_KQ_ZQSetup_02.frx":0000
Style = 1 'Graphical
TabIndex = 8
Top = 3240
Width = 735
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 500
Index = 1
Left = 3840
Picture = "frm_KQ_ZQSetup_02.frx":00F2
Style = 1 'Graphical
TabIndex = 7
Top = 3840
Width = 735
End
Begin VB.CommandButton Command1
Height = 320
Index = 1
Left = 3840
Picture = "frm_KQ_ZQSetup_02.frx":0186
Style = 1 'Graphical
TabIndex = 6
Top = 1800
Width = 320
End
Begin VB.CommandButton Command1
Height = 320
Index = 0
Left = 3840
Picture = "frm_KQ_ZQSetup_02.frx":05C8
Style = 1 'Graphical
TabIndex = 5
Top = 1320
Width = 320
End
Begin VB.CommandButton Command1
Height = 320
Index = 2
Left = 3840
Picture = "frm_KQ_ZQSetup_02.frx":0A0A
Style = 1 'Graphical
TabIndex = 4
Top = 2280
Width = 320
End
Begin VB.TextBox Text1
BackColor = &H00C0DCC0&
Height = 330
Left = 1320
TabIndex = 2
Top = 345
Width = 2175
End
Begin MSDataListLib.DataCombo DataCombo1
Height = 330
Index = 0
Left = 1320
TabIndex = 0
Top = 840
Width = 2175
_ExtentX = 3836
_ExtentY = 582
_Version = 393216
BackColor = 12639424
Text = ""
End
Begin VB.Label Label1
Caption = "班次周期"
Height = 255
Index = 1
Left = 360
TabIndex = 3
Top = 480
Width = 1005
End
Begin VB.Label Label1
Caption = "班次名稱"
Height = 255
Index = 0
Left = 360
TabIndex = 1
Top = 960
Width = 1005
End
End
Attribute VB_Name = "frm_KQ_ZQSetup_02"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mDB As New mDB
Dim strSQL As String
Dim adoprimaryRS As ADODB.Recordset
Dim strSQL2 As String
Dim adoPrimaryRS2 As ADODB.Recordset
Dim strSQL3 As String
Dim adoPrimaryRS3 As ADODB.Recordset
Dim strSQL4 As String
Dim adoprimaryRS4 As ADODB.Recordset
Private Sub Command1_Click(Index As Integer)
Select Case Index
Case 0
List1.AddItem DataCombo1(0).Text
Case 1
If List1.Text <> "" Then
List1.RemoveItem List1.ListIndex
End If
Case 2
List1.Clear
End Select
End Sub
Private Sub Command2_Click(Index As Integer)
Dim i As Integer
Dim J As Integer
Dim nCount As Integer
nCount = List1.ListCount
Select Case Index
Case 0
If nCount Then
strSQL = "select max(regualid) from wktmregual"
Set adoprimaryRS = mDB.adoprimaryRS(strSQL)
J = adoprimaryRS.Fields(0).Value + 1
strSQL = "select * from wktmregual"
Set adoprimaryRS = mDB.adoprimaryRS(strSQL)
For i = 1 To nCount
With adoprimaryRS
.AddNew
.Fields("regualid").Value = J
.Fields("regualname").Value = Text1.Text
.Fields("regualorder").Value = i
DataCombo1(0).Text = List1.List(i - 1)
.Fields("wktmid").Value = DataCombo1(0).BoundText
.Fields("wktmdays").Value = nCount
.Update
End With
Next i
End If
Unload Me
Case 1
Unload Me
End Select
End Sub
Private Sub Form_Load()
Set mDB = New mDB
mDB.InitDB_RY SQLConnDR
strSQL = "select * from wktm"
Set adoprimaryRS = mDB.adoprimaryRS(strSQL)
With DataCombo1(0)
Set .RowSource = adoprimaryRS
.BoundColumn = "wktmid"
.ListField = "wktmdecs"
.Refresh
End With
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -