📄 banner.asp
字号:
<%Response.Expires=0
Response.Buffer = False%>
<input type=hidden id=DrugCatiID readonly size=8 value="ROOT"><input readonly type=hidden id=Leaf size=3 value="0/0"><input readonly size=12 type=hidden id=DrugID><input readonly size=3 type=hidden id=HaveDrug value="NO">
<html>
<head>
<link rel="STYLESHEET" type="text/css" href="../../Css_Template/CssTitle.css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Sub_Banner</title>
<base target="contents">
</head>
<body topmargin=2>
<Script Language=VBScript>
<!--
Sub SetLeaf(UpID) '将Key为UpID的节点设置为叶子属性
cTemp = window.parent.Sub_left.TVWCati.Nodes.Item(UpID).Tag
cTemp1 = Mid(cTemp,2,Len(cTemp)-1)
window.parent.Sub_left.TVWCati.Nodes.Item(UpID).Tag = "1" + cTemp1
End Sub
Sub AddNode(cID,cName,UpID) '在TreeView中添加一个节点
'msgbox cID
Set cID = window.parent.Sub_left.TVWCati.Nodes.Add(DrugCatiID.value,4,cID,cName)
nGrade = Mid(Leaf.value,3,Len(Leaf.value)-2)
nGrade = nGrade + 1
cID.Tag = "1/" + CStr(nGrade)
cTemp = window.parent.Sub_left.TVWCati.Nodes.Item(UpID).Tag
cTemp1 = Mid(cTemp,2,Len(cTemp)-1)
window.parent.Sub_left.TVWCati.Nodes.Item(UpID).Tag = "0" + cTemp1
Leaf.value = "0" + cTemp1
End Sub
Sub AddCati()
If (HaveDrug.value = "NOREADY") Then
MsgBox "系统正在处理显示用例列表,请稍等.....",48,"系统未就绪"
Exit Sub
End If
'If (HaveDrug.value = "YES") Then
' MsgBox "分类 "+DrugCatiName.value+" 已经有用例存在,不允许添加子分类",48,"非法操作"
'Else
cTemp = showModalDialog("Add_Cati.asp?DrugCatiID="+DrugCatiID.value+"&UpCatiName="+DrugCatiName.value+"&Leaf="+Leaf.value,"","dialogHeight:11;dialogWidth:12;help:no;resizable:no;status:no")
'//cTemp返回的是新的分类的ID以及名称 'ID DrugCatiName
If cTemp <> "Cancel" Then
nStart1 = 1
nStart2 = 1
nStart1 = InStr(nStart2,cTemp," ")
cID = "A" + Mid(cTemp,nStart2,nStart1 - nStart2)
nStart2 = nStart1 + 1
cName = Mid(cTemp,nStart2,Len(cTemp) - nStart2 + 1)
AddNode cID,cName,DrugCatiID.value
End If
'End If
End Sub
Sub DeleteCati()
If DrugCatiID.value = "ROOT" Then
MsgBox "不允许删除分类根节点",48,"非法操作"
Exit Sub
End If
If (HaveDrug.value = "NOREADY") Then
MsgBox "系统正在处理显示用例列表,请稍等.....",48,"系统未就绪"
Exit Sub
End If
If MsgBox("确定删除分类 "+DrugCatiName.value+" ?",vbYesNo + VbQuestion,"确定删除用例") = vbYes Then
'执行删除操作
cHello = showModalDialog("Temp.asp?DrugCatiID="+DrugCatiID.value,"","dialogHeight:0;dialogWidth:0;help:no;resizable:no;status:no")
if cHello="00" Or cHello="01" Or cHello="10" Or cHello="11" then
else
MsgBox "操作失败,原因为:"+"<%=cTemp%>"+" 请联系系统管理员"
Exit Sub
end if
If cHello= "10" Or cHello="11" Then
MsgBox "分类 "+DrugCatiName.value+" 下有用例存在,不允许删除",48,"非法操作"
Exit Sub
End If
If cHello="01" Or cHello="11" Then
MsgBox "分类 "+DrugCatiName.value+" 下还有分类存在,不允许删除",48,"非法操作"
Exit Sub
End If
cTemp = showModalDialog("Proc_Delete_Cati.asp?DrugCatiID="+DrugCatiID.value,"","dialogHeight:0;dialogWidth:0;help:no;resizable:no;status:no")
'MsgBox(cTemp)
If cTemp = "Cancel" Then
'表示删除失败
'MsgBox("删除失败或者放弃")
Else
'表示删除成功,接下来从TreeView中将该节点删除
cUpID = ""
nStart1 = 1
nStart2 = 1
nStart1 = InStr(nStart2,cTemp," ")
cMode = Mid(cTemp,nStart2,nStart1 - nStart2)
If cMode = "Leaf" Then '表示上级节点已经成为了叶子
'从TreeView中将父节点的Leaf属性改为叶子
nStart2 = nStart1 + 1
nStart1 = InStr(nStart2,cTemp," ")
cUpID = "A"+Mid(cTemp,nStart2,nStart1 - nStart2)
SetLeaf(cUpID)
nStart2 = nStart1 + 1
nStart1 = InStr(nStart2,cTemp," ")
End If
nStart2 = nStart1 + 1
nStart1 = InStr(nStart2,cTemp," ")
cDrugCatiID = "A" + Mid(cTemp,nStart2,nStart1 - nStart2)
nStart2 = nStart1 + 1
nStart1 = InStr(nStart2,cTemp," ")
If nStart2 <> nStart1 Then
cUpID = "A" + Mid(cTemp,nStart2,nStart1 - nStart2)
Else
cUpID = "ROOT"
End If
window.parent.Sub_left.TVWCati.Nodes.Remove(cDrugCatiID)
window.parent.Sub_left.TVWCati.Nodes.Item(cUpID).Selected = True
HaveDrug.value = "NOREADY"
DrugCatiID.value = window.parent.Sub_left.TVWCati.SelectedItem.Key
Leaf.value = window.parent.Sub_left.TVWCati.SelectedItem.Tag
DrugCatiName.value = window.parent.Sub_left.TVWCati.SelectedItem.Text
window.parent.Sub_right.location.href = "right.asp?DrugCatiID="+window.parent.Sub_left.TVWCati.SelectedItem.Key+"&DrugCatiName="+window.parent.Sub_left.TVWCati.SelectedItem.Text
End If
End If
End Sub
Sub UpdateCati()
If DrugCatiID.value = "ROOT" Then
MsgBox "不允许修改分类根节点",48,"非法操作"
Exit Sub
End If
cTemp = showModalDialog("Update_Cati.asp?DrugCatiID="+DrugCatiID.value,"","dialogHeight:10;dialogWidth:12;help:no;resizable:no;status:no")
If cTemp <> "Cancel" Then '表示执行成功
nStart1 = 1
nStart2 = 1
nStart1 = InStr(nStart2,cTemp," ")
cDrugCatiID = "A" + Mid(cTemp,nStart2,nStart1 - nStart2)
nStart2 = nStart1 + 1
cDrugCatiName = Mid(cTemp,nStart2,Len(cTemp) - nStart2 + 1)
window.parent.Sub_left.TVWCati.Nodes.Item(cDrugCatiID).Text = cDrugCatiName
HaveDrug.value = "NOREADY"
window.parent.Sub_left.TVWCati.Nodes.Item(cDrugCatiID).Selected = True
DrugCatiID.value = window.parent.Sub_left.TVWCati.SelectedItem.Key
Leaf.value = window.parent.Sub_left.TVWCati.SelectedItem.Tag
DrugCatiName.value = cDrugCatiName
window.parent.Sub_right.location.href = "right.asp?DrugCatiID="+window.parent.Sub_left.TVWCati.SelectedItem.Key+"&DrugCatiName="+window.parent.Sub_left.TVWCati.SelectedItem.Text
End If
End Sub
Sub AddDrug()
cTemp = showModalDialog("Add_TestUC.asp?DrugCatiID="+DrugCatiID.value+"&DrugCatiName="+DrugCatiName.value,"","dialogHeight:39;dialogWidth 33:;help:no;resizable:no;status:no")
If cTemp <> "Cancel" Then '表示已经成功的添加了用例
window.parent.Sub_right.location.href = "right.asp?DrugCatiID="+window.parent.Sub_left.TVWCati.SelectedItem.Key+"&DrugCatiName="+window.parent.Sub_left.TVWCati.SelectedItem.Text
End If
End Sub
-->
</Script>
当前分类 <input readonly size=20 type=text id=DrugCatiName class=InputText value="测试用例分类">
<input type=button value=添加分类 class="Button" Onclick="AddCati()"> <input type=button value=删除分类 class="Button" <%If Application("SysReady") Then Response.Write "Disabled" End If %> onClick="DeleteCati()"> <input type=button value=修改分类 class="Button" Onclick="UpdateCati()"> <input type=button value=添加用例 class="Button" OnClick="AddDrug()">
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -