EditAssetType.jsp
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:6k
源码类别:

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312"%>
  2. <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
  3. <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
  4. <%
  5. Request m_request = new Request(request);
  6. int intAssetTypeID = m_request.GetInt("ID");
  7. int iSysDirID = m_request.GetInt("SysDirID");
  8. if(intAssetTypeID<1)
  9. {
  10. %>
  11. <script language="JavaScript" type="text/JavaScript">
  12. alert("请选择正确的资产类型,修改失败!");
  13. history.back();
  14. </script>
  15. <%
  16. }
  17. else
  18. {
  19. Vector vt = AssetTypeManager.getBySysDirIDRecord(iSysDirID);
  20. %>
  21. <html>
  22. <head>
  23. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  24. <title>资产类型管理-- GForce OA 2.0</title>
  25. <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
  26. <script language="JavaScript" type="text/javascript">
  27. function mouseon(rowid,imagesid)
  28. {
  29.     rowid.className = "DataRowMouseOn";
  30.     rowid.borderColorLight = "#000000";
  31.     rowid.borderColorDark = "#FFFFFF";
  32.     eval("document.all." + imagesid + ".style.display=''");
  33. }
  34. function mouseout(rowid,imagesid,stylename)
  35. {
  36.     rowid.className = stylename;
  37.     rowid.borderColorLight = "#ffffff";
  38.     rowid.borderColorDark = "#000000";
  39.     eval("document.all." + imagesid + ".style.display='none'");
  40. }
  41. function CheckEditAssetType()
  42. {
  43.     if(document.EditAssetType.TypeName.value=='')
  44.     {
  45.         alert("请输入资产类型名称!");
  46.         document.EditAssetType.TypeName.focus();
  47.         return false;
  48.     }
  49. }
  50. </script>
  51. </head>
  52. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  53. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  54.     <tr>
  55.         <td align="center" valign="top"><p>&nbsp;</p>
  56.             <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#000000" style="">
  57.                 <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
  58.                     <th width="3%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
  59.                     <th width="6%" nowrap><font color="#000000">序号</font></th>
  60.                     <th width="40%" nowrap><font color="#000000">资产类型</font></th>
  61.                     <th width="11%" nowrap><font color="#000000">添加</font></th>
  62.                     <th width="11%" nowrap><font color="#000000">修改</font></th>
  63.                     <th width="12%" nowrap><font color="#000000">删除</font></th>
  64.                 </tr>
  65.                 <%
  66. for(int i=0;i<vt.size();i++)
  67. {
  68.     String strID = ((Vector)vt.get(i)).get(0).toString();
  69.     if(!strID.equals((intAssetTypeID + "")))
  70.     {
  71.         if(i % 2 == 0)
  72.             out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
  73.         else
  74.             out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
  75.         out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
  76.         out.println("<td align="right" valign="middle">" + (i+1) + "</td>");
  77.         out.println("<td align="left" valign="middle" nowrap>" + ((Vector)vt.get(i)).get(1).toString() + "</td>");
  78.         out.println("<td align="center" valign="middle" nowrap>&nbsp;</td>");
  79.         out.println("<td align="center" valign="middle" nowrap><a href="EditAssetType.jsp?SysDirID="+iSysDirID+"&ID=" + strID + "">修改</a></td>");
  80.         out.println("<td align="center" valign="middle" nowrap><a href="DelAssetType.jsp?SysDirID="+iSysDirID+"&ID=" + strID + "" onclick="return confirm('您确实要删除该资产类型吗?\n删除该类型之前必须删除该类型所有相关资产,\n否则会出错,您是否继续?');">删除</a></td>");
  81.         out.println("</tr>");
  82.     }
  83.     else
  84.     {
  85. %>
  86.                 <form name="EditAssetType" action="EditAssetTypeAction.jsp?SysDirID=<%=iSysDirID%>" method="post" onSubmit="javascript:return CheckEditAssetType();">
  87.                     <tr bgcolor="<%=m_session.GetString("TitleColor")%>">
  88.                         <th align="right" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">&nbsp;</th>
  89.                         <th align="right" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>"><%=(i+1)+""%>
  90.                         <input type="hidden" name="ID" value="<%=strID%>"></th>
  91.                         <th align="left" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>">
  92.                             <input name="TypeName" type="text" maxlength="20" Value="<%=((Vector)vt.get(i)).get(1).toString()%>"></th>
  93.                             <input name="SysDirID" type="hidden" Value="<%=((Vector)vt.get(i)).get(2).toString()%>"></th>
  94.                         <th align="center" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>">
  95.                             <input type="button" value="返回" onclick="location='AssetTypeManage.jsp?SysDirID=<%=iSysDirID%>'"></th>
  96.                         <th align="center" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>"><input type="submit" value="修改"></th>
  97.                         <th align="center" valign="middle" nowrap bgcolor="<%=m_session.GetString("TitleColor")%>"><a href="DelAssetType.jsp?SysDirID=<%=iSysDirID%>&ID=<%=strID%>" onclick="return confirm('您确实要删除该资产类型吗?n删除该类型之前必须删除该类型所有相关资产,n否则会出错,您是否继续?');">删除</a></th>
  98.                     </tr>
  99.                 </form>
  100. <%
  101.     }
  102. }
  103. %>
  104.             </table>
  105.         </td>
  106.     </tr>
  107. </table>
  108. </body>
  109. </html>
  110. <%
  111. }
  112. %>