<%@ page language="java" import="java.util.*,hiber_xml.SysObjStatus,hiber_xml.hibernateDao" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ include file="error.jsp"%>
<%@ include file="header.jsp"%>
<html>
  <head>
      <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">      
      <jsp:include page="cssoa.jsp"></jsp:include>
    <title></title>
  </head>
  <%
    String objid=request.getParameter("objid");
   hibernateDao oa1=new hibernateDao();
   String page_num=request.getParameter("page_num");
   if(page_num==null||page_num.length()==0){
      page_num="1";
      oa1.setPage(1);
   }
  else{
      oa1.setPage(Integer.parseInt(page_num));
   }
   %>
  <body>
  <%@ include file="menuoperate.jsp"%>
  <table  cellpadding="0" cellspacing="0">
    <tr class="clickable_t">
      <td align="left">&nbsp;&nbsp;业务状态信息</td>
    </tr>
	<tr><td>
	  <table id="resizabletable" class="sortable"  border="0" cellpadding="0" cellspacing="1" bgcolor="#999999">
        <thead>
        <tr bgcolor="#c0c0c0">
          <th width="33" align="center" class="sort-alpha">
          序号</th>
          <th width="117" align="center" class="sort-alpha">名称</th>
          <th width="50" align="center" class="sort-alpha">值</th>
        </tr>
     </thead>
     <tbody>
        <%
          int ls_i=0;
          Iterator ite_obj=oa1.getAll("SysObjStatus","order by status");
          while(ite_obj.hasNext()){
           SysObjStatus sobj=(SysObjStatus)ite_obj.next();
           ls_i++;
         %>
        <tr  ondblclick="g_dbclick();" onclick="ls_choice('<%=sobj.getSid() %>');" onMouseOver="this.style.backgroundColor='#D0E6EE';" onMouseOut="this.style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
          <td align="center">
          <input id="<%=sobj.getSid() %>" type="checkbox" name="checkbox" value="checkbox"><span id="<%=sobj.getSid() %>value"><%=String.valueOf(ls_i) %>.</span>
          </td>
          <td align="center"><%=sobj.getStatus() %></td>
          <td align="center"><%=sobj.getVal() %></td>
          
        </tr>
         <%
        }
         %>
     </tbody>
      <tfoot>
      <tr>
       <td colspan="3" bgcolor="#ffffff" align="right">
       <s:a action="interim_gwj">首页
         <s:param name='url'>sobj</s:param>
         <s:param name='page_num'>1</s:param>
        </s:a>&nbsp;&nbsp;&nbsp;&nbsp;
        <%
        if(oa1.getPage()>1){
         %> 
        <s:a action="interim_gwj">上页
         <s:param name='url'>sobj</s:param>
         <s:param name='page_num'><%=String.valueOf(oa1.getPage() - 1) %></s:param>
        </s:a>　
        <%
        }
        if(oa1.getPage()<oa1.getPagecount()){
         %> 
        <s:a action="interim_gwj">下页
         <s:param name='url'>sobj</s:param>
         <s:param name='page_num'><%=String.valueOf(oa1.getPage() + 1) %></s:param>
        </s:a>
        <%
        }
         %> 　
        <s:a action="interim_gwj">末页
          <s:param name='url'>sobj</s:param>
          <s:param name='page_num'><%=String.valueOf(oa1.getPagecount()) %></s:param>
        </s:a>　
       | <%=oa1.getPage() %> / <%=oa1.getPagecount() %> |
       </td>
      </tr>
      </tfoot>
     </table>
  <%
 oa1.closeSession();
 %>
	</td></tr>
	</table>
  </body>
  <script type="text/javascript">
    document.getElementById("g_list").style.display='none';
    document.getElementById("g_password").style.display='none';
    document.getElementById("g_add").style.display='';
    document.getElementById("g_open").style.display='';
    document.getElementById("g_copy").style.display='';
    document.getElementById("g_delete").style.display='';
    document.getElementById("g_preview").style.display='none';
    document.getElementById("g_taoda").style.display='none';
    document.getElementById("g_refresh").style.display='none';
    document.getElementById("g_save").style.display='none';
    document.getElementById("g_return").style.display='none';
    document.getElementById("g_groupCmodule").style.display='none';
    document.getElementById("g_groupCuser").style.display='none';
    document.getElementById("g_userCuser").style.display='none';
    var ls_code;
    var ls_old,ls_new
    var page=<%=page_num %>;
    function ls_choice(ls_current){
     if(ls_old!=null){
       ls_old.checked=false;
     }
     ls_new = document.getElementById(ls_current);
     ls_new.checked=true;
     ls_old = ls_new;
    }
    function g_add(){
     window.location='../interim_gwj?url=sobjEdit&page_num='+page+'&operate=g_add';  
    }
    function g_dbclick(){
     window.location="interim_gwj?url=sobjEdit&page_num="+page+"&operate=g_open&ls_myzd_id="+ls_new.id;
    }
    function g_open(){
     if(ls_new!=null){
      var ls_xh = document.getElementById(ls_new.id + "value");
      var ls_myzd_id = ls_new.id;
      window.location="../interim_gwj?url=sobjEdit&page_num="+page+"&operate=g_open&ls_myzd_id="+ls_new.id;
     }
    }
    function g_copy(){
     if(ls_new!=null){
      var ls_xh = document.getElementById(ls_new.id + "value");
      var ls_copy=confirm('确定复制第'+ls_xh.innerHTML+'条记录?');
      if(ls_copy){
       window.location="../sobjEdit!g_copy?page_num="+page+"&ls_myzd_id="+ls_new.id;
      }
     }
    }
    function g_delete(){
     if(ls_new!=null){
      
      var ls_xh = document.getElementById(ls_new.id + "value");
      
         var ls_del=confirm('确定删除第'+ls_xh.innerHTML+'条记录?');
         if(ls_del){
          window.location="../sobjEdit!g_delete?page_num="+page+"&ls_myzd_id="+ls_new.id;
          }
     }
    }
    function g_preview(){
     if(ls_new!=null){
      var ls_xh = document.getElementById(ls_new.id + "value");
      alert("将预览第"+ls_xh.innerHTML+"条记录!");
     }
    }
    function g_refresh(){
     alert('g_refresh');
    }
    function g_save(){
     alert('g_save');
    }
    function g_return(){
     alert("g_return");
    }
  </script>
</html>
