<%@ Page Language="C#" MasterPageFile="~/webUser/MasterPage.master" AutoEventWireup="true"
    Codebehind="orderDeliver.aspx.cs" Inherits="ZYDN.Web.webUser.orderDeliver" Title="设置送送方式" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Content1" runat="server">
    <form runat="server" id="newForm">
        <%-- <asp:Repeater ID="deliverList" runat="server">
        <ItemTemplate>
            <div>
                <input type="radio" name="dType" id="dType<%# DataBinder.Eval(Container, "DataItem.id")%>" />
                <label for="dType<%# DataBinder.Eval(Container, "DataItem.id")%>">
                    收件人: <%# DataBinder.Eval(Container, "DataItem.userName")%>
                   &nbsp; &nbsp;&nbsp; 地点:<%# DataBinder.Eval(Container, "DataItem.address")%>
                   &nbsp; &nbsp;&nbsp; 电话:<%# DataBinder.Eval(Container, "DataItem.TEL")%>
                </label>
            </div>
        </ItemTemplate>
    </asp:Repeater>--%>
        &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp;
        <asp:RadioButtonList ID="deliverList" runat="server" OnSelectedIndexChanged="deliverList_SelectedIndexChanged">
        </asp:RadioButtonList>
        <asp:Label ID="saveMsg" runat="server" ForeColor="Red"></asp:Label>
        <div>
            <div id="msgText">
                创建新的送货方式
            </div>
            <div id="newAdd">
                
                <div>
                    联 系 人
                    <asp:TextBox ID="uName" runat="server"></asp:TextBox>
                </div>
                <div>
                    联系地址
                    <asp:TextBox ID="uAdd" runat="server"></asp:TextBox>
                </div>
                <div>
                </div>
                联系电话
                <asp:TextBox ID="uTel" runat="server"></asp:TextBox>
                <div style="padding-left: 120px; padding-top: 10px;">
                    <asp:Button ID="saveDeliver" runat="server" Text="保存新送货方式" OnClick="saveDeliver_Click" />
                    <asp:Button ID="Button2" runat="server" Text="确定送货到这里"  OnClick="Button1_Click1" />
                </div>
            </div>
            <div id="modiAdd" style="display: none;">
                <div>
                    联 系 人
                    <asp:TextBox ID="mUser" runat="server"></asp:TextBox>
                </div>
                <div>
                    联系地址
                    <asp:TextBox ID="mAdd" runat="server"></asp:TextBox>
                </div>
                <div>
                </div>
                联系电话
                <asp:TextBox ID="mTel" runat="server"></asp:TextBox>
                <asp:TextBox ID="mID" runat="server" Text="" CssClass="deliverID"></asp:TextBox>
                <div style="padding-left: 120px; padding-top: 10px;">
                    <asp:Button ID="modiButton" runat="server" Text="修改这个送货方式" OnClick="modiButton_Click" />
                    <asp:Button ID="delButton" runat="server" Text="删除此送货方式" OnClick="delButton_Click" />
                    <asp:Button ID="Button1" runat="server" Text="确定送货到这里"  OnClick="Button1_Click1" />
                </div>
            </div>
        </div>
    </form>

    <script language="javascript" type="text/javascript">
    function loginFormSetRadio(){
        <%wjs();%>
        var objs=document.getElementsByTagName("input");
        for (var i=0;i<objs.length;i++)
        {
            if (objs[i].type=="radio"){
                objs[i].onclick=function(){
                    var deID=this.value;
                    //alert(deID);
                    $("modiAdd").style.display="";
                    $("newAdd").style.display="none";
                    $("msgText").innerHTML="编联系方式";
                    
                    
                        var objAjax=new JAjax();
                        var objResponse=new JHttpResponse();
                        objResponse.write("id",deID);
                        var out=objAjax.getText("post","../webServer.aspx?type=readDeliver",objResponse,null);
                        if (out.indexOf(c1)==-1){
                            alert(erStr(out));
                            return;
                        }
                        out=out.split(c1);
                        //TEL,address,userName
                        $(mUser).value=out[2];
                        $(mAdd).value=out[1];
                        $(mTel).value=out[0];
                        $(mID).value=deID;
                        $(mID).style.display="none";
                    
                }
            }
        }
        
      }
      
      loginFormSetRadio();
    
    
    </script>

&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp;
    &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp;

</asp:Content>
