Edit caller function names

This commit is contained in:
Sergey Chebotar 2023-06-08 06:44:11 +03:00
parent 8b125e475e
commit bfab7eb02b

View File

@ -7,7 +7,7 @@ namespace RhSolutions.AddIn;
#if !NET472
[SupportedOSPlatform("windows")]
#endif
public class RhSolutionsFunction
public class RhSolutionsFunctions
{
[ExcelFunction(Description = "Поиск артикула в базе данных")]
public static object RHSOLUTIONS([ExcelArgument(Name = "СТРОКА", Description = "Ячейка с артикулом РЕХАУ или поисковый запрос в свободной форме")] string line)
@ -16,7 +16,7 @@ public class RhSolutionsFunction
ProductSku.TryParse(line, out var skus);
if (ExcelAsyncUtil.Run("Database request", line, delegate
if (ExcelAsyncUtil.Run(nameof(RHSOLUTIONS), line, delegate
{
return databaseClient.GetProducts(line)
.GetAwaiter()
@ -80,7 +80,7 @@ public class RhSolutionsFunction
var article = skus.First().Id;
IDatabaseClient databaseClient = RhSolutionsAddIn.ServiceProvider.GetService<IDatabaseClient>();
if (ExcelAsyncUtil.Run("Database request", line, delegate
if (ExcelAsyncUtil.Run(nameof(РЕХАУИМЯ), line, delegate
{
return databaseClient.GetProducts(article)
.GetAwaiter()
@ -116,7 +116,7 @@ public class RhSolutionsFunction
var article = skus.First().Id;
IDatabaseClient databaseClient = RhSolutionsAddIn.ServiceProvider.GetService<IDatabaseClient>();
if (ExcelAsyncUtil.Run("Database request", line, delegate
if (ExcelAsyncUtil.Run(nameof(РЕХАУЦЕНА), line, delegate
{
return databaseClient.GetProducts(article)
.GetAwaiter()
@ -154,7 +154,7 @@ public class RhSolutionsFunction
IDatabaseClient databaseClient = RhSolutionsAddIn.ServiceProvider.GetService<IDatabaseClient>();
ICurrencyClient currencyClient = RhSolutionsAddIn.ServiceProvider.GetRequiredService<ICurrencyClient>();
if (ExcelAsyncUtil.Run("Database request", line, delegate
if (ExcelAsyncUtil.Run(nameof(РЕХАУЦЕНАРУБ), line, delegate
{
var product = databaseClient.GetProducts(article)
.GetAwaiter()
@ -191,7 +191,7 @@ public class RhSolutionsFunction
{
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);
var exchangeRate = currencyClient.GetCurrencyCourse(date)