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

📄 add_testuc.asp

📁 一个软件工程的软件质量web跟踪管理系统
💻 ASP
字号:
<%Response.Expires=0
Response.Buffer = False%>
<html>

<head>
<link rel="STYLESHEET" type="text/css" href="../../Css_Template/CssTable.css">
<script src="../oper.js" type="text/javascript"></script>
<meta http-equiv="Content-Language" content="zh-cn">
<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>用例属性修改</title>
<base target="contents">
<script src="../oper.vbs" Language="VBScript"></script>
<Script Language=VBScript>
<!--
window.returnValue = "Cancel"

Sub TUCCode_OnFocus()
	If TUCCode.value = "" Then
		TUCCode.value = GetChinesePYCode(TUCName.value) & CodePref.value
	else
		TUCCode.value = GetChinesePYCode(TUCName.value) & CodePref.value
	End If
End Sub



Sub Submit()

    '用例名称
	If Trim(TUCName.value) = "" Then
		Msgbox "用例名称不能为空!",48,"输入错误"
		TUCName.focus()
		Exit Sub
	End If
	
    '用例摘要
	If Trim(TUCDesc.value) = "" Then
		Msgbox "用例摘要不能为空!",48,"输入错误"
		TUCDesc.focus()
		Exit Sub
	End If

    '用例描述
	If Trim(DetailDesc.value) = "" Then
		Msgbox "用例描述不能为空!",48,"输入错误"
		DetailDesc.focus()
		Exit Sub
	End If

    '预期结果
	If Trim(Result.value) = "" Then
		Msgbox "预期结果不能为空!",48,"输入错误"
		Result.focus()
		Exit Sub
	End If

    '创建人
	If Trim(CreateUserName.value) = "" Then
		Msgbox "创建人不能为空!",48,"输入错误"
		CreateUserName.focus()
		Exit Sub
	End If

    
'一切就绪,准备提交数据

    cTreeNodeID=TreeNodeID.value
    cTUCCode=TUCCode.value 
    cTUCName= TUCName.value
    cSearchKey= SearchKey.value
    cTestProgressID=TestProgressID.value
    cDealPriorityID=DealPriorityID.value
    cTestTypeID=TestTypeID.value
    cAuditSate=AuditSate.value
    cVersion=Version.value
    cItsProductPath=ItsProductPath.value
    cTUCDesc=TUCDesc.value
    cFileURL=FileURL.value
    cScriptURL=ScriptURL.value
    cVersionSourceName=Trim(VersionSourceName.value)
    cVersionSourceID=VersionSourceID.value
    if cVersionSourceName="" then
    	cVersionSourceID=""
    end if
    cEntironment=Entironment.value
    cCreateUserID=CreateUserID.value
    cCreateUserName=CreateUserName.value
    cCreateDate=CreateDate.value
    cAuditUserID=AuditUserID.value
    cAuditDate=AuditDate.value
    cDetailDesc=DetailDesc.value
    cPathNo=PathNo.value
    cResult=Result.value
	cTemp = showModalDialog("Proc_Update_TestUC.asp?CaseMainID="+CaseMainID.value+"&TUCCode="+cTUCCode+"&TreeNodeID="+cTreeNodeID+"&TUCName="+cTUCName+"&SearchKey="+cSearchKey+"&TestProgressID="+cTestProgressID +"&DealPriorityID="+cDealPriorityID +"&TestTypeID="+cTestTypeID +"&AuditSate="+cAuditSate +"&Version="+cVersion+"&ItsProductPath="+cItsProductPath+"&TUCDesc="+cTUCDesc +"&FileURL="+cFileURL +"&ScriptURL="+cScriptURL +"&VersionSourceID="+cVersionSourceID +"&Entironment="+cEntironment +"&CreateUserID="+cCreateUserID+"&CreateUserName="+cCreateUserName +"&CreateDate="+cCreateDate +"&AuditUserID="+cAuditUserID +"&AuditDate="+cAuditDate +"&DetailDesc="+cDetailDesc+"&PathNo="+cPathNo+"&Result="+cResult ,"","dialogHeight:20;dialogWidth:26;help:no;resizable:no;status:no")

	window.returnValue = "Update End"
	window.close()

End Sub

-->
</Script>

