Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string          bookGuid  = Request["bookGuid"];
            string          startDate = Request["startDate"];
            string          endDate   = Request["endDate"];
            BookCountAccess data      = new BookCountAccess();
            DataTable       dt        = data.GetBookReadCount_Detail(bookGuid, startDate, endDate);

            repData.DataSource = dt;
            repData.DataBind();
        }
Example #2
0
        /// <summary>
        /// 明细导出
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public void GetBookReadCount_Detail(HttpContext context)
        {
            string bookGuid  = context.Request["bookGuid"];
            string startDate = context.Request["startDate"];
            string endDate   = context.Request["endDate"];

            if (string.IsNullOrEmpty(startDate))
            {
                startDate = DateTime.Now.AddDays(-7).ToShortDateString();
            }
            if (string.IsNullOrEmpty(endDate))
            {
                endDate = DateTime.Now.ToShortDateString();
            }

            BookCountAccess data = new BookCountAccess();
            DataTable       dt   = data.GetBookReadCount_Detail(bookGuid, startDate, endDate);

            BasePage.ExcelHelper helper = new BasePage.ExcelHelper();
            helper.ExportDataGridToCSV(dt, "图书热点明细统计" + DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss"));
        }