<%@ page language="C#" autoeventwireup="true" inherits="Admin_Image_List_Select, ShopNum1Deploy" %>
<%@ 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>图片选择框</title>
       <link type="text/css" rel="Stylesheet" href="css/index.css" /> 
        <script type="text/javascript" language="javascript" src="../js/CommonJS.js"></script>
    <base Target="_self" /> 
       <script language="javascript"  type="text/javascript"> 
        //设置返回到父窗口的值 
        function ReturnValue(str) 
        { 
            window.returnValue=str; 
            window.close(); 
        } 
</script> 
</head>
<body style="padding:0; background-image: url(images/Bg_right.gif); background-repeat:repeat;">
    <form id="form1" runat="server">
      <table style="width:100%">
        <tr>
            <td style="width:100%" align="left">
                       &nbsp;</td>
        </tr>
        <tr>
            <td style="width:100%" align="left">
            <div class="query">
            
                       <asp:Label ID="LabelName" runat="server" Text="图片名称："></asp:Label> 
                       <asp:TextBox ID="TextBoxSName" runat="server" CssClass="input1"></asp:TextBox> &nbsp; &nbsp; &nbsp; &nbsp;
                       <asp:Label ID="Label1" runat="server" Text="图片类型：" CssClass="input1"></asp:Label>
                         <asp:DropDownList ID="DropDownListSImageType" runat="server" 
                           AutoPostBack="True"  CssClass="select1">
                       </asp:DropDownList>
                       &nbsp;<asp:Button ID="ButtonSearch" runat="server" onclick="ButtonSearch_Click" 
                           Text="查询" CausesValidation="False"  CssClass="bt2"/></div>                                    
                       </td>
        </tr>
        <tr>
            <td style="width:100%" align="left">
            <asp:DataList ID="DataListShow" runat="server" RepeatDirection="Horizontal" 
                RepeatColumns="6" Width="100%">
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>
                                <div>                              
                   <img id="loadImg" height="70" width="90"  alt="" 
                    src='<%#"../ImgUpload/"+ DataBinder.Eval(Container, "DataItem.ImagePath") %>'
                     onclick= 'ReturnValue("<%# "../ImgUpload/"+ DataBinder.Eval(Container, "DataItem.ImagePath")%>");' />
                      </div>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" style="width: 90px">
                             <input id="checkboxItem"   value='<%# Eval("Guid") %>'  type="checkbox" />
                                <asp:Label ID="imgName" runat="server" 
                Text='<%# DataBinder.Eval(Container,"DataItem(Name)","{0}") %>'></asp:Label>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </asp:DataList>
              </td>
        </tr>
        <tr>
         <td style="width:100%" align="left">
             <!-- 分页部分-->
               <div class="btconfig" style="text-align:right">
                 <asp:Label ID="LabelPageMessage" runat="server"></asp:Label>
                 &nbsp;<asp:HyperLink ID="lnkFirst" runat="server" ForeColor="black">[ 首页</asp:HyperLink>
                 <asp:HyperLink ID="lnkPrev" runat="server" ForeColor="black">| 上一页</asp:HyperLink>
                 <asp:HyperLink ID="lnkNext" runat="server" ForeColor="black">| 下一页</asp:HyperLink>
                 <asp:HyperLink ID="lnkLast" runat="server"  ForeColor="black">| 末页 ]</asp:HyperLink>
                 &nbsp;<span>转到 
                 <asp:Literal ID="lnkTo" runat="server" />
                 页</span>
             </div></td>
        </tr>
        <tr>
         <td >
         <div class="vote">
             <asp:Button ID="ButtonAdd" runat="server" Text="添加" 
                 CausesValidation="False" CssClass="bt2"/>
 <asp:Button ID="ButtonDelete" runat="server" Text="删除" onclick="ButtonDelete_Click" 
                 CausesValidation="False" onclientclick="return DeleteButton()" CssClass="bt2"/>
         &nbsp;<ShopNum1:MessageShow ID="MessageShow" runat="server" Visible="False" /></div>
            </td>
        </tr>
        </table>
       <table style="width:100%">
            <tr>
                <td align="right" style="width:40%"></td>
                <td align="left" style="width:60%">
                    &nbsp;</td>
            </tr>
            <tr>
                <td align="right" style="width:40%">
                    <asp:Label ID="Label2" runat="server" Text="图片类型："></asp:Label>
                </td>
                <td align="left" style="width:60%">
                    <asp:DropDownList ID="DropDownListImageType" runat="server" Width="201px" 
                        AutoPostBack="True" onselectedindexchanged="DropDownListImageType_SelectedIndexChanged" 
                         CssClass="select2">
                    </asp:DropDownList>
                    <font color="red">
                            <asp:Label ID="Label9" runat="server" Text="*"></asp:Label></font>
                    </td>
            </tr>
            <tr>
                <td align="right" style="width:40%">
                    <asp:Label ID="Label3" runat="server" Text="图片名称："></asp:Label>
                </td>
                <td align="left" style="width:60%">
                    <asp:TextBox ID="textBoxName" runat="server" CssClass="input2"></asp:TextBox>
                    <font color="red">
                            <asp:Label ID="Label7" runat="server" Text="*"></asp:Label></font>
                          <asp:RequiredFieldValidator ID="RequiredFieldValidatorName" 
                            runat="server" ControlToValidate="textBoxName" Display="Dynamic" 
                            ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                          </td>
            </tr>
            <tr>
                <td align="right" style="width:40%">
                    <asp:Label ID="Label4" runat="server" Text="上传图片："></asp:Label>
                </td>
                <td align="left" style="width:60%">
                    <asp:FileUpload ID="FileUploadImage" runat="server" />
                    <font color="red">
                            <asp:Label ID="Label8" runat="server" Text="*"></asp:Label></font>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidatorImage" 
                            runat="server" ControlToValidate="FileUploadImage" Display="Dynamic" 
                            ErrorMessage="该值不能为空"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right" style="width:40%">
                    <asp:Label ID="Label5" runat="server" Text="描述："></asp:Label>
                </td>
                <td align="left" >
                    <asp:TextBox ID="textBoxDescription" runat="server" Height="60px" 
                        TextMode="MultiLine" Width="440px" ></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorTitle3" 
                        runat="server" ControlToValidate="textBoxDescription" Display="Dynamic" 
                        ErrorMessage="描述最多100个字符" ValidationExpression="^[\s\S]{0,100}$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td align="right" style="width:40%">
                    <asp:Label ID="LabelSpec" runat="server" Text="生成缩略图："></asp:Label>
                </td>
                <td align="left" style="width:60%">
                    <asp:CheckBoxList ID="CheckBoxListImageSpec" runat="server" RepeatColumns="4" 
                        RepeatDirection="Horizontal">
                    </asp:CheckBoxList>
                </td>
            </tr>
            <tr>
                <td align="right" style="width:40%">
                    &nbsp;</td>
                <td align="left" style="width:60%">
                    <asp:Button ID="btnConfirm" runat="server"  Text="确定" OnClick="btnConfirm_Click"  CssClass="bt2"/>
                    &nbsp;<input ID="inputReset" runat="server"  type="reset" value="重置"  class="bt2"/></td>
            </tr>
            </table>
      <div>           
        <div >
          <div></div>
        </div>
    </div>
    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
    </form>
</body>
</html>
