private void Bind() { FlowInfo flow = new FlowInfo(); flow.Time = DateTime.Parse(txtTime.Value); if (!string.IsNullOrEmpty(ddlAdPage.SelectedValue)) { flow.AdId = int.Parse(ddlAdPage.SelectedValue); } ltStime.Text = flow.Time.ToString("yyyy-MM-dd"); ltAdTitle.Text = ddlAdPage.SelectedItem.Text; QueryGroupInfo query = new QueryGroupInfo(); query.Time = DateTime.Parse(txtTime.Value); query.GroupBy = " time "; DataTable table = LogBrowseAnalysisBLL.Instance.GetAnalysis(query); if (table.Rows.Count != 0) { ltIp.Text = table.Rows[0]["ipcount"].ToString(); ltPv.Text = table.Rows[0]["pvcount"].ToString(); ltUv.Text = table.Rows[0]["uvcount"].ToString(); ltIp1.Text = table.Rows[0]["ipcount"].ToString(); ltPv1.Text = table.Rows[0]["pvcount"].ToString(); ltUv1.Text = table.Rows[0]["uvcount"].ToString(); } else { ltIp.Text = "0"; ltPv.Text = "0"; ltUv.Text = "0"; ltIp1.Text = "0"; ltPv1.Text = "0"; ltUv1.Text = "0"; } DataTable table1 = LogBrowseAnalysisBLL.Instance.GetBrowseHour(query); int hour = int.Parse(DateTime.Now.ToString("HH")); if (flow.Time.ToString("yyyyMMdd") != DateTime.Now.ToString("yyyyMMdd")) { hour = 24; } var chart = ChartComonBLL.GetAdBrowseHour(table1, hour); hidDataJson.Value = DN.Framework.Utility.Serializer.SerializeObject(chart); rptTable.DataSource = table1; rptTable.DataBind(); }
private void Bind() { ltStime.Text = txtTime.Value; ltAdTitle.Text = ddlAdPage.SelectedItem.Text; QcodeQueryInfo query = new QcodeQueryInfo(); query.Time = int.Parse(DN.WeiAd.Framework.TimeHelper.ConverTimeByString(txtTime.Value).ToString("yyyyMMdd")); query.GroupBy = " time "; query.OrderBy = "time desc "; query.AdUserId = Account.UserId; if (!string.IsNullOrEmpty(ddlAdPage.SelectedValue)) { query.AdId = int.Parse(ddlAdPage.SelectedValue); } DataTable table = LogAdQcodeBLL.Instance.GetAnalysis(query); if (table.Rows.Count != 0) { ltIp.Text = table.Rows[0]["ipcount"].ToString(); ltPv.Text = table.Rows[0]["pvcount"].ToString(); ltUv.Text = table.Rows[0]["uvcount"].ToString(); ltIp1.Text = table.Rows[0]["ipcount"].ToString(); ltPv1.Text = table.Rows[0]["pvcount"].ToString(); ltUv1.Text = table.Rows[0]["uvcount"].ToString(); } else { ltIp.Text = "0"; ltPv.Text = "0"; ltUv.Text = "0"; ltIp1.Text = "0"; ltPv1.Text = "0"; ltUv1.Text = "0"; } DataTable table1 = LogAdQcodeBLL.Instance.GetBrowseHour(query); int hour = int.Parse(DateTime.Now.ToString("HH")); if (query.Time.Value != int.Parse(DateTime.Now.ToString("yyyyMMdd"))) { hour = 24; } var chart = ChartComonBLL.GetAdBrowseHour(table1, hour); hidDataJson.Value = DN.Framework.Utility.Serializer.SerializeObject(chart); rptTable.DataSource = table1; rptTable.DataBind(); }