List of Listings


Chapter 2: Building an N-Tier Application

Listing 2-1: The Default web.config File
Listing 2-2: The Remoting Configuration Information

Chapter 3: Creating the Application Infrastructure

Listing 3-1: The InterfaceExample Application
Listing 3-2: The Structures Code Module
Listing 3-3: The Interfaces Code Module
Listing 3-4: The Region Stored Procedures
Listing 3-5: The Public Attributes of the RegionDC Class
Listing 3-6: The LoadProxy Method
Listing 3-7: The LoadRecord Method
Listing 3-8: The Delete Method
Listing 3-9: The Save Method
Listing 3-10: The ChangedEventArgs Class
Listing 3-11: The User-Centric Region Code Module
Listing 3-12: The LoadRecord Method of the Region Class
Listing 3-13: The Save Method
Listing 3-14: A CollectionBase Example
Listing 3-15: The RegionMgr Collection Class
Listing 3-16: The Load Method of the RegionMgr Class
Listing 3-17: The RegionMgr Implementation of the Singleton Pattern
Listing 3-18: The LoadList Method
Listing 3-19: The Find Method
Listing 3-20: The ListViewColumnSorter Class
Listing 3-21: The ColumnClick Method
Listing 3-22: The Print Method
Listing 3-23: The PrintPage Method
Listing 3-24: Printing Your Data
Listing 3-25: The New frmListBase Constructor
Listing 3-26: The frmListBase Paint Method
Listing 3-27: The AddButton_Click Method
Listing 3-28: The ObjectChanged Method
Listing 3-29: The frmRegionEdit_Load Method
Listing 3-30: The EditButton_Click Method
Listing 3-31: The txtRegionDescription_Validated Method
Listing 3-32: The DeleteButton_Click Method

Chapter 4: Handling Errors with Class

Listing 4-1: Creating the application_errors Table
Listing 4-2: The usp_application_errors_save Stored Procedure
Listing 4-3: The LogErrorDC Class
Listing 4-4: The LogError Class
Listing 4-5: The LogErrorEvent Class
Listing 4-6: The LogErr Method
Listing 4-7: The RetrieveErrors Method
Listing 4-8: The SendErrors Method
Listing 4-9: The Sub Main Procedure
Listing 4-10: The LogException Method
Listing 4-11: The frmReportErrors_Load Method
Listing 4-12: The btnSend_Click Method
Listing 4-13: Method to Display the Application Errors

Chapter 5: Building Business Objects

Listing 5-1: The MaximumLengthException Class
Listing 5-2: The BusinessErrors Class
Listing 5-3: The BrokenRules Class
Listing 5-4: The Original RegionDescription Property
Listing 5-5: The Modified RegionDescription Property
Listing 5-6: The IsValid Property
Listing 5-7: The GetBusinessRules Method
Listing 5-8: The LoadListView Method
Listing 5-9: Additional BusinessRules Methods
Listing 5-10: The btnRules_Click Method
Listing 5-11: The BrokenRule Method Implemented
Listing 5-12: The Modified txtRegionDescription_Validated Method
Listing 5-13: The frmRegionEdit_Closing Method

Chapter 6: Creating the Windows User Interface

Listing 6-1: The Menu Table
Listing 6-2: The MenuDC Class
Listing 6-3: The UIMenu Class
Listing 6-4: The LoadMenus Routine
Listing 6-5: The AddItems Method
Listing 6-6: MainMenu_Click Method
Listing 6-7: Current Code to Launch the Region List
Listing 6-8: The UIInterface Module
Listing 6-9: The Cut Method
Listing 6-10: The Copy Method
Listing 6-11: The Paste Method
Listing 6-12: The CutCopyPaste Method
Listing 6-13: The SelectAll Method
Listing 6-14: The FindNext Method
Listing 6-15: Implementing the Find/FindNext Method in the MDI Form
Listing 6-16: The Toolbar Button Event Handler
Listing 6-17: Drawing Owner-Drawn Panels
Listing 6-18: The ShowErrorIcon Method

Chapter 7: Revisiting Objects and Rules

Listing 7-1: The Territory Stored Procedures
Listing 7-2: The TerritoryDC Object
Listing 7-3: Public Attributes of the Territory Class
Listing 7-4: The IsDirty and IsValid Methods
Listing 7-5: The Territory Class Constructors
Listing 7-6: The LoadRecord Method
Listing 7-7: The Territory Delete Method
Listing 7-8: The Territory Save Method
Listing 7-9: The GetBusinessRules and BrokenRules Methods
Listing 7-10: The TerritoryMgr Class
Listing 7-11: The frmTerritoryList Code Module and Class
Listing 7-12: The frmTerritoryEdit_Load Method
Listing 7-13: The LoadTerritories Method
Listing 7-14: The Territory Edit Form Validated Events
Listing 7-15: The btnOK_Click Method
Listing 7-16: Handling the Broken Rules and Business Rules Events

Chapter 8: Reusing Code

Listing 8-1: The BusinessBase Class
Listing 8-2: The GetBusinessRules Method of the Region Class
Listing 8-3: The Region and Territory Interfaces
Listing 8-4: IBaseInterface
Listing 8-5: The GetBusinessRules Method
Listing 8-6: The App.config File
Listing 8-7: Code for the UserCentric Project Item Template
Listing 8-8: The projItemVBCodeFile Element

Chapter 9: Understanding Server-Side Business Rules

