intTypePromotion=1
zunia.vn Tuyển sinh 2024 dành cho Gen-Z zunia.vn zunia.vn
ADSENSE

Microsoft C# Professional Projects

Chia sẻ: Nguyenhien Hien | Ngày: | Loại File: PDF | Số trang:957

151
lượt xem
33
download
 
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

This book provides readers with the knowledge of Visual C# concepts. In addition to the concepts explained in the chapters, the book provides readers with several projects that enable them to create Windows applications,Web services,Web applications, and mobile Web applications.The book aims for providing the readers with extensive knowledge of C# so that they are able to develop live projects using C#. The book is aimed at readers with a basic knowledge of programming.

Chủ đề:
Lưu

Nội dung Text: Microsoft C# Professional Projects

  1. TE AM FL Y
  2. C# Professional Projects
  3. This page intentionally left blank
  4. Geetanjali Arora Balasubramaniam C# Professional Projects Aiaswamy Nitin Pandey WITH
  5. ©2002 by Premier Press, Inc.All rights reserved. No part of this book may Publisher: be reproduced or transmitted in any form or by any means, electronic or Stacy L. Hiquet mechanical, including photocopying, recording, or by any information stor- Marketing Manager: age or retrieval system without written permission from Premier Press, Heather Buzzingham except for the inclusion of brief quotations in a review. The Premier Press logo, top edge printing, and related trade dress Managing Editor: are trademarks of P remier Press, Inc. and may not be used with- Sandy Doell out written permission. All other trademarks are the property of Editorial Assistant: their respective owners. Margaret Bauer Important: Premier Press cannot provide software support. Please contact the Book Production Services: appropriate sof tware manufacturer ’s technical support line or Web site for Argosy assistance. Cover Design: Premier Press and the author have attempted throughout this book to dis- Mike Tanamachi tinguish proprietary trademarks from descriptive terms by following the cap- italization style used by the manufacturer. Information contained in this book has been obtained by Premier Press from sources believed to be reliable.However, because of the possibility of human or mechanical error by our sources, Premier Press, or others, the Publisher does not guarantee the accuracy, adequacy, or completeness of any informa- tion and is not responsible for any errors or omissions or the results obtained from use of such information. Readers should be particularly aware of the fact that the Internet is an ever-changing entity. Some facts may have changed since this book went to press. ISBN: 1-931841-30-6 Library of Congress Catalog Card Number: 2001096998 Printed in the United States of America 02 03 04 05 06 RI 10 9 8 7 6 5 4 3 2 1
  6. About NIIT NIIT is a global IT solutions corporation with a presence in 38 countries. With its unique business model and technology-creation capabilities, NIIT delivers software and learning solutions to more than 1,000 clients across the world. The success of NIIT’s training solutions lies in its unique approach to education. NIIT’s Knowledge Solutions Business conceives, researches, and develops all of its course material. A rigorous instructional design methodology is followed to create engaging and compelling course content. NIIT trains over 200,000 executives and learners each year in information technology areas using stand-up training, video-aided instruction, computer-based training (CBT), and Internet-based training (IBT). NIIT has been featured in the Guinness Book of World Records for the largest number of learners trained in one year! NIIT has developed over 10,000 hours of instructor-led training (ILT) and over 3,000 hours of Internet-based training and computer-based training. IDC ranked NIIT among the Top 15 IT training providers globally for the year 2000. Through the inno- vative use of training methods and its commitment to research and development, NIIT has been in the forefront of computer education and training for the past 20 years. Quality has been the prime focus at NIIT. Most of the processes are ISO-9001 certi- fied. It was the 12th company in the world to be assessed at Level 5 of SEI-CMM. NIIT’s Content (Learning Material) Development facility is the first in the world to be assessed at this highest maturity level. NIIT has strategic partnerships with compa- nies such as Computer Associates, IBM, Microsoft, Oracle, and Sun Microsystems.
  7. This page intentionally left blank
  8. About the Authors Geetanjali Arora is an instructional designer who has worked with the NIIT for almost two years. She has done several projects with the NIIT that include instructor- led training (ILT),computer-based training (CBT),and Web-based training (WBT). She has written on both technical and non-technical subjects. At the NIIT, Geentanjali’s responsibilities include scripting, construction, planning, and schedul- ing. She has also provided training on NexGen and Dreamweaver. Balasubramaniam Aiaswamy is a technical trainer and writer, an instructional designer, a subject matter expert (SME), and an ID reviewer with NIIT’s Knowledge Solutions Business division, which develops and reviews instructor-led training (ILT) products for various software and technologies.These technologies include Microsof t Visual InterDev 6.0, Microsoft Site Server 3.0 Commerce Edition, Microsoft Win- dows CE, Java 2 Micro Edition (J2ME), networking concepts, the installation and administration of a Layer 3 network, and Web security. He is both an MCSD and an MCP in Windows NT. Balasubramaniam has experience in teaching career programs at NIIT’s Career Education Group division. He has taught various technical subject areas including networking essentials, SQL Server 7.0, Microsoft Windows NT Server 4.0, Microsoft Visual Basic 6.0, Microsoft Visual C++ 4.0, Windows 32 API programming, HTML, Java, Unix, C, and C++. He has also set up and managed labs for students and administered Novell 3.11 and UNIX (SCO)–based networks. Nitin Pandey works with NIIT as a subject matter expert (SME) for learning con- tent developed on Microsoft technologies. Nitin has been involved in the develop- ment of WBTs and seminars for NIIT Online Ltd. and Microsoft. Nitin provides technical support to the development teams, develops sample applications, and pro- vides technical reviews of learning content.
  9. This page intentionally left blank
  10. Contents at a Glance Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxi Part I Introduction to C# . . . . . . . . . . . . . . . . . . . . . . 1 1 Overview of the .NET Framework . . . . . . . . . . . . . . . . . . . 3 2 C# Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Part II Handling Data . . . . . . . . . . . . . . . . . . . . . . . . 41 3 Components of C# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4 More about Components . . . . . . . . . . . . . . . . . . . . . . . . . 67 5 Attributes and Properties. . . . . . . . . . . . . . . . . . . . . . . . . . 83 6 Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Part III Professional Project 1: Creating a Customer Maintenance Project. . 109 7 Project Case Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 8 Windows Forms and Controls. . . . . . . . . . . . . . . . . . . . . 141 9 Validations and Exception Handling . . . . . . . . . . . . . . . . 175 10 Database Interaction Using ADO.NET . . . . . . . . . . . . . 197 11 Crystal Reports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 12 Deploying a Windows Application . . . . . . . . . . . . . . . . . 259 Part IV Professional Project 2: Creating the Employee Records System (ERS) Project. . . 293 13 Project Case Study and Design . . . . . . . . . . . . . . . . . . . . 297 14 Implementing the Business Logic . . . . . . . . . . . . . . . . . . 311 Part V Professional Project 3: Creating a Creative Learning Project . . . . . . 329 15 Project Case Study and Design . . . . . . . . . . . . . . . . . . . . 333 16 Implementing the Programming Logic . . . . . . . . . . . . . . 349 17 Interacting with a Microsoft Word Document and Event Viewer . . . . . . . . . . . . . . . . . . . . . 365
  11. x Contents at a Glance Part VI Professional Project 4: Creating an Airline Reservation Portal. . . . . 395 18 Project Case Study and Design . . . . . . . . . . . . . . . . . . . . 399 19 Basics of ASP.NET Web Applications. . . . . . . . . . . . . . . 429 20 Designing the Application. . . . . . . . . . . . . . . . . . . . . . . . 453 21 Implementing the Business Logic . . . . . . . . . . . . . . . . . . 483 22 Creating the Customer Transaction Portal. . . . . . . . . . . . 521 23 Debugging and Testing the Application. . . . . . . . . . . . . . 537 Y 24 Administering the Application . . . . . . . . . . . . . . . . . . . . 551 FL 25 Securing the Application . . . . . . . . . . . . . . . . . . . . . . . . . 567 26 Deploying the Application . . . . . . . . . . . . . . . . . . . . . . . 581 AM Part VII Professional Project 5: Creating a Web Portal for a Bookstore . . . . 593 TE 27 Project Case Study and Design . . . . . . . . . . . . . . . . . . . . 597 28 Exploring ASP.NET Web Services . . . . . . . . . . . . . . . . . 619 29 Developing Web Services . . . . . . . . . . . . . . . . . . . . . . . . 641 30 Developing Web Service Clients . . . . . . . . . . . . . . . . . . . 667 Part VIII Professional Project 6: Creating a Mobile Application . . . . . . . . . . . 713 31 Project Case Study and Design . . . . . . . . . . . . . . . . . . . . 717 32 Basics of Mobile Applications . . . . . . . . . . . . . . . . . . . . . 727 33 Implementing the Business Logic . . . . . . . . . . . . . . . . . . 763 Part IX Beyond the Labs . . . . . . . . . . . . . . . . . . . . . 793 34 Advanced C# Concepts. . . . . . . . . . . . . . . . . . . . . . . . . . 795 Part X Appendixes . . . . . . . . . . . . . . . . . . . . . . . . . 829 A Unsafe Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831 B Introduction to Visual Basic .NET . . . . . . . . . . . . . . . . . 843 C Visual Studio.NET Integrated Development Environment . . . . . . . . . . . . . . . . . . . . . . . 877 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 897 Team-Fly®
  12. Contents Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxi Goal of the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxi How to Use this Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxii PART I INTRODUCTION TO C# . . . . . . . . . . . . . . . . . 1 Chapter 1 Overview of the .NET Framework . . . . . . . . . . . 3 Introduction to the .NET Framework . . . . . . . . . . . . . . . . . . . . . . 4 Common Language Runtime (CLR) . . . . . . . . . . . . . . . . . . . . 6 Class Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Versioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 An Overview of .NET Framework Base Classes . . . . . . . . . . . . . 14 Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Delegates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Chapter 2 C# Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Introduction to C# . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Initializing Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Variable Modifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Variable Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Types of Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Variable Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Types of Data Type Casting . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
  13. xii Contents Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Initializing Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Working with Strings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Statements and Expressions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Types of Statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 PART II HANDLING DATA . . . . . . . . . . . . . . . . . . . . 41 Chapter 3 Components of C# . . . . . . . . . . . . . . . . . . . . . 43 Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Declaring Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Inheritance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Destructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Declaring a Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Calling a Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Passing Parameters to Methods . . . . . . . . . . . . . . . . . . . . . . . 52 Method Modifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Overloading a Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Namespaces. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 Declaring Namespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Accessing Namespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Structs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Enumerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
  14. Contents xiii Writing, Compiling, and Executing a C# Program. . . . . . . . . . . . 64 Writing a C# Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Compiling a C# Program. . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Executing a C# Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Chapter 4 More about Components . . . . . . . . . . . . . . . . 67 Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Single-Dimensional Arrays. . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Multidimensional Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Methods in Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Creating Collections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Working with Collections. . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Indexers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 Boxing and Unboxing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Preprocessor Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 #region and #endregion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 #define and #undef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 #if , #endif, #else, and #elif. . . . . . . . . . . . . . . . . . . . . . . . . . 80 #error and #warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Chapter 5 Attributes and Properties . . . . . . . . . . . . . . . 83 Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Declaring Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Attribute Class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Attribute Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Default Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
  15. xiv Contents Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Declaring Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Accessors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Types of Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Chapter 6 Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Introduction to Threads. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Creating Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Aborting Threads. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Joining Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Suspending Threads. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Making Threads Sleep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Thread States. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Thread Priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 PART III PROFESSIONAL PROJECT 1 . . . . . . . . . . . 109 Project 1 Creating a Customer Maintenance Project. . 111 Project 1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 Chapter 7 Project Case Study . . . . . . . . . . . . . . . . . . . 113 Case Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Project Life Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Analyzing Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 High-Level Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 Primary and Foreign Keys . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Referential Integrity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 Normalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
  16. Contents xv Designing a Database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 Designing the Windows Forms Used in Customer Maintenance Project . . . . . . . . . . . . . . . . 130 Low-Level Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Integration and Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 User Acceptance Testing. . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 Operations and Maintenance . . . . . . . . . . . . . . . . . . . . . . . . 138 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 Chapter 8 Windows Forms and Controls. . . . . . . . . . . . 141 Introduction to Visual Studio .NET Projects. . . . . . . . . . . . . . . 142 Creating a New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Console Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 Windows Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Creating a Windows Application for the Customer Maintenance Project. . . . . . . . . . . . . . . . . . . . 164 Creating an Interface for Form1 . . . . . . . . . . . . . . . . . . . . . . . 165 Creating an Interface for WorkerForm . . . . . . . . . . . . . . . . . . . 167 Creating an Interface for CustomerForm . . . . . . . . . . . . . . . . . 168 Creating an Interface for ReportsForm . . . . . . . . . . . . . . . . . . 170 Creating an Interface for JobDetailsForm . . . . . . . . . . . . . . . 172 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Chapter 9 Validations and Exception Handling . . . . . . . 175 Performing Validations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 Identifying the Validation Mechanism . . . . . . . . . . . . . . . . . 177 Using the ErrorProvider Control . . . . . . . . . . . . . . . . . . . . . 183 Handling Exceptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 Using the try and catch Statements . . . . . . . . . . . . . . . . . . . 187 Using the Debug and Trace Classes . . . . . . . . . . . . . . . . . . . . 189
  17. xvi Contents Debugging the Customer Management Application . . . . . . . . . 190 Using the Debugging Features of Visual Studio .NET . . . . . 190 Using the Task List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 Chapter 10 Database Interaction Using ADO.NET . . . . . . 197 Connecting Windows Forms to a Data Source Using ADO.NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 Creating Form1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 Connecting WorkerForm to the Workers Table . . . . . . . . . . . 200 Connecting CustomerForm to the tblCustomer Table . . . . . . 211 Connecting the JobDetails Form to the tblJobDetails Table . . . . . . . . . . . . . . . . . . . . . . . . . . 223 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 Chapter 11 Crystal Reports . . . . . . . . . . . . . . . . . . . . . . 239 Introduction to the Crystal Reports Designer Tool. . . . . . . . . . . 240 Creating the Reports Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 Creating Crystal Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 Creating the Windows Forms Viewer Control . . . . . . . . . . . 248 Creating the Monthly Customer Visit Report . . . . . . . . . . . . . . 251 Creating the Monthly Balancing and Alignment Report . . . . . . 254 Creating the Monthly Worker Report . . . . . . . . . . . . . . . . . . . . 256 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 Chapter 12 Deploying a Windows Application. . . . . . . . . 259 Introduction to Deploying a Windows Application . . . . . . . . . . 260 Deployment Projects Available in Visual Studio .NET . . . . . 261 Deployment Project Editors . . . . . . . . . . . . . . . . . . . . . . . . . 279 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
  18. Contents xvii PART IV PROFESSIONAL PROJECT 2 . . . . . . . . . . . 293 Project 2 Creating the Employee Records System (ERS) Project. . . . . . . . . . . 295 Project 2 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 Chapter 13 Project Case Study and Design . . . . . . . . . . 297 Case Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 Project Life Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 Analyzing Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . 298 High-Level Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 Low-Level Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 Chapter 14 Implementing the Business Logic. . . . . . . . . 311 Populating the TreeView Control . . . . . . . . . . . . . . . . . . . . . . . 312 Displaying Employee Codes in the TreeView Control . . . . . 313 Event Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 Displaying Employee Details in the ListView Control . . . . . 318 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327 PART V PROFESSIONAL PROJECT 3 . . . . . . . . . . . 329 Project 3 Creating a Creative Learning Project . . . . . . 331 Project 3 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
  19. xviii Contents Chapter 15 Project Case Study and Design . . . . . . . . . . 333 Case Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334 Project Life Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 Analyzing Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . 335 High-Level Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336 Low-Level Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 Chapter 16 Implementing the Programming Logic . . . . . 349 Adding the Programming Logic to the Application . . . . . . . . . . 350 Adding Code to the Form Load() Method . . . . . . . . . . . . . . 351 Adding Code to the OK Button . . . . . . . . . . . . . . . . . . . . . . 353 Adding Code to the Exit Button . . . . . . . . . . . . . . . . . . . . . 363 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364 Chapter 17 Interacting with a Microsoft Word Document and Event Viewer . . . . . . . . . . . . 365 Interacting with a Microsoft Word Document. . . . . . . . . . . . . . 366 The Created Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366 Adding Code to the Created Event. . . . . . . . . . . . . . . . . . . . 367 Overview of XML. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371 The XmlReader Class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372 The XmlWriter Class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373 Displaying Data in an XML Document . . . . . . . . . . . . . . . . 373 Displaying an Error Message in the Event Log. . . . . . . . . . . 377 Displaying Event Entries from Event Viewer . . . . . . . . . . . . 383 Displaying Data from the Summary.xml Document in a Message Box . . . . . . . . . . . . . . . . . . . . . . . . 385 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
  20. Contents xix PART VI PROFESSIONAL PROJECT 4 . . . . . . . . . . . 395 Project 4 Creating an Airline Reservation Portal. . . . . 397 Project 4 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398 Chapter 18 Project Case Study and Design . . . . . . . . . . 399 Airline Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400 Role of a Business Manager . . . . . . . . . . . . . . . . . . . . . . . . . 401 Role of a Network Administrator . . . . . . . . . . . . . . . . . . . . . 402 Role of a Line-of-Business Executive . . . . . . . . . . . . . . . . . . 402 Project Requirements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403 Creation and Deletion of User Accounts. . . . . . . . . . . . . . . . 403 Addition of Flight Details . . . . . . . . . . . . . . . . . . . . . . . . . . 404 Reservations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404 Cancellations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 Query of Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 Confirmation of Tickets. . . . . . . . . . . . . . . . . . . . . . . . . . . . 405 Creation of Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406 Launch of Frequent Flier Programs . . . . . . . . . . . . . . . . . . . 406 Summarizing the Tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 Project Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 Database Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408 Web Forms Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 Enabling Security with the Directory Structure. . . . . . . . . . . 425 Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427 Chapter 19 Basics of ASP.NET Web Applications . . . . . . 429 Getting Started with ASP.NET. . . . . . . . . . . . . . . . . . . . . . . . . 430 Prerequisites for ASP.NET Applications. . . . . . . . . . . . . . . . 431 New Features in ASP.NET. . . . . . . . . . . . . . . . . . . . . . . . . . 431 Types of ASP.NET Applications . . . . . . . . . . . . . . . . . . . . . 433
ADSENSE

CÓ THỂ BẠN MUỐN DOWNLOAD

 

Đồng bộ tài khoản
2=>2