<%@ page language="C#" autoeventwireup="true" inherits="Admin_KeyWords_Manage, ShopNum1Deploy" %>

<%@ Register src="UserControl/MessageShow.ascx" tagname="MessageShow" tagprefix="ShopNum1" %>
<%@ Register assembly="ShopNum1.Control" namespace="ShopNum1.Control" tagprefix="cc1" %>

<!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>
</head>
<body style="padding:0; background-image: url(images/Bg_right.gif); background-repeat:repeat;">
    <form id="form1" runat="server">

     <div class="navigator">【 关键字管理 】</div>
      <table width="100%" cellpadding="0" cellspacing="0" border="0">

        <tr>
            <td >
            <div class="query">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="20%" align="right">关键字：</td>
    <td><asp:TextBox ID="TextBoxQKeyWords" runat="server" CssClass="input1"></asp:TextBox></td>
    <td align="right">类型：</td>
    <td>  <asp:DropDownList ID="DropDownListQType" runat="server" CssClass="select1">
                    </asp:DropDownList></td>
    <td></td>
  </tr>
  <tr>
    <td align="right">搜索次数：</td>
    <td> <asp:TextBox ID="TextBoxQCount" runat="server" CssClass="input1"></asp:TextBox><asp:RegularExpressionValidator ID="RegularExpressionValidatorQCount" 
                        runat="server" ControlToValidate="TextBoxQCount" Display="Dynamic" 
                        ErrorMessage="输入格式不正确" ValidationExpression="^[0-9]*$"></asp:RegularExpressionValidator></td>
    <td align="right">前台是否显示：</td>
    <td> <asp:DropDownList ID="DropDownListQIfShow" runat="server" CssClass="select1">
                    </asp:DropDownList></td>
    <td> <asp:Button ID="ButtonSearch" runat="server" Text="查询" 
            CausesValidation="False"  CssClass="bt2"/></td>
  </tr>
