v/SEngine.aspx.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Data;
using InfoSoftGlobal;

namespace Stat.web.v
{
    public partial class SEngine : System.Web.UI.Page
    {
        private int _Webid;
        protected string st = string.Empty, et = string.Empty;
        protected void Page_Load(object sender, EventArgs e)
        {
            _Webid = Stat.BLL.FPublic.Rq_Int("wid");
            this.Page.Title = "搜索引擎分析";
            if (!IsPostBack)
            {
                st = Stat.BLL.FPublic.Rq("st");
                et = Stat.BLL.FPublic.Rq("et");
                if (st == "") { st = DateTime.Now.ToLongDateString(); }
                if (et == "") { et = DateTime.Now.ToLongDateString(); }
                try
                {
                    DateTime t1 = Convert.ToDateTime(st);
                    DateTime t2 = Convert.ToDateTime(et);
                    t2 = t2 > Convert.ToDateTime(DateTime.Now.ToShortDateString()) ? Convert.ToDateTime(DateTime.Now.ToShortDateString()) : t2;
                    t1 = t1 > t2 ? t2 : t1;
                    /*-----------------------------------*/
                    this.txtStartDate.Text = st = t1.ToShortDateString();  //赋值到文本框 
                    this.txtEndDate.Text = et = t2.ToShortDateString();
                }
                catch
                {
                    Response.Write("错误提示:输入的时间格式无效!正确格式如:" + DateTime.Now.ToShortDateString() + "");
                    Response.End();
                }
                Show();
            }
        }  
        /// <summary>
        /// 分析数据
        /// </summary>
        protected void Show()
        {
            DateTime t1 = Convert.ToDateTime(st);
            DateTime t2 = Convert.ToDateTime(et).AddDays(1);//这里+1 
            DataTable dtList = BLL.BViewEngine.Get(_Webid, "EgID,EgTimCount,EgIPCount,EgUVCount", t1, t2);
            //计算
            DataTable dtEngine = BLL.Report.Rp_Engine.GetList(dtList);
            ShowReport(dtEngine);
            ShowHtml(dtEngine);
        }

        protected void ShowHtml(DataTable dt)
        { 
            //转换
            string strHtml = BLL.CHtml.HEngine.Get(dt, _Webid, st, et);
            //显示
            this.LtrEngineList.Text = strHtml;
            Response.Flush();
        }

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。