aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2023-01-13 07:52:16 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2023-01-13 07:52:16 +0300
commit61455943905669c72f2c62acbe3ae77aac74e019 (patch)
tree08d67f7e61c694de9c8f3392d529453774fb9032 /src
parent197073930656999989f4954b4308d376649262ae (diff)
Delete extension name from Name property of Price list
Diffstat (limited to 'src')
-rw-r--r--src/Models/SourcePriceList.cs3
-rw-r--r--src/Models/TargetPriceList.cs3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/Models/SourcePriceList.cs b/src/Models/SourcePriceList.cs
index ed860b4..1e47759 100644
--- a/src/Models/SourcePriceList.cs
+++ b/src/Models/SourcePriceList.cs
@@ -2,6 +2,7 @@
using Microsoft.Office.Interop.Excel;
using System;
using System.Collections.Generic;
+using System.IO;
using System.Linq;
namespace RhSolutions.Models
@@ -18,7 +19,7 @@ namespace RhSolutions.Models
}
Sheet = workbook.ActiveSheet;
- Name = workbook.Name;
+ Name = Path.GetFileNameWithoutExtension(workbook.FullName);
Range[] cells = new[]
{
diff --git a/src/Models/TargetPriceList.cs b/src/Models/TargetPriceList.cs
index 4754049..163d429 100644
--- a/src/Models/TargetPriceList.cs
+++ b/src/Models/TargetPriceList.cs
@@ -1,5 +1,6 @@
using Microsoft.Office.Interop.Excel;
using System;
+using System.IO;
using System.Linq;
namespace RhSolutions.Models
@@ -17,7 +18,7 @@ namespace RhSolutions.Models
}
Sheet = workbook.ActiveSheet;
- Name = workbook.FullName;
+ Name = Path.GetFileNameWithoutExtension(workbook.FullName);
Range[] cells = new[]
{