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

<%@ 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>
    <link type="text/css" rel="Stylesheet" href="css/index.css" /> 
         <link href="../css/Num1GridView.css" rel="stylesheet" type="text/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>
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
       <%--  <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>--%>
                <div>
            <div class="query">
            <table style="width:100%">
                <tr>
                    <td align="right">
                        <asp:Label ID="LabelSPagePath" runat="server" Text="页面名称："></asp:Label>
                    </td>
                    <td >
                        <asp:TextBox ID="TextBoxSName" runat="server" CssClass="input1"></asp:TextBox>
                    </td>
                    <td align="right">
                        <asp:Label ID="LabelSOne" runat="server" Text="一级目录："></asp:Label>
                    </td>
                    <td  >
                        <asp:DropDownList ID="DropDownListSOne" runat="server" AutoPostBack="True" 
                            onselectedindexchanged="DropDownListSOne_SelectedIndexChanged" CssClass="select1">
                        </asp:DropDownList>
                    </td>
                    <td align="right">
                        <asp:Label ID="LabelSTwo" runat="server" Text="二级目录："></asp:Label>
                    </td>
                    <td >
                        <asp:DropDownList ID="DropDownListSTwo" runat="server" CssClass="select1" >
                        </asp:DropDownList>
                    </td>
                    <td >
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="LabelSName" runat="server" Text="页面源文件："></asp:Label>
                    </td>
                    <td >
                        <asp:TextBox ID="TextBoxSPagePath" runat="server" CssClass="input1"></asp:TextBox>
                    </td>
                    <td align="right">
                        <asp:Label ID="LabelSPageType" runat="server" Text="页面类型："></asp:Label>
                    </td>
                    <td >
                        <asp:DropDownList ID="DropDownListSPageType" runat="server" AutoPostBack="True" CssClass="select1">
                            <asp:ListItem Value="0">左边菜单页面</asp:ListItem>
                            <asp:ListItem Value="1">普通操作页面</asp:ListItem>
                            <asp:ListItem Value="-1" Selected="True">-全部-</asp:ListItem>
                            <asp:ListItem Value="3">顶部页面</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td colspan="3" >
                        <asp:Button ID="ButtonSearch" runat="server" CausesValidation="False" 
                            Text="查询" onclick="ButtonSearch_Click" CssClass="bt2"/>
                    </td>
                </tr>
            </table></div>
        </div>
        <div >
            <cc1:Num1GridView ID="Num1GridViewShow" runat="server" 
                AutoGenerateColumns="False" 
                AllowPaging="True" AllowSorting="True" AscendingImageUrl="~/images/SortAsc.gif" 
                DescendingImageUrl="~/images/SortDesc.gif" Width="100%" 
                AddSequenceColumn="False" AllowMultiColumnSorting="False" BorderColor="#CCDDEF" 
                BorderStyle="Solid" BorderWidth="1px" CellPadding="4" Del="False" 
                DeletePromptText="确实要删除指定的记录吗？" Edit="False" FixHeader="False" 
                Font-Size="Small" GridViewSortDirection="Ascending" PagingStyle="None" 
                style="margin-left: 2px;" TableName="" DataSourceID="ObjectDataSourceData">          
<HeaderStyle HorizontalAlign="Center" BackColor="#6699CC" Font-Bold="True" ForeColor="White"></HeaderStyle>

