<%@ 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("HostManagement") %>
</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">
                <div>
                    <label>
                        <%: Html.Language("RoomNumber")%>：</label>
                    <input id="txtRoomNumber" class="easyui-validatebox" style="width: 60px;" />
                    <select id="cbxIsSyncRoomNumber" class="easyui-combobox" style="width: 60px;" data-options="panelHeight: 'auto',editable: false,onSelect:groupTreeOnSelectForInfo">
                        <option value='2'>
                            <%: Html.Language("All")%></option>
                        <option value='1' selected="selected">
                            <%: Html.Language("Sync")%></option>
                        <option value='0'>
                            <%: Html.Language("NoSync")%></option>
                    </select>
                    <label>
                        MAC：</label>
                    <input id="txtMac" class="easyui-validatebox" style="width: 120px;" />
                    <label>
                        <%: Html.Language("RoomType")%></label>
                    <input id="txtRoomType" class="easyui-validatebox" style="width: 60px;" />
                    <a href="javascript:void(0)" class="toolbar-button tb-icon-search" onclick="groupTreeOnSelectForInfo();">
                        <%: Html.Language("Query")%></a>
                    <%--<a href="javascript:void(0)" class="toolbar-button tb-icon-relation" onclick="syncInfo()">
                        <%: Html.Language("SyncInfo")%></a>--%>
                </div>
            </div>
        </div>
        <div title="" style="border-right: 1px solid #95B8E7;" data-options="region:'center',border:false">
            <table id="dg" class="easyui-datagrid" style="width: 100%;" data-options="
						border: false,
						singleSelect: false,
						pagination: true,
						pageSize: 200,
                        pageList: [30, 50, 100, 200],
						rownumbers: true,
						sortName: 'RegisterDate',
						sortOrder: 'desc',
						fit: true,
						fitColumns: true,
						striped: false,
						idField: 'ID',
						frozenColumns: [[{ field: 'ID', checkbox: true }]],
						method: 'POST',
                        rowStyler:function(index, row){if(row.Flag==0){return 'background-color:LightBlue;color:black;';}}
					">
                <thead>
                    <tr>
                        <th data-options="field:'Type',sortable:true,align:'center'">
                            类型
                        </th>
                        <th data-options="field:'HotelCode',sortable:true,align:'center'">
                            编码
                        </th>
                        <th data-options="field:'RoomType',sortable:true">
                            <%: Html.Language("RoomType") %>
                        </th>
                        <th data-options="field:'RoomNumber',sortable:true,align:'center'">
                            <%: Html.Language("RoomNumber") %>
                        </th>
                        <th data-options="field:'MAC',sortable:true">
                            MAC
                        </th>
                        <th data-options="field:'IPType',sortable:true,align:'center'">
                            <%: Html.Language("IPType")%>
                        </th>
                        <th data-options="field:'LanIP',sortable:true">
                            主机IP
                        </th>
                        <th data-options="field:'RoomStatus'">
                            <%: Html.Language("RoomStatus")%>
                        </th>
                        <th data-options="field:'TypeNumber',sortable:true,align:'center'">
                            机型编码
                        </th>
                        <th data-options="field:'Version',sortable:true">
                            固件APP版本
                        </th>
                        <th data-options="field:'ConfigVersion',sortable:true">
                            <%: Html.Language("ConfigVersion") %>
                        </th>
                        <th data-options="field:'HotelName',sortable:true">
                            配置酒店名称
                        </th>
                        <th data-options="field:'RoomTypeRemark',sortable:true">
                            配置房型名称
                        </th>
                        <th data-options="field:'HostID',sortable:true">
                            房号ID
                        </th>
                        <th data-options="field:'RoomTypeID',sortable:true">
                            房型ID
                        </th>
                        <th data-options="field:'LanPort',sortable:true">
                            <%: Html.Language("Port")%>
                        </th>
                        <th data-options="field:'Gateway',sortable:true">
                            <%: Html.Language("Gateway")%>
                        </th>
                        <th data-options="field:'SubnetMask',sortable:true">
                            <%: Html.Language("SubnetMask")%>
                        </th>
                        <th data-options="field:'DNS',sortable:true">
                            DNS
                        </th>
                        <th data-options="field:'ServerIP',sortable:true">
                            <%: Html.Language("ServerIP")%>
                        </th>
                        <th data-options="field:'RunTime',sortable:true">
                            主机时间
                        </th>
                        <th data-options="field:'Season',sortable:true">
                            <%: Html.Language("Season")%>
                        </th>
                        <th data-options="field:'LockStatus',sortable:true">
                            锁定
                        </th>
                        <th data-options="field:'ExpireTime',sortable:true">
                            <%: Html.Language("ExpireTime")%>
                        </th>
                        <th data-options="field:'SetExpireTime',sortable:true">
                            <%: Html.Language("SetExpireTime")%>
                        </th>
                        <th data-options="field:'Core',sortable:true">
                            Core
                        </th>
                        <th data-options="field:'Model',sortable:true">
                            <%: Html.Language("Model")%>
                        </th>
                        <th data-options="field:'Launcher',sortable:true">
                            Launcher
                        </th>
                        <th data-options="field:'UpdateTime',sortable:true">
                            同步时间
                        </th>
                        <th data-options="field:'Remark'">
                            <%: Html.Language("Remark") %>
                        </th>
                    </tr>
                </thead>
            </table>
        </div>
        <div style="width: 270px; border-left: 1px solid #95B8E7;" data-options="
				region: 'east',
				split: true,
				border: false
			">
            <div class="easyui-layout" data-options="fit:true">
                <div data-options="region:'center',border:false">
                    <table id="groupTree" class="easyui-treegrid" data-options="
							url: '/Group/LoadGroupTree/',
							method: 'post',
							idField: 'ID',
							treeField: 'Name',
							fit: true,
							fitColumns: true,
							animate: true,
							border: false,
							bodyCls: 'easyui-treegrid-no-icon',
							loadMsg: '<%: Html.Language("Loading") %>',
                            onLoadSuccess: function (row, data) {if (data[0] != null) {$('#groupTree').treegrid('select', data[0].ID);}},
							onSelect: groupTreeOnSelectForInfo
						">
                        <thead>
                            <tr>
                                <th data-options="field:'Name',width:160">
                                    <%: Html.Language("Name") %>
                                </th>
                                <th data-options="field:'Sort',align:'center',width:40">
                                    <%: Html.Language("Sort") %>
                                </th>
                            </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
    <script src="/Scripts/group.js" type="text/javascript"></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;
       } %>
    <script src="/Scripts/host-index.js" type="text/javascript"></script>
</asp:Content>
