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

<style type="text/css">
	#roomCardForm table th {
		font-weight: normal;	
		text-align: right;
	}
</style>
<form id="roomCardForm" class="easyui-form" method="post" data-options="novalidate:true">
	<input type="hidden" name="ID" value="<%: Model.ID %>" />
	<table style="margin: 20px auto;" cellpadding="3">
		<tr>
			<th><label for="txtCardNumber"><%: Html.Language("CardNumber")%>：</label></th>
			<td><input id="txtCardNumber" name="CardNumber" class="easyui-validatebox textbox text" data-options="required:true,validType:'length[1,20]'" value="<%: Model.CardNumber %>" /></td>
		</tr>
		<tr>
			<th><label for="cbxCardType"><%: Html.Language("CardType")%>：</label></th>
			<td>
				<select id="cbxCardType" name="CardTypeID" class="easyui-combobox" style="width:180px;" 
					data-options="
						valueField:'ID',
						textField:'Name',
						required:true,
						panelHeight:'auto',
						editable:false,
						url:'/RoomCard/LoadRoomCardTypes/',
						value:<%: Model.RoomCardType != null ? Model.RoomCardType.ID.ToString() : "''" %>
					">
				</select>
			</td>
		</tr>
		<tr>
			<th><label for="txtUserNumber"><%: Html.Language("UserNumber")%>：</label></th>
			<td><input id="txtUserNumber" name="UserNumber" class="easyui-validatebox textbox text" value="<%: Model.UserNumber %>" /></td>
		</tr>
		<tr>
			<th><label for="txtUserName"><%: Html.Language("UserName")%>：</label></th>
			<td><input id="txtUserName" name="UserName" class="easyui-validatebox textbox text" value="<%: Model.UserName %>" /></td>
		</tr>
		<tr>
			<th><label for="txtSort"><%: Html.Language("Sort")%>：</label></th>
			<td><input id="txtSort" name="Sort" class="easyui-numberspinner text" value="1" style="width:60px;" data-options="required:true,min:1,value:<%: Model.Sort %>" /></td>
		</tr>
	</table>
</form>