private void getdata() { if (Request.Params["Flag"] == "store") { msg = GetTran("002241", "店铺订单汇总"); this.lbl_title.Text = GetTran("000388", "店铺"); this.lbl_flag = GetTran("000571", "店铺号"); this.Flag = "storeid"; dt = ReportFormsBLL.GetOrderCollect(Session["Begin"].ToString(), Session["End"].ToString(), "store"); if (dt.Rows.Count < 1) { this.lbl_message.Text = GetTran("001946", "没有相关数据!!"); this.lbl_message.Visible = true; } } if (Request.Params["Flag"] == "city") { msg = GetTran("002238", "区域订单汇总"); this.lbl_title.Text = GetTran("000110", "000109"); this.lbl_flag = GetTran("000110", "000109"); this.Flag = "City"; dt = ReportFormsBLL.GetOrderCollect(Session["Begin"].ToString(), Session["End"].ToString(), "city"); if (dt.Rows.Count < 1) { this.lbl_message.Text = GetTran("001946", "没有相关数据") + "!!!"; this.lbl_message.Visible = true; } } if (Request.Params["Flag"] == "Country") { msg = GetTran("000000", "国家订单汇总"); this.lbl_title.Text = GetTran("000110", "000109"); this.lbl_flag = GetTran("000110", "000109"); this.Flag = "Country"; dt = ReportFormsBLL.GetOrderCollect(Session["Begin"].ToString(), Session["End"].ToString(), "Country"); if (dt.Rows.Count < 1) { this.lbl_message.Text = GetTran("001946", "没有相关数据") + "!!!"; this.lbl_message.Visible = true; } } }
//取数据源 private void getdata() { //SqlParameter[] param ={ // new SqlParameter("@BeginDate",SqlDbType.DateTime), // new SqlParameter("@EndDate",SqlDbType.DateTime), // new SqlParameter("@qishu",SqlDbType.Int) // }; //param[0].Value = Session["Begin"].ToString(); //param[1].Value = Session["End"].ToString(); //param[2].Value = 0; //dt = Standard.DBHelper.ExecuteDataTable("D_OrderDetail_getData", param, CommandType.StoredProcedure); dt = ReportFormsBLL.GetOrderCollect_II(Session["Begin"].ToString(), Session["End"].ToString()); if (dt.Rows.Count < 1) { this.lbl_message.Text = GetTran("001946", "没有相关数据!!"); this.lbl_message.Visible = true; } }
public void showChat() { Translations(); Session["Begin"] = this.DatePicker1.Text; Session["End"] = this.DatePicker2.Text; if (this.DatePicker1.Text.Length < 1 || this.DatePicker2.Text.Length < 1) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + GetTran("000465", "请输入要查询的日期区间!") + "!')</script>"); return; } else { try { DateTime d1 = Convert.ToDateTime(this.DatePicker1.Text); DateTime d2 = Convert.ToDateTime(this.DatePicker2.Text); } catch { ClientScript.RegisterStartupScript(this.GetType(), "", "<script language='javascript'>alert('" + GetTran("000468", "日期格式不正确!") + "!')</script>"); return; } Session["Begin"] = this.DatePicker1.Text; Session["End"] = this.DatePicker2.Text; } //绑定 ArrayList arraydate = ReportFormsBLL.ConstructData(rbtn_type.SelectedIndex, Session["Begin"].ToString(), Session["End"].ToString(), ddl_item.SelectedValue); //Chart1.DataSource = arraydate; //Chart1.ChartAreas["ChartArea1"].BackColor = Color.FromArgb(209, 237, 254); //if (this.ddl_image.SelectedValue == "1")//饼图 //{ // Chart1.Series["Series1"].ChartType = SeriesChartType.Pie; // Chart1.Series["Series1"].BorderColor = Color.DarkGray; // Chart1.Series["Series1"].Label = "#VALX:#PERCENT{P}"; // Chart1.Series["Series1"].LegendText = "#VALX"; // Chart1.Series["Series1"].PostBackValue = "#INDEX"; // Chart1.Series["Series1"].LegendPostBackValue = "#INDEX"; //} //else if (this.ddl_image.SelectedValue == "2") //柱形图 //{ // Chart1.Series["Series1"].ChartType = SeriesChartType.Column; // Chart1.Series["Series1"].Label = "#VAL"; // Chart1.Series["Series1"].ToolTip = "#VALX #PERCENT{P1}"; // //start // Chart1.ChartAreas["ChartArea1"].BackColor = Color.FromArgb(209, 237, 254); // Chart1.Legends[0].Enabled = false; //} //Chart1.Series["Series1"].XValueMember = "Text"; //Chart1.Series["Series1"].YValueMembers = "Value"; //Chart1.DataBind(); Translations(); //if (this.ddl_image.SelectedValue == "1") //{ // int pointIndex = 1; // if (pointIndex >= 0 && pointIndex < Chart1.Series["Series1"].Points.Count) // { // Chart1.Series["Series1"].Points[pointIndex].CustomProperties += "Exploded=true"; // } //} }