Esempio n. 1
0
        public async Task <IActionResult> GetColaboradores(string pattern, int?skip)
        {
            var validateToken = await ValidatedToken(_configuration, _getHelper, "contacto");

            if (validateToken != null)
            {
                return(null);
            }

            if (!await ValidateModulePermissions(_getHelper, moduloId, eTipoPermiso.PermisoEscritura))
            {
                return(null);
            }

            if (pattern == null || pattern == "" || skip == null)
            {
                return(null);
            }

            var colaboradores = await _getHelper.GetColaboradoresSinCuentaUsuarioByPatternAsync(pattern, (int)skip);

            return(new PartialViewResult
            {
                ViewName = "_GetColaboradores",
                ViewData = new ViewDataDictionary
                           <List <Colaborador> >(ViewData, colaboradores)
            });
        }