Edit caller function names
This commit is contained in:
parent
8b125e475e
commit
bfab7eb02b
@ -7,7 +7,7 @@ namespace RhSolutions.AddIn;
|
|||||||
#if !NET472
|
#if !NET472
|
||||||
[SupportedOSPlatform("windows")]
|
[SupportedOSPlatform("windows")]
|
||||||
#endif
|
#endif
|
||||||
public class RhSolutionsFunction
|
public class RhSolutionsFunctions
|
||||||
{
|
{
|
||||||
[ExcelFunction(Description = "Поиск артикула в базе данных")]
|
[ExcelFunction(Description = "Поиск артикула в базе данных")]
|
||||||
public static object RHSOLUTIONS([ExcelArgument(Name = "СТРОКА", Description = "Ячейка с артикулом РЕХАУ или поисковый запрос в свободной форме")] string line)
|
public static object RHSOLUTIONS([ExcelArgument(Name = "СТРОКА", Description = "Ячейка с артикулом РЕХАУ или поисковый запрос в свободной форме")] string line)
|
||||||
@ -16,7 +16,7 @@ public class RhSolutionsFunction
|
|||||||
|
|
||||||
ProductSku.TryParse(line, out var skus);
|
ProductSku.TryParse(line, out var skus);
|
||||||
|
|
||||||
if (ExcelAsyncUtil.Run("Database request", line, delegate
|
if (ExcelAsyncUtil.Run(nameof(RHSOLUTIONS), line, delegate
|
||||||
{
|
{
|
||||||
return databaseClient.GetProducts(line)
|
return databaseClient.GetProducts(line)
|
||||||
.GetAwaiter()
|
.GetAwaiter()
|
||||||
@ -80,7 +80,7 @@ public class RhSolutionsFunction
|
|||||||
var article = skus.First().Id;
|
var article = skus.First().Id;
|
||||||
IDatabaseClient databaseClient = RhSolutionsAddIn.ServiceProvider.GetService<IDatabaseClient>();
|
IDatabaseClient databaseClient = RhSolutionsAddIn.ServiceProvider.GetService<IDatabaseClient>();
|
||||||
|
|
||||||
if (ExcelAsyncUtil.Run("Database request", line, delegate
|
if (ExcelAsyncUtil.Run(nameof(РЕХАУИМЯ), line, delegate
|
||||||
{
|
{
|
||||||
return databaseClient.GetProducts(article)
|
return databaseClient.GetProducts(article)
|
||||||
.GetAwaiter()
|
.GetAwaiter()
|
||||||
@ -116,7 +116,7 @@ public class RhSolutionsFunction
|
|||||||
var article = skus.First().Id;
|
var article = skus.First().Id;
|
||||||
IDatabaseClient databaseClient = RhSolutionsAddIn.ServiceProvider.GetService<IDatabaseClient>();
|
IDatabaseClient databaseClient = RhSolutionsAddIn.ServiceProvider.GetService<IDatabaseClient>();
|
||||||
|
|
||||||
if (ExcelAsyncUtil.Run("Database request", line, delegate
|
if (ExcelAsyncUtil.Run(nameof(РЕХАУЦЕНА), line, delegate
|
||||||
{
|
{
|
||||||
return databaseClient.GetProducts(article)
|
return databaseClient.GetProducts(article)
|
||||||
.GetAwaiter()
|
.GetAwaiter()
|
||||||
@ -154,7 +154,7 @@ public class RhSolutionsFunction
|
|||||||
IDatabaseClient databaseClient = RhSolutionsAddIn.ServiceProvider.GetService<IDatabaseClient>();
|
IDatabaseClient databaseClient = RhSolutionsAddIn.ServiceProvider.GetService<IDatabaseClient>();
|
||||||
ICurrencyClient currencyClient = RhSolutionsAddIn.ServiceProvider.GetRequiredService<ICurrencyClient>();
|
ICurrencyClient currencyClient = RhSolutionsAddIn.ServiceProvider.GetRequiredService<ICurrencyClient>();
|
||||||
|
|
||||||
if (ExcelAsyncUtil.Run("Database request", line, delegate
|
if (ExcelAsyncUtil.Run(nameof(РЕХАУЦЕНАРУБ), line, delegate
|
||||||
{
|
{
|
||||||
var product = databaseClient.GetProducts(article)
|
var product = databaseClient.GetProducts(article)
|
||||||
.GetAwaiter()
|
.GetAwaiter()
|
||||||
@ -191,7 +191,7 @@ public class RhSolutionsFunction
|
|||||||
{
|
{
|
||||||
ICurrencyClient currencyClient = RhSolutionsAddIn.ServiceProvider.GetRequiredService<ICurrencyClient>();
|
ICurrencyClient currencyClient = RhSolutionsAddIn.ServiceProvider.GetRequiredService<ICurrencyClient>();
|
||||||
|
|
||||||
if (ExcelAsyncUtil.Run("Database request", dateField, delegate
|
if (ExcelAsyncUtil.Run(nameof(КУРСЕВРО), dateField, delegate
|
||||||
{
|
{
|
||||||
DateTime date = dateField == 0 ? DateTime.Today : DateTime.FromOADate(dateField);
|
DateTime date = dateField == 0 ? DateTime.Today : DateTime.FromOADate(dateField);
|
||||||
var exchangeRate = currencyClient.GetCurrencyCourse(date)
|
var exchangeRate = currencyClient.GetCurrencyCourse(date)
|
Loading…
Reference in New Issue
Block a user