Ejemplo n.º 1
0
 public void UpdatePortalAliasInfo(PortalAliasInfo objPortalAliasInfo)
 {
     DataCache.RemoveCache(DataCache.PortalAliasCacheKey);
     DataProvider.Instance().UpdatePortalAliasInfo(objPortalAliasInfo.PortalAliasID, objPortalAliasInfo.PortalID, objPortalAliasInfo.HTTPAlias.ToLower(), UserController.GetCurrentUserInfo().UserID);
     Services.Log.EventLog.EventLogController objEventLog = new Services.Log.EventLog.EventLogController();
     objEventLog.AddLog(objPortalAliasInfo, PortalController.GetCurrentPortalSettings(), UserController.GetCurrentUserInfo().UserID, "", CommonLibrary.Services.Log.EventLog.EventLogController.EventLogType.PORTALALIAS_UPDATED);
 }
Ejemplo n.º 2
0
        public static PortalAliasInfo GetPortalAliasInfo(string PortalAlias)
        {
            string          strPortalAlias;
            PortalAliasInfo objPortalAliasInfo = GetPortalAliasLookup(PortalAlias.ToLower());

            if (objPortalAliasInfo == null)
            {
                if (PortalAlias.ToLower().StartsWith("www."))
                {
                    strPortalAlias = PortalAlias.Replace("www.", "");
                }
                else
                {
                    strPortalAlias = string.Concat("www.", PortalAlias);
                }
                objPortalAliasInfo = GetPortalAliasLookup(strPortalAlias.ToLower());
            }
            if (objPortalAliasInfo == null)
            {
                if (PortalAlias.IndexOf(".") != -1)
                {
                    strPortalAlias = PortalAlias.Substring(PortalAlias.IndexOf(".") + 1);
                }
                else
                {
                    strPortalAlias = PortalAlias;
                }
                if (objPortalAliasInfo == null)
                {
                    objPortalAliasInfo = GetPortalAliasLookup("*." + strPortalAlias.ToLower());
                }
                if (objPortalAliasInfo == null)
                {
                    objPortalAliasInfo = GetPortalAliasLookup(strPortalAlias.ToLower());
                }
                if (objPortalAliasInfo == null)
                {
                    objPortalAliasInfo = GetPortalAliasLookup("www." + strPortalAlias.ToLower());
                }
            }
            if (objPortalAliasInfo == null)
            {
                PortalAliasCollection objPortalAliasCollection = GetPortalAliasLookup();
                if (!objPortalAliasCollection.HasKeys || (objPortalAliasCollection.Count == 1 && objPortalAliasCollection.Contains("_default")))
                {
                    DataProvider.Instance().UpdatePortalAlias(PortalAlias.ToLower(), UserController.GetCurrentUserInfo().UserID);
                    Services.Log.EventLog.EventLogController objEventLog = new Services.Log.EventLog.EventLogController();
                    objEventLog.AddLog("PortalAlias", PortalAlias.ToString(), PortalController.GetCurrentPortalSettings(), UserController.GetCurrentUserInfo().UserID, CommonLibrary.Services.Log.EventLog.EventLogController.EventLogType.PORTALALIAS_UPDATED);
                    DataCache.RemoveCache("GetPortalByAlias");
                    objPortalAliasInfo = GetPortalAliasLookup(PortalAlias.ToLower());
                }
            }
            return(objPortalAliasInfo);
        }
Ejemplo n.º 3
0
        public PortalSettings(int tabID, PortalAliasInfo objPortalAliasInfo)
        {
            _ActiveTab  = new TabInfo();
            PortalId    = objPortalAliasInfo.PortalID;
            PortalAlias = objPortalAliasInfo;
            PortalController controller = new PortalController();
            PortalInfo       portal     = controller.GetPortal(PortalId);

            if (portal != null)
            {
                GetPortalSettings(tabID, portal);
            }
        }
