Else '显示统计结果
Dim bjhc As String = trim(e.PostValues("xd") & e.PostValues("xj") & e.PostValues("bj"))
wb.AppendCookie("xq",e.PostValues("学期"))
wb.AppendCookie("bj",bjhc)
wb.AppendCookie("km",e.PostValues("km"))
wb.AppendCookie("ksmc",e.PostValues("ksmc"))
wb.AddPageTitle("","pageheader","学生成绩表册",e.postvalues("学期") & ">" & bjhc & ">" & e.postvalues("km") & ">" & e.PostValues("ksmc"))
' wb.AddForm("","form1","")
Dim dr As DataRow = DataTables("用户").sqlfind("身份证号 = '" & e.Cookies("username") & "'")
Dim xss As List(Of DataRow)
xss = DataTables("学生信息").sqlSelect("学校名称 = '" & dr("group") & "' And 班级 = '" & bjhc & "' and left(状态,2) ='在读'")
For Each xs As DataRow In xss
Dim pr As DataRow
pr =DataTables("自测成绩").sqlfind("学期= '"& e.PostValues("学期") & "' and 学校名称 = '" & dr("group") & "' and 班级 = '" & bjhc & "' And 考试名称 ='" & e.PostValues("ksmc") & "' and 科目 = '" & e.PostValues("km") & "' and 身份证号 = '" & xs("身份证件号") & "'")
If pr Is Nothing
pr = DataTables("自测成绩").addnew()
End If
pr("学校名称")= dr("group")
pr("考试名称")= e.PostValues("ksmc")
pr("科目") =e.PostValues("km")
pr("班级") = xs("班级")
pr("姓名")=xs("学生姓名")
pr("身份证号")=xs("身份证件号")
pr("学期") = e.PostValues("学期")
pr("考试日期")= e.postvalues("rq")
pr("A卷满分")=val(e.postvalues("amf"))
pr("B卷满分")=val(e.postvalues("bmf"))
pr("A卷折率")=val(e.postvalues("az"))
pr("B卷折率")=val(e.postvalues("bz"))
pr("教师身份证")= e.Cookies("username")
pr.save()
Next
For Each key As String In e.Values.Keys
If key.Contains("txt1_")
Dim jlh As String = key.split("_")(1)
Dim fdr As DataRow = DataTables("自测成绩").sqlfind("_Identify = '" & jlh & "'")
fdr("A卷") = val(e.values("txt1_" & jlh))
fdr("B卷") = val(e.values("txt2_" & jlh))
fdr("总分")= val(e.values("txt1_" & jlh)) +val(e.values("txt2_" & jlh))
fdr.save()
End If
Next
wb.AddToast("","t1", "正在上传",1) '定义提示
wb.AddForm("","form1","tfsz.htm").attribute= """
With wb.AddButtonGroup("form1","btg1", False) '水平排列
.Add("btn6", "保存","submit")
'.Add("btn7", "返回","button","tfsz.htm")'.Attribute = ""
End With
Dim xss1 As List(Of DataRow) =DataTables("自测成绩").sqlselect("学期= '"& e.PostValues("学期") & "' And 班级 = '" & bjhc & "' And 考试名称 ='" & e.PostValues("ksmc") & "' and 科目 = '" & e.PostValues("km") & "' and 教师身份证 = '" & e.Cookies("username") & "'","","总分 desc,姓名")
wb.InsertHTML("form1", "<Table border=1 cellspacing=0 style='width:100%;text-align:center;'><tr><td style='text-align:center;font-size: 15pt;strong'>姓名</td><td style='text-align:center;font-size: 15pt'>A卷</td><td style='text-align:center;font-size: 15pt'>B卷</td><td style='text-align:center;font-size: 15pt'>总分</td></tr>")
For Each xs1 As DataRow In xss1
wb.insertHtml("form1", "<tr><td style='width:25%;font-size:15pt' >" & xs1("姓名") & "</td><td style='width:25%'><input style='width:95%;font-size: 15pt; border:none;text-align:center;' type='number' max= '" & xs1("A卷满分") & "' min ='0' name='txt1_" & xs1("_Identify") & "' value='" & iif(xs1("A卷")>0, xs1("A卷"),"") & "' /></td><td style='width:25%'><input style='width:95%;font-size:15pt;border:none;text-align:center;' type= 'number' max= '" & xs1("B卷满分") & "' name='txt2_" & xs1("_Identify") & "' value='" & iif(xs1("B卷")>0,xs1("B卷"),"") & "' /></td><td style='width:25%;font-size:15pt' >" & xs1("总分") & "</td></tr>")
Next