Пример #1
0
        /// <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;
            }
        }
Пример #2
0
        /// <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);
        }
Пример #3
0
        /// <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);
        }
Пример #4
0
        /// <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);
        }