Ejemplo n.º 4
0
        public static string GetPortalAliasByPortal(int PortalId, string PortalAlias)
        {
            string retValue = "";
            PortalAliasCollection objPortalAliasCollection = PortalAliasController.GetPortalAliasLookup();
            string          strHTTPAlias;
            bool            bFound             = false;
            PortalAliasInfo objPortalAliasInfo = objPortalAliasCollection[PortalAlias.ToLower()];

            if (objPortalAliasInfo != null)
            {
                if (objPortalAliasInfo.PortalID == PortalId)
                {
                    retValue = objPortalAliasInfo.HTTPAlias;
                    bFound   = true;
                }
            }
            if (!bFound)
            {
                foreach (string key in objPortalAliasCollection.Keys)
                {
                    objPortalAliasInfo = objPortalAliasCollection[key];
                    strHTTPAlias       = objPortalAliasInfo.HTTPAlias.ToLower();
                    if (strHTTPAlias.StartsWith(PortalAlias.ToLower()) == true && objPortalAliasInfo.PortalID == PortalId)
                    {
                        retValue = objPortalAliasInfo.HTTPAlias;
                        break;
                    }
                    if (strHTTPAlias.StartsWith("www."))
                    {
                        strHTTPAlias = strHTTPAlias.Replace("www.", "");
                    }
                    else
                    {
                        strHTTPAlias = string.Concat("www.", strHTTPAlias);
                    }
                    if (strHTTPAlias.StartsWith(PortalAlias.ToLower()) == true && objPortalAliasInfo.PortalID == PortalId)
                    {
                        retValue = objPortalAliasInfo.HTTPAlias;
                        break;
                    }
                }
            }
            return(retValue);
        }
Ejemplo n.º 5
0
        public PortalAliasCollection GetPortalAliasByPortalID(int PortalID)
        {
            IDataReader dr = DataProvider.Instance().GetPortalAliasByPortalID(PortalID);

            try
            {
                PortalAliasCollection objPortalAliasCollection = new PortalAliasCollection();
                while (dr.Read())
                {
                    PortalAliasInfo objPortalAliasInfo = new PortalAliasInfo();
                    objPortalAliasInfo.PortalAliasID = Convert.ToInt32(dr["PortalAliasID"]);
                    objPortalAliasInfo.PortalID      = Convert.ToInt32(dr["PortalID"]);
                    objPortalAliasInfo.HTTPAlias     = Convert.ToString(dr["HTTPAlias"]);
                    objPortalAliasCollection.Add(Convert.ToString(dr["HTTPAlias"]).ToLower(), objPortalAliasInfo);
                }
                return(objPortalAliasCollection);
            }
            finally
            {
                CBO.CloseDataReader(dr, true);
            }
        }
Ejemplo n.º 6
0
        public ArrayList GetPortalAliasArrayByPortalID(int PortalID)
        {
            IDataReader dr = DataProvider.Instance().GetPortalAliasByPortalID(PortalID);

            try
            {
                ArrayList arr = new ArrayList();
                while (dr.Read())
                {
                    PortalAliasInfo objPortalAliasInfo = new PortalAliasInfo();
                    objPortalAliasInfo.PortalAliasID = Convert.ToInt32(dr["PortalAliasID"]);
                    objPortalAliasInfo.PortalID      = Convert.ToInt32(dr["PortalID"]);
                    objPortalAliasInfo.HTTPAlias     = Convert.ToString(dr["HTTPAlias"]).ToLower();
                    arr.Add(objPortalAliasInfo);
                }
                return(arr);
            }
            finally
            {
                CBO.CloseDataReader(dr, true);
            }
        }
