Esempio n. 1
0
        public Content Get(string contentId)
        {
            GetBIMRecordByMaterialIdResponse result = null;

            var client = new FBDWSSoapClient(new FBDWSSoapClient.EndpointConfiguration());

            Task.Run(async() =>
            {
                result = await client.GetBIMRecordByMaterialIdAsync(contentId + "%");
            }).Wait();

            var response = result.Body.GetBIMRecordByMaterialIdResult.ToList();

            if (!response.Any())
            {
                return(new Content());
            }

            var content = new Content
            {
                ContentId   = contentId,
                MaterialIds = response.Select(r => r.MaterialId).ToList()
            };

            return(content);
        }
Esempio n. 2
0
        /// <summary>
        /// To determine Bim value
        /// </summary>
        /// <param name="id">"Id"</param>
        /// <returns>Bim status</returns>
        public IActionResult CheckBim(string id)
        {
            var endpoint = new FBDWSSoapClient.EndpointConfiguration();

            GetBIMRecordByMaterialIdResponse response = null;

            var client = new FBDWSSoapClient(endpoint);

            Task.Run(async() =>
            {
                response = await client.GetBIMRecordByMaterialIdAsync(id + "%");
            }).Wait();

            return(Json(response));
        }