Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Query()
        {
            if (IsValid)
            {
                DateTime begin = UCConditionDTTwo1.Begin;
                DateTime end   = UCConditionDTTwo1.End;

                //int  UCConditionDTTwo1.GetQueryDeviceIDs();
                StationCollection sc           = this.UCConditionDTTwo1.Stations;
                string[]          stationNames = sc.GetStationNames();

                DataTable tbl = DitchDataDayDBI.GetDayDataTable(begin, end, stationNames, this.DataEnum);
                //this.GridView1.DataSource = tbl;
                //this.DataBind();
                this.GridView1.Columns.Clear();
                Xdgk.UI.GridViewHelper H = new Xdgk.UI.GridViewHelper(this.GridView1);
                H.GridViewConfig = GetGridViewConfig(tbl);
                H.DataSource     = tbl;
                H.Bind();


                this.UCZedChart1.DataSource      = tbl;
                this.UCZedChart1.GraphPaneConfig = GetGraphPaneConfig(tbl);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="gv"></param>
 /// <param name="dataSource"></param>
 /// <param name="cfg"></param>
 private void ReBindGridViewDataSource(GridView gv, object dataSource, GridViewConfig cfg)
 {
     gv.Columns.Clear();
     Xdgk.UI.GridViewHelper h = new Xdgk.UI.GridViewHelper(gv);
     h.GridViewConfig = cfg;
     h.DataSource     = dataSource;
     h.Bind();
 }
Exemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 private Xdgk.UI.GridViewHelper GetGridViewHelper()
 {
     if (_h == null)
     {
         _h = new Xdgk.UI.GridViewHelper(this.GridView1);
     }
     return(_h);
 }
Exemplo n.º 4
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.GetDataSource;

            if (!IsPostBack)
            {
                h.GridViewConfig = GetGridViewConfig();
            }
            this.UCWaterUserListDTTwo1.QueryEvent += new EventHandler(UCWaterUserListDTTwo1_QueryEvent);
        }
Exemplo n.º 5
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.GetDataSource;

            if (!IsPostBack)
            {
                h.GridViewConfig = GetGridViewConfig();
            }
            this.UCWaterUserListDTTwo1.QueryEvent += new EventHandler(UCWaterUserListDTTwo1_QueryEvent);
        }
Exemplo n.º 6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="selected"></param>
        /// <param name="begin"></param>
        /// <param name="end"></param>
        private void QueryFlux(StationCollection selected, DateTime begin, DateTime end)
        {
            string    title  = string.Format("{0} ~ {1} {2}流量曲线", begin, end, this.GetSelectedChannelName());
            string    yTitle = "流量(m3/s)";
            DataTable tbl    = selected.GetFluxDataTable(begin, end);

            this.UCAMChart1.SetLineChartInfo(tbl,
                                             YongShuiGuanLiDBI.DBNames.vDitchData.StationName,
                                             YongShuiGuanLiDBI.DBNames.vDitchData.DT,
                                             DataTableHelper.GetExistColumnName(tbl, "InstantFlux", "avgflux"),
                                             title,
                                             yTitle);

            this.GridView1.Columns.Clear();
            Xdgk.UI.GridViewHelper h = new Xdgk.UI.GridViewHelper(this.GridView1);
            h.GridViewConfig = GetGridViewConfig(DataEnum.Flux, tbl);
            h.DataSource     = tbl;
            h.Bind();
        }
Exemplo n.º 7
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="selected"></param>
        /// <param name="begin"></param>
        /// <param name="end"></param>
        private void QueryWL(StationCollection selected, DateTime begin, DateTime end)
        {
            string    title  = string.Format("{0} ~ {1} {2}水位曲线", begin, end, this.GetSelectedChannelName());
            string    ytitle = "水位(cm)";
            DataTable tbl    = selected.GetWL1DataTable(begin, end);

            this.UCAMChart1.SetLineChartInfo(tbl,
                                             YongShuiGuanLiDBI.DBNames.vDitchData.StationName,
                                             YongShuiGuanLiDBI.DBNames.vDitchData.DT,
                                             DataTableHelper.GetExistColumnName(tbl, "wl1", "avgwl"),
                                             title,
                                             ytitle);

            this.GridView1.Columns.Clear();

            Xdgk.UI.GridViewHelper h = GetGridViewHelper();
            h.GridViewConfig = GetGridViewConfig(DataEnum.WL, tbl);
            h.DataSource     = tbl;
            h.Bind();
        }
