Пример #1
0
 void DisplayCarID()
 {
     //get the number of the Car to be processed.
     CarID = Convert.ToInt32(Session["CarID"]);
     //create an instance.
     MyClassLibrary.clsCarsCollection ReceptionistCarID = new MyClassLibrary.clsCarsCollection();
     //find the record to be displayed.
     ReceptionistCarID.ThisCar.Find(CarID);
     //copy properties into textboxes on web form.
     txtReceptionistCarID.Text = ReceptionistCarID.ThisCar.CarID.ToString();
 }
Пример #2
0
 void FilterCarRegistrationPlate()
 {
     //create an instance of the customer collection
     MyClassLibrary.clsCarsCollection Cars = new MyClassLibrary.clsCarsCollection();
     //set the data dource to the list of customer in the collection
     Cars.ThisCar.CarRegistrationPlate = txtFilterCarReg.Text;
     Cars.FilterByRegPlate(Cars.ThisCar.CarRegistrationPlate);
     lstSalesmanBox.DataSource = Cars.CarList;
     //set the name of the primary key
     lstSalesmanBox.DataValueField = "CarID";
     //set the data field to display
     lstSalesmanBox.DataTextField = "CarRegistrationPlate";
     lstSalesmanBox.DataBind();
 }