<!--#include file="pysjzx_conn.asp"-->
<!--#include file="session.asp"-->
<%dim action,anclassid
anclassid=request.QueryString("id")
action=request.querystring("action")
select case action
'//添加新数据
case "add" 
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from anclass",conn,1,3
rs.AddNew
rs("letter")=trim(request("letter2"))
rs("anclass")=trim(request("anclass2"))
rs("anclassidorder")=int(request("anclassidorder2"))
rs.Update
rs.Close
set rs=nothing
response.Redirect "anclass.asp"
'//修改数据
case "edit"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from anclass where anclassid="&anclassid,conn,1,3
rs("letter")=trim(request("letter"))
rs("anclass")=trim(request("anclass"))
rs("anclassidorder")=int(request("anclassidorder"))
rs.Update
rs.Close
set rs=nothing
response.Redirect "anclass.asp"
'//删除数据
case "del"
conn.execute ("delete from anclass  where anclassid="&anclassid)
conn.execute ("delete from nclass where anclassid="&anclassid)
conn.execute ("delete from car where anclassid="&anclassid)
response.Redirect "anclass.asp"
end select
%> 
  