<%@ Page Language="C#" MasterPageFile="~/webUser/MasterPage.master" AutoEventWireup="true" EnableViewState="false" CodeBehind="orderCreate.aspx.cs" Inherits="ZYDN.Web.webUser.order" Title="创建订单" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Content1" runat="server">
       <div class="maxTitle">
              创建订单
              <script type="text/javascript" language="javascript">
                    function saveCart()
                       {
                            var objAjax=new JAjax();
                            var num = $("ctl00_Content1_Num").value;
                            var pID = $("ctl00_Content1_pID").value;
                            var price = $("ctl00_Content1_Price").value;
                            var pName = $("ctl00_Content1_Titles").innerText;
                            var tex = $("ctl00_Content1_tabData").value;
                            var typeIDs = $("ctl00_Content1_typeIDs").value;
                            var typeNames = $("ctl00_Content1_typeNames").value;
                            var menuNames = $("ctl00_Content1_menuNames").value;
                            var menuIDs = $("ctl00_Content1_menuIDs").value;
                            var sellerNames = $("ctl00_Content1_sellerNames").value;
                            var sellerIDs = $("ctl00_Content1_sellerIDs").value;
                            var Mark = $("ctl00_Content1_Mark").value;
                            var GoodsInfo = $("ctl00_Content1_GoodsInfo").value;
                            var TimeStart = $("ctl00_Content1_TimeStart").value;
                            var TimeEnd = $("ctl00_Content1_TimeEnd").value;
                            var objResponse=new JHttpResponse();
                            objResponse.write("num",num);
                            objResponse.write("pID",pID);
                            objResponse.write("price",price);
                            objResponse.write("pName",pName);
                            objResponse.write("tabName",tex);
                            objResponse.write("typeID",typeIDs);
                            objResponse.write("typeName",typeNames);
                            objResponse.write("menuName",menuNames);
                            objResponse.write("menuID",menuIDs);
                            objResponse.write("sellerName",sellerNames);
                            objResponse.write("sellerID",sellerIDs);
                            objResponse.write("Mark",Mark);
                            objResponse.write("GoodsInfo",GoodsInfo);
                            objResponse.write("TimeStart",TimeStart);
                            objResponse.write("TimeEnd",TimeEnd);
                            var out=objAjax.getText("post","?type=saveCart",objResponse,null);
//                            alert("您的购物车现有"+out+"种商品");
                            window.location.href="myShoppingCart.aspx?menuindex=4";
                       }
                </script>
 </div>
