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 Page_Load(object sender, EventArgs e)
        {
            _h = new Xdgk.UI.GridViewHelper(this.GridView1);
            _h.DataSourceDelegate = this.GetDataTable;


            //this.UCZedChart1.GraphPaneConfig = GetGraphPaneConfig();
            //this.UCZedChart1.DataSource = this.GetDataTable();

            //this.GridView1.AutoGenerateColumns = false;
            // TODO: 2011-05-16 ddlStation not add all
            //
            this.UCConditionDTTwo1.IsAddAll = false;
            //
            this.UCConditionDTTwo1.QueryEvent += new EventHandler(UCConditionDTTwo1_QueryEvent);

            if (!IsPostBack)
            {
                _h.GridViewConfig = GetGridViewConfig();
                //this.UCChart1.Hide();

                //this.UCConditionDTTwo1.Begin =
                if (DistributeQueryStringParam())
                {
                    // todo: query
                    //
                }
                if (DistributeQueryStringParam_Real())
                {
                    // query
                    //
                }

                string t = null;
                if (this.DataEnum == DataEnum.WL)
                {
                    t = Titles.DataHistoryWL;
                }
                else if (this.DataEnum == DataEnum.Flux)
                {
                    t = Titles.DataHistoryFlux;
                }
                else if (this.DataEnum == DataEnum.Amount)
                {
                    t = Titles.DataHistoryAmount;
                }

                MasterPageHelper.SetTitle(this, t);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            _h = new Xdgk.UI.GridViewHelper(this.GridView1);
            _h.DataSourceDelegate = this.GetDataTable;

            //this.UCZedChart1.GraphPaneConfig = GetGraphPaneConfig();
            //this.UCZedChart1.DataSource = this.GetDataTable();

            //this.GridView1.AutoGenerateColumns = false;
            // TODO: 2011-05-16 ddlStation not add all
            //
            this.UCConditionDTTwo1.IsAddAll = false;
            //
            this.UCConditionDTTwo1.QueryEvent += new EventHandler(UCConditionDTTwo1_QueryEvent);

            if (!IsPostBack)
            {
                _h.GridViewConfig = GetGridViewConfig();
                //this.UCChart1.Hide();

                //this.UCConditionDTTwo1.Begin =
                if (DistributeQueryStringParam())
                {
                    // todo: query
                    //
                }
                if (DistributeQueryStringParam_Real())
                {
                    // query
                    //
                }

                string t = null;
                if (this.DataEnum == DataEnum.WL)
                {
                    t = Titles.DataHistoryWL;
                }
                else if (this.DataEnum == DataEnum.Flux)
                {
                    t = Titles.DataHistoryFlux;
                }
                else if (this.DataEnum == DataEnum.Amount)
                {
                    t = Titles.DataHistoryAmount;
                }

                MasterPageHelper.SetTitle(this, t);
            }
        }
Exemplo n.º 4
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);
        }