Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            this.UCChannelStationDTOne1.IsSelectOneStation = true;
            MasterPageHelper.SetTitle(this, "水位修改");

            this.UCChannelStationDTOne1.QueryEvent += new EventHandler(UCChannelStationDTOne1_QueryEvent);

            if (!IsPostBack)
            {
                if (GetQueryParams())
                {
                    this.Device = DeviceFactory.CreateDevice(_queryDeviceID);
                    StationClass station = this.Device.StationClass;

                    this.UCChannelStationDTOne1.SelectedChannel = station.Channel;
                    this.UCChannelStationDTOne1.SelectedStation = station;

                    DateTime begin = _queryDateTime.Date;
                    DateTime end   = begin.Add(TimeSpan.FromDays(1d));

                    QueryData(_queryDeviceID, begin, end);
                }
            }
            else
            {
                //this.Device = this.UCChannelStationDTOne1.SelectedStation.DeviceCollection[0];
            }
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            MasterPageHelper.SetTitle(this, Titles.DistributeItemNew);
            if (!IsPostBack)
            {
                YongShuiGuanLiLib.ValidatorMessageCreater.CreateSQLDateTimeMessage(this.cvBegin);
                YongShuiGuanLiLib.ValidatorMessageCreater.CreateSQLDateTimeMessage(this.cvEnd);

                DistributeClass d = this.DistributeClass;
                this.txtWaterUser.Text  = d.NeedWaterClass.WaterUserClass.Name;
                this.txtNeedBegin.Text  = d.NeedWaterClass.Begin.ToString();
                this.txtNeedEnd.Text    = d.NeedWaterClass.End.ToString();
                this.txtNeedRemark.Text = d.NeedWaterClass.Reamrk.ToString();
                this.txtNeedAmount.Text = d.NeedWaterClass.NeedAmount.ToString();

                if (!d.IsNew())
                {
                    this.txtDistributeAmount.Text = d.DistributeAmount.ToString();
                    this.txtDistributeBegin.Text  = d.Begin.ToString();
                    this.txtDistributeEnd.Text    = d.End.ToString();
                    this.txtDistributeRemark.Text = d.Remark;

                    MasterPageHelper.SetTitle(this, Titles.DistributeItemEdit);
                }
            }
        }
Esempio n. 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            string s = null;

            if (this.DataEnum == DataEnum.WL)
            {
                s = Titles.DuringWL;
            }
            else if (this.DataEnum == DataEnum.Amount)
            {
                s = Titles.DuringAmount;
            }
            MasterPageHelper.SetTitle(this, s);
            //this.UCZedChart1.GraphPaneConfig = GetGraphPaneConfig();

            this.UCConditionDTTwo1.QueryEvent += new EventHandler(UCConditionDTTwo1_QueryEvent);
            // TODO: 2011-05-03 set title or title like lable
            //
            this.Page.Title = this.DataEnum.ToString() + "查询";

            if (!IsPostBack)
            {
                //this.UCChart1.Hide();
            }
        }
Esempio n. 4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            string t = null;

            if (this.DataEnum == DataEnum.Amount)
            {
                t = Titles.CompareAmount;
            }
            else if (this.DataEnum == DataEnum.WL)
            {
                t = Titles.CompareWL;
            }
            MasterPageHelper.SetTitle(this, t);
            // 2011-06-09
            //
            //object obj = H1;
            //obj = H2;

            this.UCCompareCondition1.QueryEvent += new EventHandler(UCCompareCondition1_QueryEvent);
            if (!IsPostBack)
            {
                //H1.GridViewConfig = GetGridViewConfig();
                //H2.GridViewConfig = GetGridViewConfig();
            }

            this.UCZedChart1.GraphPaneConfig = GetGraphPaneConfig();
        }
Esempio n. 5
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;
            }
        }
Esempio n. 6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            MasterPageHelper.SetTitle(this, Titles.NeedWaterNew);
            YongShuiGuanLiLib.ValidatorMessageCreater.CreateSQLDateTimeMessage(this.cvBegin);
            YongShuiGuanLiLib.ValidatorMessageCreater.CreateSQLDateTimeMessage(this.cvEnd);

            if (!IsPostBack)
            {
                int id = this.NeedWaterID;
                if (id != 0)
                {
                    NeedWaterClass need = NeedWaterClass.CreateByID(id);
                    this.txtBegin.Text      = need.Begin.ToString();
                    this.txtEnd.Text        = need.End.ToString();
                    this.txtUsedAmount.Text = need.NeedAmount.ToString();
                    this.txtRemark.Text     = need.Reamrk;
                    this.txtWaterUser.Text  = need.WaterUserClass.Name;

                    MasterPageHelper.SetTitle(this, Titles.NeedWaterEdit);
                }
                else
                {
                    WaterUserClass u = SessionManager.LoginSession.WaterUser;
                    if (u != null)
                    {
                        this.txtWaterUser.Text = u.Name;
                    }
                }
            }
        }