<div style="position:relative;width:630px;left:10px;z-index:2;" id="winDiv">
<form method="post" id="form1" runat="server">	
    <input id="tabData" type="hidden" runat="server" />
    <input id="pID" type="hidden" runat="server" />
    <input id="typeIDs" type="hidden" runat="server" />
    <input id="typeNames" type="hidden" runat="server" />
    <input id="menuNames" type="hidden" runat="server" />
    <input id="menuIDs" type="hidden" runat="server" />
    <input id="sellerNames" type="hidden" runat="server" />
    <input id="sellerIDs" type="hidden" runat="server" />
			<table  style="border: 1px solid #b5d1e4; margin:10px;" border="0" width="610" cellspacing="0" cellpadding="0">
					<tr>
						<td class="infoLineLeft1" style="width:100px; height: 41px;" >商品名称</td>
					  <td style="width:251px" class="infoLineLeft1">
	  					  <asp:Label ID="Titles" runat="server"></asp:Label>
						  </td>
						<td colspan="2" rowspan="6" align="center" class="infoLineR1" >
						<table border="0" width="100%" id="table2">
							<tr>
								<td colspan="2"></td>
							    
							</tr>
							<tr>
								<td  colspan="2" style="height:182px; text-align:center;">
								<div  style="width:200px;height:200px;overflow:hidden;text-align:center">
									<div style="width:180px;height:200px;overflow:hidden;border: 1px solid #898c95;text-align:center">
                                        <asp:Image ID="Picture" runat="server" Width="180" Height="200" ImageAlign="Middle" />
									</div>
								</div>
								</td>
							</tr>
							<tr>
								<td colspan="2" style="text-align:center">
                                    <asp:Label ID="Label2" runat="server" Text="商品图片"></asp:Label>
							  </td>
							</tr>
							
						</table></td>
					</tr>
					
					<tr id="trTimeStart">
						<td class="infoLineLeft2" style="width:100px; height: 41px;">
                            <asp:Label ID="startTimeLabel" runat="server" Text=""></asp:Label></td>
					  <td style="width:251px" class="infoLineLeft2">
                          <asp:TextBox ID="TimeStart" runat="server"></asp:TextBox><input type="button" value="选择" onclick="selectDate(this)"/>   
						  <span class="STYLE1">*</span></td>
					</tr>
					<tr id="trTimeEnd">
						<td  style="width:100px; height: 41px;" class="infoLineLeft1">
                            <asp:Label ID="endTimeLabel" runat="server" Text=""></asp:Label></td>
						<td style="width:251px" class="infoLineLeft1">
                            <asp:TextBox ID="TimeEnd" runat="server"></asp:TextBox><input type="button" value="选择" onclick="selectDate(this)"/> 
                        </td>
					</tr>
					<tr id="trNum">
						<td  style="width:100px; height: 45px;" class="infoLineLeft2">数量</td>
					  <td style="width:251px; height: 45px;" class="infoLineLeft2">
                          <asp:TextBox ID="Num" runat="server" Text="1"></asp:TextBox>
                          <span class="STYLE1">*</span>
                          <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="RequiredFieldValidator" ControlToValidate="Num" Display="Dynamic">数量不能为空</asp:RequiredFieldValidator>
                          <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="RegularExpressionValidator" ControlToValidate="Num" ValidationExpression="^[1-9]\d*$">必须是数字</asp:RegularExpressionValidator>
						  </td>
					</tr>
					<tr>
						<td  style="width:100px; height: 41px;" class="infoLineLeft1">价格</td>
					  <td style="width:251px" class="infoLineLeft1">
                           <asp:TextBox ID="Price" runat="server" Enabled="false"></asp:TextBox>
                          <asp:Label ID="TypePrice" runat="server" Text=""></asp:Label>
						  </td>
					</tr>
					<tr>
						<td  style="width:100px; height: 41px;" class="infoLineLeft2">总价</td>
						<td style="width:251px" class="infoLineLeft2">
                            <asp:TextBox ID="Tatle" runat="server" Enabled="false"></asp:TextBox>
                            <asp:Label ID="TypePrice1" runat="server" Text="" ></asp:Label>
						  </td>
					</tr>
					<tr>
						<td  style="width:100px; height: 41px;" class="infoLineLeft1">备注</td>
					  <td style="width:251px; height: 63px;" class="infoLineLeft1" colspan="4">
                          <asp:TextBox ID="Mark" TextMode="MultiLine" runat="server" Height="50px" Width="527px"></asp:TextBox>
						  </td>
					</tr>
					<tr>
						<td  style="width:100px; height: 19px;" class="infoLineR2">商品介绍</td>
						<td  width="610" colspan="3" style="height: 19px" class="infoLineR2">&nbsp;</td>
					</tr>
					<tr>
						<td colspan="4"  width="630">
                            <asp:TextBox ID="GoodsInfo" TextMode="MultiLine" Enabled="false" runat="server" Height="100px" Width="610px"></asp:TextBox>
						</td>
					</tr>
					<tr>
						<td colspan="4"  width="630" style="text-align:center; height: 24px;">
						    <input id="SaveCart" type="button" value="放入购物车" onclick="saveCart()" />
                            <asp:Button ID="Button1" runat="server" Text="马上付款" OnClick="Button1_Click" />
                            <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="货到付款" />
                            <input id="Reset1" type="reset" value="重置" /></td>
					</tr>
					</table>
					
			
				<div id="Div2"  style="overflow:visible">
				<!--扩展部分开始-->
				   <div  style="padding:4px;overflow:auto;" id="userEx">
						
						
				   </div>
				   <!--扩展部分完-->
				    
				</div>	 
  
	</form>
	
<% js(); %>
<% getTatle(); %>
<script language="javascript" type="text/javascript">
    function selectDate(thisObj){
        var d=openSelectDate(sysPath);
        var obj=thisObj.previousSibling;
        if(d!="" & d!=null)
        obj.value=d;
        
        
    }
</script>

</div>
</asp:Content>
