<%@ Page Title="" Language="C#" MasterPageFile="~/BackStage/SiteMaster.Master" AutoEventWireup="true" CodeBehind="Frm_TimePromotion.aspx.cs" Inherits="AndroidSevice.Web.WLTGL.Frm_TimePromotion" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
        function ShowDataHelp(_url, _title, _handler) {
            layer.open({
                type: 2,
                area: ['80%', '85%'],
                fix: false, //不固定
                maxmin: true,
                content: _url,
                end: function () {
                    location.reload();
                }
            });
        }
        function ShowDataHelpSel(_url, _title, _handler) {
            layer.open({
                type: 2,
                area: ['60%', '70%'],
                fix: false, //不固定
                maxmin: true,
                content: _url
            });
        }
        function sAlert(info) {
            var message = info;
            layer.alert(message, 8); //风格一，layer弹出层特效
        }

        function SelectAll() {
            var checkboxs = document.getElementsByName("Btypecheck");
            for (var i = 0; i < checkboxs.length; i++) {
                var e = checkboxs[i];
                e.checked = !e.checked;
            }
        }
        function sAlertok(info) {
            layer.alert(info, { closeBtn: 0
            }, function () {
                parent.location.reload(); //刷新父页面
            });
        }
        function sAlertOut(info) {
            layer.alert(info, { closeBtn: 0
            }, function () {
                window.location.href = '../../default.aspx'; //刷新父页面
            });
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="content-header">
        <div class="btn-group">
        </div>
    </div>
    <div id="breadcrumb">
        <a href="#" title="Go to Home" class="tip-bottom"><i class="icon-home"></i>物联通管理</a>
        <a href="#" class="current">时段促销</a>
    </div>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span12">
                <div class="widget-box">
                    <div class="widget-title">
                        <span class="icon"><i class="icon-th-list"></i></span>
                        <h5>时段促销</h5>
                            <div class="buttons">
                                <a href="#"><button type="button"  style=" color:White; background:#00B7EE" onclick=ShowDataHelp('Frm_AddTimePromotion.aspx?add=add','','') class="btn" >新增</button></a>
                            </div>
                        </div>
                        <div class="widget-content">
                            <table id="query" class="table table-bordered table-striped table-hover">
                                <tbody>
                                    <tr>
                                        <td>
                                                <span>促销商品：<input type="text" name="ptypeId" id="ptypeId" style=" width:170px" value="<%=_ptypeName %>" disabled="disabled"/>
                                                </span>
                                                <a title="" onclick=ShowDataHelpSel('Frm_SelPtypeData.aspx?','','') class="btn btn-mini" href="#"><i class="icon-plus"></i></a>
                                                <a >
								                    <button type="button" onclick="window.location.href='Frm_TimePromotion.aspx?delp=delp'" class="btn btn-mini" ><i class="icon-minus"></i></button>
                                                </a>  
                                        </td>
                                        <td colspan="2"><span>录单日期：</span><span>
                                            <input type="text" class="inputwidth" style=" width:90px"   onFocus="WdatePicker({isShowClear:false,readOnly:true})" name="strdateLD" id="strdateLD" value="<%=_strDateLD %>"/></span>
                                            <span>
                                            <input type="text" class="inputwidth" style=" width:90px" onFocus="WdatePicker({isShowClear:false,readOnly:true})"  name="endateLD" id="endateLD" value="<%=_endDateLD %>"/></span>
                                        </td>
                                        <td  colspan="2"><span>促销日期：</span><span>
                                            <input type="text" class="inputwidth" style=" width:90px" onFocus="WdatePicker({isShowClear:false,readOnly:true})" name="strdateCX" id="strdateCX" value="<%=_strDateCX %>"/></span>
                                            <span>
                                            <input type="text" class="inputwidth" style=" width:90px"  onFocus="WdatePicker({isShowClear:false,readOnly:true})"  name="endateCX" id="endateCX" value="<%=_endDateCX %>"/></span>
                                        </td>
                                        <td><button type="submit" name="sub" value="sub" class="btn" >查询</button>
                                            <asp:HiddenField ID="HiddenField1" runat="server" />
                                            <asp:HiddenField ID="HiddenField2" runat="server" />
                                            <asp:HiddenField ID="HiddenField3" runat="server" />
                                            <asp:HiddenField ID="HiddenField4" runat="server" />
                                        </td>
									</tr>
                                </tbody>
                            </table>
                            <table id="wew" class="table table-bordered table-striped table-hover">
                                <thead>
                                    <tr>
                                        <th style=" width:20px">
                                            序号
                                        </th>
                                         <th>
                                            录单日期
                                        </th>
                                        <th>
                                            单据编号
                                        </th>
                                        <th>
                                            时段促销单名称
                                        </th>
                                        <th>
                                            促销日期
                                        </th>
                                        <th>
                                            促销时间
                                        </th>
                                        <th>
                                            促销周期
                                        </th>
                                        <th>
                                            促销品种数
                                        </th>
                                         <th>
                                            制单人
                                        </th>
                                        <th>
                                            摘要
                                        </th>
                                        <th>
                                            编辑
                                        </th>
                                        <th>
                                            操作
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <%
                                        if (dtList != null && dtList.Rows.Count != 0)
                                        {
                                            for (int i = 0; i < dtList.Rows.Count; i++)
                                            {
                                    %>
                                    <tr>
                                         <td style=" width:20px"><%=i+1 %></td>
                                        <td>
                                            <%=dtList.Rows[i]["CreateDate"].ToString()%>
                                        </td>
                                        <td>
                                            <%=dtList.Rows[i]["BillCode"].ToString()%>
                                        </td>
                                        <td>
                                            <%=dtList.Rows[i]["PromoName"].ToString()%>
                                        </td>
                                        <td>
                                            <%=dtList.Rows[i]["StartDate"].ToString()%>  到  <%=dtList.Rows[i]["EndDate"].ToString()%>
                                        </td>
                                        <td>
                                            <%=dtList.Rows[i]["StartTime"].ToString()%>  到  <%=dtList.Rows[i]["EndTime"].ToString()%>
                                        </td>
                                        <td>
                                            <%=dtList.Rows[i]["PromoDayDetail"].ToString()%>
                                        </td>
                                        <td>
                                            <%=dtList.Rows[i]["PromoPtypeQty"].ToString()%>
                                        </td>
                                        <td>
                                            <%=dtList.Rows[i]["FullName"].ToString()%>
                                        </td>
                                        <td>
                                            <%=dtList.Rows[i]["Commet"].ToString()%>
                                        </td>
                                        <td>
                                             <a onclick=ShowDataHelp('Frm_AddTimePromotion.aspx?add=update&billid=<%=dtList.Rows[i]["BillNumberID"].ToString()%>','','') ><button type="button" class="btn" >编辑</button></a>
                                           </td>
                                        <td> <a ><button type="button" class="btn" onclick="javaScript:if(confirm('您确定要删除吗？')) window.location.href='Frm_TimePromotion.aspx?del=del&Id=<%=dtList.Rows[i]["BillNumberID"].ToString() %>'">删除</button></a>
                                        </td>
                                    </tr>
                                    <%
                                        }
                                        }
                                    %>
                                </tbody>
                            </table>
                            <div class="pager">
                                <webdiyer:AspNetPager ID="AspNetPager1" runat="server" FirstPageText="首页" LastPageText="尾页"
                                    PrevPageText="上一页" NextPageText="下一页" OnPageChanging="AspNetPager1_PageChanging"
                                    PageSize="20" AlwaysShow="True" />
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

</asp:Content>