Esempio n. 7
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            MasterPageHelper.SetTitle(this, Titles.DuringWaterDefine);
            DataTable tbl = DuringWaterDBI.GetDuringDataTable();

            H.DataSource = tbl;
            H.Bind();
        }
Esempio n. 8
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     MasterPageHelper.SetTitle(this, "修改记录");
     if (!IsPostBack)
     {
         Query();
     }
 }
Esempio n. 9
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     MasterPageHelper.SetTitle(this, Titles.NeedDistribute);
     this.UCDTTwoOnly1.QueryEvent += new EventHandler(UCDTTwoOnly1_QueryEvent);
     if (!IsPostBack)
     {
     }
 }
Esempio n. 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string t = "雨情信息";

            MasterPageHelper.SetTitle(this, t);

            this.UCRain1.QueryEvent += new EventHandler(UCRain1_QueryEvent);
        }
Esempio n. 11
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     MasterPageHelper.SetTitle(this, Titles.NeedWaterLowLevel);
     this.UCChildWaterUserDTTwo1.QueryEvent += new EventHandler(UCChildWaterUserDTTwo1_QueryEvent);
     if (!IsPostBack)
     {
     }
 }
Esempio n. 12
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     MasterPageHelper.SetTitle(this, Titles.YearAmount);
     this.UCConditionYear1.QueryEvent += new EventHandler(UCConditionYear1_QueryEvent);
     if (!IsPostBack)
     {
     }
 }
Esempio n. 13
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     MasterPageHelper.SetTitle(this, "水费查询");
     this.UCFeeCondition1.QueryEvent += new EventHandler(UCFeeCondition1_QueryEvent);
     if (!IsPostBack)
     {
         ShowOrHideControls(false);
     }
 }
Esempio n. 14
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     MasterPageHelper.SetTitle(this, Titles.NeedWaterList);
     this.GridView1.RowDeleting   += new GridViewDeleteEventHandler(GridView1_RowDeleting);
     this.UCDTTwoOnly1.QueryEvent += new EventHandler(UCDTTwoOnly1_QueryEvent);
     if (!IsPostBack)
     {
         Bind();
     }
 }
Esempio n. 15
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     MasterPageHelper.SetTitle(this, "重新计算");
     this.UCCompareAmount1.QueryEvent += new EventHandler(UCCompareAmount1_QueryEvent);
     //this.UCCompareAmount1.
     if (!IsPostBack)
     {
         this.panelFormula.Visible   = false;
         this.panelNoFormula.Visible = false;
     }
 }
Esempio n. 16
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            MasterPageHelper.SetTitle(this, "水位增加");
            this.UCWLAdd1.IsSelectOneStation = true;
            this.UCWLAdd1.QueryEvent        += new EventHandler(UCWLAdd1_QueryEvent);

            if (!IsPostBack)
            {
                //this.UCWLAdd1.IsSelectAllStation = false;
                this.panelOpera.Visible = false;
            }
        }
Esempio n. 17
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            this.UCCompareAmount1.QueryEvent += new EventHandler(UCCompareAmount1_QueryEvent);
            MasterPageHelper.SetTitle(this, "水量对比");

            this.H.SortingDelegate = this.Query;

            if (!IsPostBack)
            {
                HideControls();
            }
        }
Esempio n. 18
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            string t = null;

            if (this.IsInsert())
            {
                t = "水费计收";
            }
            else
            {
                t = "水费修改";
            }
            MasterPageHelper.SetTitle(this, t);

            if (!IsPostBack)
            {
                YongShuiGuanLiLib.ValidatorMessageCreater.CreateSQLDateTimeMessage(
                    this.cvBegin);
                YongShuiGuanLiLib.ValidatorMessageCreater.CreateSQLDateTimeMessage(
                    this.cvEnd);

                this.cvName.Text         = "*";
                this.cvName.ErrorMessage = "收费名称不能为空";

                this.cvUnitPrice.Text         = "*";
                this.cvUnitPrice.ErrorMessage = "无效的数字";

                this.cvTotalPrice.Text         = "*";
                this.cvTotalPrice.ErrorMessage = "无效的数字";

                this.cvUsedTotal.Text         = "*";
                this.cvUsedTotal.ErrorMessage = "无效的数字";

                // wateruser bind
                //
                WaterUserClass wu = SessionManager.LoginSession.WaterUser;
                if (wu != null)
                {
                    WaterUserDataBinder.DataBind(wu, this.ddlWaterUser);
                }

                if (this.IsUpdate())
                {
                    DataTable tbl = FeeDBI.GetFeeDataTableWithFeeID(this.EditID);
                    if (tbl.Rows.Count > 0)
                    {
                        FillFeeInfo(tbl.Rows[0]);
                    }
                }
            }
        }
