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

<%@ Register src="UserControl/MessageShow.ascx" tagname="MessageShow" tagprefix="China315" %>
<!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>图片选择框</title>
        <link rel="stylesheet" type="text/css" href="style/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) 
        { 
            var imgsrc = str.src;
            imgsrc = "~" + imgsrc.substring(imgsrc.indexOf("/ImgUpload"),imgsrc.length);
            window.returnValue = imgsrc + "," + str.src;
            window.close(); 
        } 
</script> 
</head>
<body style="padding:0; background-image: url(images/Bg_right.gif); background-repeat:repeat;">
    <form id="form1" runat="server">
    <div class="main">
   
        <div class="title">
        图片管理
        
        </div>
        <div class="query">
        <table style="width:100%" cellspacing="1" border="0" cellpadding="0">
        <tr>
            <td style="width:100%" align="left">
                     
            
                       <asp:Label ID="LabelName" runat="server" Text="图片名称："></asp:Label> 
                       <asp:TextBox ID="TextBoxSName" runat="server" CssClass="allinput1"></asp:TextBox> &nbsp; &nbsp; &nbsp; &nbsp;
                       <asp:Label ID="Label1" runat="server" Text="图片类型：" ></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="bnt1"/> </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"  runat="server" alt="" 
                src='<%# Eval("ImagePath") %>'
                     onclick= 'ReturnValue(this);' />
                      </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='<%# Eval("Name") %>'></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="bnt1"/>
 <asp:Button ID="ButtonDelete" runat="server" Text="删除" onclick="ButtonDelete_Click" 
                 CausesValidation="False" onclientclick="return DeleteButton()" CssClass="bnt1"/>
         &nbsp;<China315:MessageShow ID="MessageShow" runat="server" Visible="False" /></div>
            </td>
        </tr>
        </table>
        
        
        </div><br />
                <div class="title">添加图片</div>
    
        
        <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"  
                        AutoPostBack="True" onselectedindexchanged="DropDownListImageType_SelectedIndexChanged" 
                         >
                    </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="allinput1"></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" cssclass="allinput1" ></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" Enabled="False">
                    </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="bnt1"/>
                    &nbsp;<input ID="inputReset" runat="server"  type="reset" value="重置"  class="bnt1"/></td>
            </tr>
            </table>
      
        
        
        
  
    
    
    
    
    
    
    </div>
      
       
 
    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
        <asp:HiddenField ID="HiddenFieldproduceMemLoginID" runat="server" />
    </form>
</body>
</html>
