Пример #1
0
        public static void UpdateOrAddPersonAttribute(int personId, string key, string value, HttpRequest.RequestResult resultHandler)
        {
            string urlEncodedValue = System.Net.WebUtility.UrlEncode(value);
            string oDataFilter     = string.Format("/{0}?attributeKey={1}&attributeValue={2}", personId, key, urlEncodedValue);

            if (string.IsNullOrWhiteSpace(value))
            {
                RockApi.Delete_People_AttributeValue(oDataFilter, resultHandler);
            }
            else
            {
                RockApi.Post_People_AttributeValue(oDataFilter, resultHandler);
            }
        }