Example #1
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            this._remoteContentModule = base.Module as RemoteContentModule;
            this.btnCancel.Attributes.Add("onclick", String.Format("document.location.href='AdminRemoteContent.aspx{0}'", base.GetBaseQueryString()));

            if (Request.QueryString["FeedId"] != null)
            {
                int feedId = Int32.Parse(Request.QueryString["FeedId"]);
                if (feedId > 0)
                {
                    this._feed = this._remoteContentModule.GetFeedById(feedId);
                    if (!this.IsPostBack)
                    {
                        BindFeed();
                    }
                    this.btnSave.Enabled   = true;
                    this.btnDelete.Visible = true;
                    this.btnDelete.Attributes.Add("onclick", "return confirm('Are you sure?');");
                }
                else
                {
                    this._feed           = new Feed();
                    this.btnSave.Enabled = false;
                }
            }
        }
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (! this.IsPostBack && ! base.HasCachedOutput)
     {
         this._module = base.Module as RemoteContentModule;
         this.rptFeedItems.DataSource = this._module.GetAllFeedItems();
         this.rptFeedItems.DataBind();
     }
 }
Example #3
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!this.IsPostBack && !base.HasCachedOutput)
     {
         this._module = base.Module as RemoteContentModule;
         this.rptFeedItems.DataSource = this._module.GetAllFeedItems();
         this.rptFeedItems.DataBind();
     }
 }
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // The base page has already created the module, we only have to cast it here to the right type.
            this._remoteContentModule = base.Module as RemoteContentModule;
            this.btnNew.Attributes.Add("onclick", String.Format("document.location.href='EditFeed.aspx{0}&FeedId=-1'", base.GetBaseQueryString()));

            if (! this.IsPostBack)
            {
                BindFeeds();
            }
        }
Example #5
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // The base page has already created the module, we only have to cast it here to the right type.
            this._remoteContentModule = base.Module as RemoteContentModule;
            this.btnNew.Attributes.Add("onclick", String.Format("document.location.href='EditFeed.aspx{0}&FeedId=-1'", base.GetBaseQueryString()));

            if (!this.IsPostBack)
            {
                BindFeeds();
            }
        }
Example #6
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            this._remoteContentModule = base.Module as RemoteContentModule;
            this.btnCancel.Attributes.Add("onclick", String.Format("document.location.href='AdminRemoteContent.aspx{0}'", base.GetBaseQueryString()));

            if (Request.QueryString["FeedId"] != null)
            {
                int feedId = Int32.Parse(Request.QueryString["FeedId"]);
                if (feedId > 0)
                {
                    this._feed = this._remoteContentModule.GetFeedById(feedId);
                    if (! this.IsPostBack)
                    {
                        BindFeed();
                    }
                    this.btnSave.Enabled = true;
                    this.btnDelete.Visible = true;
                    this.btnDelete.Attributes.Add("onclick", "return confirm('Are you sure?');");
                }
                else
                {
                    this._feed = new Feed();
                    this.btnSave.Enabled = false;
                }
            }
        }