</table></div>
                </td>
        </tr>
        <tr>
            <td >
    
        <cc1:Num1GridView id="Num1GridViewShow" runat="server" AllowSorting="True" 
            AutoGenerateColumns="False" Width="100%" PageSize="5" AllowPaging="True" 
                    DataSourceID="ObjectDataSourceData" 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" type="checkbox" value='<%# Eval("Guid") %>' />
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" Width="30px" />
                </asp:TemplateField>
                <asp:BoundField DataField="Guid" HeaderText="GUID" Visible="False">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField DataField="Name" HeaderText="关键字" SortExpression="Name" >
                    <HeaderStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField DataField="Count" HeaderText="搜索次数" SortExpression="Count" >
                    <HeaderStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="前台是否显示" SortExpression="IfShow">
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# ChangeIfShow(DataBinder.Eval(Container, "DataItem(IfShow)","{0}")) %>'>></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="类型" SortExpression="Type">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# ChangeType(DataBinder.Eval(Container, "DataItem(Type)","{0}")) %>'>></asp:Label>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
            </Columns>
        </cc1:Num1GridView>
    
            </td>
        </tr>
        <tr>
            <td >
    <div class="vote">
            <asp:Button ID="ButtonAdd" runat="server" CausesValidation="False" Text="添加" onclick="ButtonAdd_Click"  CssClass="bt2"/>
            &nbsp;<asp:Button ID="ButtonEdit" runat="server" CausesValidation="False" Text="编辑" 
                onclientclick="return EditButton()" onclick="ButtonEdit_Click" CssClass="bt2"/>
            &nbsp;<asp:Button ID="ButtonDelete" runat="server" CausesValidation="False" 
                Text="删除" onclientclick="return DeleteButton()" onclick="ButtonDelete_Click" 
               CssClass="bt2"/>

        <ShopNum1:MessageShow ID="MessageShow" runat="server" Visible="False" />
    </div>
            </td>
        </tr>
        </table>
        <br />
        <table style="width:100%">
            <tr>
                <td align="right" width="20%">
                            <asp:Label ID="LabelKeyWords" runat="server" Text="关键字："></asp:Label>
                        </td>
                <td align="left" >
                            <asp:TextBox ID="TextBoxKeyWords" runat="server" TextMode="MultiLine" Width="440" Height="60"></asp:TextBox>
                            
                            <asp:Label ID="Label5" runat="server" Text="*" ForeColor="red"></asp:Label>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorKeyWords" 
                            runat="server" ControlToValidate="TextBoxKeyWords" Display="Dynamic" 
                            ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorKeyWords" 
                        runat="server" ControlToValidate="TextBoxKeyWords" Display="Dynamic" 
                        ErrorMessage="标题最多50个字符" ValidationExpression="^[\s\S]{0,50}$"></asp:RegularExpressionValidator>
                        </td>
            </tr>
            <tr>
                <td align="right">
                            <asp:Label ID="LabelType" runat="server" Text="类型："></asp:Label>
                        </td>
                <td align="left">
                            <asp:DropDownList ID="DropDownListType" runat="server" CssClass="select2">
                            </asp:DropDownList>
                            <asp:Label ID="Label6" runat="server" Text="*" ForeColor="red"></asp:Label>
                    <asp:CompareValidator ID="CompareValidatorType" runat="server" 
                            ControlToValidate="DropDownListType" Display="Dynamic" ErrorMessage="该值必需选择" 
                            Operator="NotEqual" ValueToCompare="-1"></asp:CompareValidator>
                        </td>
            </tr>
            <tr>
                <td align="right" >
                            <asp:Label ID="LabelCount" runat="server" Text="搜索次数："></asp:Label>
                        </td>
                <td align="left" >
                            <asp:TextBox ID="TextBoxCount" runat="server" CssClass="input2"></asp:TextBox>
                            <asp:Label ID="Label8" runat="server" Text="*" ForeColor="red"></asp:Label>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorCount" 
                            runat="server" ControlToValidate="TextBoxCount" Display="Dynamic" 
                            ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorCount" 
                        runat="server" ControlToValidate="TextBoxCount" Display="Dynamic" 
                        ErrorMessage="只能输入数字" ValidationExpression="^[0-9]*$"></asp:RegularExpressionValidator>
                        </td>
            </tr>
            <tr>
                <td align="right" >
                            <asp:Label ID="LabelIfShow" runat="server" Text="前台是否显示："></asp:Label>
                        </td>
                <td align="left" >
                    <asp:DropDownList ID="DropDownListIfShow" runat="server"  CssClass="select2">
                    </asp:DropDownList>
                            <asp:Label ID="Label7" runat="server" Text="*" ForeColor="red"></asp:Label>
                    <asp:CompareValidator ID="CompareValidatorIfShow" runat="server" 
                            ControlToValidate="DropDownListIfShow" Display="Dynamic" ErrorMessage="该值必需选择" 
                            Operator="NotEqual" ValueToCompare="-1"></asp:CompareValidator>
                        </td>
            </tr>
            <tr>
                <td align="right" >
                    &nbsp;</td>
                <td align="left" >
                    <asp:Button ID="ButtonConfirm" runat="server" Text="确定" 
                        onclick="ButtonConfirm_Click" ToolTip="Submit" CssClass="bt2"/>
&nbsp;<input ID="inputReset" runat="server"  type="reset" value="重置" class="bt2"/></td>
            </tr>
            <tr>
                <td align="right" >
                    &nbsp;</td>
                <td align="left" >
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right" >
                    &nbsp;</td>
                <td align="left" >
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right" >
                    &nbsp;</td>
                <td align="left" >
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right" >
                    &nbsp;</td>
                <td align="left" >
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right" >
                    &nbsp;</td>
                <td align="left" >
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right" >
                    &nbsp;</td>
                <td align="left" >
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right" >
                    &nbsp;</td>
                <td align="left" >
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right" >
                    &nbsp;</td>
                <td align="left" >
                    &nbsp;</td>
            </tr>
        </table>
    

    <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" 
        SelectMethod="Search" TypeName="ShopNum1.BusinessLogic.ShopNum1_KeyWords_Action" 
        >
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBoxQKeyWords" Name="name" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxQCount" Name="count" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="DropDownListQType" Name="type" 
                PropertyName="SelectedValue" Type="Int32" />
            <asp:ControlParameter ControlID="DropDownListQIfShow" Name="ifshow" 
                PropertyName="SelectedValue" Type="Int32" />
            <asp:Parameter DefaultValue="0" Name="isDeleted" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>

    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
    </form>
</body>
</html>
