Exemplo n.º 1
0
        public void Load()
        {
            // initialize the width of columns
            foreach (ColumnHeader column in listViewSale.Columns)
            {
                column.Width = -2;
            }
            listViewSale.Columns[listViewSale.Columns.Count - 2].Width = 0;
            /////
            listViewSale.Items.Clear();
            List <Invoice> invoices = InvoiceHelper.FindInvoices();
            int            i        = 0;

            foreach (var item in invoices)
            {
                ListViewItem listViewItem = new ListViewItem(new string[] { i.ToString(), item.NameManager,
                                                                            item.NameCustomer,
                                                                            ExtensionHelper.ChangeToCurrency(item.Cost.ToString()),
                                                                            item.ID.ToString(),
                                                                            item.Time_Of_Purchase.ToShortDateString() });
                listViewSale.Items.Add(listViewItem);
                i++;
            }
        }