<Script Language=VBScript>
<!--
Sub SetCreateDate()
   cYear=Year(Now)
   cMonth=Month(Now)
   cDay=Day(Now)
   cHour=Hour(Now)
   cMinute=Minute(Now)
   cSecond=Second(Now)
   CreateDate.value=cYear & "-"  & cMonth & "-" & cDay
   cYear=Right(cYear,2)
   
   iLen=Len(cMonth)
   if iLen=0 then
      cMonth="00"
   else
      if iLen=1 then
      	cMonth="0" & cMonth
      end if
   end if
   
   iLen=Len(cDay)
   if iLen=0 then
      cDay="00"
   else
      if iLen=1 then
      	cDay="0" & cDay
      end if
   end if
 
   iLen=Len(cHour)
   if iLen=0 then
      cHour="00"
   else
      if iLen=1 then
      	cHour="0" & cHour
      end if
   end if

   iLen=Len(cMinute)
   if iLen=0 then
      cMinute="00"
   else
      if iLen=1 then
      	cMinute="0" & cMinute
      end if
   end if

   iLen=Len(cSecond)
   if iLen=0 then
      cSecond="00"
   else
      if iLen=1 then
      	cSecond="0" & cSecond
      end if
   end if
  
   CodePref.Value=cYear & cMonth & cDay & cHour & cMinute & cSecond
End Sub
-->
</Script>


<Script Lang=Javascript>
<!--
function Cancel()
{
	if ( window.returnValue != "Update End")
	{
		cTemp = showModalDialog("Proc_Delete_TestUC.asp?CaseMainID="+CaseMainID.value,"","dialogHeight:10;dialogWidth:10;help:no;resizable:no;status:no")
		window.close();
	}
}
-->
</Script>






</head>
<%
On Error Resume Next
cDrugCatiID_A = Trim(Request.QueryString("DrugCatiID")) '合法的DrugID前方加一个"A"
if cDrugCatiID_A="ROOT" Then
cDrugCatiID = cDrugCatiID_A
else
cDrugCatiID = Mid(cDrugCatiID_A,2,Len(cDrugCatiID_A) - 1)
end if 
cDrugCatiName = Trim(Request.QueryString("DrugCatiName"))

cSystemTempDrug = "<_System_Temp_Drug_>" '系统临时用例名称

'Response.Write cDrugID
Set Conn = session("AdoConnectObj")

'产生一个新的DrugID
cOperName=session("OperName")
cOperID=session("OperID")

MySql="Delete From Project1_CaseMain Where fchrTreeNodeID='" & cOperID  & "'"
Conn.Execute(MySql)
MySql = "Insert Into Project1_CaseMain(fchrCaseMainID,fchrTreeNodeID,fchrCaseName) Values (NewID(),'"+cOperID+"','"+cSystemTempDrug+"')"
Conn.Execute(MySql)

Conn.BeginTrans
MySql = "Select REPLACE(REPLACE(REPLACE(fchrCaseMainID, '}', ''), '{', ''), '-', '_') As CaseMainID From Project1_CaseMain Where fchrTreeNodeID='" & cOperID  & "'"

Set Rs =Conn.Execute(MySql)
cCaseMainID = Rs("CaseMainID")
cCaseMainID_A = "A" + cCaseMainID
Set Rs = Nothing


%>

<body topmargin=12 Onunload="Cancel()" onload="SetCreateDate()">
<table cellpadding="0" cellspacing="0" border="0" align="center" WIDTH="90%">
<tr>
	<td width="50%" nowrap>用例编号&nbsp;<input type=text size=20 maxlength=50 class=InputText id=TUCCode onchange="Javascript:BSubmit.disabled = false" disabled></td>
	<td width="50%" nowrap>&nbsp;&nbsp;所属分类&nbsp;<input type=text id=TreeNodeName size=20 maxlength=50 class=InputText disabled value="<%=cDrugCatiName%>"></td>
</tr>
<tr>
	<td width="50%" nowrap>用例名称&nbsp;<input type=text size=20 maxlength=15 class=InputText id=TUCName  onkeyup="TUCCode_OnFocus()"  onchange="Javascript:BSubmit.disabled = false"></td>
	<td width="50%" nowrap>&nbsp;&nbsp;检索键值&nbsp;<input type=text size=20 maxlength=15 class=InputText id=SearchKey onchange="Javascript:BSubmit.disabled = false"></td>
