/// <summary> /// Create a new SystemSettings object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="sendReminder">Initial value of the SendReminder property.</param> public static SystemSettings CreateSystemSettings(global::System.Int32 id, global::System.Boolean sendReminder) { SystemSettings systemSettings = new SystemSettings(); systemSettings.Id = id; systemSettings.SendReminder = sendReminder; return systemSettings; }
public static bool Validate(SystemSettings entity) { if (entity.SendReminder) { if (string.IsNullOrEmpty(entity.ReminderText.Trim())) { Methods.ShowStandardMsgBox(FormMessageType.Error, RscError.ValidationTitle, RscError.SystemSettingsReminderTextNull); return false; } else if (string.IsNullOrEmpty(entity.SmsPassword.Trim()) || string.IsNullOrEmpty(entity.SmsUsername.Trim())) { Methods.ShowStandardMsgBox(FormMessageType.Error, RscError.ValidationTitle, RscError.SystemSettingsUserPassNull); return false; } } return true; }
/// <summary> /// Deprecated Method for adding a new object to the SystemSettings EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToSystemSettings(SystemSettings systemSettings) { base.AddObject("SystemSettings", systemSettings); }