2021-11-11 16:33:40 +03:00
|
|
|
|
using ExcelDna.Integration;
|
2021-11-14 12:27:49 +03:00
|
|
|
|
using System.Net.Http;
|
2021-11-11 16:33:40 +03:00
|
|
|
|
|
|
|
|
|
namespace Rehau.Sku.Assist
|
|
|
|
|
{
|
|
|
|
|
public class Functions : IExcelAddIn
|
|
|
|
|
{
|
2021-11-14 12:27:49 +03:00
|
|
|
|
static readonly HttpClient httpClient = new HttpClient();
|
|
|
|
|
|
2021-11-11 21:13:21 +03:00
|
|
|
|
public static object RAUNAME(string request)
|
2021-11-11 16:33:40 +03:00
|
|
|
|
{
|
2021-11-14 12:27:49 +03:00
|
|
|
|
return ExcelAsyncUtil.Run("RAUNAME", request, delegate
|
2021-11-11 21:13:21 +03:00
|
|
|
|
{
|
2021-11-14 12:27:49 +03:00
|
|
|
|
var document = SkuAssist.GetDocumentAsync(request, httpClient).Result;
|
2021-11-11 21:13:21 +03:00
|
|
|
|
return SkuAssist.GetResultFromDocument(document);
|
|
|
|
|
});
|
2021-11-11 16:33:40 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void AutoClose()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void AutoOpen()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|