<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>

<table id="dgChannel" class="easyui-datagrid" style="width: 100%; height: auto;" data-options="
		toolbar: '#tbChannel',
		border: false,
		singleSelect: true,
		pagination: true,
		pageSize: 50,
		rownumbers: true,
		sortName: 'Sort',
		sortOrder: 'asc',
		fit: true,
		fitColumns: true,
		striped: true,
		idField: 'ID',
		url: '/RoomTypeChannels/LoadAllByPage/',
		queryParams: { roomTypeID: <%: Model %>},
		method: 'POST',
		onDblClickRow: function(index, row) { editRoomTypeChannel(row); }
	">
    <thead>
        <tr>
            <%--<th data-options="field:'RoomTypeName',sortable:true,resizable:false">
                <%: Html.Language("RoomType")%>
            </th>--%>
            <th data-options="field:'Code',sortable:true,resizable:false">
                <%: Html.Language("Code")%>
            </th>
            <th data-options="field:'Name',sortable:true,resizable:false">
                <%: Html.Language("Name")%>
            </th>
            <th data-options="field:'Sort',align:'center',sortable:true,resizable:false">
                <%: Html.Language("Sort")%>
            </th>
        </tr>
    </thead>
</table>
<div id="tbChannel">
    <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" onclick="$('#dgChannel').datagrid('reload');"><%: Html.Language("Refresh")%></a> 
    <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" onclick="addRoomTypeChannel(<%: Model %>)"><%: Html.Language("New")%></a> 
    <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" onclick="editRoomTypeChannel()"><%: Html.Language("Edit")%></a> 
    <a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" onclick="delRoomTypeChannel()"><%: Html.Language("Delete")%></a>
</div>
