diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2023-06-20 09:51:44 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2023-06-20 09:51:44 +0300 |
commit | 63a962f495d25a2ec4dac0b8b75cd2ba5b12acc1 (patch) | |
tree | 72048014d38b0e5f6f2c2d91a3e150cb5f4077b5 | |
parent | 8c134644ba3d75421152ec98c61f3a88e49b3705 (diff) |
Implement fill sleeves tool
-rw-r--r-- | RhSolutions.AddIn/Tools/SleevesTool.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/RhSolutions.AddIn/Tools/SleevesTool.cs b/RhSolutions.AddIn/Tools/SleevesTool.cs new file mode 100644 index 0000000..727baed --- /dev/null +++ b/RhSolutions.AddIn/Tools/SleevesTool.cs @@ -0,0 +1,25 @@ +namespace RhSolutions.Tools; + +internal class SleevesTool : Tool +{ + public SleevesTool(IServiceProvider provider) : base(provider) + { + } + + public override void Execute() + { + Application app = RhSolutionsAddIn.Excel.Application; + _reader = _readerFactory.GetReader("Excel"); + _writer = _writerFactory.GetWriter("CurrentPrice"); + var products = new List<(string, Dictionary<Product, double>)>() + { + (string.Empty, new Dictionary<Product, double>() + { + [new Product("11600011001")] = 10, + [new Product("11600021001")] = 10, + [new Product("11600031001")] = 10 + }) + }; + _writer.WriteProducts(products); + } +} |