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

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    智能语音上报查询
</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" style="overflow: hidden; height: 30px;">
            <div class="toolbar" style="position: relative;">
                <span style="padding-left: 5px;"><a href="javascript:void(0)" class="toolbar-button tb-icon-search"
                    onclick="query()">
                    <%: Html.Language("Query")%></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>
                        <%--<a href="javascript:void(0)" class="toolbar-button tb-icon-remove" onclick="delData()"><%: Html.Language("Delete")%></a>--%>
                        <%--<a href="javascript:void(0)" class="toolbar-button tb-icon-clear" onclick="clearData()"><%: Html.Language("Empty")%></a>--%>
                    </span>
            </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,
						singleSelect: false,
						pagination: true,
						pageSize: 50,
						rownumbers: true,
						striped: true,
						sortName: 'CreatedDate',
						sortOrder: 'desc',
						fit: true,
						fitColumns: true,
						idField: 'ID',
                        nowrap:true,
						frozenColumns: [[
							{ field: 'ID', checkbox: true }
						]],
						method: 'post'
					">
                <thead>
                    <tr>
                        <th data-options="field:'RoomNumber',sortable:true">
                            <%: Html.Language("RoomNumber")%>
                        </th>
                        <th data-options="field:'ModalAddress',sortable:true">
                            <%: Html.Language("ReturnAddress")%>
                        </th>
                        <th data-options="field:'Type',sortable:true,formatter:checkType">
                            <%: Html.Language("Type")%>
                        </th>
                        <th data-options="field:'Sentence',sortable:true">
                            <%: Html.Language("Sentence")%>
                        </th>
                        <th data-options="field:'CreatedDate',sortable:true,resizable:false,formatter:$.tools.formatDateTime">
                            <%: Html.Language("Time")%>
                        </th>
                    </tr>
                </thead>
            </table>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
    <style type="text/css">
        .toolbar label
        {
            font-size: 12px;
        }
    </style>
    <script type="text/javascript">
        function checkType(val, row) {
            switch (val) {
                case 1:
                    return "客需服务";
                case 2:
                    return "电视控制";
                default:
                    return "RCU异常信息";
            }
        }
        function refresh() {
            $('#dg').datagrid('load', {});
        }

        function query() {
            var params = {
                roomNumber: ""
            };
            $('#dg').datagrid({ url: '/HostWordsReport/LoadAllByPage/', queryParams: params });
        }
    </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>
