Lưu ý Tại thời điểm này, nút Delete trên mẫu CustomerEditor không hoạt động. Ví dụ xuất hiện sau đó trong chương này trên trang 283 cho biết thêm các mã cần thiết để kích hoạt tính năng loại bỏ khách hàng. | 276 Microsoft 4 Step by Step Note At this point the Delete button on the CustomerEditor form does not work. The example that appears later in this chapter on page 283 adds the necessary code to enable the customer removal feature. Modifying a Database Through Entity Objects Visual Basic 1. Open the Chapter 16 VB project from the installed samples folder. The project includes classes named CustomerEditor and CustomerDetail which let a user modify records in the sample database s Customer table. 2. Open the source code view for the CustomerEditor form. Locate the GetConnectionString function this is a routine that uses a SqlConnectionStringBuilder to create a valid connection string to the sample database. It currently includes the following statements local SQLExpress StepSample True Adjust these statements as needed to provide access to your own test database. 3. Open the source code view for the CustomerDetail form. Locate the SaveFormData function. This routine updates an entity s properties with data supplied by the user. Just after the Update the individual fields comment add the following statements If 0 Then _ Else _ Nothing If 0 Then _ Else _ Nothing If 0 Then _ Else _ Chapter 16 Understanding Entities Through Objects 277 Nothing If -1 Then _ Else Nothing If 0 Then _ Else _ Nothing If 0 Then _ Else _ .