<%@ Page CodeFileBaseClass="IlgharCMS.Lib.MemberPageBase" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- TemplateInfo codeOutsideHTMLIsLocked="true" -->
<ilghar:Get ID="Product" Object="Product" InnerID="Request.QueryString['ID']" />
<ilghar:Get ID="Config" Object="InstanceConfig" Operation="GetBasicSettings()" />
<ilghar:Get ID="Member" Mark="Member" Object="Member" Guid="User['ID']" />
<ilghar:List ID="Discounts" Object="Discount" />
<base target="_self" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Expires" content="Mon,1 Fab 1979 23:36:05 GMT" />
<title>下单</title>
<link rel="stylesheet" type="text/css" href="<%=CommonPath%>jquery/themes/lightness/all.css" />
<ilghar:Comment><link rel="stylesheet" type="text/css" href="../../S01/CHS/css/common.css" /></ilghar:Comment>
<link rel="stylesheet" href="<%=CssPath%>common.css" />
<script language="c#" runat="server">
protected int Discount
{
	get
	{
		int result = 100;
		string roleInnerIDs = Member[IlgharCMS.MemberModule.Alias.Member.RoleInnerIDs].ToString();
		foreach (DataRow discount in Discounts.Rows)
		{
			if (roleInnerIDs.Contains("|" + discount[Alias.Discount.RoleInnerID] + "|"))
			{
				if ((int)discount[Alias.Discount.Amount] < result)
					result = (int)discount[Alias.Discount.Amount];
			}
		}
		
		return result;
	}
}
</script>
<script type="text/javascript">
var _page = "order";
var _webPath = "<%=WebPath%>";
var _taxRate = <%=Config[TaxRate]%>;
var _discount = <%=Discount%>;
var _amount = 1;
var _price = <%=Product[Price]%>;
var _priceAdjustment = 0;
var _sum = 0;

var _product = new Object();
_product.ProductID = "<%=Product[ID]%>";
_product.ProductNumber = "<%=Product[Number]%>";
_product.Name = "<%=Product[Name]%>";
_product.Kind = "<%=Product[Kind]%>";
_product.UnitID = "<%=Product[UnitID]%>";
_product.Kind = "<%=Product[Kind]%>";

var _isLocked = <%=Convert.ToString(User["IsLocked"]).ToLower()%>;
var _lang_locked = "你被锁定，不能操作！";
var _lang_working = "正在操作...";
var _lang_operation_success = "操作成功！";
var _lang_operation_fail = "操作失败！";
</script>
</head>
<body>
<div class="Block">
	<ul class="Title">
		<li class="Left"></li>
		<li class="Middle">下单</li>
		<li class="Right"></li>
	</ul>
	<form action="">
		<table border="0" cellpadding="4" cellspacing="1">
			<tfoot>
				<tr>
					<td colspan="2">
						<input type="submit" value="确定下单" />
					</td>
				</tr>
			</tfoot>
			<tbody>
				<tr>
					<th width="120">产品：</th>
					<td><%=Product[Name]%></td>
				</tr>
				<tr>
					<th>数量：</th>
					<td>1</td>
				</tr>
				<tr>
					<th>需要发票：</th>
					<td>
						<input type="radio" name="NeedInvoice" id="NeedInvoiceYes" /><label for="NeedInvoiceYes">是</label>
						<input type="radio" name="NeedInvoice" id="NeedInvoiceNo" checked="checked" /><label for="NeedInvoiceNo">否</label>
					</td>
				</tr>
				<tr>
					<th>备注：</th>
					<td><textarea id="Memo" cols="30" rows="3"></textarea></td>
				</tr>
				<tr>
					<th>价格：</th>
					<td id="Sum">0</td>
				</tr>
			</tbody>
		</table>
	</form>
	<div class="Footer"></div>
</div>
<script type="text/javascript" src="<%=CommonPath%>jquery/core.js"></script>
<script type="text/javascript" src="<%=CommonPath%>jquery/ui.js"></script>
<script type="text/javascript" src="<%=CommonPath%>utility.js"></script>
<script type="text/javascript" src="<%=JsPath%>common.js"></script>
<script type="text/javascript" src="<%=JsPath%>host.js"></script>
</body>
</html>