Compare commits

..

No commits in common. "6fdc410c8ff3eeffd54f0a6c50e7941f436ece0e" and "a2165e7ef6713e495618f0c15abf53b3f92f40fa" have entirely different histories.

6 changed files with 6 additions and 13 deletions

View File

@ -133,18 +133,11 @@ namespace RhSolutions.Services
cell.AddValue(amount);
}
else
{
if (amount == 0)
{
cell.Value2 = null;
}
else
{
cell.Value2 = amount;
}
}
}
}
private void FillAmounts(KeyValuePair<Product, double> positionAmount, params int[] columns)
{

View File

@ -19,8 +19,8 @@ internal class ConvertTool : Tool
Application app = RhSolutionsAddIn.Excel.Application;
Worksheet worksheet = app.ActiveWorkbook.ActiveSheet;
_reader = _readerFactory.GetReader("Excel");
var products = _reader.ReadProducts(new[] { worksheet });
_writer = _writerFactory.GetWriter("NewPrice");
var products = _reader.ReadProducts(new[] { worksheet });
_writer.WriteProducts(products);
}
}

View File

@ -17,8 +17,8 @@ internal class ExportTool : Tool
{
Application app = RhSolutionsAddIn.Excel.Application;
_reader = _readerFactory.GetReader("Excel");
var products = _reader.ReadProducts(app.Selection);
_writer = _writerFactory.GetWriter("NewPrice");
var products = _reader.ReadProducts(app.Selection);
_writer.WriteProducts(products);
}
}

View File

@ -15,8 +15,8 @@ internal class GuessTool : Tool
Application app = RhSolutionsAddIn.Excel.Application;
Worksheet worksheet = app.ActiveWorkbook.ActiveSheet;
_reader = _readerFactory.GetReader("Guess");
var products = _reader.ReadProducts(new[] { worksheet });
_writer = _writerFactory.GetWriter("NewPrice");
var products = _reader.ReadProducts(new[] { worksheet });
_writer.WriteProducts(products);
}
}

View File

@ -18,8 +18,8 @@ internal class MergeTool : Tool
IFileDialog dialog = RhSolutionsAddIn.ServiceProvider.GetRequiredService<IFileDialog>();
string[] files = dialog.GetFiles();
_reader = _readerFactory.GetReader("Excel");
var products = _reader.ReadProducts(files);
_writer = _writerFactory.GetWriter("NewPrice");
var products = _reader.ReadProducts(files);
_writer.WriteProducts(products);
}
}

View File

@ -14,9 +14,9 @@ internal class SleevesTool : Tool
Application app = RhSolutionsAddIn.Excel.Application;
Worksheet worksheet = app.ActiveWorkbook.ActiveSheet;
_reader = _readerFactory.GetReader("Excel");
_writer = _writerFactory.GetWriter("CurrentPrice");
var products = _reader.ReadProducts(new[] { worksheet });
var sleeves = _sleevesCaluculator.CalculateSleeves(products.Select(p => p.Item2).First());
_writer = _writerFactory.GetWriter("CurrentPrice");
_writer.WriteProducts(sleeves);
}
}