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

<script type="text/javascript" src="/Scripts/room-type-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; } %>
<div id="roomControlDlg" class="easyui-layout" fit="true">
    <div data-options="region:'north',border:false" style="height:230px;">
        <form id="roomControlForm" method="post" action="#">
        <input type="hidden" name="ID" value="<%: Model.ID %>" />
        <input type="hidden" name="GroupID" value="<%: Model.GroupID %>" />
        <input type="hidden" name="RoomTypeID" value="<%: Model.RoomTypeID %>" />
        <div style=" text-align:center;">
            <%--<div style=" margin-top:15px;">
                <label><%: Html.Language("Floor")%>：</label> 
                <input id="cbxGroup" name="GroupID" class="easyui-combotree" style="width: 150px;" value=" <%: Model.GroupID %>"
                    data-options="
							valueField: 'ID',
							textField: 'Name',
							lines:true,
							required: true,
                            editable:false,
							panelHeight: 'auto',
							url: '/Group/LoadCurrentUserGroupTree/',
                            onSelect:cbtFloorOnSelect
                    "/>
            </div>--%>            
            <div style=" margin-top:15px;">
                <label><%: Html.Language("RoomType")%>：</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<input id="cbxRoomType" name="RoomTypeID" class="easyui-combobox" style="width:150px;" value="<%: Model.RoomTypeID %>"
					data-options="
						editable:false,
						panelHeight:'auto',
						valueField:'ID',
						textField:'Name',
						onSelect: cbxRoomTypeOnSelect,
						url:'/RoomType/LoadDataForRoomTypeCombobox/'
						" />
            </div>            
            <div style=" margin-top:5px;">
                <label> <%: Html.Language("RoomNumber")%>：</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input id="cbxRoomNumber" name="HostIDs" class="easyui-combogrid" style="width: 150px;" value="<%: Model.HostIDs %>"
                    data-options="
                        multiple: true,
						panelHeight:'300',
						panelWidth:'220',
						required: true,
						idField: 'ID',
						valueField: 'ID',
						textField: 'RoomNumber',
						editable: true,
						columns:[[
							{ field: 'ck',checkbox: true },
							{ field: 'RoomNumber', title: '<%: Html.Language("RoomNumber")%>' },
							{ field: 'GroupName', title: '<%: Html.Language("Floor")%>' },
							{ field: 'RoomTypeName', title: '<%: Html.Language("RoomType")%>' }
						]],
						url:'/RoomControl/LoadRoomNumberCombobox/?roomTypeID='+<%: Model.RoomTypeID %>
                    "/>
            </div>            
            <div style=" margin-top:5px;">
                <label><%: Html.Language("RoomStatus")%>：</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<input id="cbxRoomStatus" name="RoomStatusID" class="easyui-combobox" style="width:150px;" value="<%: Model.RoomStatusID %>" 
					data-options="
						editable:false,
						panelHeight:'auto',
						valueField:'ID',
						textField:'Name',
						url:'/RoomStatus/LoadDataForRoomStatusCombobox/'
						" />		
            </div>            
            <div style=" margin-top:5px;">
                <label><%: Html.Language("CardType")%>：</label>
                <input id="cbxRoomCard" name="RoomCardTypeID" class="easyui-combobox"  style="width: 150px;" value="<%:Model.RoomCardTypeID %>"
                    data-options="
                        editable:false,
						panelHeight:'auto',
						valueField: 'ID',
						textField: 'CardType',
						url: '/HostRoomCard/LoadDataForCardTypeCombobox/'
                    "/>
            </div>
            <div id="Scene" style=" margin-top:5px;">
                <label><%: Html.Language("Scene")%>：</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input id="cbxSceneName" name="RoomTypeSceneID" class="easyui-combobox" style="width:150px;" value="<%:Model.RoomTypeSceneID %>"
                data-options="
                        editable:false,
						panelHeight: '120',
						required: true,
						valueField: 'ID',
						textField: 'Name',
						method: 'post',
						url: '/RoomControl/LoadRoomTypeScene/?roomTypeID='+<%: Model.RoomTypeID %>
                    " /> 
            </div>
            <div style=" margin-top:5px;">
                <label><%: Html.Language("TimingType")%>：</label>
                <input id="cbxTimingType" name="TimingType" class="easyui-combobox" style="width:150px;" value="<%:Model.TimingType %>"
					data-options="
                        editable:false,
                        panelHeight: 'auto',
                        onSelect: cbxTimingTypeOnSelect,
						data:[
					    { value: 0, text: lang.EveryDay },
					    { value: 1, text: lang.EveryWeek },
					    { value: 2, text: lang.EveryMonth }
				]"/>
            </div>
            <div style=" margin-top:5px;">
                <label><%: Html.Language("Date")%>：</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                
                <input id="cbxTimeDay" name="TimingDay" class="easyui-combogrid" style="width: 150px;" value="<%: Model.TimingDay %>"
                    data-options="
						editable: true,
                        multiple: true,
						panelHeight:'120',
						required: true,
						idField: 'ID',
						valueField: 'ID',
						textField: 'Name',
						method: 'post',
						columns:[[
							{ field: 'ck',checkbox: true },
							{ field: 'Name', title: '<%: Html.Language("Name")%>' }
						]],
						url:'/RoomControl/LoadTimeDay/?timeType='+<%:Model.TimingType %>
                    "/>
            </div>
            <div style=" margin-top:5px;">
                <label><%: Html.Language("Time")%>：</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <input id="cbxTiming" name="Timing" class="easyui-combogrid" style="width:150px;" value="<%:Model.Timing %>"
                data-options="
                        editable:true,
                        multiple: true,
						panelHeight: '120',
						required: true,
						idField: 'Value',
						valueField: 'Value',
						textField: 'Value',
						method: 'post',
						columns:[[
							{ field: 'ck',checkbox: true },
							{ field: 'Value', title: '<%: Html.Language("Time")%>' }
						]],
						url: '/RoomControl/LoadTiming/'
                    " /> 
            </div>
        </div>
        </form>
    </div>
</div>