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

📄 update_cati.asp

📁 一个软件工程的软件质量web跟踪管理系统
💻 ASP
字号:
<%@ Language=VBScript %>
<%Response.Expires=0
Response.Buffer = False
%>
<HTML>
<HEAD>
<META name="VI60_DefaultClientScript" Content="VBScript">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<TITLE>修改用例分类</TITLE>
<BODY scroll=no topmargin=12  onload="SetCreateDate()">
<script src="../oper.vbs" Language="VBScript"></script>
<Script Language=VBScript>
<!--
Sub PYCode_OnFocus()
	If PYCode.value = "" Then
		PYCode.value = GetChinesePYCode(DrugCatiName.value)
	End If
End Sub
-->
</Script>
<LINK href="../../Css_Template/CssTable.css" rel=STYLESHEET type=text/css>
<script src="../oper.js" type="text/javascript"></script>
<Script Language=Javascript>
<!--
returnValue = "Cancel";

function TSubmit()
{
	 if (DrugCatiName.value == "")
	{
		alert("用例分类不允许为空"); 
		DrugCatiName.focus();
		return;
	}

	//if (!CheckInput(DrugCatiName))
	//{
	//	alert("分类名称不允许有 空格,单双引号以及大于小于符号");
	//	DrugCatiName.focus();
	//	return;
	//}
		
	 if (PYCode.value == "")
	{
		alert("拼音码不允许为空"); 
		PYCode.focus();
		return;
	}
	
	if (!CheckInput(PYCode))
	{
		alert("拼音码不允许有 空格,单双引号以及大于小于符号");
		PYCode.focus();
		return;
	}
	
	if (!CheckInput(DCode))
	{
		alert("自定义码不允许有 空格,单双引号以及大于小于符号");
		PYCode.focus();
		return;
	}

	cTemp = ""
	cTemp = showModalDialog("Proc_Update_Cati.asp?DrugCatiID="+DrugCatiID.value+"&DrugCatiName="+DrugCatiName.value+"&PYCode="+PYCode.value+"&DCode="+DCode.value,"","dialogHeight:7;dialogWidth:12;help:no;resizable:no;status:no");
	//cTemp返回的是所获得的ID
	
	if (cTemp == "OVERLAP") //表示发生重名
	{
		alert("分类名称 "+ DrugCatiName.value + " 已经存在,请重新输入");
		DrugCatiName.focus();
		return;
	}
	
	if (cTemp == "Cancel") //表示操作失败了
	{
		returnValue = "Cancel";
		window.close();
		return;
	}


	returnValue = cTemp + " " + DrugCatiName.value;
	window.close();


//	returnValue = "OK "+ DrugAliasName.value + " " + PYCode.value;
//	window.close();
}
-->
</Script>

<Script Language=VBScript>
<!--

Sub DCode_OnFocus()
		DCode.value = GetChinesePYCode(DrugCatiName.value) & CodePref.value
End Sub


Sub SetCreateDate()
   cYear=Year(Now)
   cMonth=Month(Now)
   cDay=Day(Now)
   cHour=Hour(Now)
   cMinute=Minute(Now)
   cSecond=Second(Now)
   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>

<%
cDrugCatiID_A = Trim(Request.QueryString("DrugCatiID"))

cDrugCatiID = Mid(cDrugCatiID_A,2,Len(cDrugCatiID_A) - 1)

Set Conn = session("AdoConnectObj")
MySql = "Select fchrTreeNodeName as DrugCatiName,fchrTreeNodeCode as DCode,'PYCode' as PYCode From Project1_CaseTree Where (REPLACE(REPLACE(REPLACE(fchrTreeNodeID , '}', ''), '{', ''), '-', '_')= '"+cDrugCatiID +"')"

Set Rs = Conn.Execute(MySql)

cDrugCatiName = Trim(Rs("DrugCatiName"))
cPYCode = Trim(Rs("PYCode"))
cDCode = Trim(Rs("DCode"))

%>
<table cellpadding="0" cellspacing="0" border="0" align="center" WIDTH="90%">
	<tr>
			<td nowrap>
	分类编码&nbsp;<input id="DCode" type="text" value="<%=cDCode%>" size="15" maxlength="15" class=InputText disabled OnChange="Javascript:Submit.disabled = false"><br>
		</td>
	</tr>

		<td nowrap>
	分类名称&nbsp;<input id="DrugCatiName" value="<%=cDrugCatiName%>" type="text" size="15" maxlength="50" class=InputText onkeyup="DCode_OnFocus()"  OnChange="Javascript:Submit.disabled = false"><br>
		</td>
	</tr>
	<tr>
		<td nowrap>
	<input id="PYCode" hidden value="<%=cPYCode%>" type="hidden" size="15" maxlength="15" class=InputText OnChange="Javascript:Submit.disabled = false"><br>
		</td>
	</tr>
	<tr>
	<tr><td>&nbsp;</td></tr>
	<tr>
		<td align="right">
			<input type="button" id="Submit" value="确定" onclick="TSubmit()" class="Button" disabled>&nbsp;&nbsp;<input class="Button" type="button" value="取消" onclick="javascript:window.close()" id="button1" name="button1">&nbsp;&nbsp;
		</td>
	</tr>
</table>
<Input type=hidden id=DrugCatiID value="<%=cDrugCatiID%>">
<Input Type=Hidden id=CodePref Value=""> 
</BODY>
</HTML>



















⌨️ 快捷键说明

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