<%@ page language="C#" autoeventwireup="true" inherits="GroupByAdmin_Region_List, GroupTGWeb_deploy" %>

<%@ Register Assembly="ShopNum1.Control" Namespace="ShopNum1.Control" TagPrefix="cc1" %>
<%@ Register Src="UserControl/MessageShow.ascx" TagName="MessageShow" TagPrefix="uc1" %>
<!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 id="Head1" runat="server">
    <title>Untitled Page</title>

    <script type="text/javascript" language="javascript" src="../js/CommonJS.js"></script>

    <link type="text/css" rel="Stylesheet" href="css/index.css" />
</head>
<body style="padding: 0; background-image: url(images/Bg_right.gif); background-repeat: repeat;
    font-size: 12px">
    <form id="form1" runat="server">
    <div>
    </div>
    <div class="navigator">
        【城市管理】</div>
    <div class="query">
        <table cellpadding="0" cellspacing="0">
            <tr>
                <td width="20%" align="right">
                    <asp:Label ID="Label4" runat="server" Text="城市名称："></asp:Label>
                </td>
                <td width="30%">
                    <asp:TextBox ID="textBoxName" runat="server" CssClass="input1"></asp:TextBox>
                </td>
                <td width="20%">
                    <asp:Button ID="ButtonSearch" runat="server" OnClick="ButtonSearch_Click" Text="查询"
                        CssClass="bt2" />
                </td>
            </tr>
        </table>
    </div>
    <cc1:Num1GridView ID="Num1GridViewShow" runat="server" Width="100%" AddSequenceColumn="False"
        AllowMultiColumnSorting="False" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
        BorderColor="#CCDDEF" BorderStyle="Solid" BorderWidth="1px" CellPadding="4" DataSourceID="ObjectDataSourceData"
        Del="False" DeletePromptText="确实要删除指定的记录吗？" Edit="False" FixHeader="False" GridViewSortDirection="Ascending"
        PagingStyle="None" Style="margin-left: 2px;" TableName="">
        <Columns>
            <asp:TemplateField>
                <HeaderTemplate>
                    <input id="checkboxAll" onclick="javascript:SelectAllCheckboxes(this);" type="checkbox" />
                </HeaderTemplate>
                <ItemTemplate>
                    <input id="checkboxItem" type="checkbox" value='<%# Eval("Guid") %>' />
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" Width="30px" />
            </asp:TemplateField>
            <asp:BoundField DataField="Guid" HeaderText="城市编号" Visible="False" />
           <%-- <asp:BoundField DataField="Name" HeaderText="城市名称" SortExpression="Name">
                <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>--%>
            <asp:TemplateField HeaderText="城市名称">
                <ItemTemplate>
                    <a href='<%# "Region_Operate.aspx?Guid="+Eval("Guid") %>'>
                        <%# Eval("Name")%></a>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
            </asp:TemplateField>
            <asp:BoundField DataField="ShortName" HeaderText="城市缩写" SortExpression="ShortName">
                <ItemStyle HorizontalAlign="Center" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="是否默认">
                <ItemTemplate>
                    <%# IsOrNo(Eval("IsDefault"))%>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="是否开通">
                <ItemTemplate>
                    <%# IsOpen(Eval("IsForbid"))%>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
            </asp:TemplateField>
        </Columns>
        <HeaderStyle HorizontalAlign="Center" BackColor="#6699CC" Font-Bold="True" ForeColor="#FFFFFF">
        </HeaderStyle>
        <PagerStyle HorizontalAlign="Left" BackColor="#EEEEEE" ForeColor="#6699CC"></PagerStyle>
    </cc1:Num1GridView>
    <div class="vote">
        <asp:Button ID="ButtonAdd" runat="server" CausesValidation="False" Text="添加" OnClick="ButtonAdd_Click"
            CssClass="bt2" />
        <asp:Button ID="ButtonEdit" runat="server" CausesValidation="False" Text="编辑" OnClientClick="return EditButton()"
            OnClick="ButtonEdit_Click" CssClass="bt2" />
        <asp:Button ID="ButtonDelete" runat="server" CausesValidation="False" Text="删除" OnClientClick="return DeleteButton()"
            OnClick="ButtonDelete_Click" CssClass="bt2" />
        <uc1:MessageShow ID="MessageShow" runat="server" Visible="False" />
    </div>
    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
    <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" SelectMethod="Search"
        TypeName="GroupFlyTG.BusinessLogic.GroupFlyTG_Region_Action" OldValuesParameterFormatString="original_{0}">
        <SelectParameters>
            <asp:ControlParameter ControlID="textBoxName" Name="name" PropertyName="Text" Type="String" />
            <asp:Parameter DefaultValue="0" Name="isDeleted" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    </form>
</body>
</html>
