protected void btnYtSave_Click(object sender, EventArgs e)
        {
            //string curlan = (Page as DotNetNuke.Framework.PageBase).PageCulture.Name;
            //int pluggid = Convert.ToInt32(((DotNetNuke.Framework.CDefault)this.Page).Title);
            //PluggContainer p = new PluggContainer(curlan, pluggid);

            //List<PluggComponent> comps = p.GetComponentList();

            //BaseHandler bh = new BaseHandler();

            //List<object> objToadd = new List<object>();
            BaseHandler bh = new BaseHandler();
            YouTube yt = bh.GetYouTubeByComponentId(YouTubeId);
            if (yt == null)
                yt = new YouTube();
            try
            {
                yt.YouTubeTitle = yttitle.Value;
                yt.YouTubeDuration = Convert.ToInt32(ytduration.Value);
                yt.YouTubeCode = ytYouTubeCode.Value;
                yt.YouTubeAuthor = ytAuthor.Value;
                yt.YouTubeCreatedOn = Convert.ToDateTime(ytYouTubeCreatedOn.Value);
                yt.YouTubeComment = ytYouTubeComment.Value;
                yt.PluggComponentId = YouTubeId;
            }
            catch
            {

            }

            bh.SaveYouTube(yt);
        }
 protected void btnSave_Click(object sender, EventArgs e)
 {
     BaseHandler bh = new BaseHandler();
     YouTube yt = bh.GetYouTubeByComponentId(PluggComponentId);
     if (yt == null)
         yt = new YouTube();
     yt.YouTubeTitle = yttitle.Value;
     yt.YouTubeDuration = Convert.ToInt32(ytduration.Value);
     yt.YouTubeCode = ytYouTubeCode.Value;
     yt.YouTubeAuthor = ytAuthor.Value;
     yt.YouTubeCreatedOn = Convert.ToDateTime(ytYouTubeCreatedOn.Value);
     yt.YouTubeComment = ytYouTubeComment.Value;
     yt.PluggComponentId = PluggComponentId;
     bh.SaveYouTube(yt);
     Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(TabId, "", "edit=0", AttachQS));
 }
Exemplo n.º 3
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            List<PluggComponent> comps = this.PluggContainer.GetComponentList();

            BaseHandler bh = new BaseHandler();
            List<object> objToadd = new List<object>();
            Plugghest.Base2.YouTube yt = bh.GetYouTubeByComponentId(this.ComponentID);
            if (yt == null)
                yt = new Plugghest.Base2.YouTube();
            try
            {
                yt.YouTubeTitle = yttitle.Value;
                yt.YouTubeDuration = Convert.ToInt32(ytduration.Value);
                yt.YouTubeCode = ytYouTubeCode.Value;
                yt.YouTubeAuthor = ytAuthor.Value;
                yt.YouTubeCreatedOn = Convert.ToDateTime(ytYouTubeCreatedOn.Value);
                yt.YouTubeComment = ytYouTubeComment.Value;
                yt.PluggComponentId = this.ComponentID;
            }
            catch
            {

            }

            bh.SaveYouTube(yt);

            Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(this.TabID, "", new string[] { "edit=1", "language=" + this.CurrentLanguage }));
        }
Exemplo n.º 4
0
        protected void btnYtSave_Click(object sender, EventArgs e)
        {
            var id = hdnlabel.Value;
            var itemid = Convert.ToInt32(id);

            List<PluggComponent> comps = p.GetComponentList();

            BaseHandler bh = new BaseHandler();

            List<object> objToadd = new List<object>();

            YouTube yt = bh.GetYouTubeByComponentId(Convert.ToInt32(id));
            if (yt == null)
                yt = new YouTube();
            try
            {
                yt.YouTubeTitle = yttitle.Value;
                yt.YouTubeDuration = Convert.ToInt32(ytduration.Value);
                yt.YouTubeCode = ytYouTubeCode.Value;
                yt.YouTubeAuthor = ytAuthor.Value;
                yt.YouTubeCreatedOn = Convert.ToDateTime(ytYouTubeCreatedOn.Value);
                yt.YouTubeComment = ytYouTubeComment.Value;
                yt.PluggComponentId = itemid;
            }
            catch
            {

            }

            bh.SaveYouTube(yt);

            Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(TabId, "", new string[] { "edit=1", "language=" + curlan }));
        }