private void BindData() { string time0 = Request.QueryString["dt1"].Trim(); string time1 = Request.QueryString["dt2"].Trim(); string depart = Request.QueryString["depart"].Trim(); string zeren = Request.QueryString["zeren"].Trim(); XT_UserLogBU logo1 = new XT_UserLogBU(); this.GridView1.DataSource = logo1.GetUserLogList(time0, time1, depart, zeren); this.GridView1.DataBind(); logo1.Close(); }
//处理统计事件 void SelectTime1_StaticEvent(object sender, EventArgs e) { string dt1 = this.SelectTime1.BeginTime; string dt2 = this.SelectTime1.EndTime; DataSet ds1 = new DataSet(); XT_UserLogBU userlog1 = new XT_UserLogBU(); DataSet ds = userlog1.GetUserLogList(dt1, dt2); userlog1.Close(); string tableTitle = ""; switch (this.SelectTime1.StaticType) { case SearchStaticType.年统计: tableTitle = this.SelectTime1.StaticYear + "年度用户上线统计表"; break; case SearchStaticType.月统计: tableTitle = this.SelectTime1.StaticYear + "年" + this.SelectTime1.StaticMonth + "月用户上线统计表"; break; case SearchStaticType.季度统计: tableTitle = this.SelectTime1.StaticYear + "年" + this.SelectTime1.StaticJidu + "季度用户上线统计表"; break; default: string begtime = this.SelectTime1.BeginTime; if (begtime == "") { begtime = "过去"; } string endtime = this.SelectTime1.EndTime; if (endtime == "") { endtime = "现在"; } tableTitle = begtime + "~" + endtime + "用户上线统计表"; break; } this.SetTableData(tableTitle, ds); }