aboutsummaryrefslogtreecommitdiff
path: root/src/Services
diff options
context:
space:
mode:
Diffstat (limited to 'src/Services')
-rw-r--r--src/Services/EventsUtil.cs1
-rw-r--r--src/Services/Functions.cs31
-rw-r--r--src/Services/RhDatabaseClient.cs1
3 files changed, 2 insertions, 31 deletions
diff --git a/src/Services/EventsUtil.cs b/src/Services/EventsUtil.cs
index 4b1d923..bb37125 100644
--- a/src/Services/EventsUtil.cs
+++ b/src/Services/EventsUtil.cs
@@ -1,4 +1,5 @@
using Microsoft.Office.Interop.Excel;
+using RhSolutions.AddIn;
using RhSolutions.Controllers;
namespace RhSolutions.Services
diff --git a/src/Services/Functions.cs b/src/Services/Functions.cs
deleted file mode 100644
index 22b67e0..0000000
--- a/src/Services/Functions.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using ExcelDna.Integration;
-using System;
-
-namespace RhSolutions.Services
-{
- public class Functions
- {
- [ExcelFunction(Description = "Запрос в удаленную базу данных")]
- public static object RHSOLUTIONS([ExcelArgument(Name = "Запрос")] string line)
- {
- object result;
-
- result = ExcelAsyncUtil.Run("Database request", line, delegate
- {
- return RhDatabaseClient.GetProduct(line).GetAwaiter().GetResult();
- });
-
- if (result == null)
- {
- return ExcelError.ExcelErrorNA;
- }
-
- if (result.Equals(ExcelError.ExcelErrorNA))
- {
- return "Загрузка...";
- }
-
- return result;
- }
- }
-} \ No newline at end of file
diff --git a/src/Services/RhDatabaseClient.cs b/src/Services/RhDatabaseClient.cs
index c57d4d8..d71a6ba 100644
--- a/src/Services/RhDatabaseClient.cs
+++ b/src/Services/RhDatabaseClient.cs
@@ -1,4 +1,5 @@
using Newtonsoft.Json;
+using RhSolutions.AddIn;
using System.Collections.Generic;
using System.Linq;
using System.Net;