예제 #1
0
        public static void AddOrUpdateCellPhoneNumber(Rock.Client.Person person, Rock.Client.PhoneNumber phoneNumber, bool isNew, int modifiedById, HttpRequest.RequestResult resultHandler)
        {
            // update the phone number
            phoneNumber.PersonId          = person.Id;
            phoneNumber.NumberTypeValueId = CellPhoneValueId;

            // now we can upload it.
            if (isNew)
            {
                // set the required values for a new phone number
                phoneNumber.Guid = Guid.NewGuid( );
                RockApi.Post_PhoneNumbers(phoneNumber, modifiedById, resultHandler);
            }
            else
            {
                // or just update the existing number
                RockApi.Put_PhoneNumbers(phoneNumber, modifiedById, resultHandler);
            }
        }