Exemplo n.º 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Xdgk.UI.GridViewHelper h = new Xdgk.UI.GridViewHelper(this.GridView1);

            this.GridView1.RowEditing  += new GridViewEditEventHandler(GridView1_RowEditing);
            this.GridView1.DataKeyNames = new string[] { YongShuiGuanLiDBI.DBNames.vStationDevice.StationID };
            if (!IsPostBack)
            {
                h.GridViewConfig = GetViewConfig();
                YongShuiGuanLiDBI.GridViewHelper.AddEditColumn(this.GridView1);
            }

            //GridViewHelper.AddEditDeleteColumn(this.GridView1);

            DataTable t = StationDBI.GetStationDataTable(DeviceTypeDefine.CQDeviceTypes);

            ////this.GridView1.DataSource = t;
            //this.GridView1.DataBind();
            h.DataSource = t;
            h.Bind();
        }
Exemplo n.º 9
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="selected"></param>
        /// <param name="begin"></param>
        /// <param name="end"></param>
        private void QueryAmount(StationCollection selected, DateTime begin, DateTime end)
        {
            string title  = string.Format("{0} ~ {1} {2}水量曲线", begin, end, this.GetSelectedChannelName());
            string yTitle = "水量(m3)";

            DataTable tbl = selected.GetAmountDataTable(begin, end);

            this.UCAMChart1.SetLineChartInfo(tbl,
                                             YongShuiGuanLiDBI.DBNames.vDitchDataDay.StationName,
                                             YongShuiGuanLiDBI.DBNames.vDitchDataDay.DT,
                                             YongShuiGuanLiDBI.DBNames.vDitchDataDay.DayAmount,
                                             title,
                                             yTitle);


            this.GridView1.Columns.Clear();
            Xdgk.UI.GridViewHelper h = new Xdgk.UI.GridViewHelper(this.GridView1);
            h.GridViewConfig = GetGridViewConfig(DataEnum.Amount, tbl);
            h.DataSource     = tbl;
            h.Bind();
        }
Exemplo n.º 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Xdgk.UI.GridViewHelper h = new Xdgk.UI.GridViewHelper(this.GridView1);

            this.GridView1.RowEditing += new GridViewEditEventHandler(GridView1_RowEditing);
            this.GridView1.DataKeyNames = new string[] { YongShuiGuanLiDBI.DBNames.vStationDevice.StationID };
            if (!IsPostBack)
            {
                h.GridViewConfig = GetViewConfig();
                YongShuiGuanLiDBI.GridViewHelper.AddEditColumn(this.GridView1);
            }

            //GridViewHelper.AddEditDeleteColumn(this.GridView1);

            DataTable t = StationDBI.GetStationDataTable(DeviceTypeDefine.CQDeviceTypes);

            ////this.GridView1.DataSource = t;
            //this.GridView1.DataBind();
            h.DataSource = t;
            h.Bind();
        }
Exemplo n.º 11
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            Xdgk.UI.GridViewHelper h = new Xdgk.UI.GridViewHelper(this.GridView1);

            this.GridView1.RowEditing += new GridViewEditEventHandler(GridView1_RowEditing);
            this.GridView1.RowDeleting += new GridViewDeleteEventHandler(GridView1_RowDeleting);
            this.GridView1.DataKeyNames = new string[] { YongShuiGuanLiDBI.DBNames.tblDuringWater.DuringWaterID};
            if (!IsPostBack)
            {
                h.GridViewConfig = GetViewConfig();
                YongShuiGuanLiDBI.GridViewHelper.AddEditDeleteColumn(this.GridView1);
            }

            //GridViewHelper.AddEditDeleteColumn(this.GridView1);

            DataTable t = DuringWaterDBI.GetDuringDataTable();
            ////this.GridView1.DataSource = t;
            //this.GridView1.DataBind();
            h.DataSource = t;
            h.Bind();
        }
Exemplo n.º 12
0
        /// <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
            {
            }
        }
Exemplo n.º 13
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            Xdgk.UI.GridViewHelper h = new Xdgk.UI.GridViewHelper(this.GridView1);

            this.GridView1.RowEditing  += new GridViewEditEventHandler(GridView1_RowEditing);
            this.GridView1.RowDeleting += new GridViewDeleteEventHandler(GridView1_RowDeleting);
            this.GridView1.DataKeyNames = new string[] { YongShuiGuanLiDBI.DBNames.tblDuringWater.DuringWaterID };
            if (!IsPostBack)
            {
                h.GridViewConfig = GetViewConfig();
                YongShuiGuanLiDBI.GridViewHelper.AddEditDeleteColumn(this.GridView1);
            }

            //GridViewHelper.AddEditDeleteColumn(this.GridView1);

            DataTable t = DuringWaterDBI.GetDuringDataTable();

            ////this.GridView1.DataSource = t;
            //this.GridView1.DataBind();
            h.DataSource = t;
            h.Bind();
        }