<PagerStyle HorizontalAlign="center" 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>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" Width="30px" />
                </asp:TemplateField>
                    <asp:BoundField DataField="Guid" HeaderText="Guid" Visible="False" />
                    <asp:TemplateField HeaderText="页面类型" SortExpression="PageType">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# ChangePageType(DataBinder.Eval(Container, "DataItem(PageType)","{0}")) %>'></asp:Label>
                        </ItemTemplate>
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="Name" HeaderText="页面名称" SortExpression="Name" >
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="PagePath" HeaderText="页面源文件" 
                        SortExpression="PagePath" >
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Description" HeaderText="描述" 
                        SortExpression="Description" />
                </Columns>
            </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="bt3" />--%>
            <%--<asp:Button ID="ButtonDelete" runat="server" CausesValidation="False" 
                Text="删除(暂时没做)" onclientclick="return DeleteButton()" 
                onclick="ButtonDelete_Click" CssClass="bt3" />--%>
            <asp:Button ID="ButtonManageControl" runat="server" CausesValidation="False" 
                onclick="ButtonManageControl_Click" onclientclick="return EditButton()" 
                Text="管理页面控件" CssClass="bt3" />
            </div>
            <br />
  
        <table cellpadding="0" cellspacing="0" border="0" style="width:100%">
            <tr>
                <td colspan="2" style="width:100%;background-color:#6699CC;">
                    <div style="color:White;padding-left:6px;line-height:30px;line-height:30px">
                        <asp:Label ID="LabelPageTitle" runat="server" Font-Bold="True" Text="新增页面"></asp:Label>&nbsp;
                     </div>
                 </td>
            </tr>
            <tr>
                <td align="right" style="width:20%;">
                        &nbsp;</td>
                <td align="left" >
                        &nbsp;</td>
            </tr>
            <tr>
                <td align="right" >
                        <asp:Label ID="LabelPageType" runat="server" Text="页面类型："></asp:Label>
                    </td>
                <td align="left" >
                        <asp:DropDownList ID="DropDownListPageType" runat="server" AutoPostBack="True" 
                            onselectedindexchanged="DropDownListPageType_SelectedIndexChanged" CssClass="select2">
                            <asp:ListItem Value="0">左边菜单页面</asp:ListItem>
                            <asp:ListItem Value="1">普通操作页面</asp:ListItem>
                            <asp:ListItem Value="3">顶部页面</asp:ListItem>
                            <asp:ListItem Selected="True" Value="-1">-请选择-</asp:ListItem>
                        </asp:DropDownList>
        <asp:Label ID="Label5" runat="server" ForeColor="#FF0066" Text="*"></asp:Label>
                        <asp:CompareValidator ID="CompareValidatorPageType" runat="server" 
                            ControlToValidate="DropDownListPageType" Display="Dynamic" ErrorMessage="该值必需选择" 
                            Operator="NotEqual" ValueToCompare="-1"></asp:CompareValidator>
                    </td>
            </tr>
            <tr   style="display:<%=(One)?"":"none"%>">
                <td align="right" >
                        <asp:Label ID="LabelOne" runat="server" Text="一级目录："></asp:Label>
                    </td>
                <td align="left" >
                        <asp:DropDownList ID="DropDownListOne" runat="server" AutoPostBack="True" 
                            onselectedindexchanged="DropDownListOne_SelectedIndexChanged" CssClass="select2">
                        </asp:DropDownList>
        <asp:Label ID="Label8" runat="server" ForeColor="#FF0066" Text="*"></asp:Label>
                    </td>
            </tr>
            <tr   style="display:<%=(Two)?"":"none"%>">
                <td align="right" >
                        <asp:Label ID="LabelTwo" runat="server" Text="二级目录："></asp:Label>
                    </td>
                <td align="left" >
                        <asp:DropDownList ID="DropDownListTwo" runat="server" AutoPostBack="True" 
                            onselectedindexchanged="DropDownListTwo_SelectedIndexChanged" CssClass="select2">
                        </asp:DropDownList>
                    </td>
            </tr>
            <tr >
                <td align="right" >
                        <asp:Label ID="LabelName" runat="server" Text="页面名称："></asp:Label>
                    </td>
                <td align="left" >
                        <asp:TextBox ID="TextBoxName" runat="server" CssClass="input2"></asp:TextBox>
        <asp:Label ID="Label3" runat="server" ForeColor="#FF0066" Text="*"></asp:Label>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorName" 
                            runat="server" ControlToValidate="TextBoxName" Display="Dynamic" 
                            ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorLoginID0" 
                        runat="server" ControlToValidate="TextBoxName" Display="Dynamic" 
                        ErrorMessage="页面名称最多50个字符" ValidationExpression="^[\s\S]{0,50}$"></asp:RegularExpressionValidator>
                    </td>
            </tr>
            <tr   style="display:<%=(PagePath)?"":"none"%>">
                <td align="right" >
                        <asp:Label ID="LabelPagePath" runat="server" Text="页面源文件："></asp:Label>
                    </td>
                <td align="left" >
                        <asp:TextBox ID="TextBoxPagePath" runat="server" CssClass="input2"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorPagePath" 
                        runat="server" ControlToValidate="TextBoxPagePath" Display="Dynamic" 
                        ErrorMessage="页面源文件最多250个字符" ValidationExpression="^[\s\S]{0,250}$"></asp:RegularExpressionValidator>
                    </td>
            </tr>
            <tr>
                <td align="right" >
    
                        <asp:Label ID="LabelDescription" runat="server" Text="描述："></asp:Label>
                    </td>
                <td align="left" >
                        <asp:TextBox ID="TextBoxDescription" runat="server" TextMode="MultiLine" 
                            Width="440px" Height="60px"></asp:TextBox>
                        </td>
            </tr>
            <tr>
                <td align="right" >
    
                        <asp:Label ID="LabelOrderID" runat="server" Text="排序号："></asp:Label>
                    </td>
                <td align="left" >
                        <asp:TextBox ID="TextBoxOrderID" runat="server" CssClass="input2"></asp:TextBox>
        <asp:Label ID="Label7" runat="server" ForeColor="#FF0066" Text="*"></asp:Label>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorOrderID" 
                            runat="server" ControlToValidate="TextBoxOrderID" Display="Dynamic" 
                            ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorLoginID" 
                        runat="server" ControlToValidate="TextBoxOrderID" Display="Dynamic" 
                        ErrorMessage="只能输入数字" ValidationExpression="^[0-9]*$"></asp:RegularExpressionValidator>
                    </td>
            </tr>
            <tr>
                <td align="right" >
    
                        &nbsp;</td>
                <td align="left" >
                        &nbsp;</td>
            </tr>
            <tr style="background-color:#EEEEEE;" class="btconfig">
             <td align="right" >
                 &nbsp;</td>
                <td align="left" >
                     <div style="width:80%; ">
                        <asp:Button ID="ButtonConfirm" runat="server" Text="确定" 
                            onclick="ButtonConfirm_Click" ToolTip="Submit"  CssClass="bt2"/>
                         <input ID="inputReset" runat="server"  type="reset" value="重置" Class="bt2"/>
                         <uc1:MessageShow ID="MessageShow" runat="server" Visible="False" />
                     </div>
                </td>  
            </tr>
        </table>
        </div>
       
    
    
    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
    <asp:HiddenField ID="hiddenGuid" runat="server" Value="0" />
    <%--                   <input ID="checkboxItem"   onclick="GetItmeValue(this)" type="checkbox" />--%>
        
    <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" 
        SelectMethod="Search" TypeName="ShopNum1.BusinessLogic.ShopNum1_Page_Action" 
        >
        <SelectParameters>
            <asp:ControlParameter ControlID="DropDownListSOne" Name="oneID" 
                PropertyName="SelectedValue" Type="Int32" DefaultValue="-1" />
            <asp:ControlParameter ControlID="DropDownListSTwo" DefaultValue="-1" 
                Name="twoID" PropertyName="SelectedValue" Type="Int32" />
            <asp:ControlParameter ControlID="DropDownListSPageType" Name="pageType" 
                PropertyName="SelectedValue" Type="Int32" DefaultValue="-1" />
            <asp:ControlParameter ControlID="TextBoxSName" DefaultValue="" Name="name" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxSPagePath" Name="pagePath" 
                PropertyName="Text" Type="String" />
            <asp:Parameter Name="IsDeleted" Type="Int32" DefaultValue="0" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <br />
    </form>
</body>
</html>
