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

<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="cc1" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>
<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register TagPrefix="V5Shop" Namespace="V5Shop.Control" Assembly="V5Shop.Control" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>配送区域编辑</title>
    <link href="css/css.css" rel="stylesheet" type="text/css">
    <link href="css/css_list.css" rel="stylesheet" type="text/css">
    <link href="css/control.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" language="javascript" src="js/Common.js"></script>
    <script type="text/javascript">
    function chk(){
        for(i=0;i<form1.query.length;i++){
            var frm =form1.query[i];
            if(frm.value==""){alert("不能为空");frm.focus();return false;break;}
            if(frm.value.match(/[^0-9\.]/ig)){alert("请输入数字");frm.select();return false;break;}
        }
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <div class="OperateTitle">
                <div>
                    【 编辑配送区域信息 】 <a href="System_DeliveryArea_Manage.aspx?dllname=<%=DllName %>">
                        <asp:Label ID="lblList" runat="server" Text="配送区域列表" meta:resourcekey="lblListResource1"></asp:Label></a>
                </div>
            </div>
            <div>
                <table id="OperateTable" runat="server" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                            <asp:Label ID="lblTitle" runat="server" Text="配送方式：" meta:resourcekey="lblTitleResource1"></asp:Label>
                        </td>
                        <td bgcolor="#FFFFFF" align="left">
                            <asp:Label ID="lblDelivery" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                            <cc1:HelpCtrl ID="HelpCtrl1" runat="server" FontColor="red" Header="配送区域名称" HideSelects="False" ImageURL="images/help.gif" Text='配送区域的名称,例如"华中"。' />
                            <asp:Label ID="Label1" runat="server" Text="配送区域名称：" meta:resourcekey="lblTitleResource1"></asp:Label>
                        </td>
                        <td bgcolor="#FFFFFF" align="left">
                            <asp:TextBox ID="txtName" runat="server" meta:resourcekey="TitleResource2" MaxLength="50"></asp:TextBox>
                            <span class="NeedMsg">*</span>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="txtName" runat="server" ErrorMessage="不能为空" meta:resourcekey="RequiredFieldValidator1Resource1"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                            <asp:Label ID="Label2" runat="server" Text="配送区域描述：" meta:resourcekey="lblTitleResource1"></asp:Label>
                        </td>
                        <td bgcolor="#FFFFFF" align="left">
                            <asp:TextBox ID="txtDescription" runat="server" meta:resourcekey="TitleResource2" TextMode="MultiLine"></asp:TextBox>
                            <span class="NeedMsg">*</span>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtDescription" runat="server" ErrorMessage="不能为空" meta:resourcekey="RequiredFieldValidator1Resource1" Display="Dynamic"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtDescription" Display="Dynamic" ErrorMessage="长度必须在250字以内" ValidationExpression="^[\s\S]{0,250}$"></asp:RegularExpressionValidator></td>
                    </tr>
                    <tr>
                        <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                            <cc1:HelpCtrl ID="HelpCtrl2" runat="server" FontColor="red" Header="地区设置" HideSelects="False" ImageURL="images/help.gif" Text='为配送方式设置地区,例如"华中"这个配送区域可添加武汉,长沙等。' />
                            <asp:Label ID="Label3" runat="server" Text="地区设置："></asp:Label>
                        </td>
                        <td>
                            <table width="90%" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td style="height: 216px">
                                        国家（一级地区）<br />
                                        <asp:ListBox ID="Area_1" runat="server" Width="90px" Height="200px" OnSelectedIndexChanged="Area_1_SelectedIndexChanged" AutoPostBack="true" SelectionMode="Multiple"></asp:ListBox>
                                    </td>
                                    <td style="height: 216px">
                                        省份（二级地区）<br />
                                        <asp:ListBox ID="Area_2" runat="server" Width="90px" Height="200px" OnSelectedIndexChanged="Area_2_SelectedIndexChanged" AutoPostBack="true" SelectionMode="Multiple"></asp:ListBox></td>
                                    <td style="height: 216px">
                                        城市（三级地区）<br />
                                        <asp:ListBox ID="Area_3" runat="server" Width="90px" Height="200px" OnSelectedIndexChanged="Area_3_SelectedIndexChanged" AutoPostBack="true" SelectionMode="Multiple"></asp:ListBox></td>
                                    <td style="height: 216px">
                                        区/县（四级地区）<br />
                                        <asp:ListBox ID="Area_4" runat="server" Width="90px" Height="200px" OnSelectedIndexChanged="Area_4_SelectedIndexChanged" AutoPostBack="true" SelectionMode="Multiple"></asp:ListBox></td>
                                    <td style="height: 216px">
                                        <asp:Button ID="btnMoveRight" runat="server" Text="添加>>" CssClass="button" CausesValidation="false" OnClick="btnMoveRight_Click" /><br />
                                        <br />
                                        <br />
                                        <asp:Button ID="btnMoveLeft" runat="server" Text="<<移除" CssClass="button" CausesValidation="false" OnClick="btnMoveLeft_Click" />
                                    </td>
                                    <td style="height: 216px">
                                        <br />
                                        <asp:ListBox ID="AreaList" runat="server" Width="80px" Height="200px"></asp:ListBox></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                        </td>
                        <td bgcolor="#FFFFFF" align="left">
                            <asp:Button ID="btnAdd" CssClass="button" runat="server" Text="确定" OnClick="btnAdd_Click" meta:resourcekey="btnAddResource1" />
                            <asp:Button ID="btnEdit" CssClass="button" runat="server" Text="更新" OnClick="btnEdit_Click" Visible="False" meta:resourcekey="btnEditResource1" />
                            <input id="iptReset" runat="server" type="reset" class="button" value="重置" />
                            <input id="Button1" type="button" value="返回列表" onclick="window.location.href='System_DeliveryArea_Manage.aspx?dllname=<%=dll %>'" class="button" />
                        </td>
                    </tr>
                </table>
                <script type="text/javascript">
                //加TABLE样式
                InitTrClass();
                
                if(document.getElementById("btnAdd"))
                    document.getElementById("btnAdd").attachEvent("onclick",chk);
                if(document.getElementById("btnEdit"))
                    document.getElementById("btnEdit").attachEvent("onclick",chk);

                </script>
                <asp:HiddenField ID="LevelID" runat="server" Value="1" />
            </div>
            <uc2:PageBottom ID="PageBottom1" runat="server" />
        </div>
    </form>
</body>
</html>
