Example #1
0
        public bool UpdateComponent(Tz.Core.IComponent c)
        {
            var cc = new AppElement.AppComponent(this.ClientID, this.AppID, c.ComponentID);

            cc.Load();
            cc.Component.ComponentName = c.ComponentName;
            cc.Component.Category      = c.Category;
            cc.Component.Title         = c.Title;
            cc.Component.TitleFormat   = c.TitleFormat;

            var a = new Tz.Core.ComponentManager(cc.Component);

            return(a.UpdateComponent());
        }
Example #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="c"></param>
        /// <returns></returns>
        public bool SaveComponent(Tz.Core.IComponent c)
        {
            var    a      = new Tz.Core.ComponentManager(c);
            string compID = a.SaveComponent();

            if (compID != "")
            {
                var cc = new AppElement.AppComponent(this.ClientID, this.AppID, compID);
                this.Components.Add(cc);
                if (cc.Assign())
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                return(false);
            }
        }