Add description to replaced products

This commit is contained in:
Sergey Chebotar 2023-05-18 15:26:38 +03:00
parent 28d6c3b6b9
commit ea69a77a0e
2 changed files with 19 additions and 0 deletions

View File

@ -130,6 +130,9 @@ public class ExcelWriter : IWriter, IDisposable
if (row != null)
{
Range nameCell = worksheetCells[row, _nameCell.Column];
nameCell.AddValue($"(замена арт. {positionAmount.Key.ProductSku})");
foreach (int column in columns)
{
Range cell = worksheetCells[row, column];
@ -146,6 +149,9 @@ public class ExcelWriter : IWriter, IDisposable
if (row != null)
{
Range nameCell = worksheetCells[row, _nameCell.Column];
nameCell.AddValue($"(замена арт. {positionAmount.Key.ProductSku})");
foreach (int column in columns)
{
Range cell = worksheetCells[row, column];

View File

@ -44,5 +44,18 @@ public static class WorksheetExtensions
range.Value2 += value;
}
}
public static void AddValue(this Range range, string value)
{
if (range.Value2 == null)
{
range.Value2 = value;
}
else
{
range.Value2 = $"{range.Value2} {value}";
}
}
}