コード例 #1
0
        public static async Task <LG.Data.Models.Clients.GroupSearch> SearchGroupTask(LG.Data.Models.Clients.GroupSearch entity)
        {
            var client = ClientConnection.GetGmsConnection();

            try
            {
                client.Open();
                var response = await client.SearchGroupAsync(
                    new SearchGroupRequest()
                {
                    MessageGuid         = Guid.NewGuid(),
                    SearchInput         = entity.SearchText,
                    IsIncludeContains   = entity.IsIncludeContains,
                    IsIncludeStartsWith = entity.IsIncludeStartsWith
                });

                client.Close();
                entity.Results = response.Groups.ToList();
            }
            catch (Exception ex)
            {
                client.Close();
                entity.IsError = true;
                entity.Message = ex.ToString();
            }
            return(entity);
        }
コード例 #2
0
 public static async Task <LG.Data.Models.Clients.GroupSearch> SearchByGroup(
     LG.Data.Models.Clients.GroupSearch entity)
 {
     return(await LG.Data.Core.Clients.GroupDataService.SearchGroupTask(entity));
 }