 |
设备管理 |
<%
Action = request("Action")
select case Action
case "Modify"
call Modify
case "SaveModify"
call SaveModify
case "doMoveToClass"
call doMoveToClass
case else
call main
end select
sub main()
%>
<%
end sub
sub modify()
dim rsem, id
id = trim(request("id"))
set rsem = conn.execute("select * from t_dev_property where id = " & id)
if rsem.bof and rsem.eof then
response.write "error"
else
%>
<%
end if
end sub
sub SaveModify()
dim id, areaid, devicename, rssm, sqlsm
id = trim(request("ID"))
areaid = trim(request("areaid"))
'devicename = trim(request("devicename"))
sqlsm = "select * from t_dev_property where id = " & id
set rssm = server.CreateObject("adodb.recordset")
rssm.open sqlsm, conn, 1, 3
if rssm.bof and rssm.eof then
FoundErr = True
ErrMsg = ErrMsg & "找不到指定的区域!"
rssm.Close
Set rssm = Nothing
Exit Sub
end if
'rssm("devicename") = devicename
rssm("areaid") = areaid
rssm.update
rssm.close
set rssm = nothing
If FoundErr = True Then Exit Sub
Response.Redirect "Admin_equipment.asp"
end sub
sub doMoveToClass()
dim BatchInfoID, areaid, rsar
BatchInfoID = ReplaceBadChar(Request("Batcheid"))
If BatchInfoID = "" Then
BatchInfoID = ReplaceBadChar(Request("eid"))
End If
if BatchInfoID = "" then response.write ""
if BatchInfoID = "" then response.end
areaid = trim(request("areaid"))
set rsar = conn.execute("select child from t_area where t_classid = " & areaid)
if rsar(0) <> 0 then response.write ""
if rsar(0) <> 0 then response.end
conn.execute("update t_dev_property set areaid = " & areaid & " where id in (" & BatchInfoID & ")")
response.redirect "admin_equipment.asp"
end sub
%> |
|