using System;
using System.Collections.Generic;
namespace Stat.web.v
{
    /// <summary>
    /// 
    /// </summary>
    public partial class Ventrance : Html.ReportPage
    {
        Model.PageInfo pageModel = new Stat.Model.PageInfo(50);
        /// <summary>
        /// 
        /// </summary>
        protected Model.StatInfo statModel = new Stat.Model.StatInfo();
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            statModel.WebID = base.Webid;
            //
            Model.WebSites websiteModel = base.Website;
            if (websiteModel != null)
            {
                this.Page.Title = "网站入口分析 " + websiteModel.WebName;
                statModel.GatherID = websiteModel.GatherServerID;
                //
                pageModel.PageIndex = base.PageIndex;
                statModel.StartTime = base.StartTime;
                statModel.EndTime = base.EndTime;
                //
                ShowHtml();
            }
            else
            {
                Response.Write("该站点不存在！");
                Response.End();
            }
        }
        /// <summary>
        /// 
        /// </summary>
        protected void ShowHtml()
        {

            List<Model.StatItem> list = BLL.ViewEnter.Get(statModel);
            string strdtRPageList = Stat.Html.Venter.GetList(list, pageModel.PageIndex, pageModel.PageSize);
            this.LtrVenterList.Text = strdtRPageList;
            Response.Flush();
            if (list.Count > pageModel.PageSize)
            {
                string urlPar = "wid=" + statModel.WebID + "&st=" + statModel.StartTime.ToShortDateString() + "&et=" + statModel.EndTime.ToShortDateString();
                this.LtrVenterPageIndex.Text = JPageIndex.GetIndex.Get(list.Count, pageModel.PageIndex, pageModel.PageSize, urlPar, 1, 0, 1, 6);

                Response.Flush();
            }
        }
    }
}