<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Admin_DPTodayPromot.aspx.cs" Inherits="TW.UI.Admin.Admin_DPTodayPromot" %>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="css/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="../js/artDialog/artDialog.js?skin=default"></script>
<script type="text/javascript" src="../js/artDialog/plugins/iframeTools.js"></script>
<script type="text/javascript" src="../js/public.js"></script>
<script type="text/javascript" src="../js/FancyZoom/FancyZoom.js"></script>
<script type="text/javascript" src="../js/FancyZoom/FancyZoomHTML.js"></script>

</head>
<body onload="setupZoom();">
<form id="form1" runat="server">
<div class="nav"><h1>今日促销</h1></div>

<div class="cont">
    <div class="opera">
        <table class="seletable">
        <tr>
            <td>
            </td>
            <td><font color=red>注：该功能用于首页今日<%=mainchnstr%>管理，今日<%=mainchnstr%>最多添加<strong><%=act == "cx"?"6":"1" %></strong>条：示例图：<a href="/silitu/<%=act == "cx"?"jrcxsl":"mssl" %>.png"><img src="images/tu1.gif" /></a></font>
            </td>
        </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    <input id="Button1" type="button" value="查看前台页面" onclick="window.open('/');" class="btn1 btn111" />
                    <input id="Button3" type="button" value="新增今日<%=mainchnstr%>" onclick="location.href='Admin_DPTodayPromotAdd.aspx?act=<%=act%>';" class="btn1 btn111" />
                    <asp:Button ID="Button7" runat="server" Text="删除?" OnClientClick="return (CheckLen()&&confirm('确定删除?'));" 
                    CssClass="btn1 btn111" onclick="btnDel_Click" />
                </td>
            </tr>
        </table>
    </div>
    <asp:Button ID="btnSaveGds" runat="server" Text="Button" CssClass="disnone" onclick="btnSaveGds_Click" />
    <table class="table1">
    <tr>
        <td width="5%"><input id="chkall" onclick="CheckAll('chkBox')" type="checkbox" title="全选/全不选"/></td>
        <td><%=mainchnstr%>名称</td>
        <td>点卡编码</td>
        <%=act == "cx" ? "" : "<td>秒杀日期</td>"%>
        <td>面值</td>
        <td>充值类型</td>
        <td>VIP价</td>
        <td><%=mainchnstr%>价</td>
        <td>原价</td>
        <td>手续费比例</td>
        <td>所属商品</td>
        <td>排序号</td>
        <td>库存</td>
        <td>销量</td>
        <td width="90px">操作</td>
    </tr>
        <asp:Repeater ID="Repeater1" runat="server" onitemcommand="Repeater1_ItemCommand">
        <ItemTemplate>
        <asp:HiddenField ID="hidItemId" Value='<%#Eval("Id") %>' runat="server" />
    <tr>
        <td><asp:CheckBox ID="chkBox" runat="server" /></td>
        <td class="nor">
            <%#Eval("Thumb").ToString() == "" ? "<a href=\"uploads/no.jpg\"><img src=\"images/tu0.gif\" border=\"0\" /></a>" : "<a href=\"/uploads/?" + Eval("Thumb") + ".jpg\"><img src=\"images/tu1.gif\" border=\"0\" /></a>"%>
            <%#Eval("Title")%>
            <%#Eval("DPMSThumb").ToString() == "" ? "<a href=\"uploads/no.jpg\"><img src=\"images/tu0.gif\" border=\"0\" /></a>" : "<a href=\"/uploads/?" + Eval("DPMSThumb") + ".jpg\"><img src=\"images/tu1.gif\" border=\"0\" /></a>"%>
        </td>
        <td><%#Eval("GoodsNo")%></td>
        <%#act == "cx" ? "" : "<td>" + Convert.ToDateTime(Eval("SpikeDate")).ToString("yyyy-MM-dd") + "</td>"%>
        <td><%#Eval("ParVal")%></td>
        <td><%#GetGoodsRecharType(Eval("RecharType"))%></td>
        <td><%#Eval("VIPPrice")%>元</td>
        <td><%#Eval("PTPrice")%>元</td>
        <td><%#Eval("OrgPrice")%>元</td>
        <td><%#Convert.ToInt32(Eval("FeeProp"))==0?"无手续费":Eval("FeeProp")+"%"%></td>
        <td><%#Eval("ProTitle")%></td>
        <td>
            <TW:ReplaceBox ID="txtPai" runat="server" Text='<%#Eval("Pai")%>' Width="50" onblur="$('#btnSaveGds').click();"></TW:ReplaceBox>
        </td>
        <td><%#Eval("StockNum")%></td>
        <td><%#Eval("SaleNum")%></td>
        <td>   
            <a href="Admin_DPTodayPromotAdd.aspx?act=<%=act%>&id=<%#Eval("Id") %>">修改</a>              
            <asp:LinkButton ID="btnDel" runat="server" CommandName="del" OnClientClick="return confirm('确定删除?')">删除?</asp:LinkButton>
        </td>
    </tr>
        </ItemTemplate>
        </asp:Repeater>
    </table>
    <TW:Pager ID="Pager1" runat="server" CssClass="page" onchangepageclick="Pager1_ChangePageClick" />
</div>

</form>

<script type="text/javascript">
    var oTab = $('.table1')[0];
    var oldBgColor = '';
    var i = 0;
    for (i = 0; i < oTab.tBodies[0].rows.length; i++) {
        oTab.tBodies[0].rows[i].style.background = i % 2 ? '#ffffff' : 'url(images/line2.png) repeat-x';
        oTab.tBodies[0].rows[i].onmouseover = function () {
            oldBgColor = this.style.background;
            this.style.background = '#ffffd4 url(images/line.png) repeat-x';
        };
        oTab.tBodies[0].rows[i].onmouseout = function () {
            this.style.background = oldBgColor;
        };
    }
</script>
</body>
</html>
