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); } }
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); } }