Beispiel #1
0
        public JsonResult RefAgencyDelete(string id)
        {
            Guid org    = new Guid(id);
            int  SuccID = db_Ref.DeleteT_OE_ORGANIZATION(org);

            //now delete from Azure
            AzureSearch.DeleteSearchIndexAgency(id);

            string response = "Success";

            if (SuccID == -1)
            {
                response = "Cannot delete agency because agency users exist.";
            }
            else if (SuccID == -2)
            {
                response = "Cannot delete agency because agency projects exist.";
            }
            else if (SuccID == -3)
            {
                response = "Cannot delete agency because agency enterprise services exist.";
            }

            return(Json(response));
        }