<%@ Page Title="" Language="VB" MasterPageFile="~/App_MasterPage/mpManager.master" AutoEventWireup="false" CodeFile="Yc_Goods.aspx.vb" Inherits="Manager_YCGoods_Yc_Goods" %>
<%@ Register assembly="ControlPageing" namespace="ControlPageing" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="chpPageTitle" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="chpHead" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="chpScript" Runat="Server">
<script type="text/javascript" src="/App_Themes/ManagerTheme/Js/jquery.min.js"></script> 
    <script type="text/javascript" src="/App_Themes/ManagerTheme/js/lhgdialog.min.js"></script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="chpTitle" Runat="Server">商品管理</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="chpContent" Runat="Server">
    <asp:MultiView ID="MultiView1" runat="server">
        <asp:View ID="View_Edit" runat="server">
         <script language="javascript" type="text/javascript">
             function txtBoxClick(objtxtBox) {
                 $.dialog({
                     lock: true,
                     title: '选择文件',
                     content: 'url:/Manager/House/ViewFiles.htm',
                     width: '800px',
                     height: '500px',
                     max: false,
                     min: false
                 });
             }
             function callBack(filePath) {
                 $('#dplFileName').html('');
                 if (filePath != null && filePath != '') {
                     var fileName = filePath.split(',');
                     $('#<%=hfFileList.ClientID %>').attr('value', filePath);
                     for (var i = 0; i < fileName.length; i++) {
                         $('#dplFileName').append("<option value='" + fileName[i] + "'>" + fileName[i] + "</option>");
                     }
                 }
             }
             $(document).ready(function() {
                 $('#dplFileName').html('');
                 var Files = $('#<%=hfFileList.ClientID %>').attr('value');
                 if (Files != null & Files != '') {
                     var aryFile = Files.split(',');
                     for (var i = 0; i < aryFile.length; i++) {
                         $('#dplFileName').append("<option value='" + aryFile[i] + "'>" + aryFile[i] + "</option>");
                     }
                 }
             });
        </script>
        <asp:HiddenField ID="hfFileList" runat="server" />
    	    <table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0" class="line_table">
	    	<tr>
                    <td align="right" width="20%">分类：</td>
                    <td width="30%" colspan="2">
                        <asp:DropDownList ID="dplClass" runat="server">
                        </asp:DropDownList>
                    </td>
                    <td width="50%"><font color="red">*</font></td>
                </tr>	    	<tr>
                    <td align="right" width="20%">商品积分：</td>
                    <td width="30%" colspan="2">
                        <asp:TextBox ID="txtGoodsPoints" runat="server"  Width="96%" ></asp:TextBox>
                    </td>
                    <td width="50%"><font color="red">*</font></td>
                </tr>	    	<tr>
                    <td align="right" width="20%">商品名称：</td>
                    <td width="30%" colspan="2">
                        <asp:TextBox ID="txtGoodsName" runat="server"  Width="96%" ></asp:TextBox>
                    </td>
                    <td width="50%"><font color="red">*</font></td>
                </tr>
                <tr>
                    <td align="right" width="20%" style="vertical-align:top; line-height:25px;">商品图片：</td>
                    <td width="30%" colspan="2"> <select id="dplFileName" multiple="multiple" size="5" style="width:96%"></select></td>
                    <td width="50%"><input id="UploadPath" type="hidden" value='/Sites/Site<%=BaseFunction.PublicMethod.GetApplication("SiteID") %>/Upload/' />
                        <span onclick="txtBoxClick();" style="cursor:pointer">选择文件</span></td>
                </tr>
                <tr>
                    <td align="right" width="20%" style="vertical-align:top; line-height:25px;">商品简介：</td>
                    <td width="30%" colspan="2">
                        <asp:TextBox ID="txtGoodsDetail" runat="server"  Width="96%" Height="148px" 
                            TextMode="MultiLine" ></asp:TextBox>
                    </td>
                    <td width="50%"><font color="red">*</font></td>
                </tr>                                                                                             	            
	    </table>   
<div style=" text-align:center"><asp:ImageButton ID="imgSave" runat="server" ImageUrl="~/App_Themes/ManagerTheme/Images/tj.jpg" style="height: 22px" ToolTip="添加" /></div>     
        </asp:View>
        <asp:View ID="View_List" runat="server">
    	    <div style="text-align: right;" class="edittd">
        	<asp:CheckBox ID="cbSelectAll" runat="server" AutoPostBack="True" Text="全部" />&nbsp;
        	<asp:LinkButton ID="lnkBtnDel" runat="server"><img src="/App_Themes/ManagerTheme/Images/Delete.gif" style=" border:0px"/>&nbsp;删除选中</asp:LinkButton>&nbsp;&nbsp;
        	<a href="Yc_Goods.aspx?Action=Add"><img src="/App_Themes/ManagerTheme/Images/add.gif" style=" border:0px" />&nbsp;添加</a>
    	    </div>       
            <asp:Repeater ID="rptList" runat="server">
                <HeaderTemplate>
                    <table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0" class="line_table">
			<tr>
			    <td width="5%" align="center" class="left_bt2">选择</td>
			    <td width="65%" align="left" class="left_bt2">商品名称</td>
			    <td width="15%" align="center" class="left_bt2">商品积分</td>
			    <td align="center" width="15%" class="left_bt2">操作</td>
			</tr>
	        </HeaderTemplate>
                <ItemTemplate>
                    <tr class="menuout"   onMouseOver="this.className='menuin'" onMouseOut="this.className='menuout'">
			<td width="5%" align="center"><asp:CheckBox ID="CheckOn" runat="server" ToolTip='<%#Eval("ID")%>' /></td>
			<td width="65%" align="left"><%#Eval("GoodsName")%></td>
			<td width="15%" align="center"><%#Eval("GoodsPoints")%></td>
			<td width="15%" align="center"><a href="Yc_Goods.aspx?Action=Edit&ID=<%#Eval("ID") %>">
				<img src="/App_Themes/ManagerTheme/Images/Edit.gif" style=" border:0px" />&nbsp;编辑</a>&nbsp;&nbsp;&nbsp;<a href="Yc_Goods.aspx?Action=Del&ID=<%#Eval("ID") %>">
				<img src="/App_Themes/ManagerTheme/Images/Delete.gif" style=" border:0px" />&nbsp;删除</a></td>
			        </tr>
                </ItemTemplate>
                <FooterTemplate></table></FooterTemplate>
            </asp:Repeater>
            <div style="text-align:center"> <cc1:iPaging ID="ListPaging" runat="server" /></div>        
        </asp:View>        
    </asp:MultiView>
</asp:Content>

