<%@ page contentType="text/html; charset=GBK" %>
<%@ page import = "zr.zrpower.common.util.SysPreperty" %>
<%@ page import = "zr.zrpower.entity.sys.SessionUser" %>
<%@ page import = "zr.zrpower.dbmanage.*"%>
<%@ page import = "zr.zrpower.ejb.sys.UIService" %>
<%@ page import = "zr.zrpower.dbmanage.service.TableSpaceService"%>

<%@ page import="zr.zrpower.dbmanage.service.FieldService"%>
<%@ page import = "java.lang.Object"%>
<%@ page import = "java.util.*" %>
<%@ page import = "java.text.*" %>
<HTML>
<%
SessionUser user = (SessionUser)session.getAttribute("userinfo");
UIService userUI =new UIService();
TableSpaceService Space = new TableSpaceService();
String ID=request.getParameter("SelectedItems");
BPIP_TABLESPACE SP = Space.getSPACEID(ID);
%>
<HEAD>
<TITLE><%=SysPreperty.getProperty().SystemName%><%=SysPreperty.getProperty().Versoin%></TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META http-equiv="Content-Type" content="text/html; charset=GBK">
<LINK type="text/css" rel="stylesheet" href="../../zrsysmanage/css/<%=user.getUserCSS()%>">
<SCRIPT LANGUAGE="JavaScript" src="../../zrsysmanage/script/Public.js"></SCRIPT>
<script language="JavaScript" type="text/javascript">
function Check(theForm){
  if (theForm.CHINESENAME.value == ""){
    <%if("6".equals(user.getUserWINDOWTYPE())){%>
    parent.layer.alert('表分类名称不能为空！', {icon: 7});

    <%}else{%>
    alert("表分类名称不能为空！");
    <%}%>
    theForm.CHINESENAME.focus();
    return (false);
  }

  <%if("6".equals(user.getUserWINDOWTYPE())){%>
  //parent.layer.closeAll();关闭窗口
  RegForm.Act.value='edit';
  document.RegForm.submit();
  window.parent.parent.document.location.reload();
  <%}else{%>
  RegForm.Act.value='edit';
  return true;
  <%}%>
}
function Check1(theForm)
{
  <%if("6".equals(user.getUserWINDOWTYPE())){%>
  parent.layer.confirm('确定要删除当前选中的表分类吗？', {
      btn: ['确定','取消'] //按钮
      }, function(index){
         RegForm.Act.value='del';
         document.RegForm.submit();
         window.parent.parent.document.location.reload();
      }, function(){
      });
  <%}else{%>
     if (confirm("确定要删除当前选中的表分类吗？"))
     {RegForm.Act.value='del';
     return true;}
     else
     {return false;}
  <%}%>


}
</script>
</HEAD>
<BODY class="BodyMain">
<FORM action="../../actiontablespace.do" method="post" name="RegForm" onsubmit="return Check(this);">
<input type="hidden" name="ID" value='<%=ID%>' >
<input type="hidden" name="Act" value="edit">

           <DIV id="divMessage" style='padding-left:0;padding-top:0;width:96%;height:99%;overflow:auto'>
           <fieldset>
           <legend>编辑表分类信息</legend>
           <table border="0" class="inputTable" cellspacing="0" cellpadding="0" align="center">

           <tr>
               <td width = "18%" align="right">表分类名称：</td>
               <td class="inputTd" ><input class="text" type="text" name="CHINESENAME" value="<%=SP.getCHINESENAME()%>" size="50" maxlength="300"><Font class="WriteSign">*</Font></td>
          </tr>

          <tr>
              <td width = "18%" align="right">描述：</td>
               <td class="inputTd" ><textarea name="DESCRIPTION" rows="3" cols="51"><%=SP.getDESCRIPTION()%></textarea></td>
           </tr>
          </table>
          <br>
          </fieldset>
                 <center><br>

                  <table cellspacing="0" cellpadding="0" border='0'><tr>
                 <%=userUI.ClickButton("保存","JavaScript:if(Check(document.RegForm)){document.RegForm.submit();}","buttonSave.gif",user.getUserImage())%>
                 <%=userUI.ClickButton("删除","JavaScript:if(Check1(document.RegForm)){document.RegForm.submit();}","buttonDelete.gif",user.getUserImage())%>


                 <%if("6".equals(user.getUserWINDOWTYPE())){%>
                 <%=userUI.ClickButton("关闭","JavaScript:parent.layer.closeAll();","buttonClose.gif",user.getUserImage())%>

                <%}else{ %>
                <%=userUI.ClickButton("关闭","JavaScript:window.opener.document.location.reload();window.close();","buttonClose.gif",user.getUserImage())%>

                <%} %>
                 </tr></table>
                 </center>
          </DIV>

</FORM>
</BODY>
</HTML>
<%
//清空相关对象
user = null;
userUI = null;
Space = null;
SP = null;
%>
