<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="java.util.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.system.*" %>
<%@ page import="net.sz600.basicdata.*" %>
<%@ page import="net.sz600.formCreate.*" %>
<%@ page import="net.sz600.formEngine.*" %>
<%@ include file="/xml/formEngine2/sessionInfo2.jsp"%>
<%
  
    String sOPERATOR = SzConvert.toSpaceStr(request.getParameter("OPERATOR"));   

%>
<form name="formHidden" method="post">
  <input type="hidden" name="OPERATOR" value="<%=sOPERATOR%>"> 
</form>
<%

    boolean flag = true;
    String sUrl = "index.jsp";
    BdNumberRulerOperator bdNumberRulerOperator = new BdNumberRulerOperator();
    
    if (sOPERATOR.equals("add") ) {
    	flag = bdNumberRulerOperator.add(request);
    } else if (sOPERATOR.equals("update")) {
    	flag = bdNumberRulerOperator.update(request);
    	//2015-02增加更新标识
			if (flag) {
			    BdNumberRuler BdNumberRuler = new BdNumberRuler();
			    BdNumberRuler.updateBs(request);				
			}
    } else if (sOPERATOR.equals("delete")) {
    	flag = bdNumberRulerOperator.delete(request);    	
    }
    
    
    String sMessage = SzOut.getMessage();
    if (flag) {    	
        out.println(SzPageHelp.jsAlert("操作成功"));
        out.println(SzPageHelp.jsFormSubmit("formHidden",sUrl));
    } else {
        out.println(SzPageHelp.jsAlertBack(sMessage));
    }
%>
