<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Express.aspx.cs" Inherits="XpShop.Manage.Express" %>

<!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>
		<!--#include file="inc/head.inc"-->
		<title>物流公司管理</title>
	    <script type="text/javascript" src="inc/commond.js"></script>
	    <script src="inc/jquery.validate.js" type="text/javascript"></script>
	    <script src="inc/messages_cn.js" type="text/javascript"></script>
        <script src="inc/Express.js" type="text/javascript"></script>
	</head>
	<body>
	    <div class="container">
		<div class="sub_container">
		<div class="sub_container_title"><a href="<%=AdminDefault%>" target="_top">桌面</a><img src="images/admin_title.jpg" height=9px width=8px align="absmiddle" />
		<% if(this.Request.QueryString["Action"] == "Manage"){%>物流公司列表<%} if (this.Request.QueryString["Action"] == "Add")
     {%>物流公司添加<%} if (this.Request.QueryString["Action"] == "Modify"){%>物流公司修改<%}%></div>
		<div class="sub_container_content">
		<form id="Form1" method="post" runat="server">
		    <div class="frame">
		        <div class="frame_title"><asp:label id="lblAction" runat="server" CssClass="tableHeaderText"></asp:label></div>
		        <div class="frame_content">
		            <% if(this.Request.QueryString["Action"] == "Manage"){%>
			        <table class="tableBorder" cellSpacing="0" cellPadding="0" width="98%" align="center" border="0">
				        <tr>
					        <td class="forumRowHighlight" height="23"><asp:datagrid id="dgExpress" runat="server" HeaderStyle-CssClass="summary-title" HorizontalAlign="Center"
							        Width="100%" DataKeyField="ExpressID" AutoGenerateColumns="False" PagerStyle-Mode="NumericPages" AllowPaging="False" >
							        <HeaderStyle Font-Bold="True"></HeaderStyle>
							        <Columns>
								        <asp:TemplateColumn HeaderText="序号">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center" Width="50px"></ItemStyle>
									        <ItemTemplate>
										        <%#Container.ItemIndex+1%>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="快递公司名称">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "ExpressName") %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="电话">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "Tel").ToString() %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="排序">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "Sort").ToString() %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="查询网址">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center"></ItemStyle>
									        <ItemTemplate>
										        <%# DataBinder.Eval(Container.DataItem, "QueryUrl") %>
									        </ItemTemplate>
								        </asp:TemplateColumn>
								        <asp:TemplateColumn HeaderText="操作">
									        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
									        <ItemStyle HorizontalAlign="Center"></ItemStyle>
									        <ItemTemplate>
                                                 <%# CreateLink(Convert.ToBoolean(DataBinder.Eval(Container.DataItem, "IsUseful")), Convert.ToInt32(DataBinder.Eval(Container.DataItem, "ExpressID")))%>
                                                 <a  href="Express.aspx?action=Modify&eid=<%# DataBinder.Eval(Container.DataItem, "ExpressID")%>">修改</a>
                                                 <a class="doDel"  href="Express.aspx?action=Delete&eid=<%# DataBinder.Eval(Container.DataItem, "ExpressID")%>">删除</a>											        
									        </ItemTemplate>
									       
								        </asp:TemplateColumn>
							        </Columns>
							        <PagerStyle Mode="NumericPages"></PagerStyle>
						        </asp:datagrid></td>
				        </tr>
			        </table>
			        <%}if(this.Request.QueryString["Action"] == "Add" | this.Request.QueryString["Action"] == "Modify"){%>			      
					    <table cellSpacing="0" cellPadding="0" class="ptable" style="width:100%">
						    <tr>
							    <th class="tl"><em>*</em>物流公司名称：：</th>
							    <td class="tr">
								    <asp:TextBox ID=txtName runat=server></asp:TextBox><span class="input-remark">25个汉字（50个字符）内</span>
							    </td>
						    </tr>
						    <tr>
							    <th class="tl"><em>*</em>物流公司电话：：</th>
							    <td class="tr">
                                    <asp:TextBox ID=txtTel runat=server></asp:TextBox><span class="input-remark">25个汉字（50个字符）内</span>
							    </td>
						    </tr>
						    <tr>
							    <th class="tl"><em>*</em>快件查询网址：</th>
							    <td class="tr">
                                    <asp:TextBox ID=txtQueryUrl runat=server Columns=50 Rows=4 TextMode=MultiLine></asp:TextBox><span class="input-remark">200个汉字（400个字符）内</span>
                                </td>
						    </tr>
						    <tr>
							    <th class="tl"><em>*</em>排序：</th>
							    <td class="tr">
								    <asp:TextBox ID=txtSort runat=server></asp:TextBox><span class="input-remark">数字越小排在越前</span>
                                </td>
						    </tr>
						    <tr>
						        <th class="tl"></th>
							    <td class="tr">
                                    <asp:Button id="btnSubmit" onClick="btnSubmint_Click" runat="server" Text="增加"></asp:Button>
        					    </td>
						    </tr>
                                <asp:HiddenField ID=hideUseful runat=server Value="False" />
					    </table>
			        <%}%>
		        </div>
	        </div>
		</form>
		</div>
		</div>
		</div>
    </body>
</html>