แชร์ผ่าน


Customers Control

The Customers control of the IBuySpy Delivery 2005 application accesses the Customers database table.

Using the Customers Control

When the Customers control is created, two methods are executed:

  • The LoadCustomer() method is executed to load the Customers database table into memory as a dataset object.
  • The LoadOrders() method is also called; it loads each customer's order information from the Orders table into a datatable object.

You use the Company drop-down box to navigate between customers assigned to delivery routes. Changing a company name triggers the cboCustomers_SelectedIndexChanged() method. This updates the screen with the appropriate address, orders, and status information for the selected company.

Customers control screen

Address Field

You cannot modify the Address field. The application is designed so that customer addresses cannot be changed from the device.

Orders List Box

The Orders list displays all records in the Orders table for the current customer. Selecting an order in the Orders list and tapping View Orders loads the Orders Control and displays information for the selected order.

Status List Box

When you select a specific order number in the Orders list, the Status list displays the current status for the order: Pending, Delivered, or Failed. In the database, the Status value is stored as a small integer, with 0 representing Failed, 1 representing Delivered, and 2 representing Pending. Users can change the value of the Status field from Failed to Pending by tapping the Set Failed or Set Pending button, respectively. Marking an order as Failed makes the products in that order available for sale at future delivery locations.

Note

By default, products are reserved for their designated customers and cannot be sold at other delivery locations.

Orders are automatically set to a status of Delivered after a signature has been captured and saved for an order. After an order is marked as Delivered, it cannot be modified.

Company Field

The names in the Company field are listed by the value in the Status list. Customers with orders pending are listed first, followed by customers with delivered orders, and then customers with failed deliveries.

See Also

Concepts

Orders Control

Help and Information

Getting SQL Server Compact Edition Assistance