コード例 #1
0
        private void AddBooks(InvoiceList invs)
        {
            // Clear the Items in the list (lstBooks.Clear() would clear the columns too)
            lstInvoices.Items.Clear();

            // Go through each book and add an item to the ListView
            foreach (Invoice inv in invs)
            {
                lstInvoices.Items.Add(new ListViewItem(inv.ToStringArray()));
            }
        }
コード例 #2
0
        public Customer(IDataReader rdr)
        {
            // If the column is not null, get the member data
            // from the DataReader
            CustomerID = Field.GetGuid(rdr, "CustomerID");
            LastName   = Field.GetString(rdr, "LastName");
            FirstName  = Field.GetString(rdr, "FirstName");
            HomePhone  = Field.GetString(rdr, "HomePhone");
            Address    = Field.GetString(rdr, "Address");
            City       = Field.GetString(rdr, "City");
            State      = Field.GetString(rdr, "State");
            Zip        = Field.GetString(rdr, "Zip");

            // Create the BookList
            Invoices = new InvoiceList(rdr);
        }