public async Task <JsonResult> StateServiceView(long id) { var model = _monitor.GetServiceById(id, GetCurrentUserAsync().Result.UserName); if (model == null) { return(Json(false)); } if (await _monitor.DisableEnableService(id, GetCurrentUserAsync().Result.UserName)) { return(Json(true)); } return(Json(false)); }