<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShippingPrice.aspx.cs" Inherits="XpShop.Supplier.ShippingPrice" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register TagPrefix="uc1" TagName="Header" Src="Modules/Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="SupplierMenu" Src="Modules/SupplierMenu.ascx" %>
<%@	Register TagPrefix="ftb" Namespace="FreeTextBoxControls" Assembly="FreeTextBox"	%>
<%@ Register TagPrefix="uc1" TagName="Helper" Src="Modules/Helper.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Footer" Src="Modules/Footer.ascx" %>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<!--#include file="inc/head.inc"-->
		<title>商家中心 <%=config.SiteTitle%></title>
        <script type="text/javascript" src="inc/OrderPayList.js"></script>
        <script type="text/javascript" src="inc/commond.js"></script>
		<script src="inc/ui.datepicker.cn.js" type="text/javascript"></script>
		<link type="text/css" rel="stylesheet" href="style/ui.datepicker.css" />
		
		<script type="text/javascript">
            $(document).ready(function() {
                //全选
                $('input[name=chkAll]').click(function(){
                    $('input[name=chkItem]').attr('checked',$(this).attr('checked'));
                      if ($(this).attr("checked"))
                      $('input[name=chkItem]').prev().val($('input[name=chkAll]').prev().val());
                      else{
                          $('input[name=chkItem]').prev().val($('input[name=chkItem]').val());
                          $(this).prev().val($(this).val());
                      }
                });
                
                $("input[name=chkItem]").click(function(i,n){
                     if($(this).attr('checked'))
                     $(this).prev().val($('input[name=chkAll]').prev().val());
                     else
                     $(this).prev().val($(this).val());
                })
                
                $('input[name=chkAll]').prev().keyup(function(){
                     $('input[name=chkItem]').each(function(i,n){
                        if($(this).attr('checked'))
                        $(this).prev().val($('input[name=chkAll]').prev().val());
                     })               
                });
                
            });        
        </script>
		
	</head>
	<body>

		<uc1:Header id="Header1" runat="server"></uc1:Header>
		 <!--位置导航开始-->
		 <div class="path"><a href="<%=webSite %>supplier/default.<%=config.html%>">商家桌面</a> > 商品管理 > 查询与编辑</div>
		<!--位置导航结束-->
		<div class="xp-w clear">
			<div class="content-left">
				<!--会员中心导航开始-->
				<uc1:SupplierMenu id="SupplierMenu1" runat="server"></uc1:SupplierMenu>
				<!--会员中心导航结束-->
			</div>
			<div class="content-middle">	
				<%--<h3>欢迎您,<%=CurrentSupplier.RealName%></h3>
				<hr class="itemhr" />--%>
	            <form id="Form1" method="post" runat="server">
	            <div class="rframe">
		            <div class="tm"><asp:label id="lblAction" runat="server" CssClass="tableHeaderText">配送价格设定</asp:label></div>
		            <div class="mm">
		                <table class="ptable" cellSpacing="0" cellPadding="0" width="100%" border="0">
			                <tr>
				                <td class="tr" style="text-align:center;" height="23"><asp:dropdownlist id="ddlArea" runat="server"></asp:dropdownlist>&nbsp;&nbsp;<asp:dropdownlist id="ddlShipping" runat="server"></asp:dropdownlist>&nbsp;&nbsp;<asp:button id="btnSet" OnClick="btnSet_Click" runat="server" Text="设定" CssClass="inputbtn"></asp:button></td>
			                </tr>
			                <tr>
				                <td class="tr" style="text-align:center;"><asp:label id="lblInfo" runat="server"></asp:label>
				                <asp:datagrid id="dgShippingPrice" runat="server" HorizontalAlign="Center" DataKeyField="ShippingAreaID"
						                AutoGenerateColumns="False" AllowPaging="False" HeaderStyle-CssClass="summary-title">
						                <HeaderStyle Font-Bold="True"></HeaderStyle>
						                <Columns>
							                <asp:TemplateColumn HeaderText="&lt;img src='images/admin_help.gif'&gt;">
								                <HeaderStyle HorizontalAlign="Right"></HeaderStyle>
								                <ItemStyle HorizontalAlign="Right" Width="200px"></ItemStyle>
								                <ItemTemplate>
								                    <input type=hidden name=ShippingAreaID value="<%# DataBinder.Eval(Container.DataItem, "ShippingAreaID")%>" />
								                    <input type=hidden name=ShippingPriceID value="<%# DataBinder.Eval(Container.DataItem, "ShippingPriceID") %>" />
								                    <input type=hidden name=ShippingID value="<%# DataBinder.Eval(Container.DataItem, "ShippingID") %>" />
								                    <input type=hidden name=ShippingExpression value="<%# DataBinder.Eval(Container.DataItem, "ShippingExpression") %>" />
									                <b>
										            <%# DataBinder.Eval(Container.DataItem, "Name") %>
									                </b>
								                </ItemTemplate>
							                </asp:TemplateColumn>
							                <asp:TemplateColumn HeaderText='ddd'>
								                <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
								                <ItemStyle HorizontalAlign="Center"></ItemStyle>
								                <ItemTemplate>
									                <asp:TextBox ID="txtExpression" Runat=server Text='<%# DataBinder.Eval(Container.DataItem, "ShippingExpression") %>'></asp:TextBox>
                                                    <input type=checkbox name="<%#Container.ItemIndex==0? "chkAll":"chkItem"%>" value="<%# DataBinder.Eval(Container.DataItem, "ShippingExpression")%>">
								                </ItemTemplate>
							                </asp:TemplateColumn>
						                </Columns>
					                </asp:datagrid><br />
					                <asp:Button id="btnSave" OnClick="btnSave_Click" runat="server" Text="修改" Visible="False" CssClass="inputbtn"></asp:Button></td>
			                </tr>
		                </table>
    			        
		                <table class="ptable" cellSpacing="0" cellPadding="0" width="100%" border="0">
			                <tr>
				                <td class="tr">注：(如“20+(c(w/0.5)-1)*6”代表首重为20元次重为6元，单位重量为0.5千克的配送费用)<FONT face="宋体"><BR>
										                字母“w”表示订单物品总重量<BR>
										                字母“p”代表订单总金额<BR>
										                字母“q”代表订单物品总数量<br>
										                字符“c()”代表“ceiling”，指偏大取整（如c(0.4/0.5)=1）</font><font color=red>*Access版本不支持此函数</font></td>
			                </tr>
		                </table>
		            </div>
		        </div>

	                    

	            </form>			    
	        </div>
		</div>

		<uc1:Helper id="Helper" runat="server"></uc1:Helper>
		<uc1:Footer id="Footer" runat="server"></uc1:Footer>
	</body>
</html>