protected void BindDataInvoices() { try { IEnumerable <InvoiceDTO> invoices = new List <InvoiceDTO>(); invoices = IBL.FindInvoices(emailCustomer); AccountDTO customer = new AccountDTO(); customer = BL.GetCustomer(emailCustomer); ShoppingTable.DataSource = GetDataTable(invoices); ShoppingTable.DataBind(); if (invoices.Count() > 0) { tableShoppingHistoryLabel.Text = $"The transactionlist of {customer.GetFirstName()} " + $"{customer.GetLastName()} has {invoices.Count()} items."; } else { tableShoppingHistoryLabel.Text = "The transactionlist is empty."; } } catch (Exception e) { e.GetBaseException(); } }