public ActionResult ListAgents() { if (!_permissionService.Authorize(StandardPermissionProvider.CVChat)) { return(AccessDeniedView()); } var model = new ListAgentsModel(); return(View(model)); }
public ActionResult ListAgents(DataSourceRequest command, ListAgentsModel model) { if (!_permissionService.Authorize(StandardPermissionProvider.CVChat)) { return(AccessDeniedView()); } var arragents = _chatService.GetallAgents(model.NameAgents); var gridModel = new DataSourceResult { Data = arragents.Select(x => { var m = new AgentsModel(); m.Id = x.Id; PrepareAgentstoModel(x, m); return(m); }), Total = arragents.Count() }; return(Json(gridModel)); }