public ActionResult Delete(int id) { #region Check Rights bool hasRights = false; hasRights = AdminHelper.CheckUserAction(ScreenEnum.Agent, ActionEnum.Delete); if (!hasRights) { return(Json("You are UnAuthorized to do this action")); } #endregion string isDeleted = AgentHelper.Delete(id); return(Json(isDeleted)); }