예제 #1
0
 /// <summary>
 /// Gets the selected value.
 /// </summary>
 /// <param name="personProperty">The person property.</param>
 /// <returns></returns>
 public PersonPropertyValue GetSelectedValue(PersonProperty personProperty)
 {
     if (personProperty != null)
     {
         return(personProperty.Values.Where(v => v.Selected).FirstOrDefault());
     }
     return(null);
 }
예제 #2
0
        public PersonProperty GetProperty(string key, bool createIfNotFound = false, string label = "")
        {
            var property = Properties.Where(p => p.Key.Equals(key, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();

            if (property == null && createIfNotFound)
            {
                if (label == string.Empty)
                {
                    label = key.SplitCase();
                }

                property = new PersonProperty(key, label);
                Properties.Add(property);
            }

            return(property);
        }
예제 #3
0
 /// <summary>
 /// Gets the selected value.
 /// </summary>
 /// <param name="personProperty">The person property.</param>
 /// <returns></returns>
 public PersonPropertyValue GetSelectedValue( PersonProperty personProperty )
 {
     if ( personProperty != null )
     {
         return personProperty.Values.Where( v => v.Selected ).FirstOrDefault();
     }
     return null;
 }
예제 #4
0
        public PersonProperty GetProperty( string key, bool createIfNotFound = false, string label = "" )
        {
            var property = Properties.Where( p => p.Key.Equals( key, StringComparison.OrdinalIgnoreCase ) ).FirstOrDefault();
            if ( property == null && createIfNotFound )
            {
                if ( label == string.Empty )
                {
                    label = key.SplitCase();
                }

                property = new PersonProperty( key, label );
                Properties.Add( property );
            }

            return property;
        }