计算机应用 | 古代文学 | 市场营销 | 生命科学 | 交通物流 | 财务管理 | 历史学 | 毕业 | 哲学 | 政治 | 财税 | 经济 | 金融 | 审计 | 法学 | 护理学 | 国际经济与贸易
计算机软件 | 新闻传播 | 电子商务 | 土木工程 | 临床医学 | 旅游管理 | 建筑学 | 文学 | 化学 | 数学 | 物理 | 地理 | 理工 | 生命 | 文化 | 企业管理 | 电子信息工程
计算机网络 | 语言文学 | 信息安全 | 工程力学 | 工商管理 | 经济管理 | 计算机 | 机电 | 材料 | 医学 | 药学 | 会计 | 硕士 | 法律 | MBA
现当代文学 | 英美文学 | 通讯工程 | 网络工程 | 行政管理 | 公共管理 | 自动化 | 艺术 | 音乐 | 舞蹈 | 美术 | 本科 | 教育 | 英语 |

电子教务管理系统vb(一)毕业论文(4)

2013-05-06 18:02
导读:e Command1.Enabled = False Command2.Enabled = False Command3.Enabled = False Command4.Enabled = False Command7.Enabled = True Command8.Enabled = False Command9.Enabled = False Command13.Enabled = Fals
e
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command7.Enabled = True
Command8.Enabled = False
Command9.Enabled = False
Command13.Enabled = False
For i = 0 To 8
 txtcj(i).Enabled = True
 txtcj(i).Text = ""
Next i
End Sub

Private Sub Command9_Click()
On Error GoTo err
    For i = 0 To 8
       If Trim(txtcj(i).Text) > Text3.Text * 1 Then
          MsgBox "成绩大于预定值!", , "成绩第" & i + 1 & "项错误"
          Exit Sub
       End If
    Next i
txtcj(9).Text = txtcj(0) * 1 + txtcj(1) * 1 + txtcj(2) * 1 + txtcj(3) * 1 + txtcj(4) * 1 + txtcj(5) * 1 * (Text2.Text * 1) + txtcj(6) * 1 * (Text2.Text * 1) + txtcj(7) * 1 * (Text2.Text * 1) + txtcj(8) * 1 * (Text2.Text * 1)
If AddFlg = False Then
Rs1.Open "select 语文,数学,英语,物理,化学,政治,历史,地理,生物,总分 from 成绩表 where 考试号='" & Trim(KSH.Caption) & "' and 考试性质='" & Text1.Text & "'", Con, adOpenStatic, adLockPessimistic, adCmdText
   Rs1!语文 = Trim(txtcj(0).Text)
   Rs1!数学 = Trim(txtcj(1).Text)
   Rs1!英语 = Trim(txtcj(2).Text)
   Rs1!物理 = Trim(txtcj(3).Text)
   Rs1!化学 = Trim(txtcj(4).Text)
   Rs1!政治 = Trim(txtcj(5).Text) * 1 * (Text2.Text * 1)
   Rs1!历史 = Trim(txtcj(6).Text) * 1 * (Text2.Text * 1)
   Rs1!地理 = Trim(txtcj(7).Text) * 1 * (Text2.Text * 1)
   Rs1!生物 = Trim(txtcj(8).Text) * 1 * (Text2.Text * 1)
   Rs1!总分 = Trim(txtcj(9).Text)
   Rs1.UpdateBatch adAffectAllChapters 大学排名
   SBar1.Panels.Item(1) = "修改成功保存!"
 
Rs1.Close
Else
  
   CmdExe.ActiveConnection = Con
   CmdExe.CommandText = "insert into 成绩表(考试号,语文,数学,英语,物理,化学,政治,历史,地理,生物,总分,考试性质) values " & "(" & KSH.Caption & "," & txtcj(0).Text & "," & txtcj(1).Text & "," & txtcj(2).Text & "," & txtcj(3).Text & "," & txtcj(4).Text & "," & txtcj(5).Text * 1 * (Text2.Text * 1) & "," & txtcj(6).Text * 1 * (Text2.Text * 1) & "," & txtcj(7).Text * 1 * (Text2.Text * 1) & "," & txtcj(8).Text * 1 * (Text2.Text * 1) & "," & txtcj(9).Text & ",'" & Text1.Text & "')"
   CmdExe.Execute
   SBar1.Panels.Item(1) = "添加成功保存!"
   iCount = iCount + 1
End If
Label3.Caption = "共添加" & iCount & "条记录"

rs.MoveNext
If List1.ListIndex + 1 < List1.ListCount Then
 List1.ListIndex = List1.ListIndex + 1
End If

Display

Exit Sub
err:
Call ExecErr(Date, Me.Caption, err.Number, err.Source, err.Description)
End Sub

Private Sub Form_Load()
AddFlg = False
iCount = 0
Set rs = New ADODB.Recordset
Set Rs1 = New ADODB.Recordset
Set CmdExe = New ADODB.Command

Dim rsbj As ADODB.Recordset
Set rsbj = New ADODB.Recordset
    rsbj.Open "班级表", Con, adOpenStatic, adLockPessimistic, adCmdTable
   
    Combo1.Clear
    Do While Not rsbj.EOF
        Combo1.AddItem rsbj!班级
        rsbj.MoveNext
    Loop
 &n

上一篇:计算机专业实习总结毕业论文网 下一篇:没有了