Change column parameter to parameters array
This commit is contained in:
parent
57f3f7d724
commit
b4763bd03c
@ -1,6 +1,5 @@
|
|||||||
using Microsoft.Office.Interop.Excel;
|
using Microsoft.Office.Interop.Excel;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace RehauSku.PriceListTools
|
namespace RehauSku.PriceListTools
|
||||||
{
|
{
|
||||||
@ -22,8 +21,8 @@ namespace RehauSku.PriceListTools
|
|||||||
newColumnHeader.Value2 = $"{source.Name}";
|
newColumnHeader.Value2 = $"{source.Name}";
|
||||||
newColumnHeader.WrapText = true;
|
newColumnHeader.WrapText = true;
|
||||||
|
|
||||||
FillColumn(source.PositionAmount, TargetFile.amountCell.Column - 1);
|
FillColumn(source.PositionAmount, TargetFile.amountCell.Column - 1, TargetFile.amountCell.Column);
|
||||||
FillColumn(source.PositionAmount, TargetFile.amountCell.Column);
|
//FillColumn(source.PositionAmount, );
|
||||||
}
|
}
|
||||||
|
|
||||||
FilterByAmount();
|
FilterByAmount();
|
||||||
|
@ -31,7 +31,7 @@ namespace RehauSku.PriceListTools
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected private void FillColumn(IEnumerable<KeyValuePair<Position, double>> dictionary, int column)
|
protected private void FillColumn(IEnumerable<KeyValuePair<Position, double>> dictionary, params int[] columns)
|
||||||
{
|
{
|
||||||
List<KeyValuePair<Position, double>> missing = new List<KeyValuePair<Position, double>>();
|
List<KeyValuePair<Position, double>> missing = new List<KeyValuePair<Position, double>>();
|
||||||
object[,] groupColumn = TargetFile.groupCell.EntireColumn.Value2;
|
object[,] groupColumn = TargetFile.groupCell.EntireColumn.Value2;
|
||||||
@ -59,9 +59,10 @@ namespace RehauSku.PriceListTools
|
|||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
foreach (var column in columns)
|
||||||
{
|
{
|
||||||
Range sumCell = TargetFile.Sheet.Cells[foundCell.Row, column];
|
Range sumCell = TargetFile.Sheet.Cells[foundCell.Row, column];
|
||||||
|
|
||||||
if (sumCell.Value2 == null)
|
if (sumCell.Value2 == null)
|
||||||
{
|
{
|
||||||
sumCell.Value2 = kvp.Value;
|
sumCell.Value2 = kvp.Value;
|
||||||
@ -73,6 +74,7 @@ namespace RehauSku.PriceListTools
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (missing.Count > 0)
|
if (missing.Count > 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user