public static ContactRestrictionCollection GetContactRestrictions(string sessionKey, ContactRestrictionType type) { return DoGetContactOptions(sessionKey, type); }
public ContactRestriction(int? id, string desc, ContactRestrictionType? type) { Id = id; Description = desc; Type = type; }
private static ContactRestrictionCollection DoGetContactOptions(string sessionKey, ContactRestrictionType? type) { string sRestrictionTypeValue = null; if (type.HasValue) { switch(type.Value) { case ContactRestrictionType.Mail: sRestrictionTypeValue = "M"; break; case ContactRestrictionType.Email: sRestrictionTypeValue = "E"; break; case ContactRestrictionType.Phone: sRestrictionTypeValue = "P"; break; } } return new ContactRestrictionCollection(UnsecureTess.GetContactOptions( sSessionKey: sessionKey, sRestrictionType: sRestrictionTypeValue ?? String.Empty).Tables[0]); }