private void Monitoring_Load(object sender, EventArgs e) { weiboSpiderTimer.Elapsed += new System.Timers.ElapsedEventHandler(weiboSpiderTimer_Elapsed); weiboSpiderTimer.AutoReset = true; weiboSpiderTimer.Enabled = false; webSpiderTimer.Elapsed += new System.Timers.ElapsedEventHandler(webSpiderTimer_Elapsed); webSpiderTimer.AutoReset = true; webSpiderTimer.Enabled = false; tri = new TbReleaseInfo(); FormatDataView(dvAll, false); FormatDataView(dvBBs, false); FormatDataView(dvBlog, false); FormatDataView(dvWBlog, true); FormatDataView(dvWeb, false); FormatDataView(dvtieba, false); FormatDataView(dvWeiXin, false); dtnewsinfo = tri.GetReleaseInfoFormat(); dttiebainfo = tri.GetReleaseInfoFormat(); dtbloginfo = tri.GetReleaseInfoFormat(); dtbbsinfo = tri.GetReleaseInfoFormat(); dtqueryinfo = tri.GetReleaseInfoFormat(); dtweixininfo = tri.GetReleaseInfoFormat(); dtWebNewsInfo = tri.SelReleaseInfo(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd HH:mm:ss"), "0 AND webName<>'百度'"); dvWeb.DataSource = dtnewsinfo; dtTieBaInfo = tri.SelReleaseInfo(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd HH:mm:ss"), "5"); dvtieba.DataSource = dttiebainfo; dtWebBlogInfo = tri.SelReleaseInfo(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd HH:mm:ss"), "1"); dvBlog.DataSource = dtbloginfo; dtWebBBSInfo = tri.SelReleaseInfo(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd HH:mm:ss"), "2"); dvBBs.DataSource = dtbbsinfo; dtWebQueryInfo = tri.SelReleaseInfo(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd HH:mm:ss"), "4"); dvAll.DataSource = dtqueryinfo; dtWeiXinInfo = tri.SelReleaseInfo(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd HH:mm:ss"), "6"); dvWeiXin.DataSource = dtweixininfo; SoftVer = !GlobalPars.GloPars.ContainsKey("SoftVer")? "1" : GlobalPars.GloPars["SoftVer"].ToString(); if (!SoftVer.Equals("3")) { tabControl1.TabPages.RemoveByKey("tabPage7"); } }
private void Monitoring_Load(object sender, EventArgs e) { Thread re = new Thread(new ThreadStart(Report)); re.IsBackground = true; re.Start(); tri = new TbReleaseInfo(); FormatDataView(dvAll, false); FormatDataView(dvBBs, false); FormatDataView(dvBlog, false); FormatDataView(dvWBlog, true); FormatDataView(dvWeb, false); dtnewsinfo = tri.GetReleaseInfoFormat(); dtbloginfo = tri.GetReleaseInfoFormat(); dtbbsinfo = tri.GetReleaseInfoFormat(); dtqueryinfo = tri.GetReleaseInfoFormat(); dtWebNewsInfo = tri.SelReleaseInfo(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), DateTime.Now.AddDays(-15).ToString("yyyy-MM-dd HH:mm:ss"), "0 AND webName<>'百度'"); dvWeb.DataSource = dtnewsinfo; dtWebBlogInfo = tri.SelReleaseInfo(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), DateTime.Now.AddDays(-15).ToString("yyyy-MM-dd HH:mm:ss"), "1"); dvBlog.DataSource = dtbloginfo; dtWebBBSInfo = tri.SelReleaseInfo(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), DateTime.Now.AddDays(-15).ToString("yyyy-MM-dd HH:mm:ss"), "2"); dvBBs.DataSource = dtbbsinfo; dtWebQueryInfo = tri.SelReleaseInfo(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), DateTime.Now.AddDays(-15).ToString("yyyy-MM-dd HH:mm:ss"), "0 AND webName='百度'"); dvAll.DataSource = dtqueryinfo; }