Esempio n. 19
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            string t = "闸门信息";

            MasterPageHelper.SetTitle(this, t);

            this.UCCompareAmount1.QueryEvent += new EventHandler(UCCompareAmount1_QueryEvent);
            //if (!IsPostBack)
            //{
            //    //this.UCCompareAmount1.BindStationCheckBoxList(new string[] { "XD221" });
            //    ////this.UCCompareAmount1.DeviceTypes = new string[] { "XD221", "xd221modbus" };
            //    //this.UCCompareAmount1.BindStationCheckBoxList(new string[] { "XD221", "xd221modbus" });
            //}
        }
Esempio n. 20
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     MasterPageHelper.SetTitle(this, Titles.WaterUser);
     if (!IsPostBack)
     {
         BindTree();
         TreeNode defaultTreeNode = null;
         if (this.TreeView1.Nodes.Count > 0)
         {
             defaultTreeNode = this.TreeView1.Nodes[0];
             BindWaterUserItem(defaultTreeNode);
         }
     }
 }
Esempio n. 21
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);
            }
        }
Esempio n. 22
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            MasterPageHelper.SetTitle(this, Titles.RealData);

            WaterUserClass wu = SessionManager.LoginSession.WaterUser;

            if (wu != null)
            {
                this.UCZedChart1.GraphPaneConfig = GetZedGraphConfig();
                this.UCZedChart1.DataSource      = wu.GetDitchDataRealDataTable();

                H.DataSourceDelegate = GetLastDataTable;
                if (!IsPostBack)
                {
                    Query();
                }
            }
        }
Esempio n. 23
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     MasterPageHelper.SetTitle(this, Titles.Project);
     if (!IsPostBack)
     {
         BindTree();
         TreeNode defaultTreeNode = null;
         if (this.TreeView1.Nodes.Count > 0)
         {
             defaultTreeNode = this.TreeView1.Nodes[0];
             BindChannelOrStation(defaultTreeNode);
         }
         else
         {
             this.UCChannel1.Visible = false;
             this.UCStation1.Visible = false;
         }
     }
 }
Esempio n. 24
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            string t = string.Empty;

            switch (this.DataEnum)
            {
            case DataEnum.WL:
                t = Titles.WL2Hour;
                break;

            case DataEnum.Flux:
                t = Titles.Flux2Hour;
                break;
            }
            MasterPageHelper.SetTitle(this, t);
            this.UCConditionDTOne1.QueryEvent += new EventHandler(UCConditionDTOne1_QueryEvent);

            if (!IsPostBack)
            {
            }
        }
Esempio n. 25
0
 protected void Page_Load(object sender, EventArgs e)
 {
     MasterPageHelper.SetTitle(this, "灌区概况");
     if (!Page.IsPostBack)
     {
         if (Request.Params.Count > 0)
         {
             if (int.Parse(Request.QueryString["para"].ToString()) > 0)
             {
                 txtBaseInfo.ReadOnly = false;
                 btnEdit.Visible      = true;
                 btnCancel.Visible    = true;
             }
         }
         this.txtBaseInfo.Width  = 900;
         this.txtBaseInfo.Height = 380;
         m_Path           = @"C:\Inetpub\wwwroot\BaseText.txt";
         m_sr             = new StreamReader(m_Path, System.Text.UnicodeEncoding.Default);
         txtBaseInfo.Text = m_sr.ReadToEnd();
         m_sr.Close();
     }
 }
Esempio n. 26
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
            {
            }
        }
Esempio n. 27
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            string t = null;

            if (this.DataEnum == DataEnum.WL)
            {
                t = Titles.YearWL;
            }
            else if (this.DataEnum == DataEnum.Amount)
            {
                t = Titles.YearAmount;
            }
            else if (this.DataEnum == DataEnum.Flux)
            {
                t = Titles.YearFlux;
            }
            MasterPageHelper.SetTitle(this, t);
            this.UCConditionYear1.QueryEvent += new EventHandler(UCConditionYear1_QueryEvent);

            //this.Title = DataEnumClass.GetDataEnumString(this.DataEnum);
            if (!IsPostBack)
            {
            }
        }
Esempio n. 28
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     MasterPageHelper.SetTitle(this, "应收实收统计");
     this.UCFeeCondition1.QueryEvent += new EventHandler(UCFeeCondition1_QueryEvent);
 }
Esempio n. 29
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     MasterPageHelper.SetTitle(this, "雨情对比");
     this.UCRain1.RealRangeTypeVisbile = false;
     this.UCRain1.QueryEvent          += new EventHandler(UCRain1_QueryEvent);
 }
Esempio n. 30
0
 protected void Page_Load(object sender, EventArgs e)
 {
     MasterPageHelper.SetTitle(this, "About");
     this.lblAbout.Text = "YongShuiGuanLiV2 V1.5.0.0";
 }