public void BtnProductList_Click(object sender, EventArgs e) { DocumentCreator dc = new DocumentCreator(); dc.AddList <Vendor>(vendors, "vendor"); dc.AddList <Product>(products, "prod"); //Totals per vendor dc.AddInt32("avail", 0); dc.AddInt32("unavail", 0); dc.AddInt32("tot", 0); //Final totals dc.AddInt32("available", 0); dc.AddInt32("unavailable", 0); dc.AddInt32("total", 0); dc.ScanStart += new ScanStartEventHandler(Dc_ScanStart); dc.AfterScanRecord += new AfterScanRecordEventHandler(Dc_AfterScanRecord1); dc.ScanEnded += new ScanEndedEventHandler(Dc_ScanEnded1); dc.CreateDocument(_inputPath, _outputPath); if (!_unitTest) { Process.Start(_outputPath); } }
public void NestedTest6() { var docCreator = new DocumentCreator(delimiter: "~", preprocessText: false); var testList = new List <TestClass> { new TestClass() { Go = true, Go2 = true }, new TestClass() { Go = false, Go2 = true }, new TestClass() { Go = true, Go2 = false }, new TestClass() { Go = false, Go2 = false }, }; docCreator.AddList(testList, "S"); docCreator.CreateDocument(inputTemplatePath[5], outputPath[5]); FileAssert.AreEqual(outputPath[5], comparisonPath[5]); }
public void BtnProductList_Click(object sender, EventArgs e) { DocumentCreator dc = new DocumentCreator(); dc.AddList <Product>(products, "P"); //Group Totals dc.AddInt32("avail", 0); dc.AddInt32("unavail", 0); dc.AddInt32("tot", 0); //Final totals dc.AddInt32("available", 0); dc.AddInt32("unavailable", 0); dc.AddInt32("total", 0); dc.AddInt32("showVendor", 0); dc.AddBoolean("groupEnd", false); currentVendor = "-none-"; dc.BeforeScanRecord += new BeforeScanRecordEventHandler(Dc_BeforeScanRecord); dc.AfterScanRecord += new AfterScanRecordEventHandler(Dc_AfterScanRecord1); dc.ScanEnded += new ScanEndedEventHandler(Dc_ScanEnded1); dc.CreateDocument(_inputPath, _outputPath); if (!_isUnitTest) { Process.Start(_outputPath); } }
public void BtnProductList_Click(object sender, EventArgs e) { DocumentCreator dc = new DocumentCreator(); dc.AddList <Product>(products, "P"); dc.AddInt32("available", 0); dc.AddInt32("unavailable", 0); dc.AddInt32("total", 0); dc.AfterScanRecord += new AfterScanRecordEventHandler(Dc_AfterScanRecord1); dc.ScanEnded += new ScanEndedEventHandler(Dc_ScanEnded1); dc.CreateDocument(_inputPath, _outputPath); if (!_isUnitTest) { Process.Start(_outputPath); } }