⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 proc_add_cati.asp

📁 一个软件工程的软件质量web跟踪管理系统
💻 ASP
字号:
<%@ Language=VBScript %>
<%Response.Expires=0
Response.Buffer = False
%>
<Script Language=Javascript>
<!--
returnValue = "Cancel";
-->
</Script>
<HTML>
<HEAD>
<META name="VI60_DefaultClientScript" Content="VBScript">

<META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
</HEAD>
<!--#include virtual ="/TestUC/Include/SpecialWTack.inc"-->
<BODY>
</BODY>
</HTML>
<%
On Error Resume Next

cDrugCatiName = Trim(Request.QueryString("DrugCatiName"))
cParentDrugCatiID_A = Trim(Request.QueryString("ParentDrugCatiID"))
If cParentDrugCatiID_A = "ROOT" Then
	cParentDrugCatiID = ""
Else
	cParentDrugCatiID = Mid(cParentDrugCatiID_A,2,Len(cParentDrugCatiID_A) - 1)
End If
cLeaf_Grade = Trim(Request.QueryString("Leaf"))
cLeaf = Mid(cLeaf_Grade,1,1)
nGrade = Mid(cLeaf_Grade,3,Len(cLeaf_Grade) - 2)

cPYCode = Trim(Request.QueryString("PYCode"))
cDCode = Trim(Request.QueryString("DCode"))

Set Conn = session("AdoConnectObj")

if cParentDrugCatiID ="" then
MySql = "Select * From Project1_CaseTree Where fchrTreeNodeName = '"+cDrugCatiName+"' And (fchrFatherID Is Null)"
else
MySql = "Select * From Project1_CaseTree Where fchrTreeNodeName = '"+cDrugCatiName+"' And (REPLACE(REPLACE(REPLACE(fchrFatherID , '}', ''), '{', ''), '-', '_')= '"+cParentDrugCatiID+"')"
end if
Set Rs = Conn.Execute(MySql)

If Rs.EOF Then '表示没有发生重名
Set Rs = Nothing
cDrugCatiName=TackSpecailW(cDrugCatiName)
nGrade = nGrade + 1
if cParentDrugCatiID="" then
MySql = "Insert Into Project1_CaseTree(fchrTreeNodeID,fchrTreeNodeCode,fchrTreeNodeName,fintLevel,fchrFatherID,fbitIsLeaf) Values (newID(),'"+cDCode+"','"+cDrugCatiName+"',"+CStr(nGrade)+",NULL,'0')"
else
cParID=Replace(cParentDrugCatiID,"_","-")
MySql = "Insert Into Project1_CaseTree(fchrTreeNodeID,fchrTreeNodeCode,fchrTreeNodeName,fintLevel,fchrFatherID,fbitIsLeaf) Values (newID(),'"+cDCode+"','"+cDrugCatiName+"',"+CStr(nGrade)+",'{"+cParID+"}','0')"
end if
Conn.Execute(MySql)

If Err.description = "缺少对象" Or Err.description = "" Then
if cParentDrugCatiID ="" then
MySql = "Select REPLACE(REPLACE(REPLACE(fchrTreeNodeID, '-', '_'), '}', ''), '{', '') AS DrugCatiID From Project1_CaseTree Where fchrTreeNodeName = '"+cDrugCatiName+"' And (fchrFatherID Is Null)"
else

MySql = "Select REPLACE(REPLACE(REPLACE(fchrTreeNodeID, '-', '_'), '}', ''), '{', '') AS DrugCatiID From Project1_CaseTree Where fchrTreeNodeName = '"+cDrugCatiName+"' And (REPLACE(REPLACE(REPLACE(fchrFatherID , '}', ''), '{', ''), '-', '_')= '"+cParentDrugCatiID+"')"
end if
Set Rs = Conn.Execute(MySql)

cDrugCatiID=Rs(0)
Set Rs = Nothing

%>
<Script Language=Javascript>
<!--

returnValue = "<%=cDrugCatiID%>";
//alert("正确");
-->
</Script>
<%
Else
	cTemp = Replace(Err.description,chr(13),"\n")
%>
	<Script Lang=javascript>
	<!--
		alert("操作失败,原因为:"+"<%=cTemp%>"+" 请联系系统管理员");
	-->
	</Script>
<%
End If

Else '表示发生重名
	Set Rs = Nothing
%>
<Script Language=Javascript>
<!--
//alert("重名");
returnValue = "OVERLAP";
-->
</Script>
<%
End If
%>
<Script Language=Javascript>
<!--
window.close();
-->
</Script>


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -