/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { // TODO: // MasterPageHelper.SetTitle(this, DataEnumClass.GetDataEnumString(this.DataEnum)); this.UCChannelStationDT1.QueryEvent += new EventHandler(UCChannelStationDT1_QueryEvent); if (!IsPostBack) { ChannelStationDTCondition c; bool hasIDParam = GetChannelStationDTCondition(out c); if (hasIDParam) { this.UCChannelStationDT1.SelectedChannelCollection = c.ChannelCollection; this.UCChannelStationDT1.SelectedStationCollection = c.StationCollection; this.UCChannelStationDT1.Begin = c.Begin; this.UCChannelStationDT1.End = c.End; MasterPageHelper.SetTitle(this, DataEnumClass.GetDataEnumString(c.DataEnum)); Query(); } else { MasterPageHelper.SetTitle(this, DataEnumClass.GetDataEnumString(this.DataEnum)); } } else { this.UCAMChart1.Visible = false; } }
/// <summary> /// /// </summary> /// <returns></returns> private GraphPaneConfig GetGraphPaneConfig(DataTable tbl) { ColorProvider cp = new ColorProvider(); GraphPaneConfig cfg = new GraphPaneConfig(); cfg.Title = DataEnumClass.GetDataEnumString(this.DataEnum) + "曲线"; if (this.DataEnum == DataEnum.WL) { cfg.YTitle = strings.WLWithUnit; } if (this.DataEnum == DataEnum.Amount) { cfg.YTitle = strings.AmountWithUnit; } cfg.XTitle = "时间"; cfg.CurItemType = CurveItemType.Line; cfg.XAxisType = ZedGraph.AxisType.Date; for (int i = 1; i < tbl.Columns.Count; i++) { DataColumn col = tbl.Columns[i]; SingleCurveConfig item = new SingleCurveConfig(); item.Color = cp.GetNextColor(); item.Name = col.ColumnName; item.XDataField = "DT"; item.YDataField = col.ColumnName; cfg.CurveConfigBaseCollection.Add(item); } return(cfg); }
/// <summary> /// /// </summary> /// <returns></returns> private Xdgk.UI.Z.GraphPaneConfig GetGraphPaneConfig() { GraphPaneConfig c = new GraphPaneConfig(); c.Title = DataEnumClass.GetDataEnumString(this.DataEnum) + "历史曲线"; c.YTitle = this.GetYTitle(); c.XTitle = strings.DT; if (this.UCConditionDTTwo1.Stations.Count > 0) { SingleCurveConfig sc = new SingleCurveConfig(); sc.Name = this.UCConditionDTTwo1.Stations[0].StationName; sc.XDataField = "DT"; sc.YDataField = "WL1"; sc.Color = new ColorProvider().GetNextColor(); c.CurveConfigBaseCollection.Add(sc); } return(c); }
/// <summary> /// /// </summary> /// <returns></returns> private Xdgk.UI.Z.GraphPaneConfig GetGraphPaneConfig() { GraphPaneConfig c = new GraphPaneConfig(); string title = DataEnumClass.GetDataEnumString(this.DataEnum) + "比较曲线"; c.Title = title; c.XTitle = strings.DT; c.YTitle = this.GetYTitle(); MultiCurveConfig mccfg = new MultiCurveConfig(); mccfg.NameField = YongShuiGuanLiDBI.DBNames.vDitchDataDay.StationName; mccfg.XDataField = YongShuiGuanLiDBI.DBNames.vDitchDataDay.DT; mccfg.YDataField = GetWLOrAmountNameByDataEnum(); c.CurveConfigBaseCollection.Add(mccfg); return(c); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { MasterPageHelper.SetTitle(this, DataEnumClass.GetDataEnumTitle(this.DataEnum)); // register events // //this.UCChannelStationDT1.QueryEvent += new EventHandler(UCChannelStationDT1_QueryEvent); this.UCCompareAmount1.QueryEvent += new EventHandler(UCChannelStationDT1_QueryEvent); this.UCNavigation1.ForwardEvent += new EventHandler(UCNavigation1_ForwardEvent); this.UCNavigation1.BackwardEvent += new EventHandler(UCNavigation1_BackwardEvent); this.UCNavigation1.IncreaseEvent += new EventHandler(UCNavigation1_IncreaseEvent); this.UCNavigation1.DecreaseEvent += new EventHandler(UCNavigation1_DecreaseEvent); // init // Xdgk.UI.GridViewHelper h = this.GetGridViewHelper(); h.SortingDelegate = Query; if (!IsPostBack) { PanelHelper.InitPanelForGridView(this.Panel1); this.HideControls(); ChannelStationDTCondition c; bool hasIDParam = GetChannelStationDTCondition(out c); if (hasIDParam) { MasterPageHelper.SetTitle(this, DataEnumClass.GetDataEnumTitle(c.DataEnum)); Query(); } else { MasterPageHelper.SetTitle(this, DataEnumClass.GetDataEnumTitle(this.DataEnum)); } } else { } }