/// <summary> /// Builds the Min-Max DataTable. /// </summary> /// <returns>A DataTable representing all the QuickBooks Data to be written to the Min-Max Doc.</returns> public DataTable Analyze() { if (!excelDoc.excelObjSet) { excelDoc.SetExcelObjects(); } if (excelDoc.excelObjSet) { Log.WriteLine("...Analyzing Part Numbers..."); IQuickBooksData itemDataTable = new ItemDataTable(); IQuickBooksData salesOrderDataTable = new SODataTable(); excelDoc.InStreamData(); itemDataTable.BuildTable(); salesOrderDataTable.BuildTable(); minMaxDt = new DataTable().BuildTable(salesOrderDataTable, itemDataTable, excelDoc.partNumList); excelDoc.Write(minMaxDt); return(minMaxDt); } else { Log.WriteLine("Cannot Access Min-Max Document."); return(new DataTable()); } }
public void ExcelWriteTest() { IQuickBooksData itemTable = new ItemDataTable(); IQuickBooksData soTable = new SODataTable(); itemTable.BuildTable(); soTable.BuildTable(); using (excelDoc = new ExcelDoc()) { excelDoc.Open(); excelDoc.InStreamData(); DataTable minMaxDt = new DataTable().BuildTable(soTable, itemTable, excelDoc.partNumList); minMaxDt.Write(@"\\msw-fp1\user$\wchan\Documents\Visual Studio 2015\Projects\InventoryManagementApp\InventoryManagementApp\bin\Debug\Test\PolyMinMax.csv"); excelDoc.Write(minMaxDt); } }