</tr></table>
<table cellpadding="0" cellspacing="0" border="0" align="center" WIDTH="90%">
<tr>
	<td width="50%" nowrap>测试阶段&nbsp;<select id=TestProgressID size=1><%
	
	MySql = "Select REPLACE(REPLACE(REPLACE(fchrTestProgressID , '}', ''), '{', ''), '-', '_') As TestProgressID ,fchrTestProgressName as TestProgressName  From Sys_testProgress"	
	Set Rs = Conn.Execute(MySql)
	While NOT Rs.EOF
		Response.Write "<option value='"+Trim(Rs("TestProgressID"))+"'>"+Trim(Rs("TestProgressName"))+"</option>"
		Rs.MoveNext
	Wend
	Set Rs = Nothing
	
	%></Select></td>
	<td width="50%" nowrap>&nbsp;&nbsp;优先级别&nbsp;<select id=DealPriorityID size=1><%
	
	MySql = "Select REPLACE(REPLACE(REPLACE(fchrDealPriority , '}', ''), '{', ''), '-', '_') As DealPriorityID,fchrDealPriorityName as DealPriorityName  From Sys_DealPriority Order By fchrDealPriorityName"	
	Set Rs = Conn.Execute(MySql)
	While NOT Rs.EOF
		Response.Write "<option value='"+Trim(Rs("DealPriorityID"))+"'>"+Trim(Rs("DealPriorityName"))+"</option>"
		Rs.MoveNext
	Wend
	Set Rs = Nothing
	
	%></Select></td>

</tr>
<tr>
	<td width="50%" nowrap>测试类别&nbsp;<select id=TestTypeID size=1><%
	
	MySql = "Select REPLACE(REPLACE(REPLACE(fchrTestTypeID , '}', ''), '{', ''), '-', '_') As TestTypeID,fchrTestTypeName as TestTypeName  From Sys_TestType"	
	Set Rs = Conn.Execute(MySql)
	While NOT Rs.EOF
		Response.Write "<option value='"+Trim(Rs("TestTypeID"))+"'>"+Trim(Rs("TestTypeName"))+"</option>"
		Rs.MoveNext
	Wend
	Set Rs = Nothing
	
	%></Select></td>
	<td width="50%" nowrap>&nbsp;&nbsp;审核状态&nbsp;<Select type=InputText id=AuditSate onchange="Javascript:BSubmit.disabled = false">
		<option value="0">未 审 核</option>
		<option value="1">审核通过</option>
		<option value="2">审核拒绝</option>
		</Select></td>
</tr>
<tr>
	<td width="50%" nowrap>用例版本&nbsp;<input type=text size=20 class=InputText id=Version onchange="Javascript:BSubmit.disabled = false" Value="Ver1.0"></td>
	<td width="50%" nowrap>&nbsp;&nbsp;版本状态&nbsp;<Select type=InputText id=VersionState onchange="Javascript:BSubmit.disabled = false">
		<option value="0" selected>原始用例</option>
		<option value="1">临时用例</option>
		<option value="2">版本用例</option>
		</Select></td>
</tr>
<tr>
	<td width="50%" nowrap>补丁编号&nbsp;<input type=text size=20 maxlength=10 class=InputText id=PathNo onchange="Javascript:BSubmit.disabled = false"></td>
	<td width="50%" nowrap>&nbsp;&nbsp;所属项目&nbsp;<input type=text id=ItsProject size=20 maxlength=50 disabled class=InputText disabled value=""></td>
</tr>

</table>
<table cellpadding="0" cellspacing="0" border="0" align="center" WIDTH="90%">
<tr>
	<td width="100%" nowrap>产品路径&nbsp;<input type=text size=58 maxlength=100 class=InputText id=ItsProductPath disabled  onchange="Javascript:BSubmit.disabled = false"></td>
</tr>
<tr>
	<td width="100%" nowrap>用例摘要&nbsp;<input type=text size=58 maxlength=100 class=InputText  id=TUCDesc onchange="Javascript:BSubmit.disabled = false"></td>
</tr>
<tr>
	<td width="100%" nowrap>关联文件&nbsp;<input type=text size=58 maxlength=100 class=InputText id=FileURL onchange="Javascript:BSubmit.disabled = false"></td>
</tr>
<tr>
	<td width="100%" nowrap>关联脚本&nbsp;<input type=text size=58 maxlength=100 class=InputText id=ScriptURL onchange="Javascript:BSubmit.disabled = false"></td>
