public static void PortletEditCSSUpdate(string idPortlet, string css)
        {
            Guid id = new Guid(idPortlet);
            PortletInstanceInPanel pip = PanelInPageList.Search(id);

            pip.Style = css;
            pip.Update();
        }
        public static string PortletEditCSSGet(string idPortlet)
        {
            string result = string.Empty;
            Guid   id     = new Guid(idPortlet);

            result = PanelInPageList.Search(id).Style;
            return(result);
        }
        public static string PanelStyleUpdate(int idPanel, string style)
        {
            PanelInPage pip = PanelInPageList.Search(PSCPortal.Engine.Panel.Parse(idPanel));

            pip.Style = style;
            pip.Update();
            return(pip.Panel.ToString());
        }
        public static string PanelStyleGet(int idPanel)
        {
            string      result = string.Empty;
            PanelInPage pip    = PanelInPageList.Search(PSCPortal.Engine.Panel.Parse(idPanel));

            result = pip.Style;
            return(result);
        }
        public static void PortletInstanceReferenceAdd(string portletId, int idPanel)
        {
            Guid                   idPortletInstance = new Guid(portletId);
            PortletInstance        pi  = PortletInstance.GetPortletInstance(idPortletInstance);
            PortletInstanceInPanel pip = new PortletInstanceInPanel();

            pip.PortletInstance = pi;
            pip.Style           = string.Empty;
            PanelInPageList.Search(PSCPortal.Engine.Panel.Parse(idPanel)).Portlets.AddDB(pip);
        }
        public static string PortletInstanceAdd(string idPortlet, string name, int idPanel)
        {
            Guid            id   = new Guid(idPortlet);
            PortletInstance pi   = new PortletInstance(PortletList.Where(p => p.Id == id).Single(), name);
            string          path = pi.Portlet.DisplayURL;

            if (System.IO.File.Exists(HttpContext.Current.Server.MapPath(path)))
            {
                PortletInstanceInPanel pip = new PortletInstanceInPanel();
                pip.PortletInstance = pi;
                PanelInPageList.Search(PSCPortal.Engine.Panel.Parse(idPanel)).Portlets.AddDB(pip);
                return("");
            }
            else
            {
                return(string.Format("Đường dẫn '{0}' Portlet '{1}' không tồn tại", pi.Portlet.DisplayURL, pi.Portlet.Name));
            }
        }
 public static void PanelRemove(int idPanel)
 {
     PanelInPageList.RemoveDB(PanelInPageList.Search(PSCPortal.Engine.Panel.Parse(idPanel)));
 }