<%@ 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 = (String)request.getParameter("uuid");
    FormsUiModel fm = null;
    boolean isSave = false;
    boolean isError = false;
    String infStr = "";
    try{
        fm = PageDesignDbEngineFactory.getInstance().getPageDbEngineApi().findFormsUi(uuid,request);
        if(request.getMethod().equalsIgnoreCase("POST")){
            isSave = true;
            PageDesignDbEngineFactory.getInstance().getPageDbEngineApi().deleteFormUi(uuid,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="JScript.Encode" src="./../../../../webpage/common/engine/DTFControl.js"></script>
<script language="JScript.Encode" src="./../../../../webpage/common/js/DataReferControl.js"></script>
<script language="JScript.Encode" src="./../../../../webpage/design/js/SqlBuilder.js"></script>
<script language="javascript">
<!--
    function btn_toList(){
        window.navigate("listList.jsp?uuid=<%=fm.getFormUuid()%>");
    }
    function btn_delete(){
        formsDelete.submit();
    }
//-->
</script>
    <title>删除自定义列表视图</title>
</head>
<body class="main">
<div align="center">
<h3 align="center">删除自定义列表视图</h3>
<%
if(!isError)
{
    if(isSave)
    {
%>
<p align=center>删除成功．
<p align=center><input class="butAction" type="button" name="toList" value="返回列表" onclick="btn_toList();">
<%
    }
    else
    {
%>
<form id="formsDelete" name="formsDelete" method="POST">
    <input type="hidden" name="uuid" value="<%=uuid%>">
    <table class="content">
        <tr><td width=30%>列表视图名称</td>
        <td><%= DataBean.getStr(fm.getUiName())%>&nbsp;</td>
    </table>
    <table class="buttable2">
    <tr>
        <td width=50% align=center><input class="butAction" type="button" name="btnDelete" value="删　　除" onclick="btn_delete();">
        <td align=center><input class="butAction" type="button" name="toList" value="返回列表" onclick="btn_toList();">
    </tr>
    </table>
</form>
<%
    }
}else{
%>
<p align=center>删除失败．
<p align=center><%=infStr%>
<p align=center><input class="butAction" type="button" name="toList" value="返回列表" onclick="btn_toList();">
<%}%>
</div>
</body>
</html>
