[go: up one dir, main page]

0% found this document useful (0 votes)
85 views75 pages

Resource Reservation System

The document describes a resource reservation system that allows students and teachers at universities and colleges to register and log in to reserve resources like lab times and meeting rooms online. It is a web-based application that makes reservations easier to manage than existing manual systems. The system uses .NET framework and technologies like C# for development, and has features that allow online booking of available resources and scheduling of meetings and tasks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views75 pages

Resource Reservation System

The document describes a resource reservation system that allows students and teachers at universities and colleges to register and log in to reserve resources like lab times and meeting rooms online. It is a web-based application that makes reservations easier to manage than existing manual systems. The system uses .NET framework and technologies like C# for development, and has features that allow online booking of available resources and scheduling of meetings and tasks.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 75

RESOURCE RESERVATION SYSTEM

ABSTRACT:

One of the facilities provided by many web-based application projects such as this is that they
can be accessed via internet by all the people. That is to say, projects like this when
implemented with registration system, it becomes very easy for the target group to access the
right information provided through the application.

Resource reservation system provides registration system where students and teachers can fill
in some details and they are registered into the system. Thus, the information conveyed via
this web-based system is only accessible to teachers and students who are registered into the
system.

This project is mainly targeted at universities and colleges, as previously mentioned.


University students can find such application helpful in planning lab timings, reserving
meetings, meeting with teachers, scheduling tasks, and other similar activities.

Additionally, students with the help of such application can easily make online booking of
available resources. Here, students will look after the available slots in the web page and they
can directly reserve or take appointment.

The key features of resource reservation system are outlined below:

 It is a web-based application, so can be easily accessed via internet


 Teachers and students are required to register into the system
 Username and password is required to log in to the system
 Students can plan and schedule meetings, reservations, etc.
 Students can directly book available resources online
 It is very easy to use and maintain for the administrator
 A person with basic knowledge of handling a software application can easily
control this system as the administrator
 It is economical and flexible, meetings all the required demands
For all this to work out, there’s an administrator at the database-end of the system who
handles and maintains everything. The administrator’s main role is to handle registration of
students and teachers, set up their profiles or accounts, and flash out lab timings, meetings
and other schedules.

DRAWBACKS OF EXISTING SYSTEM:

The current asset reservation system is exceptionally cumbersome and monotonous.


Understudies should visit their particular school or college and meet individuals from their
separate division to get data with respect to accessibility of timings and time to get the space.

PROPOSED SYSTEM

This project is mainly targeted at universities and colleges, as previously mentioned.


University students can find such application helpful in planning lab timings, reserving
meetings, meeting with teachers, scheduling tasks, and other similar activities.

Additionally, students with the help of such application can easily make online booking of
available resources. Here, students will look after the available slots in the web page and they
can directly reserve or take appointment.

SOFTWARE REQUIREMENT:

Operating System: Window 10

Front -End: Visual Studio 2008

Back –End: SQL Server 2008

Language - .Net, Java Script

HARDWARE REQUIREMENT:

Processor: Intel core i3


RAM: 4 GB

Hard Disk Drive: 500 GB

Video: 800*600, 1024*768 256 colors

ABOUT THE SOFTWARE

WHAT IS “.NET”?

Microsoft .net is a set of micro soft software technologies for rapidly building and
integrating xml web services, micro soft windows-based applications, and web solutions. The
.net framework is a language-neutral platform for writing programs that can easily and
securely interoperate. There’s no language barrier with .net: there are numerous languages
available to the developer including managed c++, c#, visual basic and java script.

The .net framework provides the foundation for components to interact seamlessly,
whether locally or remotely on different platforms. It standardizes common data types and
communications protocols so that components created in different languages can easily
interoperate. “.net” is also the collective name given to various software components built
upon the .net platform. These will be both products (visual studio.net and windows.net server,
for instance) and services (like passport, .net my services, and so on).

THE .NET FRAMEWORK

Microsoft designed C# from the ground up to take advantage of its new .NET
Framework. Because C# is a player in this new .NET world, you should have a good
understanding of what the .NET Framework provides and how it increases your productivity.
The .NET Framework is made up of four parts, as shown in the Common Language
Runtime, a set of class libraries, a set of programming languages, and the ASP.NET
environment. The .NET Framework was designed with three goals in mind. First, it was
intended to make Windows applications much more reliable, while also providing an
application with a greater degree of security. Second, it was intended to simplify the
development of Web applications and services that not only work in the traditional sense, but
on mobile devices as well. Lastly, the framework was designed to provide a single set of
libraries that would work with multiple languages. The following sections examine each of
the .NET Framework components.

WEB DEVELOPMENT:

The .NET Framework was designed with one thing in mind: to fuel Internet
development. This new fuel to add to Internet development is called Web Services. You can
think of Web Services as a Web site that interacts with programs, rather than people. Instead
of delivering Web pages, a Web Service takes a request formatted as XML, performs a
particular function, and then returns a response to the requester as an XML message.

Note XML or eXtensible Markup Language is a self describing language much like
that of HTML. XML on the other hand has no predefined tags thus allowing it great
flexibility in representing a wide variety of objects.
A typical application for a Web Service would be to sit as a layer on top of a corporate
billing system. When a user surfing the Web purchases products from your Internet site, the
purchase information is then sent to the Web Services, which totals all the products, adds a
record to the accounts receivable database, and then returns a response with an order
confirmation number. Not only can this Web Service interact with Web pages, it can interact
with other Web Services, such as a corporate accounts payable system.

In order for the Web Service model to survive the natural evolution of programming
languages, it must include much more than a simple interface to the Web. The Web service
model also includes protocols that enable applications to find Web Services available across a
LAN or the Internet. This protocol also enables the application to explore the Web Service
and determine how to communicate with it, as well as how to exchange information. To
enable Web Service discovery, the Universal Discovery, Description and Integration (UDDI)
was established. This allows Web Services to be registered and searched, based on key
information such as company name, type of service, and geographic location.

APPLICATION DEVELOPMENT

Aside from Web development, you can still build traditional Windows applications
with the .NET Framework. Windows applications created with the .NET Framework are
based upon Windows Forms. These Windows Forms are somewhat of a crossbreed between
Visual Basic 6 forms and the forms of Visual C++. Though forms look the same as their
predecessors, they are completely object-oriented and class-based, much like form objects in
the Microsoft Foundation Class. These new Windows Forms now support many classic
controls found in Visual Studio, such as the Button, TextBox, and Label, as well as ActiveX
controls. Aside from the traditional controls, new components such as PrintPreview,
LinkLabel, ColorDialog, and OpenFileDialog are also supported.

Building applications with .NET also provides you with many enhancements not
found in other languages, such as security. These security measures can determine whether an
application can write or read a disk file. They also enable you to embed digital signatures into
the application to ensure that the application was written by a trusted source. The .NET
Framework also enables you to embed component information, and version information,
within the actual code. This makes it possible for software to install on demand,
automatically, or with no user intervention at all. Together, all of these features greatly
reduce support costs within the enterprise.

COMMON LANGUAGE RUNTIME

Programming languages usually consist of both a compiler and a runtime environment. The
compiler turns the code that you write into executable code that can be run by users. The
runtime environment provides a set of operating system services to your executable code.
These services are built into a runtime layer so that your code does not need to worry about
the low-level details of working with the operating system. Operations such as memory
management and file I/O are good examples of services that might be provided by a runtime
environment. Before .NET came along, each language shipped with its own runtime
environment. Visual Basic shipped with a runtime called MSVBVM60.DLL. Visual C++
shipped with a DLL called MSVCRT.DLL. Each of these runtime modules provided a set of
low-level services to code that developers wrote. Developers would write code and then build
that code with the appropriate runtime in mind. The executable code would ship with the
runtime, which would be installed on a user's machine if it weren't already present.

The main problem with these runtime environments is that they were designed for use
with a single language. The Visual Basic runtime provided nice features for operations like
working with memory and launching COM objects, but these features were only available to
Visual Basic users. Developers using Visual C++ could not use the features of the Visual
Basic runtime. Visual C++ users had their own runtime, with its own long list of features, but
those features were unavailable to Visual Basic users. This "separate runtime" approach
prevented languages from working together seamlessly.

It's not possible, for example, to grab some memory in a piece of Visual Basic code
and then hand it off to a piece of Visual C++ code, which frees the memory. The different
runtimes implement their own feature set in their own way. The feature sets of the various
runtimes are inconsistent. Even features that are found in more than one runtime are
implemented in different ways, making it impossible for two pieces of code written in
different languages to work together.
One of the design goals of the .NET Framework was to unify the runtime engines so
that all developers could work with a single set of runtime services. The .NET Framework's
solution is called the Common Language Runtime (CLR). The CLR provides capabilities such
as memory management, security, and robust error-handling to any language that works with
the .NET Framework. Thanks to the CLR, all .NET languages can use a variety of runtime
services without developers worrying about whether their particular language supports a
runtime feature.
The CLR also enables languages to interoperate with one another. Memory can be
allocated by code written in one language — Visual Basic .NET, for instance — and can be
freed by code written in another language, say, C#. Similarly, errors can be raised in one
language and
processed in another language.

.NET CLASS LIBRARIES

Developers like to work with code that has already been tested and shown to work,
such as the Win32 API and the MFC Class libraries. Code re-use has long been the goal of
the software development community. However, the practicality of code re-use has not lived
up to expectations. Many languages have had access to bodies of pre-tested, ready-to-run
code. Visual C++ has benefited from class libraries such as the Microsoft Foundation Classes
(MFC), which enabled C++ developers to build Windows applications quickly, and the
Active Template Library (ATL), which provided support for building COM objects.
However, the language specific nature of these libraries has made them unavailable for use in
other languages.

Visual Basic developers are locked out of using ATL when building their COM
objects. The .NET Framework provides many classes that help developers re-use code.
The .NET class libraries contain code for programming topics such as threading, file I/O,
database support, XML parsing, and data structures, such as stacks and queues. Best of all,
this entire class library is available to any programming language that supports the .NET
Framework. Thanks to the CLR, any .NET language can use any class in the .NET class
library. Because all languages now support the same runtime, they can re-use any class that
works with the .NET Framework. This means that any functionality available to one language
will also be available to any other .NET language.
The class library re-use picture painted by the .NET Framework gets even better when
you realize that re-use extends to your code, not just code that Microsoft ships with .NET.
The code that Microsoft ships in the .NET class library code base is architecturally no
different from the code you write. The Microsoft code is simply code that was written using a
language supported by .NET and built using a .NET development tool. This means that
Microsoft is using the same tools that you will use to write your code. You can write code
that can be used in other .NET languages, just as Microsoft has with its class library.
The .NET Framework enables you to write code in C#, for example, and hand it off to Visual
Basic .NET developers, who can use your compiled code in their applications.

.NET Programming Language


