<%@ Page Language="C#" AutoEventWireup="false" CodeBehind="SendA.aspx.cs" Inherits="web.admin.SendA" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>ShippingArea</title><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<LINK href="images/adminstyle.css" type="text/css" rel="stylesheet">
				<script language="JavaScript">
<!--
//By Dicky 2005-2-17 11:16:49
function Window_Load(Flag)
{

if (Flag == 0)
{

  parent.document.all['Loading'].style.display = 'block';
  parent.document.all['Loading'].style.width = '500';
   parent.document.all['Loading'].style.height = '60';
  //show the window
}
else
{
  parent.document.all['Loading'].style.display = 'none';
  
  //hide the window
}
}
//-->
</script>
	</HEAD>
	<body rightmargin="0" leftmargin="0" topmargin="0" onload="Window_Load(1);">
	
		<form id="Form1" method="post" runat="server" onsubmit="Window_Load(0);">
		
  <table width="100%" height="550" cellspacing="0" cellpadding="0">
    <tr>
    <td valign="top">
<div class="top">
          <table width="100%" align="center" cellpadding="0" cellspacing="0" background="img/labelbg.gif" bgcolor="#EDF6FF">
            <tr>
		      <td width="9%" height="30" class="tl"></td>
		<td width="85%" class="tm"><span class="tt">平台基础设置管理 &gt;&gt; <asp:label id="lblAction" runat="server"></asp:label>&nbsp;
            <span style="color: #ff0033">注意：删除一级区域，属于它的下级区域一并删除！</span></span></td>
		      <td width="1%" class="tm2"><span class="tt"></span></td>
		<td width="5%" class="tr"></td>
	</tr>
