<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Order_Order_Edit_Delivery, V5Shop.Shop.Order" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>
<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="V5" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />
    <link href="js/calendar-system.css" rel="stylesheet" type="text/css" />
    <link href="css/css_list.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" language="javascript" src="js/Common.js"></script>

    <script type="text/javascript" language="javascript">
    //<!--
    function RadioBoxID_OnSelect(id, obj, col)
    {
        try
        {
            //剥离<TBODY>标签
            var DataGridView = childs(document.getElementById(id).childNodes)[0];
            
            document.getElementById('CheckedIDS').value = "";

            //从1开始，直接排除掉表头
            for(var i=1; i < childs(DataGridView.childNodes).length; i++)
            {
                //剥离<TR>标签
                var objTR = childs(DataGridView.childNodes)[i];
                
                //剥离<TD>标签
                var objCol = childs(objTR.childNodes)[col];
                
                //剥离<INPUT>标签
                var radiobox = childs(objCol.childNodes)[0];

                if(radiobox != obj) radiobox.checked = false;
            }
            document.getElementById('CheckedIDS').value = obj.value;
            document.getElementById('DeliveryID').value = obj.DeliveryID;
        }
        catch(e)
        {
        }
    }
    //[上一步]按钮按下时
    function btnPrevPage_Click()
    {
        return true;
    }
    //[下一步]按钮按下时
    function btnNextPage_Click()
    {
        if(document.getElementById('CheckedIDS').value == "")
        {
            alert(document.getElementById('AlertInfo').value);
            return false;
        }
        return true;
    }
    //[查询]按钮按下时
    function btnSearch_Click()
    {
        document.getElementById('CheckedIDS').value == "";
        document.getElementById('DeliveryID').value == "";
        return true;
    }
    //-->
    </script>

</head>
<body>
    <form id="form1" runat="server">
        <div>
            <div class="OperateTitle">
                <div>
                    <asp:Label ID="lblAdd" runat="server" Text="【订单编辑 (配送方式选择)】" /></div>
            </div>
            <div id="search">
                <!-- 查询部 -->
                <div style="padding-right: 20px; padding-left: 20px; padding-bottom: 20px; padding-top: 20px;
                    border-bottom: #f7f7f7 4px solid">
                    <table cellpadding="0" cellspacing="0" border="0">
                        <tr>
                            <td>
                                &nbsp;<asp:Label ID="Label1" runat="server" Text="城市/区域：" />
                            </td>
                            <td>
                                <V5:AreaBox ID="AreaID" runat="server" />
                            </td>
                            <td>
                                &nbsp;<asp:Button ID="btnSearch" runat="server" CssClass="button" Text="查询" OnClick="btnSearch_Click"
                                    OnClientClick="btnSearch_Click()" UseSubmitBehavior="False" />&nbsp;
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div id="content">
                <div class="listborder">
                    <V5:V5ShopGridView ID="GridViewShow" runat="server" AllowPaging="True" AllowSorting="True"
                        AutoGenerateColumns="False" CssClass="datalist" PageSize="5" HeaderStyle-ForeColor="#000000"
                        EmptyDataText="没有任何可用信息！" CacheName="Delivery" OnRowDataBound="GridViewShow_RowDataBound">
                        <PagerSettings Mode="NumericFirstLast" />
                        <Columns>
                            <asp:TemplateField meta:resourcekey="DetilData">
                                <itemtemplate>
                            <input runat="server" value='<%# Eval("DllName") %>' DeliveryID='<%# Eval("ID") %>' id="RadioBoxID" name="RadioBoxID" type="radio" class="checkbox"
                                onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" onclick="return RadioBoxID_OnSelect('GridViewShow', this, 0);" />
                            </itemtemplate>
                                <itemstyle horizontalalign="Center" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" />
                            <asp:BoundField DataField="Name" HeaderText="名称" SortExpression="Name" />
                            <asp:BoundField DataField="Description" HeaderText="描述" />
                            <asp:BoundField DataField="Freight" HeaderText="保价费" SortExpression="Freight" />
                        </Columns>
                        <HeaderStyle CssClass="category" ForeColor="Black" />
                    </V5:V5ShopGridView>
                </div>
                <div style="text-align: center;">
                    <asp:Button ID="btnPrevPage" runat="server" CssClass="button" Text="上一步" OnClick="btnPrevPage_Click"
                        UseSubmitBehavior="False" />
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="btnNextPage" runat="server" CssClass="button" Text="下一步" OnClick="btnNextPage_Click"
                        UseSubmitBehavior="False" /></div>
            </div>
            <uc2:PageBottom ID="PageBottom" runat="server" />
            <div id="hiddenfield">
                <asp:HiddenField ID="CheckedIDS" runat="server" Value="" />
                <asp:HiddenField ID="DeliveryID" runat="server" Value="" />
                <asp:HiddenField ID="AlertInfo" runat="server" Value="请先选择一个配送方式！" />
                <uc1:HiddenField ID="Alert" runat="server" />
            </div>
        </div>
    </form>
</body>
</html>
