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

            pip.Style = css;
            pip.Update();
        }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
        public static string PortletEditCSSGet(string idPortlet)
        {
            string result = string.Empty;
            Guid   id     = new Guid(idPortlet);

            result = PanelInPageList.Search(id).Style;
            return(result);
        }
Ejemplo n.º 4
0
        public static string PanelStyleGet(int idPanel)
        {
            string      result = string.Empty;
            PanelInPage pip    = PanelInPageList.Search(PSCPortal.Engine.Panel.Parse(idPanel));

            result = pip.Style;
            return(result);
        }
Ejemplo n.º 5
0
        protected void lbtAddPanel_Click(object sender, EventArgs e)
        {
            int         idPanel = int.Parse(ddlPanel.SelectedValue);
            PanelInPage pip     = new PanelInPage();

            pip.Panel = PanelList.Search(PSCPortal.Engine.Panel.Parse(idPanel));
            PanelInPageList.AddDB(pip);
        }
Ejemplo n.º 6
0
        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));
            }
        }
Ejemplo n.º 7
0
 public static void PortletRemove(string idPortlet)
 {
     PanelInPageList.PortletRemoveDB(new Guid(idPortlet));
 }
Ejemplo n.º 8
0
 public static void PanelRemove(int idPanel)
 {
     PanelInPageList.RemoveDB(PanelInPageList.Search(PSCPortal.Engine.Panel.Parse(idPanel)));
 }