public ActionResult GetApprovers(string WorkflowID) { TravelCards request = new TravelCards(); request = new AppClass().ExplodeRequest(WorkflowID).First(); string errorResult = "{{\"employee_number\":\"{0}\",\"name\":\"{1}\"}}"; if (request.travel_request.ApprovalStage != "Card Services Approval") { errorResult = string.Format(errorResult, null, "No approvers found for the entry"); return(Content(errorResult, "application/json")); } else { var profile = new AppClass().getApprovernames(); if (profile == null || profile.Count() <= 0) { errorResult = string.Format(errorResult, null, "No approvers found for the entry"); return(Content(errorResult, "application/json")); } else { return(Json(profile, JsonRequestBehavior.AllowGet)); } } }