<%@ Page Language="C#" MasterPageFile="~/Admin/MainPage.Master" AutoEventWireup="true" ValidateRequest="false" 
    Codebehind="AreaEdit.aspx.cs" Inherits="PPFOR.Admin.Sys.WebConfig.AreaEdit" Title="修改地区" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PPFOR_mainContent" runat="server">    
<script src="../../JS/popup.js" type="text/javascript"></script> 
<script language="javascript" type="text/javascript">
function openAreaListForSelect(bid,cid)
{
   popup_show("所属地区选择","<iframe id='htmlFrame' src='/Admin/CustomView/selectSingleArea.aspx?cid=" + cid + "&bid=" + bid + "&aid=" + document.getElementById(bid).value + "' scrolling='yes' width='100%' height='100%' frameborder='0'></iframe>",300,250);
}
function resetBelongArea()
{
    var objBelong=document.getElementById("belongAreaId");
    if(objBelong!=null){
        objBelong.value='<%=PPFOR_belongAreaId %>';  
    }
}
</script>
    <form action="AreaEdit.aspx" method="post" id="form1" runat="server">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="fortable">
    <thead>   
        <tr>
            <td colspan="2" align="center">修改地区</td>
        </tr>    
    </thead>                   
        <tr>
            <td style="width:15%" align="right">地区名称：</td>
            <td>
                <asp:TextBox ID="PPFOR_areaName" runat="server" Width="300px" MaxLength="255"></asp:TextBox> *                  
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" SetFocusOnError="true" ValidationExpression="^[^,:<>]{1,255}$" Display="Dynamic" ControlToValidate="PPFOR_areaName"><br />地区名称长度必须在1至255个字符之间，且不能包含以下字符之一：:，,，<，>"</asp:RegularExpressionValidator>
              <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" SetFocusOnError="true" Display="Dynamic" ControlToValidate="PPFOR_areaName"><br />地区名称不能为空</asp:RequiredFieldValidator>
              <asp:Label ID="PPFOR_areaId" runat="server" Enabled="false" Visible="false"></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="right">所属地区：</td>
            <td>
                <input readonly="readonly" id="belongAreaText" value="<%=PPFOR_belongAreaName %>" onclick="openAreaListForSelect('belongAreaId','belongAreaText');"/> 
                <input id="belongAreaId" name="belongAreaId" type="hidden" value="<%=PPFOR_belongAreaId %>" />
                <span onclick="openAreaListForSelect('belongAreaId','belongAreaText');">点击输入框可以更换所属地区</span>                
            </td>
        </tr>                     
        <tr>
            <td align="right">排序：</td>
            <td>
                <asp:TextBox ID="PPFOR_sort" runat="server" Text="0" MaxLength="4"></asp:TextBox>
                <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="PPFOR_sort" Display="Dynamic" SetFocusOnError="true" Type="Integer" MinimumValue="-999" MaximumValue="9999">排序顺序只能填写-999至9999之间的整数</asp:RangeValidator>
            </td>
        </tr>                       
        <tr>
            <td colspan="2" style="width:100%; height:50px; display:none" align="center" valign="middle">
                <asp:Button ID="PPFOR_updateArea" CssClass="inputbutton" runat="server" Text="提交" OnClick="PPPFOR_updateAreaClick"/>
                <input name="reset" id="reset1" onclick="resetBelongArea();" type="reset" class="inputbutton" onmouseover="this.className='inputbutton_hover'" onmouseout="this.className='inputbutton'" value="重置" />
                    <script type="text/javascript">
                        addButtonArray("<%= PPFOR_updateArea.ClientID %>","reset1");
                    </script> 
            </td>
        </tr>           
    </table>
</form>
</asp:Content>
