Exemple #1
0
 static void UpdateFamilyAddress(Rock.Client.Group family, Rock.Client.GroupLocation address, List <KeyValuePair <string, string> > attributes, HttpRequest.RequestResult resultHandler)
 {
     // is there an address?
     if (address != null)
     {
         ApplicationApi.UpdateFamilyAddress(family, address,
                                            delegate(System.Net.HttpStatusCode statusCode, string statusDescription)
         {
             // if it updated ok, go to family attributes
             if (Rock.Mobile.Network.Util.StatusInSuccessRange(statusCode))
             {
                 UpdateFamilyAttributes(family, address, attributes, resultHandler);
             }
             // address failed
             else
             {
                 resultHandler(statusCode, statusDescription);
             }
         });
     }
     // no, go to family attrubutes
     else
     {
         UpdateFamilyAttributes(family, address, attributes, resultHandler);
     }
 }
Exemple #2
0
                public void UpdateAddress(HttpRequest.RequestResult addressResult)
                {
                    // fire it off
                    ApplicationApi.UpdateFamilyAddress(PrimaryFamily, PrimaryAddress,
                                                       delegate(System.Net.HttpStatusCode statusCode, string statusDescription)
                    {
                        if (Rock.Mobile.Network.Util.StatusInSuccessRange(statusCode) == true)
                        {
                            SaveToDevice( );
                        }

                        if (addressResult != null)
                        {
                            addressResult(statusCode, statusDescription);
                        }
                    });
                }