?? project_editlist.asp
字號:
<!--#include file="../Include/TimeOut.asp"-->
<!--#include file="../Include/online.asp"-->
<html>
<head>
<title>項目列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/CssLib/CssLink.css">
</head>
<Script Language=JavaScript>
<!--
function open1(Code)
{
window.open("BackYiJian_ContentDisplay.asp?code="+Code,"推薦意見","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;
}
}
}
else{
if(ConList.checkCon.checked == false){
ConList.SelAll.checked = false;
}
}
}
//-->
</Script>
<script language="vbscript"runat="server">
function msgzh()
msgzh= MsgBox ("確定要刪除這些記錄嗎?", vbYesNo, "提示信息")
if msgzh=vbyes then
document.ConList.submitType.value="del"
document.ConList.submit()
end if
end function
function check_onclick(i,tpr)
msgsindel= MsgBox ("確定要刪除這條記錄嗎?", 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對象
dim strsql 'sql語句
'處理刪除項目
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”的項目
set adocom=server.CreateObject("ADODB.Command")'用于刪除協(xié)作單位的存儲過程對象
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" '由查詢轉(zhuǎn)來
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ù)選框選中時,strQueryType="%"
if Request.Form("checkbox").Count=1 then
strQueryType="%"
else
strQueryType=""
end if
'無任何where選項時
strsql="select * from XT_VD_ProjectName where 1=1 "
'根據(jù)角色生成where選項
select case role
case 0 '系統(tǒng)維護員
strSQLWhere=""
case 1 '申報者
strSQLWhere=" and 項目負責(zé)人='"&session("usercode")&"'"
case 2 '主管部門
strSQLWhere=" and left(項目負責(zé)人,3)='"&left(session("usercode"),3)&"'"
case 3 '項目計劃員
strSQLWhere=""
case 4 '項目管理員
strSQLWhere=" and 分配接收處室='"&session("Departcode")&"'"
case 5 '項目撥款員
strSQLWhere=" and 合同編碼<>''"
case 6 '部門領(lǐng)導(dǎo)
strSQLWhere=""
end select
'按查詢界面各輸入框生成多條件where選項
if not code="" then
strSQLWhere=strSQLWhere+" and 項目編碼 like '"+strQueryType+code+strQueryType+"'"
end if
if not name="" then
strSQLWhere=strSQLWhere+" and 項目名稱 like '"+strQueryType+name+strQueryType+"'"
end if
if not ProjectType="" then
strSQLWhere=strSQLWhere+" and 項目類別 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 計劃編碼 like '"+strQueryType+PlanCode+strQueryType+"'"
end if
if not Username="" then
strSQLWhere=strSQLWhere+" and 負責(zé)人姓名 like '"+strQueryType+Username+strQueryType+"'"
end if
if not TechType="" then
strSQLWhere=strSQLWhere+" and 技術(shù)領(lǐng)域 like '"+strQueryType+TechType+strQueryType+"'"
end if
if not ProjectJD="" then
strSQLWhere=strSQLWhere+" and 項目進度 like '"+strQueryType+ProjectJD+strQueryType+"'"
end if
if not JDZK="" then
strSQLWhere=strSQLWhere+" and 進度狀況 like '"+strQueryType+JDZK+strQueryType+"'"
end if
if not NDPC="" and not NDPC2="" then
strSQLWhere=strSQLWhere+" and (年度批次 between '"+NDPC+"' and '"+NDPC2+"')"
else if not NDPC="" and NDPC2="" then
strSQLWhere=strSQLWhere+" and 年度批次 like '"+NDPC+strQueryType+"'"
else if NDPC="" and not NDPC2="" then
strSQLWhere=strSQLWhere+" and 年度批次 like '"+NDPC2+strQueryType+"'"
end if
end if
end if
if not KXXBG="" then
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -