Example #1
0
    public static void AddLanguageSwitchSettings(string SwitchType, bool ListTypeFlags, bool ListTypeName, bool ListTypeBoth, string ListAlign, bool EnableCarousel, string DropDownType, int PortalID, int UserModuleID)
    {
        List <LanguageSwitchKeyValue> lstSettings = new List <LanguageSwitchKeyValue>();

        lstSettings.Add(new LanguageSwitchKeyValue("SwitchType", SwitchType.ToString()));
        lstSettings.Add(new LanguageSwitchKeyValue("ListTypeFlag", ListTypeFlags.ToString()));
        lstSettings.Add(new LanguageSwitchKeyValue("ListTypeName", ListTypeName.ToString()));
        lstSettings.Add(new LanguageSwitchKeyValue("ListTypeBoth", ListTypeBoth.ToString()));
        lstSettings.Add(new LanguageSwitchKeyValue("ListAlign", ListAlign.ToString()));
        lstSettings.Add(new LanguageSwitchKeyValue("EnableCarousel", EnableCarousel.ToString()));
        lstSettings.Add(new LanguageSwitchKeyValue("DropDownType", DropDownType.ToString()));
        foreach (LanguageSwitchKeyValue obj in lstSettings)
        {
            obj.AddedBy  = "superuser";
            obj.IsActive = true;
        }
        try
        {
            LocaleController.AddLanguageSwitchSettings(lstSettings, UserModuleID, PortalID);
        }
        catch (Exception)
        {
            throw;
        }
    }