<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SimonMasterPage.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%: Html.Language("BrushCardRecord")%>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<div class="easyui-layout" data-options="fit:true">
		<div data-options="region:'north',border:false">
			<div class="toolbar" style="height: 65px;">
                <div>
				<span style="padding-left:5px;">
					<%: Html.Language("RoomNumber")%>：<input id="txtRoomNumber" class="easyui-combobox" style="width:80px;"
					    data-options="
						url: '/Host/LoadDataForRoomNumberCombobox/',
						editable:false,
						panelHeight:'150',
						valueField:'ID',
						textField:'RoomNumber',
						"/>&nbsp;
					<%: Html.Language("CardType")%>：<input id="txtCardType" class="easyui-combobox" style="width:60px;"
					    data-options="
						url:'/HostRoomCard/LoadDataForCardTypeCombobox/',
						editable:false,
						panelHeight:'auto',
						valueField:'ID',
						textField:'CardType',
                        value:-1
						" />&nbsp;
					<%: Html.Language("CardNumber")%>：<input id="txtCardNumber" class="easyui-combobox" style="width:80px;"
					   data-options="
						url:'/HostRoomCard/LoadDataForCardNumberCombobox/',
						required: false,
						editable:false,
						panelHeight:'150',
						panelWidth:'150',
						idField: 'ID',
						valueField:'CardNumber',
						textField:'Name'
						" />&nbsp;
					<a href="javascript:void(0)" class="toolbar-button tb-icon-search" onclick="query()"><%: Html.Language("Query")%></a>
					<% if ((bool)ViewData["EnableDelData"]){ %>
					<a href="javascript:void(0)" class="toolbar-button tb-icon-remove" onclick="dgDelete()"><%: Html.Language("Delete")%></a>
					<a href="javascript:void(0)" class="toolbar-button tb-icon-clear" onclick="clearData()"><%: Html.Language("Empty")%></a>
                    <% } %>	 
					<a href="/HostRoomCard/Export/" class="toolbar-button tb-icon-export" target="_blank"><%: Html.Language("Export")%></a>
				</span>
				<span style="position:absolute;right:10px;">
					<a href="javascript:void(0)" class="toolbar-button tb-icon-refresh" onclick="refresh()"><%: Html.Language("Refresh") %></a> 
				</span>
                </div>
                <div>
					<label><%: Html.Language("StartDate")%>：</label>
                    <input id="txtStartTime" type="text" class="easyui-datebox" style="width: 100px;" />
                    <label><%: Html.Language("Deadline")%>：</label>
                    <input id="txtEndTime" type="text" class="easyui-datebox" style="width: 100px;" />
                </div>
			</div>
		</div>
		<div data-options="region:'center',border:false">
			<table id="dg" class="easyui-datagrid" style="width:100%; height:auto;"
				data-options="
						toolbar: '#tb',
						border: false,
						pagination: true,
						pageSize: 50,
						rownumbers: true,
						striped: true,
						sortName: 'ID',
						sortOrder: 'asc',
						fit: true,
						fitColumns: true,
						idField: 'ID',
						method: 'post'
					">
				<thead>
					<tr>
						<th data-options="field:'RoomNumber'">
							<%: Html.Language("RoomNumber")%>
						</th>
						<th data-options="field:'CardType',sortable:true">
							<%: Html.Language("CardType")%>
						</th>
						<th data-options="field:'CardNumber',sortable:true">
							<%: Html.Language("CardNumber")%>
						</th>
						<th data-options="field:'UserNumber',sortable:true">
							<%: Html.Language("UserNumber")%>
						</th>
						<th data-options="field:'UserName',sortable:true">
							<%: Html.Language("UserName")%>
						</th>
						<th data-options="field:'InCardTime',sortable:true">
							<%: Html.Language("InCardTime")%>
						</th>
						<th data-options="field:'OutCardTime',sortable:true">
							<%: Html.Language("OutCardTime")%>
						</th>
						<th data-options="field:'Duration',sortable:true">
							<%: Html.Language("DurationMinute")%>
						</th>
					</tr>
				</thead>
			</table>
		</div>
	</div>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
    <script type="text/javascript" src="/Scripts/host-roomcard.js"></script>
</asp:Content>
