Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        private void Query()
        {
            DateTime begin = this.UCChannelStationDTOne1.Begin;

            begin = begin.Date;
            DateTime  end = begin + TimeSpan.FromDays(1d);
            DataTable tbl = this.UCChannelStationDTOne1.SelectedStationCollection.GetDitchDataTable(
                begin, end);

            this.GridView1.Columns.Clear();
            Xdgk.UI.GridViewHelper h = new Xdgk.UI.GridViewHelper(this.GridView1);
            h.DataSource     = tbl;
            h.GridViewConfig = getGridViewConfig();
            h.Bind();

            //this.GridView1.DataSource = tbl;
            //this.GridView1.DataBind();

            string selChannel = this.UCChannelStationDTOne1.SelectedChannelCollection[0].ChannelName;
            string chartTitle = string.Format("{0} {1}日水位", begin.ToShortDateString(), selChannel);
            string yTitle     = "水位(cm)";

            //DataTableHelper
            //this.UCAMChart1.SetLineChartInfo(tbl,
            //this.UCAMChart1.SetDayLineChartInfo (tbl,
            //"StationName", "DT", "WL1", chartTitle, yTitle);
            this.UCAMChart1.SetLineChartInfo(tbl, "StationName", "DT", "WL1",
                                             chartTitle, yTitle);
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Query()
        {
            // TODO: 2011-05-27 page_load 之前不能调用 IsValid
            //
            //if (IsValid)
            DateTime begin = UCConditionDTTwo1.Begin;
            DateTime end   = UCConditionDTTwo1.End;

            //int[] deviceIDs = UCConditionDTTwo1.GetQueryDeviceIDs();
            DeviceCollection dc = UCConditionDTTwo1.Stations.GetDeviceCollection();

            int[] deviceIDs = dc.GetDeviceIDs();
            if (deviceIDs.Length == 0)
            {
                // TODO: 2011-05-16 not select station msg
                //
                return;
            }

            DataTable tbl = DitchDataDBI.GetData(begin, end, deviceIDs);

            _h.Bind();
            //DataTable tbl = GetDataTable(begin, end, deviceIDs[0]);
            //ColumnNameTextCollection nts = GetColumnNameTextCollection();
            //GridViewHelper.SetGridViewColumn(this.GridView1, nts);
            //this.GridView1.DataSource = tbl;
            //this.DataBind();


            this.UCZedChart1.GraphPaneConfig = this.GetGraphPaneConfig();
            this.UCZedChart1.DataSource      = tbl;
        }
Exemplo n.º 3
0
        /// <summary>
        /// 
        /// </summary>
        private void Query()
        {
            DateTime begin = this.UCChannelStationDTOne1.Begin;
            begin = begin.Date;
            DateTime end = begin + TimeSpan.FromDays(1d);
            DataTable tbl = this.UCChannelStationDTOne1.SelectedStationCollection.GetDitchDataTable(
                begin, end);

            this.GridView1.Columns.Clear();
            Xdgk.UI.GridViewHelper h = new Xdgk.UI.GridViewHelper(this.GridView1);
            h.DataSource = tbl;
            h.GridViewConfig = getGridViewConfig();
            h.Bind();

            //this.GridView1.DataSource = tbl;
            //this.GridView1.DataBind();

            string selChannel = this.UCChannelStationDTOne1.SelectedChannelCollection[0].ChannelName;
            string chartTitle = string.Format("{0} {1}日水位", begin.ToShortDateString(), selChannel);
            string yTitle = "水位(cm)";

            //DataTableHelper
            //this.UCAMChart1.SetLineChartInfo(tbl,
            //this.UCAMChart1.SetDayLineChartInfo (tbl,
            //"StationName", "DT", "WL1", chartTitle, yTitle);
            this.UCAMChart1.SetLineChartInfo(tbl, "StationName", "DT", "WL1",
                chartTitle, yTitle);
        }