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

<style type="text/css">
	#roomTypeModalForm table {
		margin: 10px auto;	
	}
	#roomTypeModalForm table th{
		font-weight: normal;
		text-align: right;
		cursor: default;
	}
	#roomTypeModalForm table th,
	#roomTypeModalForm table td{
		/*background:pink;*/
	}
</style>

<form id="roomTypeModalForm">
	<input type="hidden" name="ID" value="<%: Model.ID %>" id="txtRoomTypeModalID" />
	<input type="hidden" name="RoomTypeID" value="<%: Model.RoomType == null ? 0 : Model.RoomType.ID %>" />
	<input type="hidden" name="Color" value="<%: Model.Color == null ? "" : Model.Color %>" />
	<input type="hidden" name="Outlet" value="<%: Model.Outlet == null ? "" : Model.Outlet %>" />
	<table cellpadding="3">
		<tr>
			<th><%: Html.Language("Type")%></th>
			<td>
				<select name="Type" class="easyui-combobox" 
						data-options="
							required:true,
							editable:false,
							panelHeight:'auto',
							value: '<%: Model.Type %>',
                            onSelect:cbxDeviceTypeOnSelect
						">
                        <%--阿宝修改的---设备类型--%>
					<% foreach (var name in Enum.GetNames(typeof(Domain.DeviceType))) { %>
						<option value="<%: name %>"><%: Html.Language(name) %></option>
					<%	} %>
				</select>
			</td>
			<%--<th><%: Html.Language("Subtype") %></th>
			<td>
				<select id="subtype" name="Subtype" class="easyui-combobox" style="width:65px;"
						data-options="
							url: '/RoomType/LoadDeviceSubtypes?deviceType=<%: Model.Type %>',
							editable: false,
							panelHeight: 'auto',
							valueField: 'Value',
							textField: 'Name',
							value: '<%: Model.Subtype != null ? Model.Subtype : "" %>'
						">
				</select>
			</td>--%>
		</tr>
		<tr>
			<th>  <%: Html.Language("ReturnAddress")%></th>
			<td colspan="4"><input class="easyui-validatebox textbox text" id="txtModalAddress" name="ModalAddress" <%: Model.Default ? "readonly='readonly'" : "" %> data-options="required:true,validType:'length[9,9]'" value="<%: Model.ModalAddress %>" /></td>
		</tr>
		<%--<tr>
			<th>  <%: Html.Language("DeliveryOutlet")%></th>
			<td colspan="4"><input class="easyui-validatebox textbox text" name="Outlet" data-options="required:true" value="<%: Model.Outlet %>" /></td>
		</tr>--%>
		<tr>
			<th>  <%: Html.Language("Name")%></th>
			<td colspan="4"><input class="easyui-validatebox textbox text" name="Name" data-options="required:true" value='<%= Model.Name ?? "" %>' /></td>
		</tr>
		<tr>
			<th>  <%: Html.Language("EnglishName")%></th>
			<td colspan="4"><input class="easyui-validatebox textbox text" name="EnglishName" value='<%= Model.EnglishName ?? "" %>' /></td>
		</tr>
		<tr>
			<th>  <%: Html.Language("TWName")%></th>
			<td colspan="4"><input class="easyui-validatebox textbox text" name="TWName" value='<%= Model.TWName ?? "" %>' /></td>
		</tr>
        <tr>
            <th> <%: Html.Language("AliasName")%></th>
            <td colspan="4"><input class="easyui-validatebox textbox text" name="AliasName" value='<%= Model.AliasName ?? "" %>' /></td>
        </tr>
		<tr>
			<th><%: Html.Language("PowerWatt")%></th>
			<td colspan="4"><input class="easyui-numberbox textbox text" name="Power" data-options="required:true" value="<%: Model.Power %>" /></td>
		</tr>
        <%--<tr>
			<th><%: Html.Language("LowElectricityValue")%></th>
			<td colspan="4"><input class="easyui-numberbox textbox text" name="LowPower" data-options="required:true" value="<%: Model.LowPower %>" /></td>
		</tr>--%>
		<tr>
			<th><%: Html.Language("Sort")%></th>
			<td colspan="4"><input name="Sort" class="easyui-numberspinner text" value="1" style="width:60px;" data-options="required:true,min:1,value:<%: Model.Sort %>" /></td>
		</tr>

        <tr>
        <th>
            TCL设备名
        </th>
        <td colspan="4">
            <select id="cmbMode11TCLDeviceName" name="TCLDeviceName" class="easyui-combobox" style="width: 60px;" data-options="
							required:true,
							editable:false,
							panelHeight:'auto',
							value: '<%: Model.TCLDeviceName %>',
                            ">
                <option value="">--请选择--</option>
                <option value="红">R-红</option>
                <option value="绿">G-绿</option>
                <option value="蓝">B-蓝</option>
            </select>
        </td>
        </tr>

        <tr>
        <th>
            组设备编号
        </th>
        <td colspan="4">
            <input name="MultipleGroupID" class="easyui-numberspinner text" value="<%: Model.MultipleGroupID %>" style="width: 60px;" />
        </td>
    </tr>
        <tr>
        <th>组设备</th>
        <td colspan="4">
            <select id="selectMultipleTCLName" name="MultipleTCLName" class="easyui-combobox" data-options="
							required:true,
							editable:false,
							panelHeight:'auto',
							value: '<%: Model.MultipleTCLName %>'">
                <option value="">--请选择--</option>
                <option value="氛围灯">氛围灯</option>
            </select>
        </td>
    </tr>
	</table>
</form>