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

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

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<div class="easyui-layout" data-options="fit:true">
		<div title='<%: Html.Language("RoomCardMgmt")%>' style="border-right:1px solid #95B8E7;" 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: 20,
						rownumbers: true,
						striped: true,
						sortName: 'ID',
						sortOrder: 'asc',
						fit: true,
						fitColumns: true,
						idField: 'ID',
						frozenColumns: [[ { field: 'ID', checkbox: true } ]],
						url: '/RoomCard/LoadAllByPage/',
						method: 'post',
						onDblClickRow: function(index, row) { edit(row); }
					">
				<thead>
					<tr>
						<th data-options="field:'CardNumber',sortable:true">
							<%: Html.Language("CardNumber")%>
						</th>
						<th data-options="field:'CardType',sortable:true">
							<%: Html.Language("CardType")%>
						</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:'Sort',sortable:true">
							<%: Html.Language("Sort")%>
						</th>
					</tr>
				</thead>
			</table>
		</div>
	</div>
	<div id="tb">
		<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="$('#dg').datagrid('load',{});"><%: Html.Language("Refresh")%></a> 
		<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="add()"><%: Html.Language("New")%></a>
		<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="edit()"><%: Html.Language("Edit")%></a>
		<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="del()"><%: Html.Language("Delete")%></a>
	</div>
	<div id="dialog" class="easyui-window"   style="padding: 5px;"
		data-options="
			closed: true,
			modal: true,
			collapsible: false,
			minimizable: false,
			maximizable: false
		">
		<div class="easyui-panel dlg-content" style="margin-bottom:5px;"></div>
		<div class="dlg-footer" style="text-align:right; padding:5px 5px 0 0;">
			<a class="easyui-linkbutton dlg-btn-save" data-options="iconCls:'icon-save'" href="javascript:void(0)"><%: Html.Language("Save")%></a>
			<a class="easyui-linkbutton dlg-btn-cancel" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#dialog').window('close');"><%: Html.Language("Cancel")%></a>
		</div>
	</div>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
	<script type="text/javascript" src="/Scripts/room-card-index.js"></script>
    <% switch ((int)Session["isCN"]){case 1: %>
    <script type="text/javascript" src="/Scripts/en-US.js"></script>
    <% break; case 2: %>
    <script type="text/javascript" src="/Scripts/zh-TW.js"></script>
    <% break;default: %>
    <script type="text/javascript" src="/Scripts/zh-CN.js"></script>
    <% break; } %>
</asp:Content>
