?? frmscore.frm
字號:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form frmScore
Caption = "成績輸入"
ClientHeight = 5550
ClientLeft = 60
ClientTop = 345
ClientWidth = 9015
Icon = "frmScore.frx":0000
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 5550
ScaleWidth = 9015
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 960
Top = 5640
Width = 1200
_ExtentX = 2117
_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= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=eislink"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "eislink"
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = $"frmScore.frx":0442
Caption = "Adodc1"
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.Frame Frame3
Caption = "課程成績輸入"
Height = 2775
Left = 0
TabIndex = 13
Top = 2760
Width = 9015
Begin VB.CommandButton btnUpdate
Caption = "修改成績"
Height = 375
Left = 7440
TabIndex = 17
Top = 1320
Width = 1215
End
Begin VB.TextBox txbScore
Height = 375
Left = 7560
TabIndex = 16
Top = 720
Width = 1215
End
Begin MSDataGridLib.DataGrid DataGrid1
Bindings = "frmScore.frx":04F6
Height = 2415
Left = 0
TabIndex = 14
Top = 240
Width = 6855
_ExtentX = 12091
_ExtentY = 4260
_Version = 393216
HeadLines = 1
RowHeight = 15
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.Label Label6
Caption = "成績"
Height = 255
Left = 7080
TabIndex = 15
Top = 840
Width = 495
End
End
Begin VB.Frame Frame2
Caption = "選擇課程"
Height = 1335
Left = 0
TabIndex = 3
Top = 1440
Width = 9015
Begin VB.CommandButton btnSubmit
Caption = "最終提交"
Height = 375
Left = 2760
TabIndex = 12
Top = 720
Width = 975
End
Begin VB.CommandButton btnSearch
Caption = "查詢"
Height = 375
Left = 2040
TabIndex = 11
Top = 720
Width = 615
End
Begin VB.TextBox txbName
Height = 375
Left = 2760
TabIndex = 10
Top = 240
Width = 975
End
Begin VB.TextBox txbId
Height = 375
Left = 840
TabIndex = 9
Top = 720
Width = 975
End
Begin VB.TextBox txbPY
Height = 375
Left = 840
TabIndex = 8
Top = 240
Width = 975
End
Begin VB.Label Label5
Caption = $"frmScore.frx":050B
Height = 975
Left = 4320
TabIndex = 7
Top = 240
Width = 4575
End
Begin VB.Label Label4
Caption = "課程名稱"
Height = 255
Left = 2040
TabIndex = 6
Top = 360
Width = 855
End
Begin VB.Label Label3
Caption = "課程編號"
Height = 255
Left = 120
TabIndex = 5
Top = 840
Width = 735
End
Begin VB.Label Label2
Caption = "課程拼音"
Height = 255
Left = 120
TabIndex = 4
Top = 360
Width = 855
End
End
Begin VB.Frame Frame1
Caption = "結束選課,生成空成績單"
Height = 1455
Left = 0
TabIndex = 0
Top = 0
Width = 9015
Begin VB.CommandButton btnClear
Caption = "終止選課,生成空成績單"
Height = 375
Left = 360
TabIndex = 1
Top = 600
Width = 2295
End
Begin VB.Label Label1
Caption = $"frmScore.frx":05F3
Height = 975
Left = 3120
TabIndex = 2
Top = 360
Width = 4695
End
End
End
Attribute VB_Name = "frmScore"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub SetDGDList()
Dim strSQL As String
strSQL = "select b.課程名稱,a.學號,c.姓名,a.成績,"
strSQL = strSQL + " a.編號,a.課程編號 from 成績表 as a, 課程信息 as b, "
strSQL = strSQL + "學生信息 as c where a.課程編號=b.課程編號 and a.學號"
strSQL = strSQL + "=c.學號 and 是否已確定成績 = 'N' "
Dim strFilter As String
strFilter = ""
If Len(Trim(Me.txbPY.Text)) <> 0 Then
strFilter = strFilter + " and 拼音碼 like '" + Trim(txbPY.Text) + "%'"
End If
If Len(Trim(Me.txbName.Text)) <> 0 Then
strFilter = strFilter + " and a.學號 like '" + Trim(txbId.Text) + "%'"
End If
If Len(Trim(Me.txbName.Text)) <> 0 Then
strFilter = strFilter + " and c.姓名 like '" + txbName.Text + "%'"
End If
If Len(Trim(strFilter)) = 0 Then
Exit Sub
Else
strFilter = strFilter + " order by b.課程名稱,a.學號"
Dim db As New DataBases
Dim rs As Recordset
Set rs = db.RunSelectSQL(strSQL + strFilter)
Set Adodc1.Recordset = rs
End If
End Sub
Private Sub btnClear_Click()
Dim db As New DataBases
db.RunSelectSQL ("exec sf_終止選課")
End Sub
Private Sub btnSearch_Click()
SetDGDList
End Sub
Private Sub btnSubmit_Click()
If Adodc1.Recordset.EOF Or Adodc1.Recordset.BOF Then
Exit Sub
End If
Dim strSubject As String
strSubject = Trim(Adodc1.Recordset(5))
If MsgBox("提交后成績不可以修改,是否確認提交?", vbYesNo) = vbYes Then
Dim strSQL As String
strSQL = "exec sf_成績提交 " + strSubject
Dim db As New DataBases
db.RunSelectSQL (strSQL)
MsgBox ("提交成績成功!")
SetDGDList
End If
End Sub
Private Sub btnUpdate_Click()
Dim score As Integer
score = CInt(txbScore.Text)
If Not Adodc1.Recordset.EOF And Not Adodc1.Recordset.BOF Then
Dim db As New DataBases
Dim strSQL As String
strSQL = "update 成績表 set 成績="
strSQL = strSQL + Trim(txbScore.Text) + " where 編號="
strSQL = strSQL + Trim(Adodc1.Recordset(4))
db.RunSelectSQL (strSQL)
SetDGDList
End If
End Sub
Private Sub Form_Load()
Dim db As New DataBases
Adodc1.ConnectionString = db.sConn
End Sub
Private Sub txbPY_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SetDGDList
End If
End Sub
Private Sub txbName_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SetDGDList
End If
End Sub
Private Sub txbId_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
SetDGDList
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -