Rename Source validation extension

This commit is contained in:
Sergey Chebotar 2023-04-06 08:49:12 +03:00
parent bfd7702939
commit bf97036724
4 changed files with 5 additions and 5 deletions

View File

@ -93,7 +93,7 @@ public class RibbonController : ExcelRibbon
else
{
Worksheet worksheet = RhSolutionsAddIn.Excel.ActiveWorkbook.ActiveSheet;
return worksheet.IsRehauSource();
return worksheet.IsValidSource();
}
}

View File

@ -83,7 +83,7 @@ public class RhExcelReader : IExcelReader, IDisposable
List<(string, Dictionary<Product, double>)> result = new();
foreach (Worksheet worksheet in worksheets)
{
if (!worksheet.IsRehauSource())
if (!worksheet.IsValidSource())
{
continue;
}

View File

@ -42,7 +42,7 @@ public class RhExcelWriter : IExcelWriter, IDisposable
{
_worksheet = OpenNewPrice();
if (!_worksheet.IsRehauSource())
if (!_worksheet.IsValidSource())
{
_application.ActiveWorkbook.Close();
throw new ArgumentException(

View File

@ -9,14 +9,14 @@ namespace RhSolutions.Services;
#endif
public static class WorksheetExtensions
{
public static bool IsRehauSource(this Worksheet worksheet)
public static bool IsValidSource(this Worksheet worksheet)
{
Range amountCell;
Range skuCell;
Range programLineCell;
Range nameCell;
var pricelistParameters = RhSolutionsAddIn.Configuration.GetPriceListHeaders();
var pricelistParameters = RhSolutionsAddIn.Configuration.GetPriceListHeaders();
Range[] cells = new[]
{