Professional Documents
Culture Documents
10
CERTIFICATE
This is to certify that this report title BIG done by:Shikha mahajan Rajwinder kaur Shabnam devi
ACKNOWLEDGEMENT
On the completion of my project I would like to express my sincere thanks to all those who have guided, advised, inspired & supported me during my project work at NIIT CENTER PATHANKOT BRANCH . I would extend my sincere thanks to Mr.varinder kumar(H.O.D) for all academic facilities extended for the completion of the project. I wish to express my deep sense of gratitude and profound feeling to Mr.
INTRODUCTION TO .NET
The .Net initiative offers a complete suite for developing applications .This suite consists of .net products, .Net services and .Net Framework. y .Net products: Microsoft has already introduced Visual Studio. Net, which is a tool for developing? Net applications by using programming languages such as Visual Basic. Net, VC#, AND Visual c++. y .Net services: .Net helps you create software as Web services .A Web Services is an application or business logic that is accessible through standard Internet protocols such as HTTP and SOAP. A Web service can be identified by a URL. y .Net framework: It is the foundation on which you design, develop, and deploy applications .Its consistent and simplified programming model makes it easier to build robust applications it is the core of the .Net infrastructure, as it exists as a layer between .Net applications and the underlining operating system.
.Net Framework Base Classes Configuration Win Forms Winforms Messaging Messaging Security Security Threading Threading DIAGNOSTICS Diagnostics IO Data Data Globalization Globalization XML XML CodeDOM Code DOM Reflection Reflection
Common Language Runtime MUTIPLE Multiple LANGUAGE Language INTEGRATION Integration Common Common Type Type System System Debbuging Debugging and and Profiling profiling Garbage Collection Garbage Collection Version Version Deployment Deployment Control Control Security Security
INTRODUCTION TO VISUAL C#
Visual c# is one of the languages that are directed towards meeting the objectives of the .Net initiative of creating distributed applications .VC# is a powerful object-oriented language that provides features such as abstraction.enscapsulation,inheritance,polymorphism,multithreadingan d exception handling.
Features of VC#
y y y y y y Inheritance Constructors and Destructors Overloading Overriding Exception handling Multithreading
y INHERITANCE: Inheritance is the ability of a class to derive its characteristics from an existing class. Using VC#. You can create a class that provides basic functionality so that other classes can inherit its members. Derived Class: Class Derived Class: Parent Class { : : } y CONSTRUCTORS AND DESTRUCTORS: VC# supports constructors and destructors. A constructor is a special type of
This documentation is done by SHIKHA,SHABNAM AND RAJWINDER.
method that is invoked when you create a new instance of a class A constructors is used to initialize the members of a class. A destructor, on the other hand is invoked when an object is destroyed. y OVERLOADING: Overloading enables methods to be defined with the same name but different parameters. In other words, it allows you to have multiple implementations of a method. Class My Class { Public int add (int a, int b, int c) { Return (a+b+c); } Public int add (int a, int b) { Return (a+b); } } y OVERRIDING: Overriding is the capability of a derived class to override the characteristics of the parent class. VC# has introduced the override keyword for providing a new implementation of an inherited member in the derived class. y EXCEPTION CLASS: Exceptions are the errors that are generated at runtime as a result of an erroneous statement or condition or because of some unexpected behavior of the application.
This documentation is done by SHIKHA,SHABNAM AND RAJWINDER.
y MULTITHREADING: VC# provides full support for creating multithreaded applications .Multithreading enables an application to contain one or more threads that can share the workload in an application by executing one at a time of any window displayed in an application. A Window form is used to accept input from a user and display information.
INTERFACES:
A user interface is the means by which a user interacts with an applications .A data entry screen that accepts input for product orders is an example of a user interface. There are two types of user interface y Character user interface(CUI) y Graphical user interface(GUI)
CUI: In CUI, you interact with an application by entering commands. GUI: GUI-based software, on the other hand provides a graphical
interface for interfacing with an application. GUIs are easy to learn and use as you do not have to remember any command or syntax. .
the user or display some information on the form. Each control has its own set of properties, methods, and events that makes it suitable for a particular task.
TEXTBOX CONTROLS: The Textbox control is used to display text to a
user or accept input from a user. By default you can enter a maximum of 2048 characters in a textbox control.
LABEL CONTROL: The label control is used to display then text that
cannot be edited by the user directly. The label control is used for providing information or description of another control on the windows form.
LINKLABEL CONTROL: The link label control is used to display the text
as a link; it opens another form or web site. The link label control has all properties of a label control.
LISTBOX CONTROL: The list box control is used to display a list of items
to a user. A user can select an item from the list .You can add items to a list box control by using the properties window. The combo box control is used to display a drop-down list of items. It is a combination of a text box in which a user enters an item and a drop-down list from which a user selects an item.
COMBOBOX CONTROL:
CHECKBOX CONTROL:
This control is used to implement question which have answers as yes/no or True/False options.
RADIOBUTTON CONTROL: The radio button control is used to provide a
set of mutually exclusive options to the user. Only one button can be selected in a group.
GROUPBOX CONTROL: The group box control is used to group relegated
controls together. The group box controls facilitates the group of controls to be easily moved together at design time.
BUTTON CONTROL: The button control is used to perform an action
when a user clicks it. The button control has the text property which is used to display text on a button.
STATUSBAR CONTROL: The status Bar control to .form.
DATA TYPES
A data type (or data type) In programming, a classification identifying one of various types of data, as floating-point, integer, or Boolean, stating the possible values for that type, the operations that can be done on that type, and the way the values of that type are stored.
VARIABLES
A variable is a way of referring to a memory location used in a computer program. This memory location holds values- perhaps numbers or text or more complicated types of data like a payroll record
This documentation is done by SHIKHA,SHABNAM AND RAJWINDER.
INTRODUCTION TO COMPONENTS
A Component is a reusable piece of code in binary form, which can be used along with the components from other vendors.eg. We might develop an application for the website of a music company that deals in audio CDs.
Types of Components
Component can be divided into the following categories: y y y y y In-built components Component classes User controls Custom control In-built components
The .NET class framework comes with in-built components, such as Timer and Service Controller.
Component classes
A class becomes a component when it follows defined standards of interaction. These standards are provided by the I Component interface.
This documentation is done by SHIKHA,SHABNAM AND RAJWINDER.
User Controls
User controls can be defined as bundles of standard controls and can be used as the component.
Custom control
Custom controls have the highest degree of customizability. We may require a control that has a very little resemblance with any of the inbuilt controls in matter of both appearance and functionbility.All custom controls inherit fromSystem.Windows.Forms.Control class e.g. If we need a analog clock control, combination of controls or inheriting a control will be of very little help.
Characteristics of a Component
The name of a component class should be short and meaningful. It should be a combination of whole words with a capitalized initial character for each word eg.PriceCalculator. You can control the use of a component by using proper access level for the constructors. The base class of all components by using proper access level for the constructors. The base class of all the components is the class Component. The namespace structure in an assembly should be according to the internal organization of the components. Working of a component
A Component goes through different stages once we deploy it. The constructors initialize components. Initialization can be of two typesy Type initialization y Instance initialization
Type initializationIt is achieved by using a static constructor. We will initialize static variables in these constructors. We cannot overload a static constructor.
Types of streams
A stream is an abstraction of a sequence of bytes, which may come from a file, a TCP/IP socket, or memory.
Buffered Stream: This stream provides a buffer for other streams to improve performance. File Stream: This stream provides a way to read and write files. Memory Stream: This stream uses memory for backup storage. It performs faster I/O operations in comparison to other streams. Network Stream: This stream provides a way to access data on the network. Crypto Stream: This stream enables you to perform encryption and decryption on other streams.
File Handling
In.NET, System.IO provides all classes required for file handling. The two important classes are: File class: The File class is the logical representation of the physical file on the disk. Directory class: The Directory class is the logical representation of the physical directory on the disk.
The Following Table Lists Some of the commonly used Methods of Directory Info Class:
Get Files
Description The Create method creates a directory. The Create Subdirectory method creates a subdirectory. The Delete method deletes a directory. The Get Directories method returns the subdirectories in the current directory. The Get Files method returns the files in the current directory.
INTRODUCTION TO ADO.NET
ADO.NET is a model used by.NET applications to communicate with a database for retrieving, accessing, updating data. Applications need to communicate with database for the following tasks:
y Retrieving the data stored in the database and presenting it in a user-friendly format y Updating the database that is, inserting, modifying and deleting data
Features of ADO.NET
y Disconnected data architecture- ADO.NET uses the disconnected data architecture. Applications connect to the database only while retrieving and updating data. After the is retreived,the connection with the database is closed. y Data cached in datasets- A dataset is the most common method of accessing data in ADO.NET because it implements a disconnected architecture. Therefore, the data is retrieved and stored in datasets. A dataset is a cached set of database records. y Data transfer in XML format-Data is transferred from a database into dataset and from the dataset to another component by using XML.
Acessin
.NET APPLICATIONS
CONNECTION
Retrieves
DATA READER
data
COMMAND
Executes command
DATA BASE
DATASET
DATA ADAPTER
The data residing in a database is retrieved through data provider. An application can access data either through a Dataset or through a Data Reader object
y Using a Dataset: In this case, the data is cached in a dataset and the applications access the data from dataset. y Using a Data Reader: In this method, a Data Reader object, which is a component of the data provider, uses the connection object to connect to the database, uses the command object to retrieve data, and provides data to the application in a read only and forward only mode.
Data Provider
A data provider is used for connecting to a database, retrieving data, sorting the data in a dataset, reading the data, and updating the database.
y SQL Server data provider: This type of data provider is used to work specifically with Microsoft SQL Server.
Data Adapter
A data adapter is integral to the working of ADO.NET since data is transferred to and from a data base through a data adapter. A data adapter retrieves data from a data base into a dataset. When you make changes to the dataset, the changes in the database are actually done by the data adapter.
Data Reader
Data reader is used to retrieve data from a data source in a read only and forward only mode. A data reader uses the connections object to connect to the database, the command object to execute SQL statements on the database and retrieves the data in a sequential mode. Using data reader results in faster access to data and less memory usage since at any time, only a single row is stored in the memory.
Dataset
Dataset is disconnected, cached set of records that are retrieved from a data base. The dataset acts like virtual database containing tables, rows and columns.
The dataset has its own object model, as shown in the figure:
DATASET
Extended Properties
Data Relation
Data Table
Data View
Primary Key
Data Row
Data Column
DATA BINDING
After the data is retrieved from the database, it has to be bound to a control on a Window Form to be displayed. Such a binding is called data binding. It is of two types.
Crystal Report
CRYSTAL REPORT
DATA
DATA SOURCE
data from it. The data from the data source is cached in a dataset and multiple Crystal Reports accesses the data from the dataset.
DATASET DATA
DATA SOURCE
THANKS THANKS