<%@ Page CodeFileBaseClass="IlgharCMS.Lib.AdminPageBase" %>
<ilghar:List ID="Discount" Object="Discount" />
<script language="c#" runat="server">
protected object _amount;
protected bool Exists(object roleInnerID)
{
	DataRow[] rows = Discount.Select(Alias.Discount.RoleInnerID + "=" + roleInnerID);
	if (rows.Length > 0)
	{
		_amount = rows[0][Alias.Discount.Amount];
		return true;
	}
	else
	{
		_amount = null;
		return false;
	}
}
</script>
<table id="MemberPriceTable" border="0" cellpadding="4" cellspacing="1">
	<thead>
		<tr>
			<th>会员群组</th>
			<th>价格</th>
			<th>留空默认</th>
		</tr>
	</thead>
	<tbody>
		<ilghar:List Mark="System" Object="Role">
			<ilghar:Record>
				<tr>
					<td class="<%=ContentLang%>Font"><%=Name%></td>
					<td>
						<%If Exists(InnerID)%>
							<input type="text" name="MG<%=InnerID%>" size="10" maxlength="10" amount="<%=_amount%>" class="Text" />
						<%Else%>
							<input type="text" name="MG<%=InnerID%>" size="10" maxlength="10" amount="100" class="Text" />
						<%EndIf%>
					</td>
					<td><span id="MP<%=InnerID%>"></span></td>
				</tr>
			</ilghar:Record>
		</ilghar:List>
	</tbody>
</table>