Example #1
0
        //[HttpDelete]
        public async Task <ActionResult> RemoveAddress(int addressId)
        {
            var result = await _apiProvider.DeleteItemAsync($"{_uri}/{addressId}", "entityType=61");

            if (string.IsNullOrWhiteSpace(result))
            {
                return(Content(""));
            }
            else
            {
                return(Content("Error removing address"));
            }
        }
Example #2
0
        public async Task <ActionResult> DeleteChurch(int id)
        {
            try
            {
                var result = await _apiProvider.DeleteItemAsync($"{_uri}/{id.ToString()}?entityType=55");

                if (string.IsNullOrWhiteSpace(result))
                {
                    return(RedirectToAction("Index"));
                }
                else
                {
                    return(Content("Error deleting church"));
                }
            }
            catch (Exception ex)
            {
                return(Content("Error deleting church: " + ex.Message));
            }
        }