Dim sb As StringBuilder
Dim dr As DataRow =DataTables("users").find("name = '" & username & "'")
If dr IsNot Nothing Then
Dim dr1 As DataRow =DataTables("interest_classes").find("name = '" & e.PostValues("iname") & "'")
Dim dr2 As List(Of DataRow)
dr2 =DataTables("users").Select("[class] = '" & dr("class") & "' and [interestid] = '" & dr1("id") & "'")
messagebox.Show("ok2")
If dr2.count <=4 Then
messagebox.Show("ok3")
If dr("interestid")<>dr1("id") Then
dr("interestid")=dr1("id")
messagebox.Show("ok4")
dr.Save()
sb.AppendLine("报名成功! <br/><br/>")
sb.AppendLine("<a href='default.htm'>返回!</a>")
e.WriteString(sb.ToString)
End If
messagebox.Show("ok5")
Dim sb91 As StringBuilder
messagebox.Show("ok6")
sb91.AppendLine("Hello World")
messagebox.Show("ok7")
sb91.AppendLine("<a href='default.htm'>返回!</a>")
messagebox.Show("ok8")
e.WriteString(sb91.ToString)
messagebox.Show("ok9")
Else
messagebox.Show("ok10")
sb.AppendLine("报名失败!本社团已满员!请选择其它社团报名! <br/><br/>")
sb.AppendLine("<a href='default.htm'>返回!</a>")
e.WriteString(sb.ToString)
End If
Else
messagebox.Show("ok4")
Dim sb1 As StringBuilder
sb1.AppendLine("报名失败! <br/><br/>")
sb1.AppendLine("<a href='default.htm'>返回!</a>")
e.WriteString(sb1.ToString)
End If
e.WriteString(wb.Build)
[此贴子已经被作者于2023/9/9 8:27:34编辑过]