예제 #1
0
 void DisplayCustomers()
 {
     //create an instance of Customer collection
     Class_Library.clsCustomerCollection CustomerLog = new Class_Library.clsCustomerCollection();
     //set the data source to the list of customers in the collection
     lstCustomers.DataSource = CustomerLog.CustomerList;
     //set the name of the primary key
     lstCustomers.DataValueField = "CustomerNo";
     //set the data fiel to display
     lstCustomers.DataTextField = "HouseNo";
     //bind the data to the list
     lstCustomers.DataBind();
 }
예제 #2
0
 void DisplayCustomers()
 {
     //create an instance of Customer collection
     Class_Library.clsCustomerCollection CustomerLog = new Class_Library.clsCustomerCollection();
     //Find the records to update
     CustomerLog.ThisCustomer.Find(CustomerNo);
     //display the data for this record
     txtFirstName.Text = CustomerLog.ThisCustomer.FirstName;
     txtSurname.Text   = CustomerLog.ThisCustomer.Surname;
     txtEmail.Text     = CustomerLog.ThisCustomer.Email;
     txtStreet.Text    = CustomerLog.ThisCustomer.Street;
     txtPostCode.Text  = CustomerLog.ThisCustomer.PostCode;
     ddlTown.Text      = CustomerLog.ThisCustomer.Town;
     txtHouseNo.Text   = CustomerLog.ThisCustomer.HouseNo;
     txtDateSold.Text  = CustomerLog.ThisCustomer.ToString();
     chkActive.Checked = CustomerLog.ThisCustomer.Active;
 }