protected void EntityAddressControl_OnEntityAddressCompeleted(Object sender, Web.Application.Controls.EntityAddressCompletedEventArgs eventArgs) { if (eventArgs.Cancel) { Response.Redirect(ReferrerUrl, true); } if (eventArgs.EntityAddress != null) { Boolean success = false; success = MercuryApplication.EntityAddressSave(eventArgs.EntityAddress); if (success) { List <Client.Core.Entity.EntityAddress> addresses = MercuryApplication.EntityAddressesGet(EntityId, false); Response.Redirect(ReferrerUrl, true); } else { String postScript = ("alert (\"Unable to Save Address. " + ((MercuryApplication.LastException != null) ? MercuryApplication.LastException.Message : String.Empty) + "\");"); if ((TelerikAjaxManager != null) && (!String.IsNullOrEmpty(postScript))) { TelerikAjaxManager.ResponseScripts.Add(postScript); } } } return; }