/// <summary> /// Gets the setting by name. /// </summary> /// <returns></returns> public static SettingsDto GetSettingByName(SettingsNames settingName) { SettingsDto dto = null; // Load the object if (dto == null) { CommonSettingsAdmin admin = new CommonSettingsAdmin(); admin.LoadBySettingName(settingName.ToString()); dto = admin.CurrentDto; } dto.AcceptChanges(); return(dto); }
/// <summary> /// Gets the setting by id. /// </summary> /// <returns></returns> public static SettingsDto GetSettingById(int settingId) { SettingsDto dto = null; // Load the object if (dto == null) { CommonSettingsAdmin admin = new CommonSettingsAdmin(); admin.LoadBySettingId(settingId); dto = admin.CurrentDto; } dto.AcceptChanges(); return(dto); }