对象类
Trainees.asp
<%
Class Trainees
Private mID'报名ID
Private mName'姓名
Private mSex'性别
Private mSchool'学校
Private mProfessional'专业
Private mTime'时间
'类初始化
Private Sub Class_Initialize
mID=0'报名ID
mName=""'姓名
mSex=""'性别
mSchool=""'学校
mProfessional=""'专业
mTime=""'时间
End Sub
'填充记录集
Private Sub FillRecordSet(rsTrain)
rsTrain("Peixunjigou")=mSchool
rsTrain("Sex")=mSex
rsTrain("Kechengtitle")=mProfessional
rsTrain("baomingtime")=mTime
rsTrain("XingMing")=mName
End Sub
'读取记录集
Private Sub ReadRecordSet(rsTrain)
mName=rsTrain("XingMing")
mSchool=rsTrain("Peixunjigou")
mSex=rsTrain("Sex")
mProfessional=rsTrain("Kechengtitle")
mTime=rsTrain("baomingtime")
End Sub
'读取学员信息
Public Function ReadTrainess()
Dim rsTrain,Sql
Sql="select * from baoming Where baomingid="&mID
Set rsTrain=conn.Execute(Sql)
IF rsTrain.EOF Then
ReadTrainess=False
Else
ReadRecordSet rsTrain
ReadTrainess=True
End IF
rsTrain.Close
Set rsTrain=Nothing
End Function
'属性过程
Public Property Let ID(vData)
mID=vData
End Property
Public Property Get ID()
ID=mID
End Property
Public Property Let Time(vData)
mTime=vData
End Property
Public Property Get Time()
Time=mTime
End Property
Public Property Let Professional(vData)
mProfessional=vData
End Property
Public Property Get Professional()
Professional=mProfessional
End Property
Public Property Let School(vData)
mSchool=vData
End Property
Public Property Get School()
School=mSchool
End Property
Public Property Let Name(vData)
mName=vData
End Property
Public Property Get Name()
Name=mName
End Property
Public Property Let Sex(vData)
mSex=vData
End Property
Public Property Get Sex()
Sex=mSex
End Property
End Class
%>
显示界面
<!--#include file="info.asp"-->
<!--#include file="yinger.asp"-->
<!--#include file="newshoulderconn.asp"-->
<!--#include file="Trainees.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>报名学信息</title>
<style type="text/css">
.b1 {height:1px; font-size:1px; overflow:hidden; display:block; background:#5BBC2A; margin:0 5px;}
.b2 {height:1px; font-size:1px; overflow:hidden; display:block; background:red;
border-right:1px solid #5BBC2A; border-left:1px solid #5BBC2A; margin:0 3px;}
.b3 {height:1px; font-size:1px; overflow:hidden; display:block; background:red;
border-right:1px solid #5BBC2A; border-left:1px solid #5BBC2A; margin:0 2px;}
.b4 {height:2px; font-size:1px; overflow:hidden; display:block; background:red;
border-right:1px solid #5BBC2A; border-left:1px solid #5BBC2A; margin:0 1px;}
.TBStyle
.style1 {color: #FFFF00}
.style1 {
color: #FFFF00;
font-weight: bold;
font-size: 14px;
}
.style2 {font-size: 14px}
</style>
<script language="javascript">
<%
Dim ObjStu
Set ObjStu=New Trainees'创建学员对象
ObjStr.Name=trim(request("baomingid"))'设置学员姓名
IF ObjStr.ReadTrainess()=False Then
Response.Write "alert('没有该学员信息');"
End IF
%>
</script>
</head>
<body>
<table width="239" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
<!--DWLayoutTable-->
<tr>
<td width="239" height="4"></td>
</tr>
<tr>
<td height="4" valign="top"><b class="b1"></b><b class="b2"></b><b class="b4"></b></td>
</tr>
<tr>
<td height="13" valign="top" bgcolor="#FF0000"><div align="center" class="style1">今日部分学员报名列表</div></td>
</tr>
<tr>
<td height="5" valign="top"><b class="b4"></b><b class="b3"></b><b class="b2"></b><b class="b1"></b></td>
</tr>
<tr>
<td height="100" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="42" height="8"></td>
<td width="197"></td>
</tr>
<tr>
<td height="14" valign="top"><span class="style2">姓 名:</span></td>
<td valign="top"><span class="style2"><%=ObjStu.Name%></span></td>
</tr>
<tr>
<td height="6"></td>
<td></td>
</tr>
<tr>
<td height="14" valign="top"><span class="style2">性 别:</span></td>
<td valign="top"><span class="style2"><%=ObjStu.Sex%></span></td>
</tr>
<tr>
<td height="2"></td>
<td></td>
</tr>
<tr>
<td height="17" valign="top"><span class="style2">学 校:</span></td>
<td valign="top"><span class="style2"><%=ObjStu.School%></span></td>
</tr>
<tr>
<td height="3"></td>
<td></td>
</tr>
<tr>
<td height="16" valign="top"><span class="style2">专 业:</span></td>
<td valign="top"><span class="style2"><%=ObjStu.Professional%></span></td>
</tr>
<tr>
<td height="4"></td>
<td></td>
</tr>
<tr>
<td height="16" valign="top"><span class="style2">时 间:</span></td>
<td valign="top"><span class="style2"><%=ObjStu.Time%></span></td>
</tr>
</table></td>
</tr>
</table>
<%
Set ObjStu=Nothing
conn.Close
Set conn=Nothing
%>
</body>
</html>
index_top2.asp?baomingid=1
修改后的程序url访问形式,用报名ID做查询即可。