public ICollection<Product> retrieveProductsData() { var excelManager = new ExcelManager(); var filePath = this.unpackDirectory + "/" + ProductFileName; return excelManager.ReadProductExcelFile(filePath); }
public ICollection<ClientCompany> retrieveCompaniesData() { var excelManager = new ExcelManager(); var filePath = this.unpackDirectory + "/" + ClientCompanyFileName; return excelManager.ReadClientCompanyExcelFile(filePath); }
public ICollection<Order> retrieveOrdersData() { var excelManager = new ExcelManager(); var orders = new List<Order>(); foreach (string file in Directory.GetFiles(this.unpackDirectory)) { if (file.EndsWith(".xlsx")) { var currentOrders = excelManager.ReadOrderExcelFile(file); orders.AddRange(currentOrders); } } return orders; }
private void ToExcelFileButton_Click(object sender, RoutedEventArgs e) { var excelManager = new ExcelManager(); bool result = excelManager.CreateExcelReport(); if (result) { Result.Text = "Generating Excel report has been successfully completed!"; Result.Foreground = Brushes.Green; } else { Result.Text = "Generating Excel report failed!"; Result.Foreground = Brushes.Red; } }