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

<%@ page import = "java.lang.Object"%>


<HTML>
<%
SessionUser user = (SessionUser)session.getAttribute("userinfo");
UIService userUI =new UIService();

BPIP_USER_IDEA[] ideas = null;
UserIdeaService ideaService =new UserIdeaService();
String th = request.getParameter("th");
if (th==null){th="";}


//得到查询的记录集
  ideas = ideaService.GetIdeaList1(user.getUserID());
  String strshow_data ="";
      String strcont = "";
      if (ideas!=null && ideas.length>0){
        strshow_data = strshow_data + "[";
        for(int i=0;i<ideas.length;i++){
          strshow_data = strshow_data + "[";
          strshow_data = strshow_data + "\""+ideas[i].getID()+"\",";

          strcont = ideas[i].getCONTENT();

          if (i < ideas.length-1 )
          {
             strshow_data = strshow_data + "\""+strcont+"\"],\r\n";
          }else
          {
             strshow_data = strshow_data + "\""+strcont+"\"]";
          }
        }

        strshow_data = strshow_data + "]";
        }else
        {
          strshow_data = "null";
        }

%>
<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()%>">
<SCRIPT LANGUAGE="JavaScript" src="../../zrsysmanage/script/Public.js"></SCRIPT>

<link rel="stylesheet" type="text/css" media="all" href="../../ZrwebGui/sigma_grid/grid/calendar/calendar-blue.css">
<script type="text/javascript" src="../../ZrwebGui/sigma_grid/grid/calendar/calendar.js"></script>
<script type="text/javascript" src="../../ZrwebGui/sigma_grid/grid/calendar/calendar-setup.js"></script>
<link rel="stylesheet" type="text/css" href="../../ZrwebGui/sigma_grid/grid/gt_grid.css">
<link rel="stylesheet" type="text/css" href="../../ZrwebGui/sigma_grid/grid/skin/vista/skinstyle.css">
<link rel="stylesheet" type="text/css" href="../../ZrwebGui/sigma_grid/grid/skin/pink/skinstyle.css">
<link rel="stylesheet" type="text/css" href="../../ZrwebGui/sigma_grid/grid/skin/mac/skinstyle.css">
<script type="text/javascript" src="../../ZrwebGui/sigma_grid/grid/gt_msg_en.js"></script>
<script type="text/javascript" src="../../ZrwebGui/sigma_grid/grid/gt_const.js"></script>
<script type="text/javascript" src="../../ZrwebGui/sigma_grid/grid/gt_grid_all.js"></script>


<script type="text/javascript" >
var css = "<%=user.getUserCSS()%>";
var skincss = "vista";

if (css=="Blue.css")
{skincss = "vista";}
if (css=="Public.css")
{skincss = "default";}
if (css=="Window.css" || css=="nBlue.css")
{skincss = "mac";}
if (css=="Yellow.css")
{skincss = "pink";}

<%if (th.equals("1")){%>
  skincss = "mac";
<%}%>

var grid_demo_id = "myGrid1" ;
var show_data= <%=strshow_data%>;

var dsOption= {

	fields :[
		{name : 'NAME1'  },
		{name : 'NAME2'  }
	],

	recordType : 'array',
	data : show_data
}



var colsOption = [
           {id: 'NAME1' , header: "<center>ID</center>" , width :80 , hidden:true   },
	   {id: 'NAME2' , header: "<center>意见内容</center>" , width :380 ,align : 'center' }
];


var gridOption={
	id : grid_demo_id,
	width: "99%",
	height: "230",
	container : 'gridbox',
	replaceContainer : true,
	dataset : dsOption ,
	columns : colsOption,
	pageSize : 2000,
	toolbarContent : null,
        skin : skincss,

        onCellDblClick:function(value, record , cell, row,  colNO, rowNO,columnObj,grid){
           FunOk();
        },

       showIndexColumn : true
};


var mygrid=new Sigma.Grid( gridOption );
Sigma.Util.onLoad( Sigma.Grid.render(mygrid));

</script>

  </HEAD>
  <BODY class="BodyMain">
    <form name="recordfrm" action="List.jsp">

      <!--HTML Head表单头显示[显示内容，用户肤色的图片文件夹]-->
      <%=userUI.ShowHeadHtml("处理意见信息管理","IcoTitle.gif",user.getUserImage())%>
      <!--HTML 功能标题显示[显示内容,图标文件,宽度,用户肤色的图片文件夹]-->
  <!--HTML Body Start显示表单开始部分-->
  <%=userUI.ShowBodyStartHtml()%>

  <div id="gridbox" style="border:0px solid #cccccc;background-color:#f3f3f3;padding:5px;height:200px;width:700px;" ></div>


  <!--HTML Foot显示表单尾-->
  <%=userUI.ShowFootHtml()%>
  </form>
</BODY>
<script language="JavaScript" type="text/JavaScript">
<!--

function FunOk(){
  var allvalue = mygrid.getSelectedRecords()+",0";
  var strID = allvalue.split(",")[1];
  <%if (th.equals("1")){%>
       parent.SelectIdea_f(strID);

  <%}else{%>
       window.returnValue =strID;
       window.close();
  <%}%>

}
//-->
</script>
</HTML>
<%
//清空相关对象
user = null;
userUI = null;
ideaService = null;
ideas = null;
%>
