<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/ViewMasterPageSub.Master"
	Inherits="System.Web.Mvc.ViewPage<MvcEnterprise.Models.DataSet1+OrderRow>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
	<link href="../../Content/Skin/Validation.css" rel="stylesheet" type="text/css" />
	<script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script>
	<script src="../../Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>
	<script src="../../Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script>
	<script src="../../Scripts/Admin.js" type="text/javascript"></script>
	<%Html.EnableClientValidation(); %>
	<script type="text/javascript">
			$(document).ready(function () {
				$("#frmProductOrder").submit(function () {
					if ($.trim($("#frmProductOrder #txtValidateCode").val()).length < 5 ) {
						alert("<%= Language.Context.Global.JsAlertValidationErr %>");
						$("#frmProductOrder #txtValidateCode").focus();
						return false;
					}
				});
			});
	</script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="LeftContent" runat="server">
	<div class="Item">
		<div class="LeftNavTitle"><%= Language.Context.Product.LabelBrowsingHistory %></div>
		<div style="display: inline-block; width: 150px;">
			<%Html.RenderAction("partial_List_Product", new { IDS = MembersService.BrowsingHistory.ProductIDs });%></div>
	</div>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="RightContent" runat="server">
	<div class="Item">
		<div class="Location">
			<%= Html.ActionLink(Language.Context.Global.HomePage, "Index")%>
			<%= Html.ActionLink(Language.Context.Product.ProductList, "ProductList", new { id = "" })%>
			<%= Language.Context.Product.OrderProduct%>
		</div>
		<div class="WebContent">
			<% using (Html.BeginForm("ProductOrder", "Home", null, FormMethod.Post, new { id = "frmProductOrder" })) { %>
			<div>
				<%--产品名称--%>
				<span class="editor-label"><%= Language.Context.Product.LabelProductName %></span>
				<span class="editor-field"><%= Model.ProductName %></span>
			</div>
			<div>
				<%--订购数量--%>
				<span class="editor-label"><%= Language.Context.Product.LabelAmount %></span>
				<span class="editor-field"><%= Html.TextBoxFor(model => model.Amount, new { style="width:30px;"})%> <%= Html.DisplayToolTipFor(model => model.Amount)%> <%= Html.ValidationMessageFor(model => model.Amount)%></span>
			</div>
			<%if (Model.OrderMoney>0){ %>
			<script type="text/javascript">
				var price=<%= Model.OrderMoney %>;
				$("#Amount").change(function(){
					if (!isNaN(this.value)) {
						$("#OrderMoney").val(this.value*price);
					}
				});
			</script>
			<div>
				<%--订单金额--%>
				<span class="editor-label"><%= Language.Context.Product.LabelOrderMoney %></span>
				<span class="editor-field"><%= Html.TextBoxFor(model => model.OrderMoney, new { style = "width:120px;" })%> <%= Html.DisplayToolTipFor(model => model.OrderMoney)%> <%= Html.ValidationMessageFor(model => model.OrderMoney)%></span>
			</div>
			<%} %>
			<div>
				<%--联系人名--%>
				<span class="editor-label"><%= Language.Context.Product.LabelLinkMan %></span>
				<span class="editor-field"><%= Html.TextBoxFor(model => model.Linkman, new { style = "width:120px;" })%> <%= Html.DisplayToolTipFor(model => model.Linkman)%> <%= Html.ValidationMessageFor(model => model.Linkman)%></span>
			</div>
			<div>
				<%--手机号码--%>
				<span class="editor-label"><%= Language.Context.Product.LabelMobile %></span>
				<span class="editor-field"><%= Html.TextBoxFor(model => model.Mobile, new { style = "width:120px;" })%> <%= Html.DisplayToolTipFor(model => model.Mobile)%> <%= Html.ValidationMessageFor(model => model.Mobile)%></span>
			</div>
			<div>
				<%--联系电话--%>
				<span class="editor-label"><%= Language.Context.Product.LabelTelephone %></span>
				<span class="editor-field"><%= Html.TextBoxFor(model => model.Telephone, new { style = "width:120px;" })%> <%= Html.DisplayToolTipFor(model => model.Telephone)%> <%= Html.ValidationMessageFor(model => model.Telephone)%></span>
			</div>
			<div>
				<%--详细地址--%>
				<span class="editor-label"><%= Language.Context.Product.LabelAddress %></span>
				<span class="editor-field"><%= Html.TextBoxFor(model => model.Address, new { style = "width:300px;" })%> <%= Html.DisplayToolTipFor(model => model.Address)%> <%= Html.ValidationMessageFor(model => model.Address)%></span>
			</div>
			<div>
				<%--其他信息--%>
				<span class="editor-label"><%= Language.Context.Product.LabelRemark %></span>
				<span class="editor-field"><%= Html.TextAreaFor(model => model.Remark, new { style = "width:300px;height:80px;" })%> <%= Html.DisplayToolTipFor(model => model.Remark)%> <%= Html.ValidationMessageFor(model => model.Remark)%></span>
			</div>
			<div>
				<%--会员编号--%>
				<%= Html.HiddenFor(model => model.MemID, new { value = 0 })%>
				<%--ID--%>
				<%= Html.HiddenFor(model => model.ID)%>
				<%= Html.HiddenFor(model => model.ProductNo)%>
				<%= Html.HiddenFor(model => model.ProductID) %>
				<%= Html.HiddenFor(model => model.ProductName) %>
				<%= Html.AntiForgeryToken()%>
				<%Html.RenderPartial("ValidateCode"); %>
			</div>
			<div class="addHeight"></div>
			<div>
				<span class="editor-label">　</span>
				<span class="editor-field"><input type="submit" value="<%= Language.Context.Product.InputValueSubmit %>" class="btn w90" /> <input type="reset" class="btn w50" /></span>
			</div>
			<%} %>
		</div>
	</div>
</asp:Content>