The .NET Framework provides a set of tools that help you build code that works with
the
.NET Framework. Microsoft provides a set of languages that are already ".NET-compatible".
C# is one of those languages. New versions of Visual Basic and Visual C++ have also been
created to take advantage of the .NET Framework, with a version of Jscript.NET on the way.
The development of .NET-compatible languages is not restricted to Microsoft. The .NET
group at Microsoft has published documentation showing how language vendors can make
their languages work with .NET, and vendors are making languages such as COBOL and Perl
compatible with the .NET Framework. There are currently 20 or more languages in the works
from third party vendors and institutions that plug into the .NET Framework.

Introducing C#
C#, the new language introduced in the .NET Framework, is derived from C++.
However, C# is a modern, objected-oriented (from the ground up) type-safe language.

Language features
The following sections take a quick look at some of the features of the C# language. If
some of these concepts don't sound familiar to you, don't worry. All of them are covered in
detail in later chapters.

Classes
All code and data in C# must be enclosed in a class. You can't define a variable
outside of a class, and you can't write any code that's not in a class. Classes can have
constructors, which execute when an object of the class is created, and a destructor, which
executes when an object of the class is destroyed. Classes support single inheritance, and all
classes ultimately derive from a base class called object. C# supports versioning techniques to
help your classes evolve over time while maintaining compatibility with code that uses earlier
versions of your classes.
Data types
C# lets you work with two types of data: value types and reference types. Value types
hold actual values. Reference types hold references to values stored elsewhere in memory.
Primitive types such as char, int and float, as well as enumerated values and structures, are
value types. Reference types hold variables that deal with objects and arrays. C# comes with
predefined reference types (object and string), as well as predefined value types (sbyte, short,
int, long, byte, ushort, uint, ulong, float, double, bool, char, and decimal). You can also define
your own value and reference types in your code. All value and reference types ultimately
derive from a base type called object.

C# allows you to convert a value of one type into a value of another type. You can
work with both implicit conversions and explicit conversions. Implicit conversions always
succeed and don't lose any information (for example, you can convert an int to a long without
losing any data because a long is larger than an int). Explicit conversions may cause you to
lose data (for example, converting a long into an int may result in a loss of data because a
long can hold larger values than an int). You must write a cast operator into your code to
make an explicit conversion happen.

You can work with both one-dimensional and multidimensional arrays in C#.
Multidimensional arrays can be rectangular, in which each of the arrays has the same
dimensions, or jagged, in which each of the arrays has different dimensions. Classes and
structures can have data members called properties and fields. Fields are variables that are
associated with the enclosing class or structure. You may define a structure called Employee,
for example, that has a field called Name. If you define a variable of type Employee called
CurrentEmployee, you can retrieve the employee's name by writing CurrentEmployee.Name.
Properties are like fields, but enable you to write code to specify what should happen when
code accesses the value. If the employee's name must be read from a database, for example,
you can write code that says, "when someone asks for the value of the Name property, read
the name from the database and return the name as a string."
Functions
A function is a callable piece of code that may or may not return a value to the code
that originally called it. An example of a function would be the FullName function shown
earlier, in this chapter, in the Family class. A function is generally associated to pieces of
code that return information whereas a method generally does not return information. For our
purposes however, we generalize and refer to them both as functions. Functions can have four
kinds of parameters:

• Input parameters have values that are sent into the function, but the function cannot change
those values.
• Output parameters have no value when they are sent into the function, but the function
can give them a value and send the value back to the caller.
• Reference parameters pass in a reference to another value. They have a value coming
in to the function, and that value can be changed inside the function.
• Params parameters define a variable number of arguments in a list.

C# and the CLR work together to provide automatic memory management. You don't
need to write code that says "allocate enough memory for an integer" or "free the memory
that this object was using." The CLR monitors your memory usage and automatically
retrieves more when you need it. It also frees memory automatically when it detects that it is
no longer being used (this is also known as Garbage Collection). C# provides a variety of
operators that enable you to write mathematical and bitwise expressions. Many (but not all)
of these operators can be redefined, enabling you to change how the operators work.

C# supports a long list of statements that enable you to define various execution paths
within your code. Flow control statements that use keywords such as if, switch, while, for,
break and continue enable your code to branch off into different paths, depending on the
values of your
variables. Classes can contain code and data. Each class member has something called an
accessibility scope, which defines the member's visibility to other objects. C# supports
public, protected, internal, protected internal, and private accessibility scopes.
Variables
Variables can be defined as constants. Constants have values that cannot change
during the execution of your code. The value of pi, for instance, is a good example of a
constant, because its value won't be changing as your code runs. Enum type declarations
specify a type name for a related group of constants. For example, you could define an enum
of Planets with values of Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune and
Pluto, and use those names in your code. Using the enum names in code makes code more
readable than if you used a number to represent each planet.

C# provides a built-in mechanism for defining and handling events. If you write a
class that performs a lengthy operation, you may want to invoke an event when the operation
is completed. Clients can subscribe to that event and catch the event in their code, which
enables them to be notified when you have completed your lengthy operation. The event
handling mechanism in C# uses delegates, which are variables that reference a function. Note
An event handler is a procedure in your code that determines the actions to be performed
when an event occurs, such as the user clicking a button.

If your class holds a set of values, clients may want to access the values as if your
class were an array. You can write a piece of code called an indexer to enable your class to be
accessed as if it were an array. Suppose you write a class called Rainbow, for example, that
contains a set of the colors in the rainbow. Callers may want to write MyRainbow[0] to
retrieve the first color in the rainbow. You can write an indexer into your Rainbow class to
define what should be returned when the caller accesses your class, as if it were an array of
values.

Interfaces
C# supports interfaces, which are groups of properties, methods, and events that
specify a set of functionality. C# classes can implement interfaces, which tells users that the
class supports the set of functionality documented by the interface. You can develop
implementations of interfaces without interfering with any existing code, which minimizes
compatibility problems. nce an interface has been published, it cannot be changed, but it can
evolve through inheritance.
C# classes can implement many interfaces, although the classes can only inherit from
a single base class.Let's look at a real-world example that would benefit from interfaces to
illustrate its extremely positive role in C#. Many applications available today support add-ins.
Assume that you have created a code editor for writing applications. This code editor, when
executed, has the capability to load add-ins. To do this, the add-in must follow a few rules.
The DLL add-in must export a function called CEEntry, and the name of the DLL must begin
with CEd. When we run our code editor, it scans its working directory for all DLLs that begin
with CEd. When it finds one, it is loaded; and then it uses the GetProcAddress to locate the
CEEntry functionwithin the DLL, thus verifying that you followed all the rules necessary to
create an add-in.

This method of creating and loading add-ins is very burdensome because it burdens
the code editor with more verification duties than necessary. If an interface were used in this
instance, your add-in DLL could have implemented an interface, thus guaranteeing that all
necessary methods, properties, and events were present with the DLL itself, and functioning
as documentation specified.

Attributes
Attributes declare additional information about your class to the CLR. In the past, if
you wanted to make your class self-describing, you had to take a disconnected approach in
which the documentation was stored in external files such as IDL or even HTML files.
Attributes solve this problem by enabling you, the developer, to bind information to classes
— any kind of information. For example, you can use an attribute to embed documentation
information into a class. Attributes can also be used to bind runtime information to a class,
defining how it should act when used. The possibilities are endless, which is why Microsoft
includes many predefined attributes within the .NET Framework.

Compiling C#
Running your C# code through the C# compiler produces two important pieces of
information: code and metadata. The following sections describe these two items and then
finish up by examining the binary building block of .NET code: the assembly.
Microsoft Intermediate Language (MSIL)
The code that is output by the C# compiler is written in a language called Microsoft
Intermediate Language, or MSIL. MSIL is made up of a specific set of instructions that
specify how your code should be executed. It contains instructions for operations such as
variable initialization, calling object methods, and error handling, just to name a few. C# is
not the only language in which source code changes into MSIL during the compilation
process. All .NET-compatible languages, including Visual Basic .NET and Managed C++,
produce MSIL when their source code is compiled. Because all of the .NET languages
compile to the same MSIL instruction set, and because all of the .NET languages use the
same runtime, code from different languages and different compilers can work together
easily.

MSIL is not a specific instruction set for a physical CPU. It knows nothing about the
CPU in your machine, and your machine knows nothing about MSIL. How, then, does
your .NET code run at all, if your CPU can't read MSIL? The answer is that the MSIL code is
turned into CPU-specific code when the code is run for the first time. This process is called
"just-in-time" compilation, or JIT. The job of a JIT compiler is to translate your generic
MSIL code into
machine code that can be executed by your CPU. You may be wondering about what seems
like an extra step in the process. Why generate MSIL when a compiler could generate CPU-
specific code directly? After all, compilers have always done this in the past.

There are a couple of reasons for this. First, MSIL enables your compiled code to be
easily moved to different hardware. Suppose you've written some C# code and you'd like it to
run on both your desktop and a handheld device. It's very likely that those two devices have
different types of CPUs. If you only had a C# compiler that targeted a specific CPU, then
you'd need two C# compilers: one that targeted your desktop CPU and another that targeted
your handheld CPU. You'd have to compile your code twice, ensuring that you put the right
code on the right device. With MSIL, you compile once. Installing the .NET Framework on
your desktop machine includes a JIT compiler that translates your MSIL into CPU-specific
code for your desktop.
Installing the .NET Framework on your handheld includes a JIT compiler that
translates that same MSIL into CPU-specific code for your handheld. You now have a single
MSIL code base that can run on any device that has a .NET JIT compiler. The JIT compiler
on that device takes care of making your code run on the device.
Another reason for the compiler's use of MSIL is that the instruction set can be easily
read by a verification process. Part of the job of the JIT compiler is to verify your code to
ensure that it is as clean as possible. The verification process ensures that your code is
accessing memory properly and that it is using the correct variable types when calling
methods that expect a specific type. These checks ensure that your code doesn't execute any
instructions that could make the code crash.

The MSIL instruction set was designed to make this verification process relatively
straightforward. CPU-specific instruction sets are optimized for quick execution of the code,
but they produce code that can be hard to read and, therefore, hard to verify. Having a C#
compiler that directly outputs CPU-specific code can make code verification difficult or even
impossible. Allowing the .NET Framework JIT compiler to verify your code ensures that
your code accesses memory in a bug-free way and that variable types are properly used.

Metadata
The compilation process also outputs metadata, which is an important piece of
the .NET codesharing story. Whether you use C# to build an end-user application or you use
C# to build a class library to be used by someone else's application, you're going to want to
make use of some already-compiled .NET code. That code may be supplied by Microsoft as a
part of the .NET Framework, or it may be supplied by a user over the Internet. The key to
using this external code is letting the C# compiler know what classes and variables are in the
other code base so that it can match up the source code you write with the code found in the
precompiled code base that you're working with.

