override protected void OnInit(EventArgs e)
        {
            //
            // CODEGEN: This call is required by the ASP.NET Web Form Designer.
            //
            InitializeComponent();
            base.OnInit(e);

            _media = new cms.businesslogic.media.Media(int.Parse(Request.QueryString["id"]));

            // Save media on first load
            bool exists = SqlHelper.ExecuteScalar <int>("SELECT COUNT(nodeId) FROM cmsContentXml WHERE nodeId = @nodeId",
                                                        SqlHelper.CreateParameter("@nodeId", _media.Id)) > 0;

            if (!exists)
            {
                _media.XmlGenerate(new XmlDocument());
            }


            tmp        = new controls.ContentControl(_media, controls.ContentControl.publishModes.NoPublish, "TabView1");
            tmp.Width  = Unit.Pixel(666);
            tmp.Height = Unit.Pixel(666);
            plc.Controls.Add(tmp);

            tmp.Save += new System.EventHandler(Save);
        }
Exemplo n.º 2
0
        protected void Save(object sender, System.EventArgs e)
        {
            // error handling test
            if (!Page.IsValid)
            {
                foreach (uicontrols.TabPage tp in tmp.GetPanels())
                {
                    tp.ErrorControl.Visible = true;
                    tp.ErrorHeader          = ui.Text("errorHandling", "errorHeader");
                    tp.CloseCaption         = ui.Text("close");
                }
            }
            else if (Page.IsPostBack)
            {
                // hide validation summaries
                foreach (uicontrols.TabPage tp in tmp.GetPanels())
                {
                    tp.ErrorControl.Visible = false;
                }
            }
            _media.Save();

            this.updateDateLiteral.Text = _media.VersionDate.ToShortDateString() + " " + _media.VersionDate.ToShortTimeString();
            this.UpdateMediaFileLinksLiteral();

            _media.XmlGenerate(new XmlDocument());
            ClientTools.SyncTree(_media.Path, true);
        }
Exemplo n.º 3
0
        //protected System.Web.UI.WebControls.Literal SyncPath;

        override protected void OnInit(EventArgs e)
        {
            //
            // CODEGEN: This call is required by the ASP.NET Web Form Designer.
            //
            InitializeComponent();
            base.OnInit(e);

            _media = new cms.businesslogic.media.Media(int.Parse(Request.QueryString["id"]));

            // Save media on first load
            bool exists = SqlHelper.ExecuteScalar <int>("SELECT COUNT(nodeId) FROM cmsContentXml WHERE nodeId = @nodeId",
                                                        SqlHelper.CreateParameter("@nodeId", _media.Id)) > 0;

            if (!exists)
            {
                _media.XmlGenerate(new XmlDocument());
            }


            tmp        = new controls.ContentControl(_media, controls.ContentControl.publishModes.NoPublish, "TabView1");
            tmp.Width  = Unit.Pixel(666);
            tmp.Height = Unit.Pixel(666);
            plc.Controls.Add(tmp);

            tmp.Save += new System.EventHandler(Save);

            this.updateDateLiteral.ID   = "updateDate";
            this.updateDateLiteral.Text = _media.VersionDate.ToShortDateString() + " " + _media.VersionDate.ToShortTimeString();

            this.mediaFileLinksLiteral.ID = "mediaFileLinks";
            mediaPropertiesPane.addProperty(ui.Text("content", "updateDate", base.getUser()), this.updateDateLiteral);

            this.UpdateMediaFileLinksLiteral();
            mediaPropertiesPane.addProperty(ui.Text("content", "mediaLinks"), this.mediaFileLinksLiteral);

            // add the property pane to the page rendering
            tmp.tpProp.Controls.AddAt(1, mediaPropertiesPane);
        }
Exemplo n.º 4
0
        protected override void OnInit(EventArgs e)
        {
            //
            // CODEGEN: This call is required by the ASP.NET Web Form Designer.
            //
            InitializeComponent();
            base.OnInit(e);

            _media = new cms.businesslogic.media.Media(int.Parse(Request.QueryString["id"]));

            // Save media on first load
            bool exists = SqlHelper.ExecuteScalar<int>("SELECT COUNT(nodeId) FROM cmsContentXml WHERE nodeId = @nodeId",
                                       SqlHelper.CreateParameter("@nodeId", _media.Id)) > 0;
            if (!exists)
                _media.XmlGenerate(new XmlDocument());

            tmp = new controls.ContentControl(_media,controls.ContentControl.publishModes.NoPublish, "TabView1");
            tmp.Width = Unit.Pixel(666);
            tmp.Height = Unit.Pixel(666);
            plc.Controls.Add(tmp);

            tmp.Save += new System.EventHandler(Save);
        }
Exemplo n.º 5
0
		//protected System.Web.UI.WebControls.Literal SyncPath;

        override protected void OnInit(EventArgs e)
        {
            //
            // CODEGEN: This call is required by the ASP.NET Web Form Designer.
            //
            InitializeComponent();
            base.OnInit(e);

            _media = new cms.businesslogic.media.Media(int.Parse(Request.QueryString["id"]));

            // Save media on first load
            bool exists = SqlHelper.ExecuteScalar<int>("SELECT COUNT(nodeId) FROM cmsContentXml WHERE nodeId = @nodeId",
                                       SqlHelper.CreateParameter("@nodeId", _media.Id)) > 0;
            if (!exists)
                _media.XmlGenerate(new XmlDocument());


            tmp = new controls.ContentControl(_media, controls.ContentControl.publishModes.NoPublish, "TabView1");
            tmp.Width = Unit.Pixel(666);
            tmp.Height = Unit.Pixel(666);
            plc.Controls.Add(tmp);

            tmp.Save += new System.EventHandler(Save);

            this.updateDateLiteral.ID = "updateDate";
            this.updateDateLiteral.Text = _media.VersionDate.ToShortDateString() + " " + _media.VersionDate.ToShortTimeString();

            this.mediaFileLinksLiteral.ID = "mediaFileLinks";
            mediaPropertiesPane.addProperty(ui.Text("content", "updateDate", base.getUser()), this.updateDateLiteral);

            this.UpdateMediaFileLinksLiteral();
            mediaPropertiesPane.addProperty(ui.Text("content", "mediaLinks"), this.mediaFileLinksLiteral);

            // add the property pane to the page rendering
            tmp.tpProp.Controls.AddAt(1, mediaPropertiesPane);                       
        }