<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="java.util.*" %>
<%@ page import="com.gx.webpage.framework.util.inoutformat.DataBean" %>
<%@ page import="com.gx.webpage.engine.pagedesigndbengine.factory.PageDesignDbEngineFactory"%>
<%@ page import="com.gx.webpage.engine.pagedesigndbengine.valueobject.*"%>
<%
    String uuid = DataBean.getStr(request, "uuid");
    String fdmUuid = DataBean.getStr(request, "fdmUuid");
    FormsModel fm = null;
    FormsDetailModel fdm = null;
    boolean isSave = false;
    boolean isError = false;
    String infStr = "";
    try{
        fm =  PageDesignDbEngineFactory.getInstance().getPageDbEngineApi().findForms(uuid,request);
        fdm =  PageDesignDbEngineFactory.getInstance().getPageDbEngineApi().findFormsDetail(fdmUuid,request);
        if(request.getMethod().equalsIgnoreCase("POST")){
            isSave = true;
             PageDesignDbEngineFactory.getInstance().getPageDbEngineApi().deleteFormsDetail(fdmUuid,request);
        }
    }catch(Exception err){
        isError = true;
        infStr = DataBean.getErrStr(err);
    }
%>
<head>
    <meta http-equiv="Content-Language" content="zh-cn">
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="./../../webpage/common/css/common.css" rel="StyleSheet"  type="text/css" />
<script language="javascript" src="./../../webpage/common/engine/constant.js"></script>
<script language="JScript.Encode" src="./../../webpage/common/engine/common.js"></script>
<script language="javascript">
<!--
    function btn_toList(){
        window.navigate("formsDetailList.jsp?uuid=<%=uuid%>");
    }
    function btn_delete(){
        List.submit();
    }
//-->
</script>
<title>删除业务对象属性</title>
</head>
<body class="main">
<div align="center">
<h3 align="center">删除业务对象属性</h3>
<%if(!isError){
    if(isSave){
%>
    <p align=center>删除成功.
    <table class="buttable2">
    <tr>
        <td align=center><input class="butAction" type="button" name="toList" value="返回属性列表" onclick="btn_toList();">
    </tr>
    </table>
<%}else{%>
<form id="List" name="List" method="POST">
<table class="content">
    <tr>
        <td width=20%>业务对象</td><td width=30%><%=fm.getTblId()%>&nbsp;</td>
        <td width=20%>属性ID</td><td width=30%><%=fdm.getFieldId()%>&nbsp;</td>
    </tr>
    <tr>
        <td>属性名称</td><td><%=fdm.getFieldName()%>&nbsp;</td>
        <td>属性数据类型</td><td><%= fdm.getTypeCap()%>&nbsp;</td>
    </tr>
    <tr>
        <td>属性数据长度</td><td><%=fdm.getFieldLength()%>&nbsp;</td>
        <td>是否可以为空</td><td><%= fdm.getNotNullCap()%>&nbsp;</td>
    </tr>
</table>
<table class="buttable2">
<tr>
    <td width=50% align=center><input class="butAction" type="button" name="delete" value="删　　除" onclick="btn_delete();">
    <td width=50% align=center><input class="butAction" type="button" name="toList" value="返回属性列表" onclick="btn_toList();">
</tr>
</table>
</form>
<%}}else{%>
    <p align=center>删除失败.
    <p align=center><%= infStr%>
    <table class="buttable2">
    <tr>
        <td align=center><input class="butAction" type="button" name="toList" value="后　　退" onclick="window.history.back();">
        <td align=center><input class="butAction" type="button" name="toList" value="返回属性列表" onclick="btn_toList();">
    </tr>
    </table>
<%}%>
</div>
</body>
</html>