Think of metadata as a "table of contents" for your compiled code. The C# compiler
places metadata in the compiled code along with the generated MSIL. This metadata
accurately describes all the classes you wrote and how they are structured. All of the classes'
methods and variable information is fully described in the metadata, ready to be read by other
applications. Visual Basic .NET, for example, may read the metadata for a .NET library to
provide the IntelliSense capability of listing all of the methods available for a particular class.
If you've ever worked with COM (Component Object Model), you may be familiar with type
libraries. Type libraries aimed to provide similar "table of contents" functionality for COM
objects.
However, type libraries suffered from some limitations, not the least of which was the
fact that not all of the data relevant to the object was put into the type library. Metadata
in .NET does not have this shortcoming. All of the information needed to describe a class in
code is placed into the metadata. You can think of metadata as having all of the benefits of
COM type libraries without the limitations.

Assemblies
Sometimes, you will use C# to build an end-user application. These applications are
packaged as executable files with an extension of .EXE. Windows has always worked
with .EXE files as application programs, and C# fully supports building .EXE files. However,
there may be times when you don't want to build an entire application. Instead, you may want
to build a code library that can be used by others. You may also want to build some utility
classes in C#, for example, and then hand the code off to a Visual Basic .NET developer, who
will use your classes in a Visual Basic .NET application. In cases like this, you won't be
building an application. Instead, you'll be building an assembly.

An assembly is a package of code and metadata. When you deploy a set of classes in
an assembly, you are deploying the classes as a unit; and those classes share the same level of
version control, security information, and activation requirements. Think of an assembly as a
"logical DLL." If you're familiar with Microsoft Transaction Server or COM+, you can think
of an assembly as the .NET equivalent of a package.

There are two types of assemblies: private assemblies and global assemblies. When
you build your assembly, you don't need to specify whether you want to build a private or a
global assembly. The difference is apparent when you deploy your assembly. With a private
assembly, you make your code available to a single application. Your assembly is packaged
as a DLL, and is installed into the same directory as the application using it. With a
deployment of a private assembly, the only application that can use your code is the
executable that lives in the same directory as your assembly.

If you want to share your code among many applications, you might want to consider
deploying your code as a global assembly. Global assemblies can be used by any .NET
application on the system, regardless of the directory in which it is installed. Microsoft ships
assemblies as a part of the .NET Framework, and each of the Microsoft assemblies is
installed as a global assembly. The .NET Framework contains a list of global assemblies in a
facility called the global assembly cache, and the .NET Microsoft Framework SDK includes
utilities to both install and remove assemblies from the global assembly cache.

FEASIBILITY STUDY:
A feasibility study is a preliminary study undertaken to determine and document a
project's viability. The term feasibility study is also used to refer to the resulting document.
These results of this study are used to make a decision whether to proceed with the project, or
table it. If it indeed leads to a project being approved, it will - before the real work of the
proposed project starts - be used to ascertain the likelihood of the project's success. It is an
analysis of possible alternative solutions to a problem and a recommendation on the best
alternative. It, for example, can decide whether an order processing be carried out by a new
system more efficiently than the previous one.

A feasibility study could be used to test a proposal for new system, which could be used
because:
 The current system may no longer carry its purpose,
 Technological advancement may have rendered the current system obsolete,
 The business is expanding, allowing it to cope with extra work load,
 Customers are complaining about the speed and quality of work the business provides,
 Competitors are now winning a big enough market share due to an effective integration of a
computerized system.

A feasibility study should examine three main areas:


 Market issues
 Technical and organizational requirements
 Financial overview
Within a feasibility study, seven areas must be reviewed, including those of a :
1. Needs Analysis,
2. Economics,
3. Technical,
4. Schedule,
5. Organizational,
6. Cultural, and
7. Legal.

Needs Analysis :
A needs analysis should be the first undertaking of a feasibility study as it clearly
defines the project outline and the clients' requirements. Once these questions have been
answered the person/s undertaking the feasibility study will have outlined the project needs
definition. The following questions need to be asked to define the project needs definition:
What is the end deliverable? What purpose will it serve? What are the environmental effects?
What are the rules and regulations? What standards will we be measured against? What are
the quality requirements? What is the minimal quality requirements allowed? What
sustainability can we expect? What carry over work can we expect? What are the penalty
clauses? How much do we need to outsource? How much do we need to in source?

Technical feasibility study :


This involves questions such as whether the technology needed for the system exists,
how difficult it will be to build, and whether the firm has enough experience using that
technology. The assessment is based on an outline design of system requirements in terms of
Input, Output, Fields, Programs, and Procedures. This can be qualified in terms of volumes of
data, trends, frequency of updating, etc... In order to give an introduction to the technical
system.

Cultural Feasibility study :


In this stage, the project's alternatives are evaluated for their impact on the local and
general culture. For example, environmental factors need to be considered.

Legal Feasibility study :


Not necessarily last, but all projects must face legal scrutiny. When an organization
either has legal council on staff or on retainer, such reviews are typically standard. However,
any project may face legal issues after completion too.

Marketing Feasibility study :