Listing 9-1: The Employee Delete Stored Procedure
Listing 9-2: The Employee Getall Stored Procedure
Listing 9-3: The Employee getone Stored Procedure
Listing 9-4: The Employee Save Stored Procedure
Listing 9-5: The Employee Territory Relationship Stored Procedure
Listing 9-6: The Employee Territory Relationship Delete Stored Procedure
Listing 9-7: The structEmployee Structure
Listing 9-8: The IEmployee Interface
Listing 9-9: The Header and Properties of the EmployeeDC Class
Listing 9-10: The Employee LoadProxy Method
Listing 9-11: The Employee LoadRecord Method
Listing 9-12: The Employee Delete Method
Listing 9-13: The Employee GetBusinessRules Method
Listing 9-14: The Employee Save Method (Part 1)
Listing 9-15: The Employee Save Method (Part 2)
Listing 9-16: The Employee Save Method (Part 3)
Listing 9-17: The Employee Save Method (Part 4)
Listing 9-18: The Employee Save Method (Part 5)
Listing 9-19: The User-Centric Employee Private Attributes
Listing 9-20: The User-Centric Employee Public Properties
Listing 9-21: The Shadowed IsDirty Method
Listing 9-22: Employee Class Constructors
Listing 9-23: The Modified TerritoryMgr Constructor
Listing 9-24: The Employee LoadRecord and Related Methods
Listing 9-25: The Employee Object Delete Method
Listing 9-26: The Employee Class Save Method
Listing 9-27: The EmployeeMgr Class
Listing 9-28: Employee List Form
Listing 9-29: Employee Edit Header and Constructor Code
Listing 9-30: The btnAdd and btnRemove Methods
Listing 9-31: Associating a Photograph with an Employee
Listing 9-32: Displaying the Business Rules and Enabling/Disabling the OK Button
Listing 9-33: The Employee Validation Events
Listing 9-34: The OK Button Click Event
Listing 9-35: Trapping Employee Server-Side Errors
Listing 9-36: Employee Edit Form Closing Event
Listing 9-37: The LoadEmployees Method

Chapter 10: Using Reflection

Listing 10-1: The ComputerList Class
Listing 10-2: Three Properties with the ListAttribute Applied
Listing 10-3: The ComputerListMgr Class
Listing 10-4: The btnComputers_Click Method
Listing 10-5: The LoadList Method
Listing 10-6: The BookList and BookListMgr Classes
Listing 10-7: The btnBooks_Click Method
Listing 10-8: The ITest Interface
Listing 10-9: The NotNullAttribute Class
Listing 10-10: The DisplayNameAttribute Class
Listing 10-11: The NotEmptyAttribute Class
Listing 10-12: The MaxLengthAttribute Class
Listing 10-13: The GetDisplayName Method
Listing 10-14: The GetBusinessRules Method
Listing 10-15: The Validate Method
Listing 10-16: The ValidateAndThrow Method
Listing 10-17: The Validate Method of the BusinessBase Class

Chapter 11: Implementing Web Services and the UDDI

Listing 11-1: A Web Service Request in SOAP Format
Listing 11-2: The SOAP Response Format
Listing 11-3: The Webservice1.vbproj.webinfo File
Listing 11-4: The webservice1.sln File
Listing 11-5: The GetAllEmployees Method
Listing 11-6: Partial Output from the GetAllEmployees Method
Listing 11-7: The GetEmployeeDetails Web Method
Listing 11-8: The GetEmployeeDetails Results
Listing 11-9: The SOAP Response for the GetEmployeeDetails Method
Listing 11-10: The btnLoad Method
Listing 11-11: Second frmDetails Constructor
Listing 11-12: The frmDetails_Load Method
Listing 11-13: The btnEdit_Click Method
Listing 11-14: The btnSearch_Click Method
Listing 11-15: The btnDetails_Click Method

Chapter 12: Creating a Web Forms Interface

Listing 12-1: The UserList Table
Listing 12-2: The Location Tag
Listing 12-3: The RegReader Class
Listing 12-4: The ValidateUser Method
Listing 12-5: The AddUser Method
Listing 12-6: The Web Service Implementation of the Security Functions
Listing 12-7: The Add New User Functionality
Listing 12-8: Validating the User
Listing 12-9: The Employees.aspx Page_Load Method
Listing 12-10: Employee Details Page_Load Method
Listing 12-11: The Modified btnNewUser_Click Method
Listing 12-12: Modifications to the btnLogon_Click Method
Listing 12-13: The Page_Load Method of the employee.aspx Page
Listing 12-14: The Page_Load Method of the EmployeeDetails.aspx Page
Listing 12-15: The Save Method, Employee Details
Listing 12-16: The ShowErrors Method
Listing 12-17: Modified Page_Load Method
Listing 12-18: Assigning Associated Territories
Listing 12-19: btnSelect Method
Listing 12-20: The btnRemove_Click Method
Listing 12-21: The Modified btnSave_Click method

Chapter 13: Globalizing and Localizing Your Application

Listing 13-1: Loading the Resource Strings
Listing 13-2: EmployeeDetails Page_Load Method Additions

Appendix A: Adding Support for Unicode Characters

Listing A-1: The frmUnicode_Load Method




Building Client/Server Applications with VB. NET(c) An Example-Driven Approach
Building Client/Server Applications Under VB .NET: An Example-Driven Approach
ISBN: 1590590708
EAN: 2147483647
Year: 2005
Pages: 148
Authors: Jeff Levinson

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net