<%@ Page Language="C#" AutoEventWireup="True" Inherits="Admin_Course_CosBindListPro" Codebehind="CosBindListPro.aspx.cs" %>
<%@ Import Namespace="Kesion.Publics" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link href="<%=Request.ApplicationPath=="/"?"":Request.ApplicationPath%>/admin/images/style.css" rel="stylesheet" type="text/css" />
    <script src="../../admin/images/pannel/tabpane.js" type="text/javascript"></script>
    <link href="<%=Request.ApplicationPath=="/"?"":Request.ApplicationPath%>/admin/images/pannel/tabpane.CSS" rel="stylesheet" type="text/css" />
    <script src="<%=ResolveUrl("~/KS_Inc/Jquery.js") %>" type="text/javascript"></script>
    <script src="<%=ResolveUrl("~/KS_Inc/Kesion.Common.js") %>" type="text/javascript"></script>
	<script src="/admin/include/comm.js"></script>
    <script src="<%=ResolveUrl("~/KS_Inc/DatePicker/WdatePicker.js") %>"></script>
    <style>
		.footerPage a {border: #ccc 1px solid;padding: 6px 10px;margin: 0 3px;color: #5C5C5C;background-color: #fff;border-radius: 2px;}
		.footerPage a.curr {color: #35a7ba;border: 1px solid #35a7ba;}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <script>
			function SetDate() {
				var today = new Date();
				if ($("#showdate").is(":hidden")) {
					$("#showdate").show();
					$('#<%=TxtBeginDate.ClientID%>').val(today.getFullYear() + '-' + (today.getMonth() + 1) + '-01');
					$('#<%=TxtEndDate.ClientID%>').val(today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate());
				}
				else {
					$("#showdate").hide();
					$('#<%=TxtBeginDate.ClientID%>').val('');
					$('#<%=TxtEndDate.ClientID%>').val('');
				}
			}
			function keyWordFocus() {
				if (jQuery("#<%=this.KeyWord.ClientID %>").val() == '请输入关键字！') {
							jQuery("#<%=this.KeyWord.ClientID %>").val('');
						}
					}
					function keyWordBlur() {
						if (jQuery("#<%=this.KeyWord.ClientID %>").val() == '') {
					jQuery("#<%=this.KeyWord.ClientID %>").val('请输入关键字！');
				}
			}
		</script>

		<div class="quickSearch"> 
			<asp:DropDownList ID="Condition" runat="server" style="margin-right:8px;">
				<asp:ListItem Value="0">商品名称</asp:ListItem>
				<asp:ListItem Value="1">商品ID</asp:ListItem>
			</asp:DropDownList>
			<asp:TextBox onfocus="keyWordFocus();" onblur="keyWordBlur();" Style="color: #ccc" Text="请输入关键字！" CssClass="textbox" ID="KeyWord" runat="server" Width="180px"></asp:TextBox>
			<span onclick="SetDate()" class="link-color" style="cursor: pointer">日期范围？</span>
			<span id="showdate" <%if (this.TxtBeginDate.Text == "")
							  { %> style="display: none" <%} %>>
				<asp:TextBox ID="TxtBeginDate" placeholder="格式：YYYY-MM-DD" Width="150px" runat="server" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate"></asp:TextBox>至
				<asp:TextBox ID="TxtEndDate" placeholder="格式：YYYY-MM-DD" Width="150px" runat="server" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate"></asp:TextBox>
			</span>
			<asp:Button ID="search" runat="server" CssClass="button" Text="开始搜索" OnClick="search_Click" />
		</div>
		<input type="hidden" value="<%=KSCMS.S("packid") %>" name="packid" />
		<table width="100%"border="0" cellpadding="1" cellspacing="1" class="CTable">
		<asp:Repeater ID="courserepeater" runat="server"  >
			<HeaderTemplate>
					<tr class="CTitle">
						<td></td>
						<td>商品Id</td>
						<td>商品名称</td>
						<td>商品价格</td>
						<td>添加时间</td>
					</tr>
			</HeaderTemplate>
			<ItemTemplate>
				<tr>
				  <td><input type="checkbox" name="infoid" value="<%# Eval("infoid") %>" /></td>
				  <td align="center"><%# Eval("infoid") %></td>
				  <td><input type="hidden" name="name" value="<%# Eval("title")%>" /> <%# Eval("title") %></td>
				  <td align="center"><%# Kesion.APPCode.Public.ReturnShopPrice(Eval("Price_Member")) %></td>
				  <td width="150" align="center"><%# Eval("adddate") %></td> 
				</tr>
			</ItemTemplate>
		</asp:Repeater>
			<tr style="display:<%= bool.Parse((courserepeater.Items.Count==0).ToString())?"":"none"%>">
				<td align="center" colspan="10" >
					<div class="empty" >
							没有查询到记录
					</div>
				</td>
			</tr>
		</table>
    </div>

	<div class="footerPage" style="text-align:center;margin-bottom:80px;">
		<KS:Page ID="Page3" runat="server" />
    </div>
    <div class="main-button" style="bottom:0;">
     	<asp:Button ID="addintopack" CssClass="button" runat="server" Text="确定加入" OnClientClick="$(#'form1').submit()"  OnClick="addintopack_Click"/>&nbsp;<br />
    </div>
    </form>
		 <script>
		 	$(function () {
		 		$(".footer_page").removeClass("footer_page");
		 	})
    </script>
</body>
</html>
