예제 #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);
            }
        }
예제 #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();
 }
예제 #3
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();
        }
예제 #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void UCWaterUserListDTTwo1_QueryEvent(object sender, EventArgs e)
        {
            //Trace.Warn("selected wateruser list");
            //foreach (WaterUserClass w in this.UCWaterUserListDTTwo1.WaterUserCollection)
            //{
            //    Trace.Warn(w.Name);
            //}

            //DateTime begin = this.UCWaterUserListDTTwo1.Begin;
            //DateTime end = this.UCWaterUserListDTTwo1.End;
            //WaterUserCollection wuc = this.UCWaterUserListDTTwo1.WaterUserCollection;

            //// used amount list
            ////
            //StageAmountCollection list = new StageAmountCollection();
            //foreach (WaterUserClass w in wuc)
            //{
            //    double amount = w.CalcUsedAmount(begin, end);
            //    StageAmount a = new StageAmount();
            //    a.WaterUserID  = w.WaterUserID;
            //    a.WaterUserName = w.Name;
            //    a.Amount = amount;
            //    a.Begin = begin;
            //    a.End = end;

            //    list.Add(a);
            //}


            //this.GridView1.Columns.Clear();
            //this.GridView1.Columns.Add(CreateHyperLinkField());
            //// bind
            ////
            //this.GridView1.DataSource = list;
            //this.GridView1.DataBind();

            //h.DataSource = list;


            h.GridView.Columns.Add(CreateHyperLinkField());
            h.Bind();
        }
예제 #5
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();
        }
예제 #6
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();
        }
예제 #7
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();
        }
예제 #8
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();
        }
예제 #9
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();
        }
예제 #10
0
파일: pDuring.aspx.cs 프로젝트: hkiaipc/yh
        /// <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);
            }
        }
예제 #11
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();
 }
예제 #12
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();
        }
예제 #13
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();
        }
예제 #14
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();
        }