Beispiel #1
0
 /// <summary>
 /// Gets an option set value's int value based on its text value.
 /// </summary>
 /// <param name="settings">The settings.</param>
 /// <param name="optionSetName">Name of the option set.</param>
 /// <param name="optionTextValue">The text value of the OptionSetValue.</param>
 /// <returns></returns>
 public static int GetOptionValue(this CrmService settings, string optionSetName, string optionTextValue)
 {
     return(settings.GetOption(optionSetName, optionTextValue).Value.GetValueOrDefault());
 }
Beispiel #2
0
 /// <summary>
 /// Gets an option set value's text value based on its int value.
 /// </summary>
 /// <param name="settings">The settings.</param>
 /// <param name="optionSetName">Name of the option set.</param>
 /// <param name="value">The int value of the OptionSetValue.</param>
 /// <returns></returns>
 public static string GetOptionText(this CrmService settings, string optionSetName, int value)
 {
     return(settings.GetOption(optionSetName, value).GetText());
 }