Ejemplo n.º 7
0
 public void Add(String key, PortalAliasInfo value)
 {
     this.Dictionary.Add(key, value);
 }
 public PortalAliasCollection GetPortalAliasByPortalID(int PortalID)
 {
     IDataReader dr = DataProvider.Instance().GetPortalAliasByPortalID(PortalID);
     try
     {
         PortalAliasCollection objPortalAliasCollection = new PortalAliasCollection();
         while (dr.Read())
         {
             PortalAliasInfo objPortalAliasInfo = new PortalAliasInfo();
             objPortalAliasInfo.PortalAliasID = Convert.ToInt32(dr["PortalAliasID"]);
             objPortalAliasInfo.PortalID = Convert.ToInt32(dr["PortalID"]);
             objPortalAliasInfo.HTTPAlias = Convert.ToString(dr["HTTPAlias"]);
             objPortalAliasCollection.Add(Convert.ToString(dr["HTTPAlias"]).ToLower(), objPortalAliasInfo);
         }
         return objPortalAliasCollection;
     }
     finally
     {
         CBO.CloseDataReader(dr, true);
     }
 }
 public void UpdatePortalAliasInfo(PortalAliasInfo objPortalAliasInfo)
 {
     DataCache.RemoveCache(DataCache.PortalAliasCacheKey);
     DataProvider.Instance().UpdatePortalAliasInfo(objPortalAliasInfo.PortalAliasID, objPortalAliasInfo.PortalID, objPortalAliasInfo.HTTPAlias.ToLower(), UserController.GetCurrentUserInfo().UserID);
     Services.Log.EventLog.EventLogController objEventLog = new Services.Log.EventLog.EventLogController();
     objEventLog.AddLog(objPortalAliasInfo, PortalController.GetCurrentPortalSettings(), UserController.GetCurrentUserInfo().UserID, "", CommonLibrary.Services.Log.EventLog.EventLogController.EventLogType.PORTALALIAS_UPDATED);
 }
 public ArrayList GetPortalAliasArrayByPortalID(int PortalID)
 {
     IDataReader dr = DataProvider.Instance().GetPortalAliasByPortalID(PortalID);
     try
     {
         ArrayList arr = new ArrayList();
         while (dr.Read())
         {
             PortalAliasInfo objPortalAliasInfo = new PortalAliasInfo();
             objPortalAliasInfo.PortalAliasID = Convert.ToInt32(dr["PortalAliasID"]);
             objPortalAliasInfo.PortalID = Convert.ToInt32(dr["PortalID"]);
             objPortalAliasInfo.HTTPAlias = Convert.ToString(dr["HTTPAlias"]).ToLower();
             arr.Add(objPortalAliasInfo);
         }
         return arr;
     }
     finally
     {
         CBO.CloseDataReader(dr, true);
     }
 }
 public void Add(String key, PortalAliasInfo value)
 {
     this.Dictionary.Add(key, value);
 }
Ejemplo n.º 12
0
 public static PortalSettings GetHostPortalSettings()
 {
     int TabId = -1;
     int PortalId = -1;
     PortalAliasInfo objPortalAliasInfo = null;
     if (Host.HostPortalID > Null.NullInteger)
     {
         PortalId = Host.HostPortalID;
         objPortalAliasInfo = new PortalAliasInfo();
         objPortalAliasInfo.PortalID = PortalId;
     }
     return new PortalSettings(TabId, objPortalAliasInfo);
 }
Ejemplo n.º 13
0
 public PortalSettings(int tabID, PortalAliasInfo objPortalAliasInfo)
 {
     _ActiveTab = new TabInfo();
     PortalId = objPortalAliasInfo.PortalID;
     PortalAlias = objPortalAliasInfo;
     PortalController controller = new PortalController();
     PortalInfo portal = controller.GetPortal(PortalId);
     if (portal != null)
     {
         GetPortalSettings(tabID, portal);
     }
 }
 public void AddPortalAlias(int PortalId, string PortalAlias)
 {
     PortalAliasController objPortalAliasController = new PortalAliasController();
     PortalAliasInfo objPortalAliasInfo = objPortalAliasController.GetPortalAlias(PortalAlias, PortalId);
     if (objPortalAliasInfo == null)
     {
         objPortalAliasInfo = new PortalAliasInfo();
         objPortalAliasInfo.PortalID = PortalId;
         objPortalAliasInfo.HTTPAlias = PortalAlias;
         objPortalAliasController.AddPortalAlias(objPortalAliasInfo);
     }
 }