</table>
</div>
        <div class="mframe"> 
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
      <td class="ml"></td>
    <td  class="mm" align="left" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
                    <td bgcolor="#FFFFFF" valign="top" ><br>
                      <table width="90%" align="center" cellpadding="0"  cellspacing="0">
                        <tr>
		<td class="ml1"></td>
		                  <td class="mm1"> 
                            <% if(this.Request.QueryString["Action"] == "Manage"){%>
                            <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
                              <tr> 
                                <td> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="批量生成HTML" /> 
                                  <asp:Button ID="Button2" runat="server" OnClick="Button2_Click" Text="批量删除" /></td>
                              </tr>
                              <tr>
                                <td>请选择地区查看：<%=lb %></td>
                              </tr>
                            </table> 
                            <br>
                            <table width="100%" height="24" border="0" align="center" cellPadding="0"  cellSpacing="0">
                              <tr>
					<td width="100%" height="23" class="forumRowHighlight"><asp:datagrid id="dgShippingArea" runat="server" HeaderStyle-CssClass="summary-title" HorizontalAlign="Center"
							Width="100%" DataKeyField="ShippingAreaID" AutoGenerateColumns="False" PagerStyle-Mode="NumericPages" BorderColor="#E0E0E0" BorderWidth="1px">
							<HeaderStyle Font-Bold="False" BackColor="#EDF6FF" CssClass="head" Height="35px"></HeaderStyle>
							<Columns>
								<asp:TemplateColumn HeaderText="序号">
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem, "ShippingAreaID") %>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:TemplateColumn HeaderText="地区名称">
									<HeaderStyle HorizontalAlign="Center" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></HeaderStyle>
									<ItemStyle HorizontalAlign="Left" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ItemStyle>
									<ItemTemplate>
									
											<img src="../img/empty.gif" width='<%#10*(int)DataBinder.Eval(Container.DataItem,"Depth")%>' height="1" align="absmiddle">├<%# DataBinder.Eval(Container.DataItem, "Name") %>
									</ItemTemplate>
								</asp:TemplateColumn>
								
									<asp:TemplateColumn HeaderText="查看HTML">
									<HeaderStyle HorizontalAlign="Center" Width="100px"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="100px"></ItemStyle>
									<ItemTemplate>
										
										<%# getco(Convert.ToInt32(DataBinder.Eval(Container.DataItem, "ShippingAreaID").ToString())) == 0 ? "<a href='../shopList/shopList_" + DataBinder.Eval(Container.DataItem, "ShippingAreaID") + "_1.html' target='_blank'>" : "<a href='../areainfo/areaInfo_" + DataBinder.Eval(Container.DataItem, "ShippingAreaID") + ".html'  target='_blank'>"%>查看</a>
											</a>
									</ItemTemplate>
								</asp:TemplateColumn>
								
						
								<asp:TemplateColumn HeaderText="地区编码">
									<HeaderStyle HorizontalAlign="Center" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"></ItemStyle>
									<ItemTemplate>
										<%# DataBinder.Eval(Container.DataItem, "Code") %>
									</ItemTemplate>
								</asp:TemplateColumn>
							
								<asp:TemplateColumn>
									<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
									<ItemTemplate>
										<a href='SendA.aspx?Action=Modify&ShippingAreaID=<%# DataBinder.Eval(Container.DataItem, "ShippingAreaID") %>&zhi=<%=Request.QueryString["zhi"].ToString() %>'>
											修改</a>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:ButtonColumn Text="&lt;div id=&quot;de&quot; onclick=&quot;javascript:return confirm('确认删除吗？该区域下的子类、FLASH宣传画报、店铺,也将一同删除!!!')&quot;&gt;删除&lt;/div&gt;"
									CommandName="Delete">
									<ItemStyle HorizontalAlign="Center" Width="30px"></ItemStyle>
								</asp:ButtonColumn>
								
			
								
									<asp:TemplateColumn HeaderText="生成HTML">
									<HeaderStyle HorizontalAlign="Center" Width="100px"></HeaderStyle>
									<ItemStyle HorizontalAlign="Center" Width="100px"></ItemStyle>
									<ItemTemplate>
										<a href='SendA.aspx?Action=sc&ShippingAreaID=<%# DataBinder.Eval(Container.DataItem, "ShippingAreaID") %>&zhi=<%=Request.QueryString["zhi"].ToString() %>'>
											生成HTML</a>
									</ItemTemplate>
								</asp:TemplateColumn>
                                <asp:TemplateColumn HeaderText="全/反选">
                                    <HeaderTemplate>
                                        <asp:CheckBox ID="ckall" runat="server" OnCheckedChanged="ckall_CheckedChanged" AutoPostBack="True" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="Ckx" runat="server" />
                                    </ItemTemplate>
                                    <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                        Font-Underline="False" HorizontalAlign="Center" />
                                    <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                        Font-Underline="False" HorizontalAlign="Center" />
                                </asp:TemplateColumn>
							</Columns>
							<PagerStyle Mode="NumericPages"></PagerStyle>
                        <ItemStyle Height="25px" />
						</asp:datagrid></td>
				</tr>
			</table>
			<%}if(this.Request.QueryString["Action"] == "Add" | this.Request.QueryString["Action"] == "Modify"){%>
			<table cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
				<tr>
					<td height="23">
						<table  cellSpacing="0" cellPadding="6" width="95%" align="center" border="0">
                                    <tr> 
                                      <td width="16%" align="left"> 1、所在城市行政地区名称： 
                                      </td>
                                      <td width="86%" > 
                                        <asp:textbox id="txtName" CssClass="input" runat="server"></asp:textbox></td>
                                    </tr>
                                    <tr> 
                                      <td width="16%" align="left" bgcolor="#F4F4F4"> 
                                        2、地区第一个汉字字母： </td>
                                      <td bgcolor="#F4F4F4"> <asp:textbox id="txtCode" CssClass="input" runat="server"></asp:textbox>
                                        说明:比如"远东区",第一个汉字 字母为 <strong><span style="color: #ff0033">Y</span></strong></td>
                                    </tr>
                                    <tr> 
                                      <td width="16%" align="left"> 3、上级地区： </td>
                                      <td><FONT face="宋体"> 
                                        <asp:dropdownlist id="ddlArea" runat="server" ></asp:dropdownlist>
                                        <asp:label id="lblNotify" runat="server"></asp:label>
                                        </FONT></td>
                                    </tr>
                        
                                    <tr> 
                                      <td width="16%" align="left"> 4、描述： </td>
                                      <td bgcolor="F4F4F4"> <asp:textbox id="txtDescription" CssClass="input" runat="server" Width="350px" Height="60px" TextMode="MultiLine"></asp:textbox></td>
                                    </tr>
                    
                                    <tr> 
                                      <td align="center" colspan="2"><br> <asp:Button id="btnSave" runat="server" CssClass="btn" Text="保存"></asp:Button> 
                                        &nbsp;&nbsp; <asp:Button id="btnCancel" runat="server" CssClass="btn" Text="取消" CausesValidation="False"></asp:Button></td>
                                    </tr>
                                  </table>
					</td>
				</tr>
			</table>
			<%}%>
		</td>
		<td class="mr1"></td>
	</tr>
</table>
                    </td>
  </tr>
</table>


<table width="100%" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="bl"></td>
		<td class="bm">&nbsp;</td>
		<td class="br"></td>
	</tr>
</table>
</td>
    <td  class="mr"></td>
  </tr>
</table>
<table width="100%" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="bl"></td>
		<td class="bm">&nbsp;</td>
		<td class="br"></td>
	</tr>
</table>

</div>
    </td>
  </tr>
</table>
		</form>
	</body>
</HTML>