</tr>
<tr>
	<td width="100%" nowrap>原始用例&nbsp;<input type=text size=43 maxlength=100 class=InputText id=VersionSourceName disabled onchange="Javascript:BSubmit.disabled = false" 
 disabled 
 	language="vbscript"       onmousedown="                        
     cTemp = showModalDialog(&quot;STestUC.asp&quot;,&quot;选择用例名称&quot;,&quot;dialogHeight:12;dialogWidth:14;help:no;resizable:no;status:no&quot;)                        
     if cTemp<>'Exit' then                      
       cTmp=Split(cTemp,&quot;/&quot;)                      
       VersionSourceID.value=cTmp(0)                       
       PYCode.value=cTmp(1)                      
       cTm=Split(cTmp(2),&quot;&quot;)                      
       VersionSourceName.value=cTm(0) 
    else
       VersionSourceID.value=&quot;&quot;
       VersionSourceName.value=&quot;&quot;                  
                      
     end if                      
      "                         
 >&nbsp;&nbsp; <input type="button" value="浏览..." name="select" style="background-color: #e6e6e6; color: #000000"                                                           
	language="vbscript"       onmousedown="                        
     cTemp = showModalDialog(&quot;STestUC.asp&quot;,&quot;选择用例名称&quot;,&quot;dialogHeight:12;dialogWidth:14;help:no;resizable:no;status:no&quot;)                        
     if cTemp<>'Exit' then                      
       cTmp=Split(cTemp,&quot;/&quot;)                      
       VersionSourceID.value=cTmp(0)                       
       PYCode.value=cTmp(1)                      
       cTm=Split(cTmp(2),&quot;&quot;)                      
       VersionSourceName.value=cTm(0) 
    else
       VersionSourceID.value=&quot;&quot;
       VersionSourceName.value=&quot;&quot;                  
                      
     end if                      
      "                         
      >  
	</td> 
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" align="center" WIDTH="90%">
<tr>
	<td>测试描述<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<textarea id=DetailDesc cols=56 rows=5 onchange="Javascript:BSubmit.disabled = false"></textarea>
	</td>
</tr>
<tr>
	<td>预期结果<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<textarea id=Result cols=56 rows=5 onchange="Javascript:BSubmit.disabled = false"></textarea>
	</td>
</tr>
<tr>
<td width="100%"nowrap >补充说明<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<textarea id=Entironment cols=56 rows=3 onchange="Javascript:BSubmit.disabled = false"></textarea></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" border="0" align="center" WIDTH="90%">
<tr>
	<td width="50%" nowrap>创建人员&nbsp;<input type=text size=20 maxlength=50 class=InputText id=CreateUserName onchange="Javascript:BSubmit.disabled = false" disabled  value="<%=session("RealName")%>"></td>
    <td width="50%" nowrap>&nbsp;&nbsp;创建日期&nbsp;<input type=text size=20 maxlength=15 class=InputText id=CreateDate onchange="Javascript:BSubmit.disabled = false" value="" disabled></td>
</tr>
<tr>
	<td width="50%" nowrap>审核人员&nbsp;<input type=text size=20 maxlength=15 class=InputText id=AuditUserName onchange="Javascript:BSubmit.disabled = false" disabled></td>
	<td width="50%" nowrap>&nbsp;&nbsp;审核日期&nbsp;<input type=text size=20 maxlength=15 class=InputText id=AuditDate onchange="Javascript:BSubmit.disabled = false" disabled></td>
</tr></table>

<div align=right>&nbsp;&nbsp;<input type=button value=确定 disabled id=BSubmit class=Button Onclick="Submit()">&nbsp;&nbsp;<input type=button value=取消 class=Button Onclick="Cancel()" id=BCancel name=button2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
<Input Type=Hidden id=CreateUserID  Value="<%=session("OperID")%>">
<Input Type=Hidden id=VersionSourceID  Value="<%=cVersionSourceID%>">
<Input Type=Hidden id=AuditUserID  Value="<%=cAuditUserID%>">
<Input Type=Hidden id=CaseMainID Value="<%=cCaseMainID%>">
<Input Type=Hidden id=TreeNodeID Value="<%=cDrugCatiID%>">   
<Input Type=Hidden id=CaseMainID_A Value="<%=cCaseMainID_A%>">
<Input Type=Hidden id=CodePref Value="">  
<Input Type=Hidden id=PYCode  Value=""> 

</body>

</html>
<%
If Err.description = "缺少对象" Or Err.description = "" Then
	Conn.CommitTrans
%>
<%
Else
	Conn.RollbackTrans
    cTemp = Replace(Err.description,chr(13),"\n")
%>
	<Script Lang=javascript>
	<!--
		alert("操作失败,原因为:"+"<%=cTemp%>"+" 请联系系统管理员");
		window.close();
	-->
	</Script>
<%	
End If
%>

⌨️ 快捷键说明

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