示例#1
0
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="search"></param>
        /// <returns></returns>
        public async Task <NarutoResult> GetClients(SearchClientModel search)
        {
            if (search == null)
            {
                return(new NarutoFailResult($"{nameof(search)}值不能为空"));
            }
            var res = await clientStorage.GetClients(search);

            return(new NarutoSuccessResult("操作成功", res.Item1, res.Item2));
        }
示例#2
0
        public async Task <IActionResult> Index(string searchString)
        {
            SearchClientModel searchClientModel = new SearchClientModel {
                SearchString = searchString
            };

            if (!string.IsNullOrEmpty(searchString))
            {
                try { searchClientModel.SearchClientList = await _ServiceNBCH.SearchClientAsync(searchString, CancellationToken.None); }
                catch (Exception exception) {
                    _Logger.LogError(
                        exception,
                        "Не удалось получить список клиентов. Пользователь: {login},  строка поиска: {searchString}, ошибка: {exceptionMessage}, StackTrace: {StackTrace}, exception: {exception}.",
                        HelperASP.Login(User), searchString, exception.Message, exception.StackTrace, exception);
                }
            }

            return(View(searchClientModel));
        }
示例#3
0
 /// <summary>
 /// 获取客户端数据
 /// </summary>
 /// <param name="search"></param>
 /// <returns></returns>
 public async Task <NarutoResult> GetClients([FromQuery] SearchClientModel search) => await services.GetClients(search);