<%--
MosP - Mind Open Source Project         http://www.mosp.jp/
Copyright (C) 1987-2009 MIND Co., Ltd.  http://www.e-mind.co.jp/

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
--%>
<%-- 〜　〜　〜　〜　〜　〜　〜　〜　〜　〜　〜　〜　〜　〜　〜　〜　〜　〜　--%>
<%--      コンピュータ・マインド・シリーズ／MosP                             --%>
<%--                                                                         --%>
<%--                                                                         --%>
<%--                                                                         --%>
<%--      プログラムＩＤ：  cmcodeList                                       --%>
<%--      プログラム名  ：  共通コード保守一覧画面                           --%>
<%--      修正履歴      ：                                                   --%>
<%--                                                                         --%>
<%--                                                                         --%>
<%--                                                                         --%>
<%-- 〜　〜　〜　〜　〜　〜　〜　〜　〜　〜　〜　〜　〜　〜　〜　〜　〜　〜　--%>
<%@ page
language     = "java"
pageEncoding = "Windows-31J"
buffer       = "256kb"
autoFlush    = "false"
errorPage    = "/jsp/common/error.jsp"
%><%@ page
import = "jp.mosp.common.common.MospConst"
import = "jp.mosp.common.common.HtmlUtility"
import = "jp.mosp.common.CommonConst"
import = "jp.mosp.system.vo.CmCodeListVo"
%><%
CmCodeListVo vo = (CmCodeListVo)request.getAttribute(MospConst.ATT_VO);
String[] aryTid       = vo.getEscAryTId();
String[] aryTidName   = vo.getAryTIdName();
String[] aryTcode     = vo.getEscAryTCode();
String[] aryTname     = vo.getEscAryTName();
String[] aryViewIndex = vo.getEscAryViewIndex();
String[] aryDelete    = vo.getEscAryDelete();
%>
<%=HtmlUtility.getHeader(vo)%>
<%=vo.getSubTitle(vo.SUB_TITLE, vo.CMD_MENU_SYSTEM2)%>
<div class="Body" id="codeList">
	<%=HtmlUtility.getMessages(vo)%>
	<div class="Search">
		<table>
			<tr>
				<td id="tdTId">
					<span><%=CmCodeListVo.NAM_CODE_ID%><%=CommonConst.STR_TITLE_SEPARATOR%></span><select id="<%= CmCodeListVo.PRM_PLT_T_ID %>" name="<%= CmCodeListVo.PRM_PLT_T_ID %>">
						<option value=""></option>
						<%=HtmlUtility.getSelectOption(vo.aryPltTId, vo.getPltTId())%>
					</select>
				</td>
				<td id="tdTCode">
					<span><%=CmCodeListVo.NAM_CODE%><%=CommonConst.STR_TITLE_SEPARATOR%></span>
					<input type="text" class="CodeTextBox" id="<%= CmCodeListVo.PRM_TXT_T_CODE %>" name="<%= CmCodeListVo.PRM_TXT_T_CODE %>" value="<%= vo.getEscTxtTCode() %>" />
				</td>
				<td id="tdTName">
					<span><%=CmCodeListVo.NAM_NAME%><%=CommonConst.STR_TITLE_SEPARATOR%></span>
					<input type="text" class="TextBox" id="<%= CmCodeListVo.PRM_TXT_T_NAME %>" name="<%= CmCodeListVo.PRM_TXT_T_NAME %>" value="<%= vo.getEscTxtTName() %>" />
				</td>
				<td id="tdDelete">
					<span><%=CmCodeListVo.NAM_DELETE%><%=CommonConst.STR_TITLE_SEPARATOR%></span>
					<select class="DeleteFlagSelect" id="<%= CmCodeListVo.PRM_PLT_DELETE %>" name="<%= CmCodeListVo.PRM_PLT_DELETE %>">
						<option value=""></option>
						<%=HtmlUtility.getDeleteFlagSelectOption(vo.getPltDelete())%>
					</select>
				</td>
				<td class="ButtonTd">
					<button type="button" onclick="doSubmitKey(document.form, 'S2001', '')"><%=CommonConst.NAM_SEARCH%></button>

				</td>
			</tr>
		</table>
	</div>
	<%=HtmlUtility.getListInfo(vo)%>
	<div class="List">
		<table id="list">
			<thead>
				<tr>
					<th id="thButton"></th>
					<th id="thTId"       onclick="doSubmitKey(document.form, 'S2003', '<%= vo.KEY_T_ID %>'      , '')">&nbsp;<%=CmCodeListVo.NAM_CODE_ID%>&nbsp;<%=vo.getSortMark(vo.KEY_T_ID)%></th>
					<th id="thTCode"     onclick="doSubmitKey(document.form, 'S2003', '<%= vo.KEY_T_CODE %>'    , '')">&nbsp;<%=CmCodeListVo.NAM_CODE%>&nbsp;<%=vo.getSortMark(vo.KEY_T_CODE)%></th>
					<th id="thThName"    onclick="doSubmitKey(document.form, 'S2003', '<%= vo.KEY_T_NAME %>'    , '')">&nbsp;<%=CmCodeListVo.NAM_NAME%>&nbsp;<%=vo.getSortMark(vo.KEY_T_NAME)%></th>
					<th id="thViewIndex" onclick="doSubmitKey(document.form, 'S2003', '<%= vo.KEY_VIEWINDEX %>' , '')">&nbsp;<%=CmCodeListVo.NAM_INDEX%>&nbsp;<%=vo.getSortMark(vo.KEY_VIEWINDEX)%></th>
					<th id="thDelete"    onclick="doSubmitKey(document.form, 'S2003', '<%= vo.KEY_DELETE %>'    , '')">&nbsp;<%=CmCodeListVo.NAM_DELETE%>&nbsp;<%= vo.getSortMark(vo.KEY_DELETE) %></th>
				</tr>
			</thead>
			<tbody>
<%
for (int i = vo.getStart(); i <= vo.getEnd(); i++) {
%>
				<tr>
					<td class="ButtonTd">
						<button type="button" onclick="doSubmitKey(document.form, 'S2006', '<%= aryTid[i] %>' ,  '<%= aryTcode[i] %>', '')"><%= CommonConst.NAM_SELECT %></button>
					</td>
					<td                    ><%= aryTidName  [i] %></td>
					<td                    ><%= aryTcode    [i] %></td>
					<td                    ><%= aryTname    [i] %></td>
					<td class="ViewIndexTd"><%= aryViewIndex[i] %></td>
					<td class="DeleteTd"   ><%= aryDelete[i] %></td>
				</tr>
<%
}
%>
			</tbody>
		</table>
	</div>
	<div class="ButtonDiv">
		<button type="button" class="ExecuteButton" onclick="doSubmit(document.form, 'S2005')"><%= CommonConst.NAM_MAKE_NEW_DATA %></button>
		<button type="button" class="MenuButton" onclick="doSubmit(document.form, 'S2910')"><%= CommonConst.NAM_TO_MENU %></button>
	</div>
</div>
<%= HtmlUtility.getFooter(vo) %>
