Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

C# ПІДРУЧНИКИ / c# / Premier Press - C# Professional Projects

.pdf
Скачиваний:
442
Добавлен:
12.02.2016
Размер:
14.7 Mб
Скачать

 

 

Y

 

L

 

F

 

M

 

A

 

E

 

T

 

 

C#

Professional Projects

This page intentionally left blank

Geetanjali Arora

Balasubramaniam

Aiaswamy

Nitin Pandey

C#

Professional Projects

WITH

©2002 by Premier Press, Inc.All rights reserved. No part of this book may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system without written permission from Premier Press, except for the inclusion of brief quotations in a review.

The Premier Press logo, top edge printing, and related trade dress are trademarks of P remier Press, Inc. and may not be used without written permission. All other trademarks are the property of their respective owners.

Important: Premier Press cannot provide software support. Please contact the appropriate sof tware manufacturer ’s technical support line or Web site for assistance.

Premier Press and the author have attempted throughout this book to distinguish proprietary trademarks from descriptive terms by following the capitalization 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 information 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

Publisher:

Stacy L. Hiquet

Marketing Manager:

Heather Buzzingham

Managing Editor:

Sandy Doell

Editorial Assistant:

Margaret Bauer

Book Production Services:

Argosy

Cover Design:

Mike Tanamachi

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 innovative 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 certified. 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 companies such as Computer Associates, IBM, Microsoft, Oracle, and Sun Microsystems.

This page intentionally left blank

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 instructorled 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 scheduling. 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 Windows 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 content developed on Microsoft technologies. Nitin has been involved in the development of WBTs and seminars for NIIT Online Ltd. and Microsoft. Nitin provides technical support to the development teams, develops sample applications, and provides technical reviews of learning content.

This page intentionally left blank

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