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

<%@page import="zr.zrpower.dbmanage.service.FieldService"%>
<%@page import="zr.zrpower.dbmanage.*"%>
<%@ page import = "java.lang.Object"%>


<HTML>
<%
SessionUser user = (SessionUser)session.getAttribute("userinfo");
UIService userUI =new UIService();
BPIP_FIELD[] TC = null;
BPIP_FIELD[] TC1 = null;
TableService Table = new TableService();
FieldService Field = new FieldService();
String TABLEID= request.getParameter("TABLEID");
if (TABLEID ==null)
{
   TABLEID= "";
}

%>
<HTML>
<HEAD>
<TITLE></TITLE>
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META http-equiv="Content-Type" content="text/html; charset=GBK">
<link REL="stylesheet" type="text/css" href="../../zrsysmanage/css/<%=user.getUserCSS()%>">
<%if("6".equals(user.getUserWINDOWTYPE())){ %>
<SCRIPT LANGUAGE="JavaScript" src="../../zrsysmanage/html5/script/jquery-2.0.3.min.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript" src="../../zrsysmanage/html5/layer/layer.js"></SCRIPT>
<%}%>
<SCRIPT LANGUAGE="JavaScript" src="../../zrsysmanage/script/Public.js"></SCRIPT>
<script language="JavaScript" type="text/JavaScript">
<!--
function Check(theForm){
if (RegForm.CODE.value == ""){

    <%if("6".equals(user.getUserWINDOWTYPE())){ %>
        layer.alert('编号不能为空!', {icon: 7});
    <%}else{%>
        alert("编号不能为空！");
    <%}%>
    RegForm.CODE.focus();
    return (false);
  }

return (true);
}
//-->
</script>
 <%
 String strok ="Select min(TABLEID) as TABLEID1 from BPIP_TABLE where TABLETYPE = '1'";
 if (TABLEID.length()==0)
 {
     TABLEID=Table.GetMinTABLEID(strok);
 }
 %>
</HEAD>
<BODY class="BodyMain">
<FORM name="RegForm" method="post" action="../../actionfield.do"  onsubmit="return Check(this);">
<input type="hidden" id="Act" name="Act" value="add1">
<input type="hidden" name="TABLEID" value='<%=TABLEID%>' >

 <br>&nbsp;
           <DIV id="divMessage" style='padding-left:0;padding-top:0;width:96%;height:100%;overflow:auto'>
           <fieldset>
           <legend>增加数据信息</legend>
           <table border="0" class="inputTable" cellspacing="0" cellpadding="0" align="center" >
     　 <%
//得到字段名称的记录集
     TC1 = Field.GetFIELDNAME1("");
     int iLength = 0;
     if (TC1!=null && TC1.length>0){
       iLength = TC1.length;
       for(int i=0;i<TC1.length;i++){
         TC1[i].getFIELDNAME();
       }
     }
//得到中文名称记录集
      TC = Field.GetCHINESENAME1("");
     int iLength2 = 0;
     if (TC!=null && TC.length>0){
       iLength2 = TC.length;
       for(int i=0;i<TC.length;i++){
        TC[i].getCHINESENAME();
    %>
   <tr>
               <td width="35%"  align="right"><%=TC[i].getCHINESENAME()%>：</td>
               <td class="inputTd"><input class="text" type="text"  name="<%=TC1[i].getFIELDNAME()%>" size="50"  value="" maxlength="50"></td>
           </tr>
           <%
             }
           }%>

           <tr>
               <td width="25%" align="right" height="30"></td>
               <td class="inputTd" height="30"></td>
           </tr>

           <tr>
               <td width="25%" align="right">说明：</td>
               <td class="inputTd"><font color="#FF3300">当字典在表单中为字典控件选择时，填写拼音首字母可快速检索。<br>是否禁用:1表示禁用,0或空表示正常的选项。</font></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:history.back();","buttonReturn.gif",user.getUserImage())%>
                 </tr></table>
                 </center>
          </DIV>


</form>
</BODY>
</HTML>
<%
//清空相关对象
user = null;
userUI = null;
TC = null;
TC1 = null;
Table = null;
Field = null;
%>
