//databind to total orders by eta and company id protected void bind_chart(Int32 companyid) { try { ordertablecustomcontroller _orders = new ordertablecustomcontroller(); IDataReader _dr = _orders.GetOrderCountByEtaWeek(companyid); DataTable _dt = new DataTable(); _dt.Load(_dr); //DevExpress.XtraCharts.Series _s = this.dxchartEta.Series[0]; // Series _s = this.dxchartEta.Series[0]; XYDiagram _xy = (XYDiagram)this.dxchartEta.Diagram; this.dxchartEta.Legend.Visible = false; //stagger x axis lables _xy.AxisX.Label.Staggered = false; //rotate them. _xy.AxisX.Label.Angle = -30; _xy.AxisX.Label.Antialiasing = true; _s.Label.TextOrientation = TextOrientation.Horizontal; _s.DataSource = _dt; //columns _s.ArgumentScaleType = ScaleType.DateTime; _s.ArgumentDataMember = "GroupByOfETA"; //rows _s.ValueScaleType = ScaleType.Numerical; _s.ValueDataMembers.AddRange(new string[] { "SumOrderId" }); this.dxchartEta.DataBind(); } catch (Exception ex) { this.dxlblerr3.Text = ex.Message.ToString(); this.dxlblerr3.Visible = true; } }
// overloads protected void bind_order_data(Int32 orderno, string houseBL) { try { if (Session["orderlist"] != null) { IList<Int32> _ol = (IList<Int32>)Session["orderlist"]; //DataTable _ol = (DataTable)Session["orderlist"]; this.dlorder.DataSource = _ol; this.dlorder.DataBind(); } else { //IList<Int32> _ol = build_order_table(); //_ol.Add(orderno); //160112 find any other order numbers covered by house b/l and ad to ilist IList<Int32> _ol = new ordertablecustomcontroller().get_orders_by_houseBL(houseBL); if (_ol.Count == 0) { _ol.Add(orderno); } //DataTable _ol = build_order_table(); //_ol.Rows.Add(orderno); Session["orderlist"] = _ol; this.dlorder.DataSource = _ol; this.dlorder.DataBind(); } } catch (Exception ex) { Response.Write(ex.Message.ToString()); } }