<%--
MosP - Mind Open Source Project    http://www.mosp.jp/
Copyright (C) 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.
--%>
<%@ 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.kintai.vo.ScheduleRotationListVo"
%><%
ScheduleRotationListVo vo = (ScheduleRotationListVo)request.getAttribute(MospConst.ATT_VO);
String [] aryRtCode = vo.getAryRTCode();
String [] aryRtName = vo.getAryRTName();
String [] aryDay1 	= vo.getAryDay1();
String [] aryDay2 	= vo.getAryDay2();
String [] aryDay3 	= vo.getAryDay3();
String [] aryDay4 	= vo.getAryDay4();
String [] aryDay5 	= vo.getAryDay5();
String [] aryDay6 	= vo.getAryDay6();
String [] aryDay7 	= vo.getAryDay7();
String [] aryDay8 	= vo.getAryDay8();
String [] aryDay9 	= vo.getAryDay9();
String [] aryDay10 	= vo.getAryDay10();
String [] aryHoliday= vo.getAryHoliday();
%>
<%= HtmlUtility.getHeader(vo) %>
<%= HtmlUtility.getSubTitle(vo) %>
<div class="Body" id="RotationList">
	<%= HtmlUtility.getMessages(vo) %>
	<div class="Search">
		<table>
			<tr>
				<td id="tdCode">
					<span><%= vo.NAM_RT_CODE %><%= CommonConst.STR_TITLE_SEPARATOR %></span>
					<input type="text" class="CodeTextBox" id="<%= ScheduleRotationListVo.PRM_TXT_RT_CODE %>" name="<%= ScheduleRotationListVo.PRM_TXT_RT_CODE %>" value="<%= vo.getEscTxtRTCode() %>" />
				</td>
				<td id="tdName">
					<span><%= vo.NAM_RT_NAME %><%= CommonConst.STR_TITLE_SEPARATOR %></span>
					<input type="text" class="TextBox" id="<%= ScheduleRotationListVo.PRM_TXT_RT_NAME %>" name="<%= ScheduleRotationListVo.PRM_TXT_RT_NAME%>" value="<%= vo.getEscTxtRTName() %>" />
				</td>
				<td class="ButtonTd">
					<button type="button" onclick="doSubmitKey(document.form, 'K1211', '')"><%= 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="thCode" onclick="doSubmitKey(document.form, 'K1213', '<%= vo.KEY_RT_CODE  %>')">&nbsp;<%= vo.NAM_RT_CODE  %>&nbsp;<%= vo.getSortMark(vo.KEY_RT_CODE  ) %></th>
					<th id="thName" onclick="doSubmitKey(document.form, 'K1213', '<%= vo.KEY_RT_NAME %>')">&nbsp;<%= vo.NAM_RT_NAME %>&nbsp;<%= vo.getSortMark(vo.KEY_RT_NAME ) %></th>
					<th id="thHoliday"><%=vo.NAM_HOLIDAY %></th>
					<th id="thDay"><%=vo.NAM_DAY1 %></th>
					<th id="thDay"><%=vo.NAM_DAY2 %></th>
					<th id="thDay"><%=vo.NAM_DAY3 %></th>
					<th id="thDay"><%=vo.NAM_DAY4 %></th>
					<th id="thDay"><%=vo.NAM_DAY5 %></th>
					<th id="thDay"><%=vo.NAM_DAY6 %></th>
					<th id="thDay"><%=vo.NAM_DAY7 %></th>
					<th id="thDay"><%=vo.NAM_DAY8 %></th>
					<th id="thDay"><%=vo.NAM_DAY9 %></th>
					<th id="thDay"><%=vo.NAM_DAY10%></th>					
				</tr>
			</thead>
			<tbody>
<%
for (int i = vo.getStart(); i <= vo.getEnd(); i++) {
%>
				<tr>
					<td class="ButtonTd">
						<button type="button" onclick="doSubmitKey(document.form, 'K1216', '<%= aryRtCode[i] %>')"><%= CommonConst.NAM_SELECT %></button>
					</td>				
					<td id="tdCode">	<%=aryRtCode[i] %>	</td>
					<td id="tdName">	<%=aryRtName[i] %>	</td>
					<td id="tdHoliday">	<%=aryHoliday[i]%>	</td>
					<td id="tdDay">		<%=aryDay1[i] 	%>	</td>
					<td id="tdDay">		<%=aryDay2[i] 	%>	</td>
					<td id="tdDay">		<%=aryDay3[i] 	%>	</td>
					<td id="tdDay">		<%=aryDay4[i] 	%>	</td>
					<td id="tdDay">		<%=aryDay5[i] 	%>	</td>
					<td id="tdDay">		<%=aryDay6[i] 	%>	</td>
					<td id="tdDay">		<%=aryDay7[i] 	%>	</td>
					<td id="tdDay">		<%=aryDay8[i] 	%>	</td>
					<td id="tdDay">		<%=aryDay9[i] 	%>	</td>
					<td id="tdDay">		<%=aryDay10[i] 	%>	</td>
				</tr>
<%
}
%>
			</tbody>
		</table>
	</div>
	<div class="ButtonDiv">
		<button type="button" class="ExecuteButton" onclick="doSubmit(document.form, 'K1215')"><%= CommonConst.NAM_MAKE_NEW_DATA %></button>
	</div>
</div>
<%= HtmlUtility.getFooter(vo) %>
	
