예제 #1
0
        public ICollection<Product> retrieveProductsData()
        {
            var excelManager = new ExcelManager();
            var filePath = this.unpackDirectory + "/" + ProductFileName;

            return excelManager.ReadProductExcelFile(filePath);
        }
예제 #2
0
        public ICollection<ClientCompany> retrieveCompaniesData()
        {
            var excelManager = new ExcelManager();
            var filePath = this.unpackDirectory + "/" + ClientCompanyFileName;

            return excelManager.ReadClientCompanyExcelFile(filePath);
        }
예제 #3
0
        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;
        }
예제 #4
0
 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;
     }
 }