?? projectreadonly_editlist.asp
字號(hào):
<!--#include file="../Include/TimeOut.asp"-->
<!--#include file="../Include/online.asp"-->
<html>
<head>
<title>項(xiàng)目列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/CssLib/CssLink.css">
<link rel="stylesheet" href="/CssLib/CssButton.css">
</head>
<Script Language=JavaScript>
<!--
function open2(Code)
{
window.open("/user/User_MoreDisplay.asp?Code="+Code,"用戶(hù)詳細(xì)資料","height=410,width=500,toolbar=no,menubar=no,scrollbars=yes,resizable=no,status=no,location=no")
}
function myalert()
{
window.alert("您只能修改'修改標(biāo)志'為'可修改'的記錄!")
}
function DelAlert()
{
window.alert("您只能刪除'修改標(biāo)志'為'可修改'的記錄!")
}
function SelAll_onclick(){
if(ConList.SelAll.checked){
SetAll();
}
else{
UnSetAll();
}
}
function SetAll(){
var intCount;
if(ConList.all("checkCon").length > 1){
for(intCount = 0; intCount < ConList.all("checkCon").length; intCount++){
ConList.checkCon(intCount).checked = true;
}
}
else{
ConList.checkCon.checked = true;
}
}
function UnSetAll(){
var intCount;
if(ConList.all("checkCon").length > 1){
for(intCount = 0; intCount < ConList.all("checkCon").length; intCount++){
ConList.checkCon(intCount).checked = false;
}
}
else{
ConList.checkCon.checked = false;
}
}
function checkCon_onclick(){
var intCount;
ConList.SelAll.checked = true;
if(ConList.all("checkCon").length > 1){
for(intCount = 0; intCount < ConList.all("checkCon").length; intCount++){
if(ConList.checkCon(intCount).checked == false){
ConList.SelAll.checked = false;
}
}
}
if(ConList.checkCon.checked == false){
ConList.SelAll.checked = false;
}
}
}
//-->
</Script>
<script language="vbscript"runat="server">
function msgzh()
msgzh= MsgBox ("確定要?jiǎng)h除這些記錄嗎?", vbYesNo, "提示信息")
if msgzh=vbyes then
document.ConList.submitType.value="del"
document.ConList.submit()
end if
end function
function check_onclick(i,tpr)
msgsindel= MsgBox ("確定要?jiǎng)h除這條記錄嗎?", vbYesNo, "提示信息")
if msgsindel=vbyes then
if tpr > 1 then
for intcount = 0 to ConList.all("checkCon").length - 1
if intcount=i-1 then ConList.checkCon(intCount).checked=true else ConList.checkCon(intCount).checked=false
next
else
ConList.checkCon.checked = true
end if
document.ConList.submitType.value="del"
document.ConList.submit()
end if
end function
</script>
<body bgcolor="#FFFFFF" text="#000000" onload="window.top.ProjectMax()">
<!--#include file="../Include/AdoConn.asp"-->
<%
dim objrec 'recordset對(duì)象
dim strsql 'sql語(yǔ)句
'處理刪除項(xiàng)目
if Request("submitType")="del"then
for each item in Request.Form("checkCon")
code=left(Item,instr(Item,",")-1)
YN=right(Item,1)
if YN="Y" then '只能刪除修改標(biāo)志為“Y”的項(xiàng)目
set adocom=server.CreateObject("ADODB.Command")'用于刪除協(xié)作單位的存儲(chǔ)過(guò)程對(duì)象
adocom.ActiveConnection=conn
adocom.CommandType=4
adocom.CommandText="PR_XT_ProjectDelete"
set paramenter1=adocom.CreateParameter("chrProjectCode",200,1,40,code)
adocom.Parameters.Append paramenter1
adocom.Execute
set adocom=nothing
end if
next
set adocom=nothing
end if
if not Request.QueryString("strsql")="" then
if session("orderType")=" asc" then
orderType=" desc"
session("orderType")=" desc"
else
orderType=" asc"
session("orderType")=" asc"
end if
select case Request.QueryString("strsql")
case "query" '由查詢(xún)轉(zhuǎn)來(lái)
dim NDPC
dim code
dim name
dim role
dim strQueryType
dim strSQLWhere
code=trim(Request.Form("ProjectCode"))
name=trim(Request.Form("ProjectName"))
ProjectType=trim(Request.Form("ProjectType"))
ConProjectCode=trim(Request.Form("ConProjectCode"))
PlanCode=trim(Request.Form("PlanCode"))
Username=trim(Request.Form("Username"))
TechType=trim(Request.Form("TechType"))
ProjectJD=trim(Request.Form("ProjectJD"))
JDZK=trim(Request.Form("JDZK"))
NDPC=trim(Request.Form("NDPC"))
NDPC2=trim(Request.Form("NDPC2"))
KXXBG=trim(Request.Form("KXXBG"))
TJBZ=trim(Request.Form("TJBZ"))
XGBZ=trim(Request.Form("XGBZ"))
Depart=trim(Request.Form("Depart"))
ZhuChiCom=trim(Request.Form("ZhuChiCom"))
ShuoZaiQv=trim(Request.Form("ShuoZaiQv"))
FaRenCode=trim(Request.Form("FaRenCode"))
ComPanyPro=trim(Request.Form("ComPanyPro"))
CompanyType=trim(Request.Form("CompanyType"))
RegType=trim(Request.Form("RegType"))
role=trim(Request.Form("role"))
'復(fù)選框選中時(shí),strQueryType="%"
if Request.Form("checkbox").Count=1 then
strQueryType="%"
else
strQueryType=""
end if
'無(wú)任何where選項(xiàng)時(shí)
strsql="select * from XT_VD_ProjectNameLX where 1=1"
'根據(jù)角色生成where選項(xiàng)
select case role
case 0 '系統(tǒng)維護(hù)員
strSQLWhere=""
case 1 '申報(bào)者
strSQLWhere=" and 項(xiàng)目負(fù)責(zé)人='"&session("usercode")&"'"
case 2 '主管部門(mén)
strSQLWhere=" and left(項(xiàng)目負(fù)責(zé)人,3)='"&left(session("usercode"),3)&"'"
case 3 '項(xiàng)目計(jì)劃員
strSQLWhere=""
case 4 '項(xiàng)目管理員
strSQLWhere=" and 分配接收處室='"&session("Departcode")&"'"
case 5 '項(xiàng)目撥款員
strSQLWhere=" and 合同編碼<>''"
case 6 '部門(mén)領(lǐng)導(dǎo)
strSQLWhere=""
end select
'按查詢(xún)界面各輸入框生成多條件where選項(xiàng)
if not code="" then
strSQLWhere=strSQLWhere+" and 項(xiàng)目編碼 like '"+strQueryType+code+strQueryType+"'"
end if
if not name="" then
strSQLWhere=strSQLWhere+" and 項(xiàng)目名稱(chēng) like '"+strQueryType+name+strQueryType+"'"
end if
if not ProjectType="" then
strSQLWhere=strSQLWhere+" and 項(xiàng)目類(lèi)別 like '"+strQueryType+ProjectType+strQueryType+"'"
end if
if not ConProjectCode="" then
strSQLWhere=strSQLWhere+" and 合并編碼 like '"+strQueryType+ConProjectCode+strQueryType+"'"
end if
if not PlanCode="" then
strSQLWhere=strSQLWhere+" and 計(jì)劃編碼 like '"+strQueryType+PlanCode+strQueryType+"'"
end if
if not Username="" then
strSQLWhere=strSQLWhere+" and 負(fù)責(zé)人姓名 like '"+strQueryType+Username+strQueryType+"'"
end if
if not TechType="" then
strSQLWhere=strSQLWhere+" and 技術(shù)領(lǐng)域 like '"+strQueryType+TechType+strQueryType+"'"
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -