コード例 #1
0
ファイル: pCQItem.aspx.cs プロジェクト: wwkkww1983/yh
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int id = this.StationID;
         if (id > 0)
         {
             StationClass station = StationFactory.CreateStationByStationID(id);
             this.txtOldStationName.Text = station.StationName;
         }
     }
 }
コード例 #2
0
ファイル: pProject.aspx.cs プロジェクト: wwkkww1983/yh
        /// <summary>
        ///
        /// </summary>
        private void BindChannelOrStation(TreeNode selected)
        {
            if (IsChannelTreeNode(selected))
            {
                int          channelID = GetSelectedID(selected);
                ChannelClass c         = ChannelFactory.CreateChannel(channelID);
                this.UCChannel1.Bind(c);

                this.UCChannel1.Visible = true;
                this.UCStation1.Visible = false;
            }
            else
            {
                int          stationID = GetSelectedID(selected);
                StationClass s         = StationFactory.CreateStationByStationID(stationID);
                this.UCStation1.Bind(s);

                this.UCChannel1.Visible = false;
                this.UCStation1.Visible = true;
            }
        }
コード例 #3
0
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        private bool DistributeQueryStringParam_Real()
        {
            string[] paramNames = new string[] { QueryStringNames.StationID };
            Type[]   paramTypes = new Type[] { typeof(int) };

            object [] result;
            bool      b = QueryStringParamPicker.Pick(this.Request.QueryString, paramNames, paramTypes,
                                                      out result);

            if (b)
            {
                int stationid = (int)result[0];
                this.UCConditionDTTwo1.WaterUser = SessionManager.LoginSession.WaterUser;

                StationClass      sc       = StationFactory.CreateStationByStationID(stationid);
                StationCollection stations = new StationCollection();
                stations.Add(sc);
                this.UCConditionDTTwo1.Stations = stations;
                this.UCConditionDTTwo1.Begin    = DateTime.Now.Date;
                this.UCConditionDTTwo1.End      = DateTime.Now.Date + TimeSpan.FromDays(1d);
                return(true);
            }
            return(false);
        }