Exemple #1
0
        public static void GetPhoneNumberByGuid(Guid guid, HttpRequest.RequestResult <Rock.Client.PhoneNumber> resultHandler)
        {
            string oDataFilter = string.Format("?$filter=Guid eq guid'{0}'", guid.ToString( ));

            RockApi.Get_PhoneNumbers <List <Rock.Client.PhoneNumber> >(oDataFilter, delegate(HttpStatusCode statusCode, string statusDescription, List <Rock.Client.PhoneNumber> model)
            {
                Rock.Client.PhoneNumber returnPhoneNumber = null;

                if (Rock.Mobile.Network.Util.StatusInSuccessRange(statusCode) == true && model != null && model.Count > 0)
                {
                    returnPhoneNumber = model[0];
                }

                resultHandler(statusCode, statusDescription, returnPhoneNumber);
            });
        }