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

<%@ Register Assembly="ShopNum1.Control" Namespace="ShopNum1.Control" TagPrefix="cc1" %>
<%@ Register Src="UserControl/MessageShow.ascx" TagName="MessageShow" TagPrefix="ShopNum1" %>
<!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>Untitled Page</title>
    <link type="text/css" rel="Stylesheet" href="css/index.css" />

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

    <style type="text/css">
        .hidden
        {
            display: none;
        }
    </style>
</head>
<body style="padding: 0; background-image: url(images/Bg_right.gif); background-repeat: repeat;
    font-size: 12px">
    <form id="form1" runat="server">
    <div class="navigator">
        【 友情链接 】</div>
    <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td style="width: 100%" align="left">
                <div class="query">
                    <table cellpadding="0" cellspacing="0" border="0" width="100%">
                        <tr>
                            <td width="10%" align="right">
                                链接标题：
                            </td>
                            <td>
                                <asp:TextBox ID="TextBoxName" runat="server" CssClass="input1"></asp:TextBox>
                            </td>
                            <td align="right">
                                是否前台显示：
                            </td>
                            <td>
                                <asp:DropDownList ID="DropDownListIsShow" runat="server" CssClass="select1">
                                </asp:DropDownList>
                            </td>
                            <td>
                                <asp:Button ID="ButtonSearch" runat="server" OnClick="ButtonSearch_Click" Text="查询"
                                    CssClass="bt2" />
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
        <tr>
            <td style="width: 100%" align="left">
                <cc1:Num1GridView ID="num1GridViewShow" runat="server" AllowPaging="True" AllowSorting="True"
                    AutoGenerateColumns="False" DataSourceID="ObjectDataSourceData" Width="100%"
                    AscendingImageUrl="~/images/SortAsc.gif" DescendingImageUrl="~/images/SortDesc.gif"
                    Font-Size="Small" AddSequenceColumn="False" AllowMultiColumnSorting="False" BorderColor="#CCDDEF"
                    BorderStyle="Solid" BorderWidth="1px" CellPadding="4" Del="False" DeletePromptText="确实要删除指定的记录吗？"
                    Edit="False" FixHeader="False" GridViewSortDirection="Ascending" PagingStyle="None"
                    Style="margin-left: 2px;" TableName="">
                    <HeaderStyle HorizontalAlign="Center" BackColor="#6699CC" Font-Bold="True" ForeColor="#FFFFFF">
                    </HeaderStyle>
                    <PagerStyle HorizontalAlign="Left" BackColor="#EEEEEE" ForeColor="#6699CC"></PagerStyle>
                    <Columns>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <input id="checkboxAll" onclick="javascript:SelectAllCheckboxes(this);" type="checkbox" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%--                   <input ID="checkboxItem"   onclick="GetItmeValue(this)" type="checkbox" />--%>
                                <input id="checkboxItem" value='<%# Eval("Guid") %>' type="checkbox" />
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" Width="30px" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="Guid" HeaderText="GUID" Visible="False" />
                        <%--<asp:BoundField DataField="Name" HeaderText="链接标题" SortExpression="Name"></asp:BoundField>--%>
                        <asp:TemplateField HeaderText="链接标题">
                            <ItemTemplate>
                                <a href='<%# "Link_Operate.aspx?Guid="+Eval("Guid") %>'>
                                    <%# Eval("Name") %></a>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="链接类型" SortExpression="LinkType">
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# ChangeLinkType(DataBinder.Eval(Container, "DataItem(LinkType)","{0}")) %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="Href" HeaderText="链接地址" SortExpression="Href" />
                        <asp:BoundField DataField="ImgADD" HeaderText="图片地址" SortExpression="ImgADD">
                            <HeaderStyle CssClass="hidden" />
                            <ItemStyle HorizontalAlign="Center" CssClass="hidden" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Description" HeaderText="站点简单介绍">
                            <HeaderStyle CssClass="hidden" />
                            <ItemStyle CssClass="hidden" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Memo" HeaderText="备注">
                            <HeaderStyle CssClass="hidden" />
                            <ItemStyle HorizontalAlign="Center" CssClass="hidden" />
                        </asp:BoundField>
                        <asp:BoundField DataField="OrderID" HeaderText="排序号" SortExpression="OrderID">
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="图片类型" SortExpression="ImgType">
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# ChangeImgType(DataBinder.Eval(Container, "DataItem(ImgType)","{0}")) %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="是否前台显示">
                            <ItemTemplate>
                                <asp:Label ID="Label3" runat="server" Text='<%# ChangeIsShow(DataBinder.Eval(Container, "DataItem(IsShow)","{0}")) %>'></asp:Label>
                            </ItemTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                    </Columns>
                </cc1:Num1GridView>
            </td>
        </tr>
        <tr>
            <td style="width: 100%" align="left">
                <div class="vote">
                    <asp:Button ID="ButtonAdd" runat="server" OnClick="ButtonAdd_Click" Text="添加" OnClientClick="GetCheckedBoxValues()"
                        CssClass="bt2" />
                    <asp:Button ID="ButtonEdit" runat="server" OnClick="ButtonEdit_Click" OnClientClick="return EditButton()"
                        Text="编辑" CssClass="bt2" />
                    <asp:Button ID="ButtonDelete" runat="server" Text="删除" OnClientClick="return DeleteButton()"
                        OnClick="ButtonDelete_Click" CssClass="bt2" />
                    <ShopNum1:MessageShow ID="MessageShow" runat="server" Visible="False" />
                </div>
            </td>
        </tr>
    </table>
    <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" SelectMethod="Search"
        TypeName="GroupFlyTG.BusinessLogic.GroupFlyTG_Link_Action">
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBoxName" DefaultValue="%" Name="name" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="DropDownListIsShow" DefaultValue="-1" Name="isShow"
                PropertyName="SelectedValue" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
    </form>
</body>
</html>
