Ejemplo n.º 1
0
        public static void UpdatePortalHelpUrlStep(IOfficeProfile officeprofile, String portalName, String helpUrl)
        {
            string key = officeprofile.Id.ToString() + "|" + portalName + "HelpUrl";

            MySlx.Data.RemoveFromCache(key);


            var            factory = EntityFactory.GetRepository <ICustomSetting>();
            ICustomSetting setting = factory.FindFirstByProperty("Description", key);

            if (setting != null)
            {
                setting.DataValue = helpUrl;
            }
            else
            {
                setting                = EntityFactory.Create <ICustomSetting>();
                setting.Description    = key;
                setting.Category       = "HelpUrl";
                setting.DataValue      = helpUrl;
                setting.DataType       = "Other";
                setting.DataValidation = "Any Characters";
            }

            setting.Save();
        }