'''''''This will include analysis of single and multi-dimensional market forces that could affect
the commercial, along with the company that is carrying out the feasibility achieving more
and more reputation as they have carried out safety checks which allow the system to run
appropriately.''''
Advantages of making Feasibility study:
There are many advantages of making feasibility study some of which are summarized
below:
 This study being made as the initial step of software development life cycle has all the
analysis part in it which helps in analyzing the system requirements completely.
.
 Helps in identifying the risk factors involved in developing and deploying the system
.
 The feasibility study helps in planning for risk analysis
.
 Feasibility study helps in making cost/benefit analysis which helps the rganization and
system to run efficiently.
.
 Feasibility study helps in making plans for training developers for implementing the system.
.
 So a feasibility study is a report which could be used by the senior or top persons in the
organization. This is because based on the report the organization decides about cost
estimation, funding and other important decisions which is very essential for an organization
to run profitably and for the system to run stable.

FEATURES OF THE SOFTWARE:


Introduction To .NET:
.NET is the Microsoft’s development model in which software becomes available
over the Internet. The .Net Framework is the infrastructure of .Net. .Net is built from the
group up on open architecture. The goal of the Microsoft .Net platform is to simplify web
development.

The .Net Framework provides the foundation upon which application and XML
web services are build and executed the unified nature of the .Net Framework means that all
applications, whether they are windows applications, web applications are XML web services
are developer by using a common set tools and code, and are easily integrated with one
another.

The .Net Framework consists of the following elements:


 The Common Language Runtime. The runtime handles runtime
services, including language integration, security and memory
management. During development, the runtime provides features that
are needed to simplify development.
 Class Libraries. Class libraries provide reusable code for most
common task, including data access, XML web service development,
and web and windows forms.
Benefits of .Net Framework:

The benefits of using the .Net Framework for developing application include:

 Based on Web standards and practices.


 Design using unified application models.
 Easy for developers to use.

About VC#.Net:
Visual C# (pronounced C sharp) is designed to be a fast and easy way to create .Net
applications, including Web services and ASP.NET Web applications. Applications
written in Visual C# are built on the services of the common language runtime and take
full advantage of the .Net Framework.

With its many innovations, C# enables rapid application development while retaining
the expressiveness and elegance of C-style languages. Visual Studio supports Visual C#
with a full-featured Code Editor, project templates, designers, code wizards, a powerful
and easy-to-use debugger and other tools. The .Net Framework class library provides
access to a wide range of operating system services and other useful, well-designed class
that speed up the development cycle significantly.

C# is a simple, elegant, type-safe, object-oriented language recently developed by


Microsoft for building a wide range of applications. C# is designed to bring rapid
development to the C++ programmer without sacrificing the power and control that are a
hallmark of C and C++.

Because of the heritage, C# has a high degree of fidelity with C and C++, and
developers familiar with these languages can quickly become productive in C#.

C# provides intrinsic code trust mechanisms for a high level of security, garbage
collection and type safety. C# supports single inheritance and creates Microsoft
intermediate language (MSIL) as to native code compilers.

As an object-oriented language, C# supports the concepts of encapsulation,


inheritance and polymorphism. All variables and methods, including the Main method,
the application’s entry point are encapsulated within class definitions. A class may inherit
directly from one parent class, but it may implement any number of interfaces. Methods
that override virtual methods in a parent class require the override keyword as a way to
avoid accidental redefinition.

.Net Framework Architecture:


C# programs run on the .Net Framework, an integral component of Windows that
includes a virtual execution System called the Common Language Runtime (CLR), an
international standard that is the basis for creating and development environments in which
languages and libraries work together seamlessly.

Source code written in C# is compiled into an intermediate language (IL) that


conforms to the CLI specification. The IL code, along with resources such as bitmaps and
strings, is stored on disk in an executable file called assembly, typically with an extension
of .exe or .dll. An assembly contains a manifest that provides information on the assembly’s
types, version, and culture and security requirements.

When the C# program is executed, the assembly is loaded into the CLR, which
might take various actions based on the information in the manifest. Then, if the security
requirements are met, the CLR performs Just In Time (JIT) compilation to convert the IL
code into native machine instructions. The CLR also provides other services related to
automatic garbage collection, exception handling and resource management. Code that is
executed by the CLR is sometimes referred to as “managed code” in contrast to “unmanaged
code” which is compiled into native machine language that targets a specific system.

Language interoperability is a key feature of the .Net Framework. Because the IL


code produced by the C# compiler conforms to the Common Type Specification (CTS), IL
code generated from C# can interact with code that was generated from the .Net versions of
Visual Basic, Visual C++, Visual J#, or any of more than 20 other CTS-compliant languages.
A single assembly may contain multiple modules written in different .NET languages and the
types can reference each other just as if they were written in the same language.
FEATURES OF ASP.NET :

What is .NET?

When .NET was announced in late 1999, Microsoft positioned the technology as a
platform for building and consuming Extensible Markup Language (XML) Web services.
XML Web services allow any type of application, be it a Windows- or browser-based
application running on any type of computer system, to consume data from any type of server
over the Internet.

The reason this idea is so great is the way in which the XML messages are
transferred: over established standard protocols that exist today. Using protocols such as
SOAP, HTTP, and SMTP, XML Web services make it possible to expose data over the wire
with little or no modifications to your existing code.

Figure presents a high-level overview of the .NET Framework and how XML Web
services are positioned.

Figure 1.1. Stateless XML Web services model.


Since the initial announcement of the .NET Framework, it's taken on many new and
different meanings to different people. To a developer, .NET means a great environment for
creating robust distributed applications. To an IT manager, .NET means simpler deployment
of applications to end users, tighter security, and simpler management. To a CTO or
CIO, .NET means happier developers using state-of-the-art development technologies and a
smaller bottom line.

To understand why all these statements are true, you need to get a grip on what
the .NET Framework consists of, and how it's truly a revolutionary step forward for
application architecture, development, and deployment.

NET Framework

Now that you are familiar with the major goals of the .NET Framework, let's briefly
examine its architecture. As you can see in Figure 1-2, the .NET Framework sits on top of the
operating system, which can be a few different flavors of Windows and consists of a number
of components .NET is essentially a system application that runs on Windows.

Conceptually, the CLR and the JVM are similar in that they are both runtime
infrastructures that abstract the underlying platform differences. However, while the JVM
officially supports only the Java language, the CLR supports any language that can be
represented in itsCommon Intermediate Language (CIL). The JVM executes bytecode, so it
can, in principle, support many languages, too. Unlike Java's bytecode, though, CIL is never
interpreted. Another conceptual difference between the two infrastructures is that Java code
runs on any platform with a JVM, whereas .NET code runs only on platforms that support the
CLR. In April, 2003, the International Organization for Standardization and the International
Electrotechnical Committee (ISO/IEC) recognized a functional subset of the CLR, known as
the Common Language Interface (CLI), as an international standard.

This development, initiated by Microsoft and developed by ECMA International, a


European standards organization, opens the way for third parties to implement their own
versions of the CLR on other platforms, such as Linux or Mac OS X. For information on
third-party and open source projects working to implement the ISO/IEC CLI and C#
specifications

The layer on top of the CLR is a set of framework base classes. This set of classes is
similar to the set of classes found in STL, MFC, ATL, or Java. These classes support
rudimentary input and output functionality, string manipulation, security management,
network communications, thread management, text management, reflection functionality,
collections functionality, as well as other functions.

On top of the framework base classes is a set of classes that extend the base classes to
support data management and XML manipulation. These classes, called ADO.NET, support
persistent data management—data that is stored on backend databases. Alongside the data
classes, the .NET Framework supports a number of classes to let you manipulate XML data
and perform XML searching and XML translations.

Classes in three different technologies (including web services, Web Forms, and
Windows Forms) extend the framework base classes and the data and XML classes. Web
services include a number of classes that support the development of lightweight distributed
components, which work even in the face of firewalls and NAT software. These components
support plug-and-play across the Internet, because web services employ standard HTTP and
SOAP.

Web Forms, the key technology behind ASP.NET, include a number of classes that
allow you to rapidly develop webGraphical User Interface (GUI) applications. If you're
currently developing web applications with Visual Interdev, you can think of Web Forms as a
facility that allows you to develop web GUIs using the same drag-and-drop approach as if
you were developing the GUIs in Visual Basic. Simply drag-and-drop controls onto your
Web Form, double-click on a control, and write the code to respond to the associated event.

Windows Forms support a set of classes that allow you to develop native Windows
GUI applications. You can think of these classes collectively as a much better version of the
MFC in C++ because they support easier and more powerful GUI development and provide a
common, consistent interface that can be used in all languages.

The Common Language Runtime

At the heart of the .NET Framework is the common language runtime. The common
language runtime is responsible for providing the execution environment that code written in
a .NET language runs under. The common language runtime can be compared to the Visual
Basic 6 runtime, except that the common language runtime is designed to handle all .NET
languages, not just one, as the Visual Basic 6 runtime did for Visual Basic 6. The following
list describes some of the benefits the common language runtime gives you:

o Automatic memory management


o Cross-language debugging
o Cross-language exception handling
o Full support for component versioning
o Access to legacy COM components
o XCOPY deployment
o Robust security model

You might expect all those features, but this has never been possible using Microsoft
development tools. Figure 1.3 shows where the common language runtime fits into the .NET
Framework.

Figure 1.3. The common language runtime and the .NET Framework.
Note

Code written using a .NET language is known asmanaged code. Code that uses anything but
the common language runtime is known as unmanaged code. The common language runtime
provides a managed execution environment for .NET code, whereas the individual runtimes
of non-.NET languages provide an unmanaged execution environment.

Inside the Common Language Runtime

The common language runtime enables code running in its execution environment to
have features such as security, versioning, memory management and exception handling
because of the way .NET code actually executes. When you compiled Visual Basic 6 forms
applications, you had the ability to compile down to native node or p-code. Figure 1.4 should
refresh your memory of what the Visual Basic 6 options dialog looked like.

Figure1.4. Visual Basic 6 compiler options dialog.


When you compile your applications in .NET, you aren't creating anything in native code.
When you compile in .NET, you're converting your code—no matter what .NET language
you're using—into an assembly made up of an intermediate language called Microsoft
Intermediate Language (MSIL or just IL, for short). The IL contains all the information about
your application, including methods, properties, events, types, exceptions, security objects,
and so on, and it also includes metadata about what types in your code can or cannot be
exposed to other applications. This was called atype library in Visual Basic 6 or an IDL
(interface definition language) file in C++. In .NET, it's simply the metadata that the IL
contains about your assembly.

Note

The file format for the IL is known as PE (portable executable) format, which is a standard
format for processor-specific execution.
When a user or another component executes your code, a process occurs called just-in-
time (JIT) compilation, and it's at this point that the IL is converted into the specific machine
language of the processor it's executing on. This makes it very easy to port a .NET
application to any type of operating system on any type of processor because the IL is simply
waiting to be consumed by a JIT compiler.

The first time an assembly is called in .NET, the JIT process occurs. Subsequent calls
don't re-JIT the IL; the previously JITted IL remains in cache and is used over and over
again. when you learn about Application Center Test, you also see how the warm-up time of
the JIT process can affect application performance.

Understanding the process of compilation in .NET is very important


because it makes clear how features such as cross-language debugging and exception
handling are possible. You're not actually compiling to any machine-specific code—you're
simply compiling down to an intermediate language that's the same for all .NET languages.
The IL produced by J# .NET and C# looks just like the IL created by the Visual Basic .NET
compiler. These instructions are the same, only how you type them in Visual Studio .NET is
different, and the power of the common language runtime is apparent.

When the IL code is JITted into machine-specific language, it does so on an as-


needed basis. If your assembly is 10MB and the user is only using a fraction of that 10MB,
only the required IL and its dependencies are compiled to machine language. This makes for
a very efficient execution process. But during this execution, how does the common language
runtime make sure that the IL is correct? Because the compiler for each language creates its
own IL, there must be a process that makes sure what's compiling won't corrupt the system.
The process that validates the IL is known asverification. Figure 1.5 demonstrates the process
the IL goes through before the code actually executes.

Figure 1.5. The JIT process and verification.


When code is JIT compiled, the common language runtime checks to make sure that
the IL is correct. The rules that the common language runtime uses for verification are set
forth in the Common Language Specification (CLS) and the Common Type System (CTS).

The .NET Framework Class Library

The second most important piece of the .NET Framework is the .NET Framework
class library (FCL). As you've seen, the common language runtime handles the dirty work of
actually running the code you write. But to write the code, you need a foundation of available
classes to access the resources of the operating system, database server, or file server. The
FCL is made up of a hierarchy of namespaces that expose classes, structures, interfaces,
enumerations, and delegates that give you access to these resources.

The namespaces are logically defined by functionality. For example, the


System.Data namespace contains all the functionality available to accessing databases. This
namespace is further broken down into System.Data.SqlClient, which exposes
functionality specific to SQL Server, and System.Data.OleDb, which exposes specific
functionality for accessing OLEDB data sources. The bounds of a namespace aren't
necessarily defined by specific assemblies within the FCL; rather, they're focused on
functionality and logical grouping. In total, there are more than 20,000 classes in the FCL, all
logically grouped in a hierarchical manner. Figure 1.8 shows where the FCL fits into
the .NET Framework and the logical grouping of namespaces.

Figure 1.8. The .NET Framework class library.


To use an FCL class in your application, you use theImports statement in Visual
Basic .NET or theusing statement in C#. When you reference a namespace in Visual
Basic .NET or C#, you also get the convenience of auto-complete and auto-list members
when you access the objects' types using Visual Studio .NET. This makes it very easy to
determine what types are available for each class in the namespace you're using. As you'll see
over the next several weeks, it's very easy to start coding in Visual Studio .NET.

The Structure of a .NET Application

To understand how the common language runtime manages code execution, you must
examine the structure of a .NET application. The primary unit of a .NET application is the
assembly. An assembly is a self-describing collection of code, resources, and metadata.

The assembly manifest contains information about what is contained within the
assembly. The assembly manifest provides:

o Identity information, such as the assembly’s name and version number


o A list of all types exposed by the assembly
o A list of other assemblies required by the assembly
o A list of code access security instructions, including permissions required by the
assembly and permissions to be denied the assembly
Each assembly has one and only one assembly manifest, and it contains all the
description information for the assembly. However, the assembly manifest can be contained
in its own file or within one of the assembly’s modules.

An assembly contains one or more modules. A module contains the code that makes
up your application or library, and it contains metadata that describes that code. When you
compile a project into an assembly, your code is converted from high-level code to IL.
Because all managed code is first converted to IL code, applications written in different
languages can easily interact. For example, one developer might write an application in
Visual C# that accesses a DLL in Visual Basic .NET. Both resources will be converted to IL
modules before being executed, thus avoiding any language-incompatibility issues.

Each module also contains a number of types. Types are templates that describe a set
of data encapsulation and functionality. There are two kinds of types: reference types
(classes) and value types (structures). These types are discussed in greater detail in Lesson 2
of this chapter. Each type is described to the common language runtime in the assembly
manifest. A type can contain fields, properties, and methods, each of which should be related
to a common functionality.

For example, you might have a class that represents a bank account. It contains fields,
properties, and methods related to the functions needed to implement a bank account. A field
represents storage of a particular type of data. One field might store the name of an account
holder, for example.

Properties are similar to fields, but properties usually provide some kind of validation
when data is set or retrieved. You might have a property that represents an account balance.

When an attempt is made to change the value, the property can check to see if the
attempted change is greater than a predetermined limit. If the value is greater than the limit,
the property does not allow the change. Methods represent behavior, such as actions taken on
data stored within the class or changes to the user interface. Continuing with the bank account
example, you might have a Transfer method that transfers a balance from a checking account
to a savings account, or an Alert method that warns users when their balances fall below a
predetermined level.
Compilation and Execution of a .NET Application

When you compile a .NET application, it is not compiled to binary machine code;
rather, it is converted to IL. This is the form that your deployed application takes—one or
more assemblies consisting of executable files and DLL files in IL form. At least one of these
assemblies will contain an executable file that has been designated as the entry point for the
application.

When execution of your program begins, the first assembly is loaded into memory. At
this point, the common language runtime examines the assembly manifest and determines the
requirements to run the program. It examines security permissions requested by the assembly
and compares them with the system’s security policy. If the system’s security policy does not
allow the requested permissions, the application will not run. If the application passes the
system’s security policy, the common language runtime executes the code. It creates a
process for the application to run in and begins application execution.

When execution starts, the first bit of code that needs to be executed is loaded into
memory and compiled into native binary code from IL by the common language runtime’s
Just-In-Time (JIT) compiler. Once compiled, the code is executed and stored in memory as
native code. Thus, each portion of code is compiled only once when an application executes.
Whenever program execution branches to code that has not yet run, the JIT compiler
compiles it ahead of execution and stores it in memory as binary code. This way, application
performance is maximized because only the parts of a program that are executed are
compiled.

The .NET Framework base class library contains the base classes that provide many
of the services and objects you need when writing your applications. The class library is
organized into namespaces. A namespace is a logical grouping of types that perform related
functions. For example, the System.Windows.Forms namespace contains all the types that
make up Windows forms and the controls used in those forms.

Namespaces are logical groupings of related classes. The namespaces in the .NET
base class library are organized hierarchically. The root of the .NET Framework is the
System namespace. Other namespaces can be accessed with the period operator. A typical
namespace construction appears as follows:
System
System.Data
System.Data.SQLClient

The first example refers to the System namespace. The second refers to the System.Data
namespace. The third example refers to the System.Data.SQLClient namespace.

Table 1.1 introduces some of the more commonly used .NET base class namespaces.

Table 1-1.Representative .NET Namespaces

Namespace Description
This namespace is the root for many of the low-level types
required by the .NET Framework. It is the root for primitive data
System
types as well, and it is the root for all the other namespaces in
the .NET base class library.
This namespace contains classes that represent a variety of
different container types, such as Array List, Sorted List, Queue,
System.Collections and Stack. You also can find abstract classes, such as Collection
Base, which are useful for implementing your own collection
functionality.
This namespace contains classes involved in component creation
System.ComponentModel and containment, such as attributes, type converters, and license
providers.
This namespace contains classes required for database access and
System.Data manipulations, as well as additional namespaces used for data
access.
This namespace contains a set of classes that are shared by
System.Data.Common
the .NET managed data providers.
This namespace contains classes that make up the managed data
System.Data.OleDb
provider for OLE DB data access.
This namespace contains classes that are optimized for interacting
System.Data.SQLClient
with Microsoft SQL Server.
System.Drawing This namespace exposes GDI+ functionality and provides classes
Table 1-1.Representative .NET Namespaces

Namespace Description
that facilitate graphics rendering.
In this namespace, you will find types for handling file system
System.IO
I/O.
This namespace is home to common mathematics functions such
System.Math
as extracting roots and trigonometry.
This namespace provides support for obtaining information and
System.Reflection
dynamic creation of types at runtime.
This namespace is home to types dealing with permissions,
System.Security
cryptography, and code access security.
This namespace contains classes that facilitate the implementation
System.Threading
of multithreaded applications.
This namespace contains types involved in creating standard
System.Windows.Forms Windows applications. Classes that represent forms and controls
reside here as well.

The namespace names are self-descriptive by design. Straightforward names make the
.NET Framework easy to use and allow you to rapidly familiarize yourself with its contents.

Introduction to Object-Oriented Programming

Programming in the .NET Framework environment is done with objects. Objects are
programmatic constructs that represent packages of related data and functionality. Objects are
self-contained and expose specific functionality to the rest of the application environment
without detailing the inner workings of the object itself. Objects are created from a template
called a class. The .NET base class library provides a set of classes from which you can
create objects in your applications. You also can use the MicrosoftVisual Studio
programming environment to create your own classes. This lesson introduces you to the
concepts associated with object-oriented programming.

Objects, Members, and Abstraction


An object is a programmatic construct that represents something. In the real world,
objects are cars, bicycles, laptop computers, and so on. Each of these items exposes specific
functionality and has specific properties. In your application, an object might be a form, a
control such as a button, a database connection, or any of a number of other constructs. Each
object is a complete functional unit, and contains all of the data and exposes all of the
functionality required to fulfill its purpose. The ability of programmatic objects to represent
real-world objects is called abstraction.

Classes Are Templates for Objects

Classes were discussed in Chapter 1 and represent user-defined reference types.


Classes can be thought of as blueprints for objects: they define all of the members of an
object, define the behavior of an object, and set initial values for data when appropriate.
When a class is instantiated, an in-memory instance of that class is created. This instance is
called an object. To review, a class is instantiated using the New (new) keyword as follows:

Visual Basic .NET

' Declares a variable of the Widget type
Dim myWidget As Widget
' Instantiates a new Widget object and assigns it to the myWidget 
' variable
myWidget = New Widget()

When an instance of a class is created, a copy of the instance data defined by that
class is created in memory and assigned to the reference variable. Individual instances of a
class are independent of one another and represent separate programmatic constructs. There
is generally no limit to how many copies of a single class can be instantiated at any time. To
use a real-world analogy, if a car is an object, the plans for the car are the class. The plans can
be used to make any number of cars, and changes to a single car do not, for the most part,
affect any other cars.

Objects and Members


Objects are composed of members. Members are properties, fields, methods, and
events, and they represent the data and functionality that comprise the object. Fields and
properties represent data members of an object. Methods are actions the object can perform,
and events are notifications an object receives from or sends to other objects when activity
happens in the application.
To continue with the real-world example of a car, consider that a Car object has fields
and properties, such as Color, Make, Model, Age, Gas Level, and so on. These are the data
that describe the state of the object. A Car object might also expose several methods, such as
Accelerate, Shift Gears, or Turn. The methods represent behaviors the object can execute.
And events represent notifications. For example, a Car object might receive an Engine
Overheating event from its Engine object, or it might raise a Crash event when interacting
with a Tree object.

Object Models
Simple objects might consist of only a few properties, methods, and perhaps an event
or two. More complex objects might require numerous properties and methods and possibly
even subordinate objects. Objects can contain and expose other objects as members. For
example, the TextBox control exposes a Font property, which consists of a Font object.
Similarly, every instance of the Form class contains and exposes a Controls collection that
comprises all of the controls contained by the form. The object model defines the hierarchy of
contained objects that form the structure of an object.

An object model is a hierarchical organization of subordinate objects contained and


exposed within a main object. To illustrate, let’s revisit the example of a car as an object. A
car is a single object, but it also consists of subordinate objects. A Car object might contain
an Engine object, four Wheel objects, a Transmission object, and so on. The composition of
these subordinate objects directly affects how the Car object functions as a whole.

For example, if the Cylinders property of the Engine subordinate object is equal to 4,
the Car will behave differently than a Car whose Engine has a Cylinders property value of 8.
Contained objects can have subordinate objects of their own. For example, the contained
Engine object might contain several Sparkplug objects.

Encapsulation
Encapsulation is the concept that implementation of an object is independent of its
interface. Put another way, an application interacts with an object through its interface, which
consists of its public properties and methods. As long as this interface remains constant, the
application can continue to interact with the component, even if implementation of the
interface was completely rewritten between versions.

Objects should only interact with other objects through their public methods and
properties. Thus, objects should contain all of the data they require, as well as all of the
functionality that works with that data. The internal data of an object should never be exposed
in the interface; thus, fields rarely should be Public (public).

Returning to the Car example. If a Car object interacts with a Driver object, the Car
interface might consist of a GoForward method, a Go Backward method, and a Stop method.
This is all the information that the Driver needs to interact with the Car. The Car might
contain an Engine object, for example, but the Driver doesn’t need to know about the Engine
object—the entire Driver cares about is that the methods can be called and that they return the
appropriate values. Thus, if one Engine object is exchanged for another, it makes no
difference to the Driver as long as the interface continues to function correctly.

Polymorphism

Polymorphism is the ability of different classes to provide different implementations


of the same public interfaces. In other words, polymorphism allows methods and properties
of an object to be called without regard for the particular implementation of those members.
For example, a Driver object can interact with a Car object through the Car public interface.

If another object, such as a Truck object or a SportsCar object, exposes the same
public interface, the Driver object can interact with them without regard to the specific
implementation of that interface. There are two principal ways through which polymorphism
can be provided: interface polymorphism and inheritance polymorphism.

Interface Polymorphism

An interface is a contract for behavior. Essentially, it defines the members a class


should implement, but states nothing at all about the details of that implementation. An object
can implement many different interfaces, and many diverse classes can implement the same
interface. All objects implementing the same interface are capable of interacting with other
objects through that interface. For example, the Car object in the previous examples might
implement the IDrivable interface (by convention, interfaces usually begin with I), which
specifies the Go Forward, Go Backward, and Halt methods. Other classes, such as Truck,
Forklift, or Boat might implement this interface and thus are able to interact with the Driver
object. The Driver object is unaware of which interface implementation it is interacting with;
it is only aware of the interface itself. Interface polymorphism is discussed in detail in Lesson
3.

Inheritance Polymorphism

Inheritance allows you to incorporate the functionality of a previously defined class


into a new class and implement different members as needed. A class that inherits another
class is said to derive from that class, or to inherit from that class. A class can directly inherit
from only one class, which is called the base class. The new class has the same members as
the base class, and additional members can be added as needed. Additionally, the
implementation of base members can be changed in the new class by overriding the base
class implementation.

Inherited classes retain all the characteristics of the base class and can interact with
other objects as though they were instances of the base class. For example, if the Car class is
the base class, a derived class might be Sports Car. The Sports Car class might be the base
class for another derived class, the Convertible Sports Car. Each newly derived class might
implement additional members, but the functionality defined in the original Car class is
retained.

Overview of ADO.NET

Most applications require some kind of data access. Desktop applications need to
integrate with central databases, Extensible Markup Language (XML) data stores, or local
desktop databases. ADO.NET data-access technology allows simple, powerful data access
while maximizing system resource usage.

Different applications have different requirements for data access. Whether your
application simply displays the contents of a table, or processes and updates data to a central
SQL server, ADO.NET provides the tools to implement data access easily and efficiently.

Disconnected Database Access


Previous data-access technologies provided continuously connected data access by
default. In such a model, an application creates a connection to a database and keeps the
connection open for the life of the application, or at least for the amount of time that data is
required. However, as applications become more complex and databases serve more and
more clients, connected data access is impractical for a variety of reasons, including the
following:

o Open database connections are expensive in terms of system resources. The more
open connections there are, the less efficient system performance becomes.
o Applications with connected data access are difficult to scale. An application that can
comfortably maintain connections with two clients might do poorly with 10 and be
completely unusable with 100.
o Open database connections can quickly consume all available database licenses,
which can be a significant expense. In order to work within a limited set of client
licenses, connections must be reused whenever possible.

ADO.NET addresses these issues by implementing a disconnected data access model


by default. In this model, data connections are established and left open only long

enough to perform the requisite action. For example, if an application requests data from a
database, the connection opens just long enough to load the data into the application, and then
it closes. Likewise, if a database is updated, the connection opens to execute the UPDATE
command, and then closes again. By keeping connections open only for the minimum
required time, ADO.NET conserves system resources and allows data access to scale up with
a minimal impact on performance.

ADO.NET Data Architecture

Data access in ADO.NET relies on two entities: the Data Set, which stores data on the
local machine, and the Data Provider, a set of components that mediates interaction between
the program and the database.

The Data Set

The Data Set is a disconnected, in-memory representation of data. It can be thought of


as a local copy of the relevant portions of a database. Data can be loaded into a Data Set from
any valid data source, such as a SQL Server database, a Microsoft Access database, or an
XML file. The Data Set persists in memory, and the data therein can be manipulated and
updated independent of the database. When appropriate, the Data Set can then act as a
template for updating the central database.

The DataSet object contains a collection of zero or more DataTable objects, each of
which is an in-memory representation of a single table. The structure of a particular
DataTable is defined by the DataColumns collection, which enumerates the columns in a
particular table, and the Constraint collection, which enumerates any constraints on the table.
Together, these two collections make up the table schema. A DataTable also contains a
DataRows collection, which contains the actual data in the DataSet.

The DataSet contains a DataRelations collection. A DataRelation object allows you to


create associations between rows in one table and rows in another table. The DataRelations
collection enumerates a set of DataRelation objects that define the relationships between
tables in the DataSet. For example, consider a DataSet that contains two related tables: an
Employees table and a Projects table. In the Employees table, each employee is represented
only once and is identified by a unique EmployeeID field. In the Projects table, an employee
in charge of a project is identified by the EmployeeID field, but can appear more than once if
that employee is in charge of multiple projects. This is an example of a one-to-many
relationship; you would use a DataRelation object to define this relationship. Additionally, a
DataSet contains an Extended Properties collection, which is used to store custom
information about the DataSet

The Data Provider

The link to the database is created and maintained by a data provider. A data provider is
not a single component; rather it is a set of related components that work together to provide
data in an efficient, performance-driven manner. The first version of the Microsoft .NET
Framework shipped with two data providers: the SQL Server .NET Data Provider, designed
specifically to work with SQL Server 7 or later, and the OleDb .NET Data Provider, which
connects with other types of databases. Microsoft Visual Studio .NET 2003 added two more
data providers: the ODBC Data Provider and the Oracle Data Provider. Each data provider
consists of versions of the following generic component classes:
o The Connection object provides the connection to the database.
o The Command object executes a command against a data source. It can execute non-
query commands, such as INSERT, UPDATE, or DELETE, or return a DataReader
with the results of a SELECT command.
o The DataReader object provides a forward-only, read-only, connected recordset.
o The DataAdapter object populates a disconnected DataSet or DataTable with data and
performs updates.

Data access in ADO.NET is facilitated as follows: a Connection object establishes a


connection between the application and the database. This connection can be accessed
directly by a Command object or by a DataAdapter object.

The Command object provides direct execution of a command to the database. If the
command returns more than a single value, the Command object returns a DataReader to
provide the data. This data can be directly processed by application logic. Alternatively, you
can use the DataAdapter to fill a DataSet object. Updates to the database can be achieved
through the Command object or through the DataAdapter. The generic classes that make up
the data providers are summarized in the following sections.

The Connection Object

The Connection object represents the actual connection to the database. Visual
Studio .NET 2003 supplies two types of Connection classes: the SqlConnection object, which
is designed specifically to connect to SQL Server 7 or later, and the OleDbConnection object,
which can provide connections to a wide range of database types.

Visual Studio .NET 2003 further provides a multipurpose ODBCConnection class, as


well as an Oracle Connection class optimized for connecting to Oracle databases. The
Connection object contains all of the information required to open a channel to the database
in the ConnectionString property. The Connection object also incorporates methods that
facilitate data transactions.

The Command Object

The Command object is represented by two corresponding classes, SqlCommand and


OleDbCommand. You can use Command objects to execute commands to a database across a
data connection. Command objects can be used to execute stored procedures on the database
and SQL commands, or return complete tables.

Command objects provide three methods that are used to execute commands on the
database:

 ExecuteNonQuery.
o Executes commands that return no records, such as INSERT, UPDATE, or
DELETE
 ExecuteScalar.
o Returns a single value from a database query
 ExecuteReader.
o Returns a result set by way of a DataReader object

The DataReader Object

The DataReader object provides a forward-only, read-only, connected stream


recordset from a database. Unlike other components of a data provider, DataReader objects
cannot be directly instantiated. Rather, the DataReader is returned as the result of a Command
object’s ExecuteReader method. The SqlCommand. ExecuteReader method returns a
SqlDataReader object, and the OleDbCommand. ExecuteReader method returns an
OleDbDataReader object.

Likewise, the ODBC and Oracle Command. ExecuteReader methods return a


DataReader specific to the ODBC and Oracle Data Providers respectively. The DataReader
can supply rows of data directly to application logic when you do not need to keep the data
cached in memory. Because only one row is in memory at a time, the DataReader provides
the lowest overhead in terms of system performance, but it requires exclusive use of an open
Connection object for the lifetime of the DataReader.

The DataAdapter Object

The DataAdapter is the class at the core of ADO.NET disconnected data access. It is
essentially the middleman, facilitating all communication between the database and a
DataSet. The DataAdapter fills a DataTable or DataSet with data from the database whenever
the Fill method is called. After the memory-resident data has been manipulated, the
DataAdapter can transmit changes to the database by calling the Update method.

The DataAdapter provides four properties that represent database commands. The
four properties are:

o Select Command.
Contains the command text or object that selects the data from the database.
This command is executed when the Fill method is called and fills a
DataTable or a DataSet.
o Insert Command.
Contains the command text or object that inserts a row into a table.
o Delete Command.
Contains the command text or object that deletes a row from a table.
o Update Command.
Contains the command text or object that updates the values of a database.

When the Update method is called, changes in the DataSet are copied back to the database,
and the appropriate Insert Command, Delete Command, or Update Command is executed.
Accessing Data

Visual Studio .NET has many built-in wizards and designers to help you shape your
data-access architecture rapidly and efficiently. With minimal actual coding, you can
implement robust data access for your application. However, the ADO.NET object model is
fully available through code to implement customized features or to fine-tune your program.
In this lesson, you will learn how to connect to a database with ADO.NET and retrieve data
to your application. You will learn to use the visual designers provided by Visual
Studio .NET and direct code access.

Microsoft Visual Basic.Net

With its release for the .NET platform, the Visual Basic language has undergone
dramatic changes.

For example:
o The language itself is now fully object-oriented.
o Applications and components written in Visual Basic .NET have full access to
the .NET Framework, an extensive class library that provides system and
application services.
o All applications developed using Visual Basic .NET run within a managed
runtime environment, the .NET common language runtime.

Visual Basic .NET is the next generation of Visual Basic, but it is also a significant
departure from previous generations. Experienced Visual Basic 6 developers will feel
comfortable with Visual Basic .NET code and will recognize most of its constructs. However,
Microsoft has made some changes to make Visual Basic .NET a better language and an equal
player in the .NET world.

These include such additions as a Class keyword for defining classes and an Inherits
keyword for object inheritance, among others. Visual Basic 6 code can't be compiled by the
Visual Basic .NET compiler without significant modification. The good news is that
Microsoft has provided a migration tool to handle the task.

FEATURES OF SQL SERVER 2000

Microsoft SQL server lets you quickly build powerful and reliable database
applications. SQL server 7.0 highly scalable, fully relational, high performance, multi-user
database server. That can be used by enterprise of any size to manage large amount of data
for client\server applications.

The major new and improved features of SQL server 7.0 include the multi-user
support Multi platform support, added memory support, scalability, integration with MMC,
Microsoft Management console and improved multiple server management. Parallel database
backup and restore. Data replication, Data warehousing distributed queries, distributed
transactions, Dynamic cocking Internet Access, Integrated windows security, Mail integration
Microsoft English Query, ODBC Support.

SQL Server management is accomplished through a set of component applications.


SQL Server introduces a number of new and improved management tools that are SQL
Server Enterprise management, profiles, and Query Analyzer service manager wizards.

The OLAP Services feature available in SQL Server version 7.0 is now called SQL
Server 2000 Analysis Services. The term OLAP Services has been replaced with the term
Analysis Services. Analysis Services also includes a new data mining component. The
Repository component available in SQL Server version 7.0 is now called Microsoft SQL
Server 2000 Meta Data Services. References to the component now use the term Meta Data
Services. The term repository is used only in reference to the repository engine within Meta
Data Services

SQL-SERVER database consist of six type of objects,

They are,

1. TABLE

2. QUERY

3. FORM

4. REPORT

5. MACRO

TABLE:

A database is a collection of data about a specific topic.

VIEWS OF TABLE:

We can work with a table in two types,

1. Design View

2. Datasheet View

Design View

To build or modify the structure of a table we work in the table design view. We
can specify what kind of data will be hold.

Datasheet View

To add, edit or analyses the data itself we work in tables datasheet view mode.

QUERY:

A query is a question that has to be asked the data. Access gathers data that answers the
question from one or more table. The data that make up the answer is either dynaset (if
you edit it) or a snapshot(it cannot be edited).Each time we run query, we get latest
information in the dynaset.Access either displays the dynaset or snapshot for us to view
or perform an action on it ,such as deleting or updating.

FORMS:

A form is used to view and edit information in the database record by record .A form
displays only the information we want to see in the way we want to see it. Forms use the
familiar controls such as textboxes and checkboxes. This makes viewing and entering
data easy.

Views of Form:

We can work with forms in several primarily there are two views,

They are,

1. Design View

2. Form View

Design View

To build or modify the structure of a form, we work in forms design view. We can
add control to the form that are bound to fields in a table or query, includes textboxes,
option buttons, graphs and pictures.

Form View

The form view which display the whole design of the form.

REPORT:

A report is used to vies and print information from the database. The report can
ground records into many levels and compute totals and average by checking values from
many records at once. Also the report is attractive and distinctive because we have control
over the size and appearance of it.

MACRO:

A macro is a set of actions. Each action in macros does something. Such as opening a
form or printing a report .We write macros to automate the common tasks the work easy
and save the time.
SYSTEM DESIGN :
INPUT DESIGN
Input design is the process of converting user-originated inputs to a computer-
based format to the application forms. Input design is one of the most expensive phases of the
operation of computerized system and is often the major problem of a system.

Input design forms are:

o Registration
o Login
o Employee leave
o Salary Report

OUTPUT DESIGN

Output design generally refers to the results and information that are generated
by the system for many end-users; output is the main reason for developing the system and
the basis on which they evaluate the usefulness of the application. The output is designed in
such a way that it is attractive, convenient and informative. Forms are designed in C#.NET
with various features, which make the console output more pleasing.
As the outputs are the most important sources of information to the users,
better design should improve the system’s relationships with us and also will help in
decision-making. Form design elaborates the way output is presented and the layout available
for capturing information.
Output design forms are:

o View files
o View Reporter
o Print Salary Report

DATABASE DESIGN
The database design is a must for any application developed especially more for the
data store projects. Since the chatting method involves storing the message in the table and
produced to the sender and receiver, proper handling of the table is a must. In the project,
login table is designed to be unique in accepting the username and the length of the username
and password should be greater than zero. Both the company and seeker username are stored
in the same table with different flag values.
The job and question table is common to all companies. Likewise job apply details are
stored in the common ‘apply’ table. The different users view the data in different format
according to the privileges given. The complete listing of the tables and their fields are
provided in the annexure under the title ‘Table Structure’.

TESTING AND IMPLEMENTATION

System Implementation:
Implementation is the most crucial stage in achieving a successful
system and giving the user’s confidence that the new system is workable and effective.
Implementation of a modified application to replace an existing one. This type of
conversation is relatively easy to handle, provide there are no major changes in the system.
Each program is tested individually at the time of development using the data
and has verified that this program linked together in the way specified in the programs
specification, the computer system and its environment is tested to the satisfaction of the user.
The system that has been developed is accepted and proved to be satisfactory for the user.
And so the system is going to be implemented very soon. A simple operating procedure is
included so that the user can understand the different functions clearly and quickly.
Initially as a first step the executable form of the application is to be created and
loaded in the common server machine which is accessible to all the user and the server is to
be connected to a network. The final stage is to document the entire system which provides
components and the operating procedures of the system.

Testing:
System Testing:
Testing is done for each module. After testing all the modules, the modules are
integrated and testing of the final system is done with the test data, specially designed to
show that the system will operate successfully in all its aspects conditions. The procedure
level testing is made first. By giving improper inputs, the errors occurred are noted and
eliminated. Thus the system testing is a confirmation that all is correct and an opportunity to
show the user that the system works. The final step involves Validation testing, which
determines whether the software function as the user expected. The end-user rather than the
system developer conduct this test most software developers as a process called “Alpha and
Beta test” to uncover that only the end user seems able to find.

This is the final step in system life cycle. Here we implement the tested error-free
system into real-life environment and make necessary changes, which runs in an online
fashion. Here system maintenance is done every months or year based on company policies,
and is checked for errors like runtime errors, long run errors and other maintenances like
table verification and reports.

Unit Testing:

Unit testing verification efforts on the smallest unit of software design, module. This
is known as “Module Testing”. The modules are tested separately. This testing is carried out
during programming stage itself. In these testing steps, each module is found to be working
satisfactorily as regard to the expected output from the module.

Integration Testing:

Integration testing is a systematic technique for constructing tests to uncover error


associated within the interface. In the project, all the modules are combined and then the
entire programmer is tested as a whole. In the integration-testing step, all the error uncovered
is corrected for the next testing steps.

Validation Testing:

To uncover functional errors, that is, to check whether functional characteristics confirm to
specification or not specified.

SYSTEM MAINTENANCE
The objectives of this maintenance work are to make sure that the system gets into work all
time without any bug. Provision must be for environmental changes which may affect the
computer or software system. This is called the maintenance of the system. Nowadays there
is the rapid change in the software world. Due to this rapid change, the system should be
capable of adapting these changes. In our project the process can be added without affecting
other parts of the system.

Maintenance plays a vital role. The system liable to accept any modification after its
implementation. This system has been designed to favor all new changes. Doing this will not
affect the system’s performance or its accuracy.

In the project system testing is made as follows:

The procedure level testing is made first. By giving improper inputs, the errors
occurred are noted and eliminated. Then the web form level testing is made. For example
storage of data to the table in the correct manner.
In the form, the zero length username and password are given and checked. Also
the duplicate username is given and checked. The client side validations are made.
The dates are entered in wrong manner and checked. Wrong email-id is given and
checked.
This is the final step in system life cycle. Here we implement the tested error-free
system into real-life environment and make necessary changes, which runs in an online
fashion. Here system maintenance is done every months or year based on company policies,
and is checked for errors like runtime errors, long run errors and other maintenances like
table verification and reports.
Implementation is the stage of the project when the theoretical design is turned out
into a working system. Thus it can be considered to be the most critical stage in achieving a
successful new system and in giving the user, confidence that the new system will work and
be effective.
The implementation stage involves careful planning, investigation of the existing
system and it’s constraints on implementation, designing of methods to achieve changeover
and evaluation of changeover methods.
Implementation is the process of converting a new system design into operation. It is
the phase that focuses on user training, site preparation and file conversion for installing a
candidate system. The important factor that should be considered here is that the conversion
should not disrupt the functioning of the organization.
ER Diagram:

Registratio
Student n

uname
Addr
Register
uname
pwd
mob

Admin Login View


appointment
result

result

appointnti
uDatetime d

Question no

Staff View request


Uname Appointment
Result

reuestid staffnam
Result e
SYSTEM ARCHITECTURE

User Staff

Login Login

access
Tutorial Forums Approve
/exams booking

Appointment Questions Reply for


booking forums

Reason for
booking Validatio
n

Resource allocated Resource


Requesting details
Run the time for
program scheduling

DATABASE

MODULES:
1. Authentication

This module is the basic one for both the Student,staff and the authors; they should
register with some admin controller. So further they can easily get response from the
server by simple login process. And there is no need that the user and author are register
with same admin, due to the cloud storage the process will be in different entities.

2.Student Reservation request

This module provides student appointment request to various staff for various
purpose like learning,lap sessions,cultural and other activities.In this module helps
student to entroll their personal information like department,mobile,emailid etc and
details based on their appointment request.

3.Staff reservation Request

Staff can give resource appointment request to various level like principal,HOD
etc.Each and every staff can raise an request for discussing varius purpose like
student performance, marks, evaluation, cutultural, training etc..Staff request will be
approved by admin(hod,principal) only based on their purpose and timing.

4.appointments

Here Staff will approve the appointment request based on their time availability
and various factors. They have an option to update their reservation status either it as
approved or rejected. Based on three parameter they will give an appointment

 Time
 Purpose
 Prioirty
After the result of every level ,the Student can request number of online appointment at a
time It will provides the another set of guidelines to improve their knowledge in that
particular exam.

5.Admin Access
Admin can add and remove all the staff details. He can manage all the resource
activities effectively. Staff access will be given by admin only based on the availability.
All the staff appointment request will be accessed by admin. Admin have an option to
change the staff appointment request at any time.

6.Reports

This is the final module of the project, which keeps entire reports of the all
process. It also keeps the user details and their performance details. This module only
proposes the results of appointments status. The cleared profiles only maintained by this
module. This report will help them to see appointment activities history. These are the
efficient modules of our project.

DATA FLOW DIAGRAM

profile

Online Tutor OR
STAFF
Appointment
Self Training Student request

View request Guidelines and


result

Career skill

Language
selection
Save/download

Student choice
Profile

request
Student request Staff or
Reason for
departments appointments

Student data Appointment


Data Guidelines
store
Data store

view Time and date

Recommendation scheduling Result

CONCLUSION:

This undertaking additionally gives the advantage of reconciliation of asset reservation


framework with understudy data the executive’s framework to make line process for booking
Input Query Result
exercises and errands. It very well may be utilized at the same time with some other college
the board framework programming or comparable application.
Execute Query Staff Error and suggestion

Adaptability is another key part of this undertaking. According to client needs and
Hint Word Appointment /
prerequisites, highlights, modules, and sub-modules can be effectively incorporated
cancel into the
framework.

Admin name Staff and student


info

Login
Password View Reports
REFERENCES

[1] A. Banerjea, D. Ferrari, B.A. Mark, M. Moran: ―The Tenet Real-Time Protocol Suite:
Design, Implementation, and Experiences‖, Technical Report TR-94-059, International
Computer Science Institute, Berkeley, CA, USA, November 1994.

[2] A. Campbell, G. Coulson, D. Hutchinson: ―A Quality of Service Architecture‖, ACM


Computer Communication Review, Vol. 24, No. 2, April 1994, pp.6-27.

[3] Y.-H. Chang: ―Network Support for a Multimedia Conference Scheduling Service‖,
Proceedings of SPIE, Vol. 2188, 1994, pp. 109- 119.

[4] D. Clark, S. Shenker, L. Zhang: ―Supporting Real-Time Applications in an Integrated


Packet Services Network: Architecture and Mechanisms‖, SIGCOMM 1992
SCREEN SHOTS
TABLE DESIGN

ADMIN STAFF RESPONSE

LOGIN
REGISTRATION

STAFF REQUEST

STAFF STUDENT RESPONSE


STUDENT REQUEST

CODING

REGISTRATION
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data.SqlClient;

namespace Resource_Reservation
{
public partial class Registration : System.Web.UI.Page
{
string strConnString =
ConfigurationManager.ConnectionStrings["conn"].ConnectionString;
SqlCommand cmd = new SqlCommand();
SqlDataAdapter sqlda;
protected void Page_Load(object sender, EventArgs e)
{

protected void Button3_Click(object sender, EventArgs e)


{
SqlConnection con = new SqlConnection(strConnString);
con.Open();
cmd = new SqlCommand("insert into Registration values('" +
TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" +
TextBox4.Text + "','" + TextBox5.Text + "','" + DropDownList1.Text + "','"
+ DropDownList2.Text + "','" + TextBox6.Text + "','" + DropDownList3.Text +
"','" + TextBox8.Text + "')", con);
cmd.ExecuteNonQuery();
Label1.Text = "REGISTRATION SAVED SUCCESSFULLY";
cmd.Dispose();
con.Close();
TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
TextBox5.Text = "";
TextBox6.Text = "";
TextBox7.Text = "";
TextBox8.Text = "";

}
}
}

LOGIN
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;

namespace Resource_Reservation
{
public partial class Login : System.Web.UI.Page
{
string strConnString =
ConfigurationManager.ConnectionStrings["conn"].ConnectionString;
string str, UserName, Password;
SqlCommand cmd = new SqlCommand();
SqlDataAdapter sqlda;
DataTable dt;
int RowCount;
protected void Page_Load(object sender, EventArgs e)
{

protected void Button3_Click(object sender, EventArgs e)


{
SqlConnection con = new SqlConnection(strConnString);
con.Open();
str = "Select * from Login";
cmd = new SqlCommand(str);
sqlda = new SqlDataAdapter(cmd.CommandText, con);
dt = new DataTable();
sqlda.Fill(dt);
RowCount = dt.Rows.Count;
for (int i = 0; i < RowCount; i++)
{
UserName = dt.Rows[i]["username"].ToString();
Password = dt.Rows[i]["Password"].ToString();
if (UserName == TextBox1.Text && Password == TextBox2.Text)
{
Session["UserName"] = TextBox1.Text;
if (dt.Rows[i]["Role"].ToString() == "Admin")
Response.Redirect("AdminDefault.aspx");
else if (dt.Rows[i]["Role"].ToString() == "Staff")
Response.Redirect("StaffDefault.aspx");
else if (dt.Rows[i]["Role"].ToString() == "Student")
Response.Redirect("StudentDefault.aspx");
}
else
{
Label1.Text = "Invalid User Name or Password! Please
try again!";
}
}
con.Close();
}
}
}
STUDENT REQUEST
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data.SqlClient;

namespace Resource_Reservation
{
public partial class StudentReservation : System.Web.UI.Page
{
string strConnString =
ConfigurationManager.ConnectionStrings["conn"].ConnectionString;
SqlCommand cmd = new SqlCommand();
SqlDataAdapter sqlda;
protected void Page_Load(object sender, EventArgs e)
{
Label2.Text = Session["UserName"].ToString();
SqlConnection con = new SqlConnection(strConnString);
cmd = new SqlCommand("select
name,email,mobileno,department,year,regno from Registration where email='"
+ Label2.Text + "'", con);
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
TextBox1.Text = Convert.ToString(dr[0]);
TextBox2.Text = Convert.ToString(dr[1]);
TextBox3.Text = Convert.ToString(dr[2]);
TextBox4.Text = Convert.ToString(dr[3]);
TextBox5.Text = Convert.ToString(dr[4]);
TextBox6.Text = Convert.ToString(dr[5]);
}
con.Close();

protected void DropDownList1_SelectedIndexChanged(object sender,


EventArgs e)
{
SqlConnection con = new SqlConnection(strConnString);
if (DropDownList1.Text == null)
{
}
else
{
cmd = new SqlCommand("select email,mobileno,year from
Registration where name='" + DropDownList1.Text + "'", con);
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
TextBox10.Text = Convert.ToString(dr[0]);
TextBox11.Text = Convert.ToString(dr[1]);
TextBox12.Text = Convert.ToString(dr[2]);

}
con.Close();
}

protected void Button4_Click(object sender, EventArgs e)


{
SqlConnection con = new SqlConnection(strConnString);
con.Open();
SqlCommand cmd = new SqlCommand("insert into StudentRequest" +
"(applicantname,applicantemail,applicantphoneno,appliantdepartment,applican
tyear,applicantregno,purpose,dateofmeeting,timeofmeeting,staffname,staffema
il,staffphoneno,staffposition)values(@applicantname,@applicantemail,@applic
antphoneno,@appliantdepartment,@applicantyear,@applicantregno,@purpose,@dat
eofmeeting,@timeofmeeting,@staffname,@staffemail,@staffphoneno,@staffpositi
on)", con);
cmd.Parameters.AddWithValue("@applicantname", TextBox1.Text);
cmd.Parameters.AddWithValue("@applicantemail", TextBox2.Text);
cmd.Parameters.AddWithValue("@applicantphoneno",
TextBox3.Text);
cmd.Parameters.AddWithValue("@appliantdepartment",
TextBox4.Text);
cmd.Parameters.AddWithValue("@applicantyear", TextBox5.Text);
cmd.Parameters.AddWithValue("@applicantregno", TextBox6.Text);
cmd.Parameters.AddWithValue("@purpose", TextBox7.Text);
cmd.Parameters.AddWithValue("@dateofmeeting ", TextBox8.Text);
cmd.Parameters.AddWithValue("@timeofmeeting ", TextBox9.Text);
cmd.Parameters.AddWithValue("@staffname", DropDownList1.Text);
cmd.Parameters.AddWithValue("@staffemail", TextBox10.Text);
cmd.Parameters.AddWithValue("@staffphoneno", TextBox11.Text);
cmd.Parameters.AddWithValue("@staffposition", TextBox12.Text);

cmd.ExecuteNonQuery();
Label3.Text = "Registration Has Been Saved Successfully";

TextBox7.Text = "";
TextBox8.Text = "";
TextBox9.Text = "";
TextBox10.Text = "";
TextBox11.Text = "";
TextBox12.Text = "";

}
}
}
STAFF STUDENT PERMISSION
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;

namespace Resource_Reservation
{
public partial class StaffStudentPermission : System.Web.UI.Page
{
string strConnString =
ConfigurationManager.ConnectionStrings["conn"].ConnectionString;
SqlCommand cmd = new SqlCommand();
SqlDataAdapter da;
DataSet ds;
protected void Page_Load(object sender, EventArgs e)
{
string set = "Student";
SqlConnection con = new SqlConnection(strConnString);
if (!Page.IsPostBack)
{
cmd = new SqlCommand("select email from Registration where
position='" + set + "'", con);
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
while (dr.Read())
{
DropDownList1.Items.Add(dr[0].ToString());
}
con.Close();
}

con.Open();
da = new SqlDataAdapter("select * from Registration where
position='" + set + "'", con);
ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
con.Close();

con.Open();
da = new SqlDataAdapter("select * from Login where Role='" +
set + "'", con);
ds = new DataSet();
da.Fill(ds);
GridView2.DataSource = ds;
GridView2.DataBind();
con.Close();
}
protected void DropDownList1_SelectedIndexChanged(object sender,
EventArgs e)
{
SqlConnection con = new SqlConnection(strConnString);
if (DropDownList1.Text == null)
{
}
else
{
cmd = new SqlCommand("select password from Registration
where email='" + DropDownList1.Text + "'", con);
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
TextBox1.Text = Convert.ToString(dr[0]);

}
con.Close();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
String status = DropDownList2.Text;
SqlConnection con = new SqlConnection(strConnString);
con.Open();
cmd = new SqlCommand("insert into Login values('" +
DropDownList1.Text + "','" + TextBox1.Text + "','" + status + "')", con);
cmd.ExecuteNonQuery();
Response.Write("<script>alert('Permission granted')</script>");
cmd.Dispose();
con.Close();
con.Open();
da = new SqlDataAdapter("select * from Login", con);
ds = new DataSet();
da.Fill(ds);
GridView2.DataSource = ds;
GridView2.DataBind();
con.Close();
}

}
}
STAFF RESERVATION PERMISSION
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;

namespace Resource_Reservation
{
public partial class StaffReservationPermission : System.Web.UI.Page
{
string strConnString =
ConfigurationManager.ConnectionStrings["conn"].ConnectionString;
SqlCommand cmd = new SqlCommand();
SqlDataAdapter sqlda;
SqlDataAdapter da;
DataSet ds;
protected void Page_Load(object sender, EventArgs e)
{
Label2.Text = Session["UserName"].ToString();
Panel1.Visible = false;
Panel2.Visible = false;

protected void GridView1_SelectedIndexChanged(object sender,


EventArgs e)
{
GridViewRow row = GridView1.SelectedRow;
TextBox1.Text = row.Cells[1].Text;
TextBox2.Text = row.Cells[2].Text;
TextBox3.Text = row.Cells[3].Text;
TextBox4.Text = row.Cells[4].Text;
TextBox5.Text = row.Cells[5].Text;
TextBox6.Text = row.Cells[6].Text;
TextBox7.Text = row.Cells[7].Text;
TextBox8.Text = row.Cells[8].Text;
TextBox9.Text = row.Cells[9].Text;

protected void RadioButton1_CheckedChanged(object sender, EventArgs


e)
{
Panel1.Visible = true;
Panel2.Visible = false;
RadioButton2.Checked = false;
TextBox14.Text = "APPROVED";

protected void RadioButton2_CheckedChanged(object sender, EventArgs


e)
{
Panel2.Visible = true;
Panel1.Visible = false;
RadioButton1.Checked = false;
TextBox14.Text = "REJECTED";

protected void Button4_Click(object sender, EventArgs e)


{
SqlConnection con = new SqlConnection(strConnString);
con.Open();
SqlCommand cmd = new SqlCommand("insert into
staffstudentresponse" +
"(applicantname,applicantemail,applicantphoneno,applicantyear,applicantdepa
rtment,applicantregno,timeofmeeting,dateofmeeting,purposeofmeeting,status,a
pprovalrules,rejectionreason)values(@applicantname,@applicantemail,@applica
ntphoneno,@applicantyear,@applicantdepartment,@applicantregno,@timeofmeetin
g,@dateofmeeting,@purposeofmeeting,@status,@approvalrules,@rejectionreason)
", con);
cmd.Parameters.AddWithValue("@applicantname", TextBox1.Text);
cmd.Parameters.AddWithValue("@applicantemail", TextBox2.Text);
cmd.Parameters.AddWithValue("@applicantphoneno",
TextBox3.Text);
cmd.Parameters.AddWithValue("@applicantyear", TextBox4.Text);
cmd.Parameters.AddWithValue("@applicantdepartment",
TextBox5.Text);
cmd.Parameters.AddWithValue("@applicantregno", TextBox6.Text);
cmd.Parameters.AddWithValue("@timeofmeeting", TextBox7.Text);
cmd.Parameters.AddWithValue("@dateofmeeting ", TextBox8.Text);
cmd.Parameters.AddWithValue("@purposeofmeeting",
TextBox9.Text);
cmd.Parameters.AddWithValue("@status", TextBox14.Text);
cmd.Parameters.AddWithValue("@approvalrules", TextBox13.Text);
cmd.Parameters.AddWithValue("@rejectionreason",
TextBox12.Text);

cmd.ExecuteNonQuery();
Label3.Text = "Registration Has Been Saved Successfully";
TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
TextBox5.Text = "";
TextBox6.Text = "";
TextBox7.Text = "";
TextBox8.Text = "";
TextBox9.Text = "";
TextBox14.Text = "";
}
}
}
STAFF ADMIN RESERVATION
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data.SqlClient;

namespace Resource_Reservation
{
public partial class StaffAdminReservation : System.Web.UI.Page
{
string strConnString =
ConfigurationManager.ConnectionStrings["conn"].ConnectionString;
SqlCommand cmd = new SqlCommand();
SqlDataAdapter sqlda;
protected void Page_Load(object sender, EventArgs e)
{
Label2.Text = Session["UserName"].ToString();
SqlConnection con = new SqlConnection(strConnString);
cmd = new SqlCommand("select
name,email,mobileno,department,position from Registration where email='" +
Label2.Text + "'", con);
con.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
TextBox1.Text = Convert.ToString(dr[0]);
TextBox2.Text = Convert.ToString(dr[1]);
TextBox3.Text = Convert.ToString(dr[2]);
TextBox4.Text = Convert.ToString(dr[3]);
TextBox5.Text = Convert.ToString(dr[4]);

}
con.Close();
}

protected void Button4_Click(object sender, EventArgs e)


{
SqlConnection con = new SqlConnection(strConnString);
con.Open();
SqlCommand cmd = new SqlCommand("insert into StaffRequest" +
"(applicantname,applicantemail,applicantphoneno,applicantdepartment,applica
ntposition,purpose,dateofmeeting,timeofmeeting,resourcename)values(@applica
ntname,@applicantemail,@applicantphoneno,@applicantdepartment,@applicantpos
ition,@purpose,@dateofmeeting,@timeofmeeting,@resourcename)", con);
cmd.Parameters.AddWithValue("@applicantname", TextBox1.Text);
cmd.Parameters.AddWithValue("@applicantemail", TextBox2.Text);
cmd.Parameters.AddWithValue("@applicantphoneno",
TextBox3.Text);
cmd.Parameters.AddWithValue("@applicantdepartment",
TextBox4.Text);
cmd.Parameters.AddWithValue("@applicantposition",
TextBox5.Text);
cmd.Parameters.AddWithValue("@purpose", TextBox7.Text);
cmd.Parameters.AddWithValue("@dateofmeeting ", TextBox8.Text);
cmd.Parameters.AddWithValue("@timeofmeeting ", TextBox9.Text);

cmd.Parameters.AddWithValue("@resourcename", TextBox10.Text);

cmd.ExecuteNonQuery();
Label3.Text = "Registration Has Been Saved Successfully";

TextBox7.Text = "";
TextBox8.Text = "";
TextBox9.Text = "";

}
}
}

You might also like