protected void ToSelect(object sender, EventArgs e) { YxBtn.SetViewState(divSel); ReportData rep = new ReportData(); DataTable dt = rep.Report2(ASPxDateEdit1.Text, ASPxDateEdit2.Text); WebChartControl1.Series.Clear(); Series series1 = new Series("", ViewType.Line); series1.Label.Visible = false; for (int j = ASPxDateEdit1.Date.Month; j <= ASPxDateEdit2.Date.Month; j++) { bool b = false; for (int i = 0; i < dt.Rows.Count; i++) { if (j.ToString() == dt.Rows[i]["iMonth"].ToString()) { SeriesPoint point = new SeriesPoint(dt.Rows[i]["iMonth"].ToString() + "月", dt.Rows[i]["iQuantity"].ToString()); series1.Points.Add(point); b = true; } } if (b == false) { SeriesPoint point = new SeriesPoint(j.ToString() + "月", 0); series1.Points.Add(point); } } WebChartControl1.Series.Add(series1); }
protected void ToSelect(object sender, EventArgs e) { YxBtn.SetViewState(divSel); ASPxGridView1.DataBind(); WebChartControl1.Series.Clear(); ReportData rep = new ReportData(); DataTable dt = rep.Report8(ASPxDateEdit1.Text, ASPxDateEdit2.Text); WebChartControl1.Series.Clear(); Series series1 = new Series("数量", ViewType.Bar); series1.Label.Visible = false; //Series series2 = new Series("金额", ViewType.Bar); //series2.Label.Visible = false; for (int i = 0; i < dt.Rows.Count && i < 15; i++) { SeriesPoint point1 = new SeriesPoint(dt.Rows[i]["cCusName"].ToString(), dt.Rows[i]["iQuantity"].ToString()); series1.Points.Add(point1); //SeriesPoint point = new SeriesPoint(dt.Rows[i]["cCusName"].ToString(), dt.Rows[i]["iMoney"].ToString()); //series2.Points.Add(point); } WebChartControl1.Series.Add(series1); //WebChartControl1.Series.Add(series2); ((XYDiagram)WebChartControl1.Diagram).AxisX.Label.Angle = 330; //Series Series1 = new Series("当年数据", ViewType.Bar); //Series1.DataSource = data; //Series1.ArgumentScaleType = ScaleType.Qualitative; }
protected void ToSelect(object sender, EventArgs e) { YxBtn.SetViewState(divSel); ASPxGridView2.DataBind(); WebChartControl1.Series.Clear(); ReportData rep = new ReportData(); for (int j = ASPxDateEdit1.Date.Year; j <= ASPxDateEdit2.Date.Year; j++) { Series series1 = new Series(j + "年", ViewType.Line); series1.Label.Visible = false; for (int s = 1; s <= 12; s++) { bool b = false; DataTable dt1 = rep.Report4_1(ASPxButtonEditcCus.Text.Trim(), ASPxButtonEditcInv.Text.Trim(), ASPxDateEdit1.Text, ASPxDateEdit2.Text, j.ToString()); for (int i = 0; i < dt1.Rows.Count; i++) { if (s.ToString() == dt1.Rows[i]["iMonth"].ToString()) { SeriesPoint point = new SeriesPoint(dt1.Rows[i]["iMonth"].ToString() + "月", dt1.Rows[i]["iQuantity"].ToString()); series1.Points.Add(point); b = true; } } if (b == false) { SeriesPoint point = new SeriesPoint(s.ToString() + "月", 0); series1.Points.Add(point); } } WebChartControl1.Series.Add(series1); } }
private void GetGrid() { LookUpDataData look = new LookUpDataData(); DataTable dt = look.Get(ASPxComboBoxLookUpType.Value.ToString()); ViewState["dtGridBind"] = dt; YxBtn.SetViewState(divSel); ASPxGridView1.DataSource = dt; ASPxGridView1.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { AjaxPro.Utility.RegisterTypeForAjax(typeof(PublicAjaxMethod)); if (!IsPostBack) { YxBtn.HidFormID = "cInvCType"; YxBtn.GetViewState(divSel); GetTitle(); ASPxGridView1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { YxBtn.HidFormID = "Report1"; ASPxDateEdit1.Date = DateTime.Parse(DateTime.Now.AddMonths(-1).ToString("yyyy-MM") + "-01"); ASPxDateEdit2.Date = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")); YxBtn.GetViewState(divSel); GetTitle(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { YxBtn.HidFormID = "Report2"; ASPxDateEdit1.Date = DateTime.Parse(DateTime.Now.Year.ToString() + "-01-01"); ASPxDateEdit2.Date = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")); YxBtn.GetViewState(divSel); GetTitle(); ToSelect(null, null); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { YxBtn.HidFormID = "Report3"; ASPxTextBox1.Value = DateTime.Now.Year.ToString(); MonthEdit1.Month = DateTime.Now.Month; YxBtn.GetViewState(divSel); GetTitle(); ToSelect(null, null); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { YxBtn.HidFormID = "FrmLookUpDataList"; if (ASPxComboBoxLookUpType.Value == null) { ASPxComboBoxLookUpType.Value = "1"; } YxBtn.GetViewState(divSel); GetTitle(); //GetGrid(); } }
protected void ASPxGridView1_PreRender(object sender, EventArgs e) { int index = YxBtn.GetViewPage(); if (index < ASPxGridView1.PageCount) { ASPxGridView1.PageIndex = index; } else if (index == 0) { } else { ASPxGridView1.PageIndex = ASPxGridView1.PageCount; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { YxBtn.HidFormID = "Report5"; ASPxTextBox1.Value = DateTime.Now.Year.ToString(); ASPxTextBox2.Value = DateTime.Now.Year.ToString(); MonthEdit1.Month = DateTime.Now.AddMonths(-1).Month; MonthEdit2.Month = DateTime.Now.Month; if (MonthEdit2.Month == 1) { ASPxTextBox1.Value = DateTime.Now.AddYears(-1).Year.ToString(); } YxBtn.GetViewState(divSel); GetTitle(); } }
protected void ToSelect(object sender, EventArgs e) { YxBtn.SetViewState(divSel); ASPxGridView1.DataBind(); //for (int i = ASPxGridView1.TotalSummary.Count - 1; i >= 0; i--) //{ // if (ASPxButtonEditcInv.Text.Trim() == "") // { // ASPxGridView1.Columns[ASPxGridView1.TotalSummary[i].FieldName].Visible = true; // } // else // { // if (ASPxGridView1.TotalSummary[i].FieldName == ASPxButtonEditcInv.Text.Trim()) // { // ASPxGridView1.Columns[ASPxGridView1.TotalSummary[i].FieldName].Visible = true; // } // else // { // ASPxGridView1.Columns[ASPxGridView1.TotalSummary[i].FieldName].Visible = false; // } // } //} }
protected void ToSelect(object sender, EventArgs e) { YxBtn.SetViewState(divSel); ASPxGridView1.DataBind(); }
protected void ASPxGridView1_PageIndexChanged(object sender, EventArgs e) { YxBtn.SetViewPage(ASPxGridView1.PageIndex); }
protected void ToSelect(object sender, EventArgs e) { YxBtn.SetViewState(divSel); WebChartControl1.Series.Clear(); int month = 1; if (MonthEdit1.Month > 1) { month = MonthEdit1.Month; } Series series1 = new Series("发出废料", ViewType.Line); series1.Label.Visible = false; ReportData rep = new ReportData(); DataTable dt1 = rep.Report3(ASPxTextBox1.Text.Trim(), 1); for (int j = 1; j <= month; j++) { bool b = false; for (int i = 0; i < dt1.Rows.Count; i++) { if (j.ToString() == dt1.Rows[i]["iMonth"].ToString()) { SeriesPoint point = new SeriesPoint(dt1.Rows[i]["iMonth"].ToString() + "月", dt1.Rows[i]["iQuantity"].ToString()); series1.Points.Add(point); b = true; } } if (b == false) { SeriesPoint point = new SeriesPoint(j.ToString() + "月", 0); series1.Points.Add(point); } } WebChartControl1.Series.Add(series1); Series series2 = new Series("发出成品", ViewType.Line); series2.Label.Visible = false; DataTable dt2 = rep.Report3(ASPxTextBox1.Text.Trim(), 2); for (int j = 1; j <= month; j++) { bool b = false; for (int i = 0; i < dt2.Rows.Count; i++) { if (j.ToString() == dt2.Rows[i]["iMonth"].ToString()) { SeriesPoint point = new SeriesPoint(dt2.Rows[i]["iMonth"].ToString() + "月", dt2.Rows[i]["iQuantity"].ToString()); series2.Points.Add(point); b = true; } } if (b == false) { SeriesPoint point = new SeriesPoint(j.ToString() + "月", 0); series2.Points.Add(point); } } WebChartControl1.Series.Add(series2); Series series3 = new Series("销售订单", ViewType.Line); series3.Label.Visible = false; DataTable dt3 = rep.Report3(ASPxTextBox1.Text.Trim(), 3); for (int j = 1; j <= month; j++) { bool b = false; for (int i = 0; i < dt3.Rows.Count; i++) { if (j.ToString() == dt3.Rows[i]["iMonth"].ToString()) { SeriesPoint point = new SeriesPoint(dt3.Rows[i]["iMonth"].ToString() + "月", dt3.Rows[i]["iQuantity"].ToString()); series3.Points.Add(point); b = true; } } if (b == false) { SeriesPoint point = new SeriesPoint(j.ToString() + "月", 0); series3.Points.Add(point); } } WebChartControl1.Series.Add(series3); }