예제 #1
0
        public HttpResponseMessage DeleteLeadadapter(int leadAdapterID)
        {
            DeleteLeadAdapterRequest  request  = new DeleteLeadAdapterRequest(leadAdapterID);
            DeleteLeadAdapterResponse response = leadAdapterService.DeleteLeadAdapter(request);

            return(Request.BuildResponse(response));
        }
예제 #2
0
        public JsonResult DeleteLeadAdapter(int leadAdapterID)
        {
            DeleteLeadAdapterRequest request = new DeleteLeadAdapterRequest(leadAdapterID);

            leadAdapterService.DeleteLeadAdapter(request);
            return(Json(new { success = true, reponse = "" }, JsonRequestBehavior.AllowGet));
        }
예제 #3
0
        public DeleteLeadAdapterResponse DeleteLeadAdapter(DeleteLeadAdapterRequest request)
        {
            DeleteLeadAdapterResponse response = new DeleteLeadAdapterResponse();

            Logger.Current.Verbose("Request received to delete lead adapter with leadAdapterID " + request.Id);
            bool isLinkedToWorkflows = leadAdaptersRepository.isLinkedToWorkflows(request.Id);

            if (isLinkedToWorkflows)
            {
                throw new UnsupportedOperationException("[|The selected Lead Adapter is linked to Automation Workflow|]. [|You cannot delete the Lead Adapter|].");
            }
            leadAdaptersRepository.DeleteLeadAdapter(request.Id);
            unitOfWork.Commit();
            return(response);
        }