<%@ 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("LoopStateRecord")%>
</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: 35px;">
                    <label><%: Html.Language("AbnormalType")%>：</label>
					<select id="cbxAbnormalType" class="easyui-combobox" style="width:300px;" data-options="
                            panelWidth: 300,
							valueField: 'Value',
							textField: 'Name',
							editable: false,
                            value:1,
							url: '/Overview/LoadAbnormalType/'
						">
					</select>
                    <%--<select id="cbxHotels" class="easyui-combogrid" style="width: 100px;" data-options="
						panelWidth: 270,
						multiple: true,
                        idField: 'ID',
                        textField: 'Name',
						editable: false,
						fitColumns: true,
						url: '/SysHotel/LoadAll/',
                        columns:[[
							{ field: 'ck',checkbox: true },
                            { field: 'ID', title: 'ID' },
                            { field: 'Code', title: '<%: Html.Language("Code")%>' },
                            { field: 'Name', title: '<%: Html.Language("Name")%>' }
                        ]]
                    ">
                    </select>--%>
                    <a href="javascript:void(0)" class="toolbar-button tb-icon-search" onclick="query();">
                        <%: Html.Language("Query")%>
					</a>
            </div>
        </div>
        <div data-options="region:'center',border:false">
            <table id="dg" class="easyui-datagrid" style="width: 100%; height: auto;" 
					data-options="
						border: false,
						singleSelect: true,
						pagination: false,
						pageSize: 50,
						rownumbers: true,
						striped: true,
						sortName: 'StartTime',
						sortOrder: 'desc',
						fit: true,
						fitColumns: true,
						method: 'POST'
					">
                <thead>
                    <tr>
                        <%--<th data-options="field:'Name',sortable:false,resizable:false">
                            <%: Html.Language("Hotel")%>
                        </th>--%>
                        <th data-options="field:'AbnormalName',sortable:false,resizable:false">
                            <%: Html.Language("AbnormalName")%>
                        </th>
                        <th data-options="field:'RoomNumber',sortable:false,resizable:false">
                            <%: Html.Language("RoomNumber")%>
                        </th>
                        <th data-options="field:'UpdateTime',sortable:false,resizable:false">
                            <%: Html.Language("Time")%>
                        </th>
                    </tr>
                </thead>
            </table>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
    <script type="text/javascript">
        function query() {
            //var hotels = $('#cbxHotels').combogrid('getValues');
            var type = $('#cbxAbnormalType').combobox('getValue');
            var params = {
                type: type
            };
            $('#dg').datagrid({ url: '/Overview/LoadHostAbnormalRecords/', queryParams: params });
        }
		$(function () {
		});
    </script>
</asp:Content>