Exemplo n.º 14
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Query()
        {
            if (IsValid)
            {
                DateTime begin = UCConditionDTTwo1.Begin;
                DateTime end = UCConditionDTTwo1.End;

                //int  UCConditionDTTwo1.GetQueryDeviceIDs();
                StationCollection sc = this.UCConditionDTTwo1.Stations;
                string[] stationNames = sc.GetStationNames();

                DataTable tbl = DitchDataDayDBI.GetDayDataTable(begin, end, stationNames, this.DataEnum);
                //this.GridView1.DataSource = tbl;
                //this.DataBind();
                this.GridView1.Columns.Clear();
                Xdgk.UI.GridViewHelper H = new Xdgk.UI.GridViewHelper(this.GridView1);
                H.GridViewConfig = GetGridViewConfig(tbl);
                H.DataSource = tbl;
                H.Bind();

                this.UCZedChart1.DataSource = tbl;
                this.UCZedChart1.GraphPaneConfig = GetGraphPaneConfig(tbl);
            }
        }
Exemplo n.º 15
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="gv"></param>
 /// <param name="dataSource"></param>
 /// <param name="cfg"></param>
 private void ReBindGridViewDataSource(GridView gv, object dataSource, GridViewConfig cfg)
 {
     gv.Columns.Clear();
     Xdgk.UI.GridViewHelper h = new Xdgk.UI.GridViewHelper(gv);
     h.GridViewConfig = cfg;
     h.DataSource = dataSource;
     h.Bind();
 }
Exemplo n.º 16
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="selected"></param>
        /// <param name="begin"></param>
        /// <param name="end"></param>
        private void QueryFlux(StationCollection selected, DateTime begin, DateTime end)
        {
            string title = string.Format("{0} ~ {1} {2}流量曲线", begin, end, this.GetSelectedChannelName());
            string yTitle = "流量(m3/s)";
            DataTable tbl = selected.GetFluxDataTable(begin, end);
            this.UCAMChart1.SetLineChartInfo(tbl,
                YongShuiGuanLiDBI.DBNames.vDitchData.StationName,
                YongShuiGuanLiDBI.DBNames.vDitchData.DT,
                DataTableHelper.GetExistColumnName (tbl, "InstantFlux","avgflux"),
                title,
                yTitle);

            this.GridView1.Columns.Clear();
            Xdgk.UI.GridViewHelper h = new Xdgk.UI.GridViewHelper(this.GridView1);
            h.GridViewConfig = GetGridViewConfig(DataEnum.Flux, tbl);
            h.DataSource = tbl;
            h.Bind();
        }
Exemplo n.º 17
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="selected"></param>
        /// <param name="begin"></param>
        /// <param name="end"></param>
        private void QueryAmount(StationCollection selected, DateTime begin, DateTime end)
        {
            string title = string.Format("{0} ~ {1} {2}水量曲线", begin, end, this.GetSelectedChannelName());
            string yTitle = "水量(m3)";

            DataTable tbl = selected.GetAmountDataTable(begin, end);
            this.UCAMChart1.SetLineChartInfo(tbl,
                YongShuiGuanLiDBI.DBNames.vDitchDataDay.StationName,
                YongShuiGuanLiDBI.DBNames.vDitchDataDay.DT,
                YongShuiGuanLiDBI.DBNames.vDitchDataDay.DayAmount,
                title,
                yTitle);

            this.GridView1.Columns.Clear();
            Xdgk.UI.GridViewHelper h = new Xdgk.UI.GridViewHelper(this.GridView1);
            h.GridViewConfig = GetGridViewConfig(DataEnum.Amount,tbl);
            h.DataSource = tbl;
            h.Bind();
        }
Exemplo n.º 18
0
 /// <summary>
 /// 
 /// </summary>
 /// <returns></returns>
 private Xdgk.UI.GridViewHelper GetGridViewHelper()
 {
     if (_h == null)
     {
         _h = new Xdgk.UI.GridViewHelper(this.GridView1);
     }
     return _h;
 }