Exemplo n.º 1
0
 /// <summary>
 /// Sets the value of an attribute key in memory.  Note, this will not persist value to database
 /// </summary>
 /// <param name="entity">The entity.</param>
 /// <param name="key">The key.</param>
 /// <param name="value">The value.</param>
 public static void SetAttributeValue(this Rock.Attribute.IHasAttributes entity, string key, DateTime?value)
 {
     if (value.HasValue)
     {
         entity.SetAttributeValue(key, value.Value.ToString("o"));
     }
     else
     {
         entity.SetAttributeValue(key, string.Empty);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Sets the value of an attribute key in memory.  Note, this will not persist value to database
 /// </summary>
 /// <param name="entity">The entity.</param>
 /// <param name="key">The key.</param>
 /// <param name="value">The value.</param>
 public static void SetAttributeValue(this Rock.Attribute.IHasAttributes entity, string key, Guid?value)
 {
     entity.SetAttributeValue(key, value.ToString());
 }