From bf2e187e6625ca4d19a6d48000843c9813a3efa5 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Wed, 2 Feb 2022 18:03:49 +0300 Subject: Make base PriceList class abstract --- src/PriceListTools/AbstractPriceList.cs | 20 ++++++++++++++++++++ src/PriceListTools/PriceList.cs | 20 -------------------- src/PriceListTools/Source.cs | 2 +- src/PriceListTools/Target.cs | 2 +- 4 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 src/PriceListTools/AbstractPriceList.cs delete mode 100644 src/PriceListTools/PriceList.cs (limited to 'src/PriceListTools') diff --git a/src/PriceListTools/AbstractPriceList.cs b/src/PriceListTools/AbstractPriceList.cs new file mode 100644 index 0000000..06427a0 --- /dev/null +++ b/src/PriceListTools/AbstractPriceList.cs @@ -0,0 +1,20 @@ +using Microsoft.Office.Interop.Excel; + +namespace RehauSku.PriceListTools +{ + internal abstract class AbstractPriceList + { + protected const string amountHeader = "Кол-во"; + protected const string skuHeader = "Актуальный материал"; + protected const string groupHeader = "Программа"; + protected const string nameHeader = "Наименование"; + + public Range amountCell { get; protected set; } + public Range skuCell { get; protected set; } + public Range groupCell { get; protected set; } + public Range nameCell { get; protected set; } + + public Worksheet Sheet { get; protected set; } + public string Name { get; protected set; } + } +} \ No newline at end of file diff --git a/src/PriceListTools/PriceList.cs b/src/PriceListTools/PriceList.cs deleted file mode 100644 index 65ff3df..0000000 --- a/src/PriceListTools/PriceList.cs +++ /dev/null @@ -1,20 +0,0 @@ -using Microsoft.Office.Interop.Excel; - -namespace RehauSku.PriceListTools -{ - internal class PriceList - { - protected const string amountHeader = "Кол-во"; - protected const string skuHeader = "Актуальный материал"; - protected const string groupHeader = "Программа"; - protected const string nameHeader = "Наименование"; - - public Range amountCell { get; protected set; } - public Range skuCell { get; protected set; } - public Range groupCell { get; protected set; } - public Range nameCell { get; protected set; } - - public Worksheet Sheet { get; protected set; } - public string Name { get; protected set; } - } -} \ No newline at end of file diff --git a/src/PriceListTools/Source.cs b/src/PriceListTools/Source.cs index fe5ee9b..a20ad81 100644 --- a/src/PriceListTools/Source.cs +++ b/src/PriceListTools/Source.cs @@ -7,7 +7,7 @@ using RehauSku.Interface; namespace RehauSku.PriceListTools { - internal class Source : PriceList + internal class Source : AbstractPriceList { public Dictionary PositionAmount { get; private set; } diff --git a/src/PriceListTools/Target.cs b/src/PriceListTools/Target.cs index 996a092..ac91544 100644 --- a/src/PriceListTools/Target.cs +++ b/src/PriceListTools/Target.cs @@ -4,7 +4,7 @@ using System.Linq; namespace RehauSku.PriceListTools { - internal class Target : PriceList + internal class Target : AbstractPriceList { private const string oldSkuHeader = "Прежний материал"; public Range oldSkuCell { get; private set; } -- cgit v1.2.3