aboutsummaryrefslogtreecommitdiff
path: root/src/Models/WorksheetExtensions.cs
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2023-03-22 08:36:13 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2023-03-22 08:36:13 +0300
commit4f448f203471a19a1444555a895f503515ad2fda (patch)
tree301b7df2561d650e4d300d24341342bd77ac7f3e /src/Models/WorksheetExtensions.cs
parent6484cac4f025bd84f7ffa2b2030d729dafe09d3d (diff)
Add basic test
Diffstat (limited to 'src/Models/WorksheetExtensions.cs')
-rw-r--r--src/Models/WorksheetExtensions.cs41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/Models/WorksheetExtensions.cs b/src/Models/WorksheetExtensions.cs
deleted file mode 100644
index 6b5fc3e..0000000
--- a/src/Models/WorksheetExtensions.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using Microsoft.Office.Interop.Excel;
-using RhSolutions.Models;
-using System.Linq;
-
-namespace RhSolutions.Services
-{
- public static class WorksheetExtensions
- {
- public static bool IsRehauSource(this Worksheet worksheet)
- {
- Range amountCell;
- Range skuCell;
- Range groupCell;
- Range nameCell;
-
- Range[] cells = new[]
- {
- amountCell = worksheet.Cells.Find(PriceListHeaders.Amount),
- skuCell = worksheet.Cells.Find(PriceListHeaders.Sku),
- groupCell = worksheet.Cells.Find(PriceListHeaders.Group),
- nameCell = worksheet.Cells.Find(PriceListHeaders.Name)
- };
-
- return cells.All(x => x != null);
- }
-
- public static void AddValue(this Range range, double value)
- {
- if (range.Value2 == null)
- {
- range.Value2 = value;
- }
-
- else
- {
- range.Value2 += value;
- }
- }
- }
-}
-