Sei sulla pagina 1di 58

EXAMINATION HALL SEATING ARRANGEMENT SYSTEM

ABSTRACT

Presently, the seating arrangement for the examinations is done manually. Initially the
examination section has to collect all student examination registration details branch wise and year
wise. These details include name, roll no. , branch, year, list of subjects registered for exam. The
administrator need to count the total number students registered. Then he needs to select the rooms
and divide the students among those rooms. After dividing the rooms, he need to prepare students
list for each based on the exam. He also needs to prepare the seating arrangement list for each
room based upon the count. All this work need to be done for each exam and for each branch and
year. This is very tedious work and there are many chances for mistakes to occur due to manual
work. The ―examination seating arrangement system‖ atomizes the existing system of assigning
seating arrangement. When a student registers for an examination, this system stores student
examination registration details (name, roll no. , branch, year & semester, subjects) in the database
depending on the branch, year & semester. These details can be efficiently used whenever required.
The system takes the details as input from the database depending on the selected branch. The
system asks for subject of the exam to be conducted, set no. , room details (room no. , size) and
allocates rooms. This also generates seating arrangement and students list for each room.
INTRODUCTION

Examination seating arrangement system gives page out results under all circumstances,

once the data collection is over. Out system manages everything perfectly. Our system reduces the

manual effect and speeds up the processing of results.

The present project has been developed to meet the aspirations indicated in the modern

age. An attempt has been made through this project to do all work ease & fast. It provide current

add, Update, Move Next, Move Previous, Move Last, Find & Delete all facilities to accomplish

the desired objectives. The facility Include in this project and the suggested activities have been

organized to impart knowledge & develop skill & attitude in the College official works.
Logic Description:

We might be clear with the problem which we are going to solve from the above figure.
As you can see, we need to obtain output of seating numbers using input of starting number and
ending number. In most of the schools and colleges, exams are having a block of 30 students, so
in that case, let’s have a looping variable 'j' which will indicate a row for each iteration. For a block
containing 30 students we require 5 rows. So range of 'j' is 1 to 5.

There is a relation of some distance between 1st and 2nd column, which is same for 3rd and
4th column, 5th and 6th column. This distance is decreased by 2 for each iteration.

We can add a facility of printing Block no., it can be incremented after each 5 iterations of
this loop. Concepts have used some file functions which are required to generate a notepad file
containing this seating arrangement, which can be easily printed out.
Seating Arrangement System

Seating Arrangement System provides a lot of facility to their user. The objective and scope
of my Project Seating Arrangement System is to record the details various activities of user. It will
simplify the task and reduce the paper work. During implementation every user will be given
appropriate training to suit their specific needs. Specific support will also be provided at key points
within the academic calendar. Training will be provided on a timely basis, and you will be trained
as the new is Seating Arrangement System rolled out to your area of responsibility.

Hence the management system for the College management has been designed to remove all the
deficiency from which the present system is suffering and to ensure.

Seating Arrangement System Usages

The client uses MS Excel, and maintains their records, however it is not possible them to
share the data from multiple system in multi user environment, there is lot of duplicate work, and
chance of mistake. When the records are changed they need to update each and every excel file.
There is no option to find and print previous saved records. There is no security; anybody can
access any report and sensitive data, also no reports to summary report. This Seating Arrangement
System is used to overcome the entire problem which they are facing currently, and making
complete atomization of manual system to computerized system.
SYSTEM STUDY

EXISTING SYSTEM

 The existing system only provides text-based interface, which is not as user-friendly as
Graphical user Interface.
 Since the system is implemented in Manual, so the response is very slow.
 The transactions are executed in off-line mode, hence on-line data capture and
modification is not possible.
 Off-line reports cannot be generated due to batch mode execution.
PROPOSED SYSTEM

Hence, there is a need of reformation of the system with more advantages and flexibility. The
Seating Arrangement System eliminates most of the limitations of the existing software. It has
the following objectives:

Enhancement:

The main objective of Seating Arrangement System is to enhance and upgrade the existing
system by increasing its efficiency and effectiveness. The software improves the working
methods by replacing the existing manual system with the computer-based system.

Automation:

The Seating Arrangement System automates each and every activity of the manual system
and increases its throughput. Thus the response time of the system is very less and it works
very fast.

Accuracy:

The Seating Arrangement System provides the uses a quick response with very accurate
information regarding the users etc. Any details or system in an accurate manner, as and
when required.

User-Friendly:

The software Seating Arrangement System has a very user-friendly interface. Thus the
users will feel very easy to work on it. The software provides accuracy along with a
pleasant interface. Make the present manual system more interactive, speedy and user
friendly.

Availability:

The transaction reports of the system can be retried as and when required. Thus, there is
no delay in the availability of any information, whatever needed, can be captured very
quickly and easily.
Maintenance Cost:

Reduce the cost of maintenance.

FEASIBILITY STUDY

The feasibility of the project is analyzed in this phase and business proposal is put forth
with a very general plan for the project and some cost estimates. During system analysis the
feasibility study of the proposed system is to be carried out. This is to ensure that the proposed
system is not a burden to the company. For feasibility analysis, some understanding of the major
requirements for the system is essential.

Three key considerations involved in the feasibility analysis are

1. ECONOMICAL FEASIBILITY
2. TECHNICAL FEASIBILITY
3. SOCIAL FEASIBILITY

1 ECONOMICAL FEASIBILITY

This study is carried out to check the economic impact that the system will have on the
organization. The amount of fund that the company can pour into the research and development of
the system is limited. The expenditures must be justified. Thus the developed system as well within
the budget and this was achieved because most of the technologies used are freely available. Only
the customized products had to be purchased.

2. TECHNICAL FEASIBILITY

This study is carried out to check the technical feasibility, that is, the technical requirements
of the system. Any system developed must not have a high demand on the available technical
resources. This will lead to high demands on the available technical resources. This will lead to
high demands being placed on the client. The developed system must have a modest requirement,
as only minimal or null changes are required for implementing this system.

3 SOCIAL FEASIBILITY
The aspect of study is to check the level of acceptance of the system by the user. This
includes the process of training the user to use the system efficiently. The user must not feel
threatened by the system, instead must accept it as a necessity. The level of acceptance by the users
solely depends on the methods that are employed to educate the user about the system and to make
him familiar with it. His level of confidence must be raised so that he is also able to make some
constructive criticism, which is welcomed, as he is the final user of the system.
SYSTEM SPECIFICATION

HARDWARE REQUIREMENT

PROCESSOR : INTEL PENTIUM III

RAM : 64MB

HDD : 40GB

SECONDARY STORAGE : 1.44 MB FDD,CD-R,CD+RW CDD

MONITOR : 15”COLOR MONITOR.

SOFTWARE REQUIREMENT

FRONT END VB .Net


BACK END MS SQL Server 2005
OPERATING YSTEM WINDOWS XP
IDE Visual Studio 2010
SOFTWARE SPECIFICATION

An overview of the Visual Studio.net Framework


Unless you have been living under a rock for the past year, you must have heard of .net (―dot
net‖) by now. What is .net? Is it a new operating environment? Is it a new language? Is it a new way of
developing distributed applications? The answer is ―Yes‖: .net is all of these things and more.

The .net world was created by Microsoft to allow users to have access to their information, files,
or programs anywhere, anytime, and on any platform or device. When Microsoft introduced the first
Windows operating system, it took application development and system design to a new level: multi-
tasking. With each new version of Windows, multi-tasking has been driven more towards distributed
processing and .net is the next step.

Visual Studio.net has an entirely new, object-oriented framework. In this paper I will introduce
you to some of features in Visual Studio.net, however, I will focus mostly on Visual Basic.net and draw
some comparisons to its predecessor VB 6. The reader of this paper will not be able to start developing
code in Visual Basic.net after reading, but should have a high-level view of the changes in Visual
Basic.net and how they differ from previous versions.

.net Framework Components

Framework, Languages and Tools

Visual Basic C++ C# ...

Common lanaguage specification

Web Services User Interface

Visual Studio .NET

Data and XML

Base class library

Common language runtime

Figure 1 - An overview of the .net Framework


As shown in Figure 1, Visual Basic sits at the top of the framework (along with the other languages in
Visual Studio.net). Below that is the Common Language Specification (CLS). This specification is a set
of rules that govern the minimum language features that must be supported to ensure that a language will
interoperate with other CLS-compliant components and tools. As long as a language conforms to the
CLS, it is guaranteed to work with the CLR. In this way, when third-party compilers target the .net
framework, as long as they conform to the CLS, the code is guaranteed to work.

You might also notice that VB is now and ―equal‖ or peer of C++, C# and any other language
that is .net compliant. Visual Basic.net shares the same variable types, arrays, user-defined types, classes,
graphical forms, visual controls and interfaces as these other languages.

Web Services
Web Services provide a Web-enabled user interface with tools that include various HTML
controls and Web controls. Forms creating using Web Services are the same as forms created for a
Windows application. The code behind a Web form is the same as the code behind a Windows form.
The markup language that is used by Web forms is still there, but the Web form applications generate it
for you.

User Interface
At the same level as Web Services is the User Interface. The User Interface is where Windows
forms live. It also provides code for drawing to the screen, printing, rendering text and displaying
images.

Data and XML


Both Web Services and the User Interface sit on top of the Data and XML block. As you will
learn later in this paper, XML (or extensible markup language) plays just as important of a role as data.
XML is used to provide a text view of data that can be shared between services on the same PC or passed
through a firewall to a web server across the country using SOAP (more on SOAP a little later).

Base Class Library


The base class library (BCL) is underneath the Data and XML block. This area is the origin for
the base class of all .net programs. Everything in Visual Basic.net is an object, and all objects originate
from a class named System. The BCL also provides collections, localization, text objects, interoperability
with non-.net code and ActiveX controls and a variety of other services.

The Common Language Runtime


At the base of the .net framework is the common language runtime (CLR). Much like the Java
Virtual Machine, the CLR is needed to make .net code run on any machine.
Common Language Runtime

Base class library support

Thread support COM marshaler

Type checker Exception manager

Security engine Debug engine

IL to native Code Garbage


components manager Collector

Class loader

Figure 2 - Common Language Runtime services

The CLR is a set of resources that any .net program can take advantage of, from any .net-
supported language. All languages will be more equal in capability than they ever have before.

The CLR includes support for the BCL, where the architecture for controls and forms actually
live. It is also responsible for managing threads and exceptions (replacing the Err object in VB 6).
Garbage collection is also handled by the CLR.

The CLR takes code generated by VB and converts it to the native language of the current
platform. Through this conversion, the magic of multi platform execution is achieved. Now VB
programmers can write code in VB syntax and the CLR is responsible for converting it to any platform
that can run the CLR. The programmer is removed several layers from the hardware and doesn’t really
need to know what platform his/her code is running on.

One additional service of the CLR is handling bad code. You have probably heard stories of
rogue code that overran buffers and trashed a machine, killing all other programs along with it. By
design, this cannot happen with code written in Visual Basic.net.
System Namespace
The System namespace includes all classes that represent the base data types used by all Visual
Basic.net applications. In .net, all of the base data types are Object, Byte, Char, Array, and so on. Many
of these correspond to the data type in classic VB.

In addition to the base data types, the System namespace contains nearly 100 classes that provide
functionality ranging from handling exceptions and forming delegates to dealing with the core run-time
concepts such as application domains and the automatic memory manager. The System namespace also
contains 25 second-level namespaces, listed in Table 1. Looking at these, you can see how the namespace
convention logically separates functionality.

Table 1 – Secondary namspaces in the System Namespace

Namespaces Description

Contains classes that can be used to represent the elements and


System.CodeDom structure of a source code document.

System.Collections Contains interfaces and classes that define various collections


of objects, such as lists, queues, arrays, hash tables and
dictionaries.

System.ComponentModel Provides classes that are used to implement and license


components.

System.Configuration Provides classes that give system run times, administrative


tools, applications and other consumers of configuration
information access to configuration information.

System.Data Consists mostly of classes that constitute the Microsoft


ADO.net architecture.

System.Diagnostics Provides classes to debug applications and trace the execution


of code.

Ssytem.DirectoryServices Provides access to Active Directory from manage code.

System.Drawing Provides access to the GDI+ basic graphics functionality.

System.EnterpriseServices Provides transaction-processing functionality.

System.Globalization Provides localization information on elements such as the


current culture, formatting, data, and time for specific locales.

System.IO Provides types that allow synchronous and asynchronous


reading from and writing to data streams and files.
Namespaces Description

System.Management Provides classes for manager of system object and events.

System.Messaging Provides classes to connect to message queues on the network,


send messages to queues and receive or ―peek‖ messages from
queues.

System.Net Provides a simple programming interface to many of the


protocols found on the network today.

System.Reflection Contains classes and interfaces that provide a managed view of


types, methods and fields, with the ability to dynamically create
and invoke types.

System.Resources Provides management of resources, such as a resource that


contains culture-specific information.

System.Runtime Provides infrastructure services,

System.Security Provides the underlying structure of the .net framework security


system, including interfaces, attributes, exceptions and base
classes for permissions.

System.ServiceProcess Provides classes to install and run services (non-interface


executables).

System.Text Contains classes representing ASCII, Unicode, UTF-7 and


UTF-8 character encoding; abstract base classes for converting
blocks of characters to and from blocks of bytes; a helper class
that manipulates and formats String objects without creating
intermediate instances of String.

System.Threading Provides class and interfaces that enable multithreaded


programming.

System.Timers Provides two components that raise an event on an interval or


more complex schedule.

System.Web Supplies classes and interfaces that enable browser-server


communication.

System.Windows.Forms Contains classes for creating Windows-based applications and


classes for many controls that can be added to forms.

System.Xml Contains XML classes that provide standards-based support for


processing XML.
The .net IDE

Figure 3 - The .net IDE

One of the biggest improvements with .net, in my opinion, is the new common IDE. As you can
see in Figure 3, the IDE contains a little of all the different classic Visual Studio languages. There is an
output window similar to the one in C++, the properties window similar to the one in VB; but best of all
are the ―slide-in‖ capabilities of the different explorer windows.

There is now a server explorer that slides-in from the left side of the IDE. This explorer allows
the developer to have access to operating services, data connections, and best of all, SQL server. I cannot
tell you how many times I’ve wished that I could change a stored procedure or table design without
having to load SQL Enterprise Manager to do so. With the .net IDE, all of the tools are found right in the
same application. With the use of the ―thumb-tack‖, you can minimize explorers to gain more space for
your code window if needed.
Visual Basic.net
Now it’s time to take a look at Visual Basic.net, the main focus of this paper. I am going to
assume that the reader is already at least familiar with writing applications using VB 6 or earlier. The
intent of this paper is to point out what is new in Visual Basic.net and not how to develop applications
using Visual Basic.net.

Visual Basic.net Data Types


Before we can get into the Visual Basic.net code, we need to start by exploring the changes to
data types. Hopefully, you are not a programmer that insisted on using the Variant data type consistently
in your code…if you did, you will have a more difficult time adjusting to the new data types in Visual
Basic.net. The Variant data type no longer exists in Visual Basic.net. (Another data type that did not
make the transition is the Currency type.)

The primitive data types still exist (Integer, Boolean, Long, etc.), the main difference now is that
these data types are all structure types in the System namespace and are referred to as Value Types.

Value types are always accessed directly. In fact, you can’t create a reference to a value type.
And unlike reference types, setting a value type to Null is not possible. Value types always hold a value,
even if one hasn’t been assigned yet. When a value type variable is dimensioned, it’s initialized to a
value representative of its type. For example, if you dimension a variable to Integer, the Visual Basic.net
compiler automatically initializes the variable to 0.

Consider the following VB 6 variable declaration:

Dim intValue As Integer

This code is still valid in Visual Basic.net, however, you can also do the following in Visual Basic.net:

Dim intValue As Integer = 5


Being able to dimension and set the value of a variable at the same time is a much welcome change.

For you Java users out there, there are also some new features to the value types you are already
familiar with: formatting and conversion. In VB 6, the Format() function and functions like CStr() or
CInt() provided us with the means of converting between data types. Now, each data type has its own
built in methods to handle conversion, equality checks (there’s even a ToString() method in these
structures.)

A final note on data types: Visual Basic.net is a type-safe language (you can only access a
variable through the type associated with that variable). We should be used to using Option Explicit in
VB code to require variable declaration, but Visual Basic.net has a new directive called Option Strict.
This new directive prevents you from trying to overwrite data with a different data type and should
always be included at the top of your class and form code.
The System.Object Class
The System.Object class is much like the Object class in Java. The System.Object class is the super class
of all classes the in .net framework—it’s the only class in .net that does not inherit from any other object
type. All objects must either explicitly or implicitly declare support for exactly one other object type. In
.net it is impossible to use a class that does not inherit from System.Object.

There are six methods inherited by all classes that come from the System.Object class, see Table 3 below.

Table 3 – Inherited Methods from System.Object

Namespaces Access Description

Public Takes another object as a parameter and returns a


Equals Boolean that indicates whether the two objects are equal.

Public Returns an integer hash code that represents the object’s


GetHashCode value. This code is usually used as a key when the object
is added to a collection. Two identical objects should
generate the same code.

Protected The CLR calls an object’s Finalize method to notify the


Finalize object that the object is about to be destroyed. This
method really does nothing and is overridden by the
class.

Protected Creates a shallow copy of the object.


MemberwiseClone

Public Returns an instance of System.Type, which is used to get


GetType information about the object through metadata.

Public Returns a string representation of the object.


ToString

Garbage Collection in Visual Basic.net


In VB 6, when you were finished using an object, you simply set it to nothing and the object
would be released. This is no longer the case with Visual Basic.net. In Visual Basic.net, when a variable
loses scope, the CLR destroys the object and removes it from the stack automatically for you.

Object Oriented Programming in Visual Basic.net


Many people have asked for this for a long time and now Microsoft has delivered. As you may
have guessed by now, the major difference in Visual Basic.net is that it is now truly object-oriented.
Inheritance is one of the fundamental aspects of object-oriented programming. Through inheritance, you
can derive classes from other classes that have already been written. Even a Windows form is now
inherited, just look at the code at that begins each form:

Public Class Form1

Inherits System.Windows.Forms.Form

As you may know, when a class inherits from a base class, it inherits the properties and methods of that
class (or its members). You can then use or add these members in your own class in whatever way you
need. Visual Basic.net couldn’t be truly object-oriented without polymorphism, which it of course has.
Using the Windows.Forms.Form class an example: you create two Windows forms in your application,
they both have a Close() method, but what the code does in each form can be different (an usually is).
The point is that each form inherits from the Windows.Forms.Form class, but each has its own ―form‖ (no
pun intended). After all, the word polymorphism literally means ―many forms‖.

One other change in Visual Basic.net that relates to OOP is method overloading. VB always had
a ―sort of‖ way of overloading functions or methods by using the Optional keyword in the
function/method declaration. In Visual Basic.net (again, much like in Java), when you write a definition
for a method/function, you can overload it with the different parameters as needed.

Visual Basic.net Classes – Checking Account Sample


The following is a short example of a class written in Visual Basic.net. After the code, I will examine the
features of the class.

Code for the Checking class:

Option Strict On

Imports System

Namespace Accounts

Public Class Checking

Private m_strAcctName As String = ""

Private m_strAcctNumber As String = ""

Sub New()

MyBase.New()

End Sub

Sub New(ByVal strAcctName As String, ByVal strAcctNumber As String)

MyBase.New()
m_strAcctName = strAcctName

m_strAcctNumber = strAcctNumber

End Sub

Overridable Function Serialize() As Boolean

If ((m_strAcctName <> "") And (m_strAcctNumber <> "")) _

Then

Return True

Else

Return False

End If

End Function

#Region "Account Properties"

Property AccountName() As String

Get

AccountName = m_strAcctName

End Get

Set(ByVal Value As String)

m_strAcctName = Value

End Set

End Property

Property AccountNumber() As String

Get

AccountNumber = m_strAcctNumber

End Get

Set(ByVal Value As String)

m_strAcctNumber = Value

End Set

End Property
#End Region

End Class

End Namespace

Examining the Checking class and Accounts Namespace:

Option Strict On – To reiterate, this statement checks for possible problems in the code that would try to
overwrite different data types (for example if: intI = strSomething).

Imports System – This imports the classes in the System Namespace.

Namespace Accounts - Namespaces are used to group related types into a hierarchical
categorization. We’ve already explored the System namespace, I’ve chosen to use Accounts for my
namespace. Later, I may want to add a Savings account or a Money Market account class to the
Accounts namespace that would have different properties.

Public Class Checking – Begins the definition of the class.

Next, I declare private memory variables that assist me in data hiding. While these variables will
hold the actual value of the Account Name and Account Number, the consumer of this class can
only access these values by using the public methods.

Sub New()- This is the default constructor for the class. You can see the I have overridden the
New() constructor with one that will also allow the consumer to pass initial values to the class
during construction.

MyBase.New()- This must be the first line of code in the constructor methods. This calls the
base-class constructor that the class is derived from (in this case it is System).

Overridable Function Serialize() – Because Visual Basic.net methods are not overridable by
default you must explicity use the keyword Overridable for methods you want consumers to be
able to override.

Property AccountName()- The traditional Let/Set methods have been replaced in Visual
Basic.net with Get/Set methods instead that are ―wrapped‖ inside of the Property block.

To actually implement this class in your Visual Basic.net code you would assign the class to a variable
using the following code:

Dim clsChecking As New Accounts.Checking()

This calls the default constructor for the class. Then to set the properties of the class, you could do the
following:
With clsChecking

.AccountName = ―AmSouth Checking Account‖

.AccountNumber = ―53-11123221‖ End

With

Visual Basic.net – A High Level Summary


As you can probably tell by now, there are a lot of things that are new with Visual Basic.net, but
there are also some things that haven’t changed. One could easily write a book on this topic, but with this
paper we will keep it on a high level…so let’s review some of the major changes in Visual Basic.net.

The Framework
There are many goals of the .net framework, however, the main goal, and benefit, is that of the
CLR. With the CLR, objects that are written in C++, C# and Visual Basic.net can all be used in any
project that is targeted for the .net framework. If you are familiar with COM, a subject I haven’t touched
on in this paper, it’s time to forget what you know…COM no longer exists in .net (there is backward
compatibility for ActiveX controls and DLLs, however, I would expect this to go away in future releases
of .net).

The Framework is meant to be the ―great equalizer‖. No longer do we, as programmers, have to
worry about the underlying architecture/hardware we’re running on; if the PC meets the minimum
requirements for the .net Framework, then your Visual Basic.net application should run without problem
on that PC.

Syntax
Much of the syntax in Visual Basic.net has remained the same, however, as I’ve already
mentioned, everything in Visual Basic.net is now an object, even the data types. You can still use data
types much the same as before, however, since they are now objects, the programmer has greater control
and flexibility when manipulating them.

Visual Basic.net is type-safe. Since the Variant data type no longer exists, you cannot simply
assign the value of an Integer to a String for example; this will cause a runtime error. Using the Option
Strict statement at the beginning of your code will help eliminate these types of errors because the
compiler will catch them.

Distribution of Applications
This is a major, and very much welcome change, in Visual Basic.net. Today, when you create a
VB 6 application that uses COM components, you have to remember to always package the COM
components with your application. Furthermore, you’d better make sure you are packaging the right
version of the components or you will get trapped in DLL Hell!
With Visual Basic.net, your target audience for the application must first install the .net Framework on
their PC(s). Next, you simply create a folder and copy your application and any supporting files (help
files, etc.) to that folder and you’re finished. It really is that simple! When the user wants to uninstall
your application, they simply delete the folder containing the application. There is no risk or worry of un-
registering components or removing shared components that cause other applications to no longer
function.

Data Access and XML


I will talk more about ADO.net in one of the following sections, but I did want to mention here
that data access with Visual Basic.net and ADO.net has changed immensely. The RecordSet object no
longer exists in ADO, instead we now use a DataSet object.

The main idea behind the DataSet object is this: after you have defined all you need about the
data source, you use a DataSetCommand object to connect to the data source and retrieve the data you
want then disconnect from the data source. This frees up server resources because the server does not
have to maintain as many concurrent connections. (This principle is much the same as using a
disconnected recordset, but as you’ll see later, there are also other features in the DataSet object that
disconnected recordsets cannot handle.)

At the root of all data in .net is XML. I will explain later why XML is used and you will
hopefully see the beauty of it. If you have ever developed distributed applications, or wanted to, .net
gives you the tools to do this much easier than before. If you refer back to the table containing the
System Namespace, you’ll see System.Xml at the end of the list…i.e., one could also say that at the root of
ALL things in .net is XML.

Accessing Data with ADO.net


Data access with Visual Basic has come a long way in a relatively short period of time. After all,
Microsoft released three versions of Visual Basic before database access was ever included. In VB 3,
Microsoft introduced DAO (Data Access Objects), which used the Microsoft Jet Engine to connect to
local databases. You could use DAO to connect to databases on a server, but the performance was poor
because DAO was optimized for local access.

Following DAO came RDO (Remote Data Objects) and then finally ADO (ActiveX Data
Objects). These access technologies were designed with client/server in mind, but with the move away
from a client/server to an n-tier approach to system design, something new was needed; enter ADO.net.

As mentioned earlier, the Recordset object no longer exists in ADO.net. The successor, the
DataSet object now gives us a look at all of the data. It can model data logically or abstractly, because
unlike the RecordSet, the DataSet is not a container that can hold only rows of data. The DataSet can
actually hold multiple tables and the relationships between them.
Let’s say for example you wanted to query data from two tables in a database that are joined
together. In traditional ADO, you would execute a SQL query that placed the results in the RecordSet
object. In ADO.net, using the DataSet object, the two tables themselves are placed in the data set and you
then perform the needed query afterwards. The advantage of this method is not obvious, but what if there
was some bit of detail in one of the tables your query left out? You would then, possibly, have to create
another RecordSet to query the additional information you needed.

Previous releases of ADO had support for XML, but it was crude at best. If you don’t know what
XML is by now, I suggest you start surfing or buy a good book on XML: it’s here to stay.

For several years now, many businesses have been using XML to exchange data. The problem
has been that both entities had to agree in advance on the format of the XML document, because there
were not any languages that would give you an easy way to access XML data. Microsoft introduced the
use of XML in ADO in version 2.1. The programmer could either save a recordset to XML and vice-
versa; the trouble was that Microsoft defined the format of the XML and no other platforms had native
support for it. Thanks to W3C, there is now a standard XML schema for recordsets and Microsoft uses
this standard in ADO.net. I am not sure if other companies have yet adopted the standard, but you can be
assured they will soon if they haven’t already.

Figure 4 depicts data flow from a data source to a data consumer using ADO.net. First we
connect to and retrieve tables from a relational database. The tables are each placed in an in-memory
DataSet object using DataSetCommand objects. These DataSetCommand objects specify the tables (or a
subset thereof) that we are interested in. After the DataSet is filled, the connection to the database is
immediately closed. We can then build the relationship between the individual tables within the DataSet
itself and send the data, via XML, to any client application.
Figure 4 - ADO.net data flow

Table 4 below lists some of the differences between ADO and ADO.net.
Table 4 – A Comparison of ADO and ADO.net Features

Feature ADO ADO.net

Use the Recordset object, which Uses the DataSet object, which can
Memory-resident looks like a single table. contain one or more tables
data represented by DataTable objects.

Requires the JOIN query to Supports the DataRelation object to


Relationships assemble data from multiple associate row in one DataTable
between multiple database tables in a single result object to rows in another DataTable
table. object.
tables

Scans Recordset rows Permits non-sequential access to


Accessing data sequentially. rows in a table. Follows
relationships to navigate from rows
in one table to corresponding rows in
another table.

Provided by the Recordset Communicates to a database with


Disconnected access object, but generally supports standardized calls to a
connected access represented DataSetCommand object.
by the Connection object.
Communicates with a database
with call to an OLE DB
provider.

Uses the connection object to Uses the strictly typed programming


Programmability transit commands. characteristic of XML. Data is self-
describing. Underlying data
constructs such as tables and rows do
not appear in the XML, making code
easier to read and to write.

Uses COM marshaling to Transmits a DataSet with an XML


Sharing transmit a disconnected file. The XML format places no
disconnected data recordset. Supports only those restrictions on data types and
data types defined by the COM requires no type conversion.
between tiers or
standard.
components

Problematic because firewalls No problem because the ADO.net


Transmitting data are typically configured to DataSet object uses text-based XML,
through firewalls prevent system-level requests which can pass through firewalls.
such as COM marshaling of
Feature ADO ADO.net

binary objects.

Database locks and active Disconnected access to database data


Scalability database connections for long limits contention for limited database
durations contend for limited resources.
resources.

RDBMS
MS ACCESS
This is one of the most popular Microsoft products. Microsoft Access is entry-level
database management software. MS Access database is not only an inexpensive but also powerful
database for small-scale projects.

MS Access uses the Jet database engine which utilizes a specific SQL language dialect
(sometimes referred to as Jet SQL).

MS Access comes with the professional edition of MS Office package. MS Access has
easy to use intuitive graphical interface.

Features

 Users can create tables, queries, forms and reports, and connect them together with
macros.
 The import and export of data to many formats including Excel, Outlook, ASCII, dBase,
Paradox, FoxPro, SQL Server, Oracle, ODBC, etc.
 There is also the Jet Database format (MDB or ACCDB in Access 2007) which can
contain the application and data in one file. This makes it very convenient to distribute
the entire application to another user, who can run it in disconnected environments.
 Microsoft Access offers parameterized queries. These queries and Access tables can be
referenced from other programs like VB6 and .NET through DAO or ADO.
 The desktop editions of Microsoft SQL Server can be used with Access as an alternative
to the Jet Database Engine.
 Microsoft Access is a file server-based database. Unlike client-server relational database
management systems (RDBMS), Microsoft Access does not implement database triggers,
stored procedures, or transaction logging.
Access versus Excel
You may be wondering what the benefits of using Access are compared with using an Excel
spreadsheet. Well, it really depends on what you want to do with the data that you're storing and
how much data you intend to store.

Excel may be fine if you've only got a small amount of data, and if you don't have many attributes
against each piece of data. It may be fine if you don't have much in the way of relational data across
multiple worksheets. Once you start storing many attributes against each piece of data, and perhaps
you find yourself repeating information across multiple worksheets, then it's time to start using
Access (or another database system if you prefer).

Another important reason for using Access over Excel is, if you need to generate a lot of queries
and reports. Access is much better suited for doing this compared to Excel.

Microsoft Access Database File Extension


When you create (and save) a database in Microsoft Access, the database is saved with a .mdb
extension. This is the file extension you will use the most, when developing Access databases.
Once you've established your database, you also have the option of saving it as an MDE file, which
gives you some benefits over the MDB file. An MDE file uses a .mde extension.

Access Versions
As with most software products, new versions of Microsoft Access are occasionally released. If
the screenshots in the tutorial don't look exactly like the screens on your computer, don't worry too
much. Most of the basic functions remain consistent between versions of Access. Having said that,
I will Endeavour to review this tutorial from time to time to ensure I cater for later versions of
Access.

Import or Link sources


Microsoft Access can also import or link directly to data stored in other applications and databases.
Microsoft Office Access 2007 and newer can import from or link to:

 Microsoft Access
 Excel
 SharePoint lists
 text
 XML
 Outlook
 HTML
 dBase
 Paradox (with Access 2007; dropped in Access 2010)
 Lotus1-2-3
 ODBC-compliant data containers, including:
o Microsoft Sql Server
o Oracle
o Mysql
o Postgre Sql

Development
Access stores all database tables, queries, forms, reports, macros, and modules in the Access Jet
database as a single file.

For query development, Access offers a "Query Designer", a graphical user interface that allows
users to build queries without knowledge of structured query language. In the Query Designer,
users can "show" the data sources of the query (which can be tables or queries) and select the fields
they want returned by clicking and dragging them into the grid. One can set up joins by clicking
and dragging fields in tables to fields in other tables. Access allows users to view and manipulate
the SQL code if desired. Any Access table, including linked tables from different data sources, can
be used in a query.

Access also supports the creation of "pass-through queries". These snippets of SQL code can
address external data sources through the use of ODBC connections on the local machine. This
enables users to interact with data stored outside the Access program without using linked tables
or Jet. Users construct the pass-through queries using the SQL syntax supported by the external
data source.

The programming language available in Access is, as in other products of the Microsoft Office
suite, Microsoft Visual Basic applications, which is nearly identical to Visual Basic 6.0 (VB6).
VBA code can be stored in modules and code behind forms and reports. Modules can also be
classes.
SYSTEM DESIGN
DATA FLOW DIAGRAM

DFD Level0-Admin Module


DFD Level1-Student master
DFD Level 2-Subject master
DFD Level 3-Resource master
DFD Level 4-Report module
SYSTEM TESTING AND MAINATANCE

Testing is the one step in the Software Engineering process that could be viewed as destructive
rather than constructive. Software testing is a critical element of software quality assurance and
represents the ultimate reviews of specification, design and coding. Testing represent an interesting
anomaly for the software.

Testing is vital to the success of the system. Errors can be injected at any stage during
development. System testing makes a logical assumption that if all the parts of the system are
correct, the goal will be successfully achieved. During testing, the program to be tested is executed
with set of data and the output of program for the test data is evaluated to determine if the program
are performing as expected. Testing cannot show the absence of defects, it can only show that
software defects are present.

The objectives of testing are

 Testing is a process of executing a program with the intent of finding an error.

 A good test care is one that has a high probability of finding an as yet undiscovered error.

 A successful test is one that uncovers and as yet undiscovered error. The software
developed has been tested successfully using the following strategies and any errors that
are encountered are corrected and again the part of the program or the procedure or function
is put to testing until all the errors are removed.

The testing steps are:

 Unit Testing

 Module Testing

 Integration Testing
UNIT TESTING:

Unit testing focuses verification effort on the smallest unit of the software design. This
project compromises the set performed by an individual programmer prior to the integration of the
unit into a larger system. This testing is carried out during the coding itself.

In this testing step each module such as registration, login, etc going to be working
satisfactorily as the expected output from the module.

MODULE TESTING:

Since it is a real time project the modules in this project may collects inputs from another
module or any sub modules. Likewise they can forward their output as inputs to some modules or
sub modules. So a module testing is one of the important testing in system development cycle.
This testing is used in login module. The output form registration is used as input for login module.

INTEGRATION TESTING:

In this project the data can be lost across an interface; one module can have adverse effort
on another, sub function when combined may not produced the desired function. Integration testing
is a systematic technique for constructing the program while at the same time conducting test to
uncover errors associated within the interface.

The objective is to take unit-tested module and built the program structure that has been
dictated by design. All modules are combined in this testing. The entire program is tested a whole.
Correction is difficult at this stage because the isolation of module. At the integration testing,
software is completely assembled as a package. Interfacing errors have been uncovered and
corrected and a final series of software test validation testing begins.

Validation testing can be defined in many ways, but a simple definition is that validation
succeeds when the software functions in manner that is reasonably expected by the customer.
Software validation is achieved through a series of black box tests that demonstrate conformity
with requirement. After validation test has been conducted, one of the two conditions exists. he
function or performance characteristics confirm to specification and are accepted.
A validation from specification is uncovered and a deficiency created. Deviation of errors
discovered at this step in this project is corrected prior to the completion of the project with the
help of the user by negotiating to establish a method for resolving deficiencies. Thus the proposed
system under consideration has been tested by using validation testing and found to be working
satisfactorily.

Advantage of Testing:

 More effective on larger units of code than glass box testing.


 Tester needs no knowledge of implementation, including specific programming
language.
 Tester and programmer are independent of each other
 Tests are done from a user’s of view.
 Black Box Test will help to expose any ambiguities or inconsistencies in the
specification.

Disadvantages of Testing:

 Only a small number of possible inputs can actually be tested.


 To test every possible input stream would take nearly forever without clear and
concise specifications.
 Test cases are hard to design.
There may be unnecessary repetition of test inputs, if the tester is not informed of test cases the
programmer has already tried may leave many program paths untested cannot be directed toward
specific segment of code which may be very complex most testing related research has been
directed toward glass box testing.
IMPLEMENTATION

PROJECT MODULES DESCRIPTION

 ADMIN MODULE
 STUDENT MASTER
 SUBJECT MASTER
 RESOURCE MASTER
MODULE DESCRIPTION

ADMIN MASTER

Top level user is available for controlling all level usage of this application; he can do
operation like Add or edit, remove any profile from the list and control the all data resources
from the list.

STUDENT MASTER

Module has the master entry form data receive the staff resource in the network or
individual environment. Student profile details like Reg no ,name subject and date of exams will
be collected for master data.

SUBJECT MASTER

All available subject information and code of subject will be added in the database.

Every data of subject will be reused in operation on other module as master data.

RESOURCE MASTER

Resource like staff and Hall with no of possible seats will be entered for Hall allocation
with in charge staff is gathered in admin module from the source of data

REPORT MODULE

The final schedule for exam with all student – seating arrangement will be exported into
excel or pdf file format for announce in notice board.

This module will be available for admin support to get hard copy of the seating process.
APPENDIX

SCREEN SHOT

Login

Hall-List

Hall-Add
Department-list

Department-add

Course-list
Course-add

Exam-list

Exam-add

Scheme-list

Staff-add
Staff-list

Student-add

Student-list

Subject-list

Subject-add
Seating check

Seating arranger
CODINGS
Login.vb

Imports System.Windows.Forms
Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration
Imports Student.MainModule

Public Class LoginDialog

Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs)
Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.Close()
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button3.Click
Using dbConnection = New SqlConnection(GetConnectionString())

Dim selectStatement = "select * from useraccount where


username='" & TextBox1.Text.Trim() & "' and password='" &
TextBox2.Text.Trim() & "'"

Using cmd As New SqlCommand(selectStatement, dbConnection)


dbConnection.Open()
Dim dr As SqlDataReader = cmd.ExecuteReader()

If dr.HasRows Then
dr.Read()
Dim uname As String = dr.GetString(0)
Dim pwd As String = dr.GetString(1)
Dim rolename As String = dr.GetString(2)

If rolename = "Admin" Then


Me.Hide()
Admin.Show()
ElseIf rolename = "Staff" Then
Me.Hide()
StaffPanel.Show()
Else

MsgBox("Invalid username or Password !",


MsgBoxStyle.OkOnly, "User Login Error")
Me.Close()
End If
Else
MsgBox("Login Failure !", MsgBoxStyle.OkOnly, "User Login
Error")
Me.Close()

End If

End Using
End Using

End Sub
End Class

Main Module.vb

Module MainModule
Public Function GetConnectionString() As String

Dim constr As String

constr = "Data Source=NIIT5;Initial Catalog=gsm_student;User


ID=sa;Password=sa"

Return constr

End Function

End Module

NewCourse.vb

Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration
Imports Student.MainModule

Public Class NewCourse

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the
'Gsm_CourseDataSet.Course' table. You can move, or remove it, as needed.
Me.CourseTableAdapter.Fill(Me.Gsm_CourseDataSet.Course)
'TODO: This line of code loads data into the
'Gsm_CourseDataSet.Course' table. You can move, or remove it, as needed.

End Sub

Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Label3.Click

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click

Using dbConnection = New SqlConnection(GetConnectionString())


Dim insertStatement = "INSERT INTO
Course([courseid],[course],[branch],[year],[semester]) VALUES " & _
"(@courseid, @coursename, @branch,@year,
@semester)"
Using cmd As New SqlCommand(insertStatement, dbConnection)
dbConnection.Open()
cmd.Parameters.AddWithValue("@courseid", TextBox1.Text)
cmd.Parameters.AddWithValue("@coursename", TextBox2.Text)
cmd.Parameters.AddWithValue("@branch", TextBox3.Text)
cmd.Parameters.AddWithValue("@year", TextBox4.Text)
cmd.Parameters.AddWithValue("@semester",
Convert.ToInt32(TextBox5.Text))
cmd.ExecuteNonQuery()
MsgBox("Data Inserted Succeddfully !")

End Using
End Using
Me.CourseTableAdapter.ClearBeforeFill = True

Me.CourseTableAdapter.Fill(Me.Gsm_CourseDataSet.Course)
Call ClearAll()
End Sub

Private Sub CourseBindingSource_CurrentChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs)

End Sub

Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object,


ByVal e As System.Windows.Forms.DataGridViewCellEventArgs)

End Sub

Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles TextBox2.TextChanged

End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button4.Click

End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button5.Click

Call ClearAll()

End Sub

Private Sub TextBox1_LostFocus(ByVal sender As Object, ByVal e As


System.EventArgs) Handles TextBox1.LostFocus
Using con = New SqlConnection(GetConnectionString())
Dim cmd As New SqlCommand("select * from course where courseid='"
& TextBox1.Text.Trim() & "'", con)
con.Open()
Dim dr As SqlDataReader = cmd.ExecuteReader()
If dr.HasRows = True Then
MsgBox("Sorry This Course id already Givrn ! Choose another
")
TextBox1.Text = ""
TextBox1.Focus()
End If
End Using
End Sub
Public Sub ClearAll()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button3.Click

End Sub
End Class

NewStaff.vb

Imports System.Data
Imports System.Data.SqlClient
Public Class NewStaff

Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles GroupBox1.Enter

End Sub
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object,
ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles
DataGridView1.CellContentClick

End Sub

Private Sub NewStaff_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Gsm_staffDataSet.Staff'
table. You can move, or remove it, as needed.
Me.StaffTableAdapter.Fill(Me.Gsm_staffDataSet.Staff)
'TODO: This line of code loads data into the
'Vdp_studentDataSet1.Staff' table. You can move, or remove it, as needed.
'Me.MdiParent = AdminPanel
'Me.StaffTableAdapter.Fill(Me.Vdp_staffDataSet1.Staff)

End Sub
Public Function EmptyTest() As String
Dim status As String = "NotEmpty"

'MsgBox("hi")
'MsgBox(GroupBox1.Controls.OfType(Of TextBox)().Count)

For Each cntrl As Control In GroupBox1.Controls.OfType(Of TextBox)()


If cntrl.Text = "" Then
status = "Empty"
MsgBox("TextBox Cannot Be Empty !")
cntrl.Focus()

Exit For
End If

Next
Return status
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Dim s As String
s = EmptyTest()
If s = "Empty" Then

Else

Using dbConnection = New SqlConnection(GetConnectionString())

DateTimePicker1.Format = DateTimePickerFormat.Custom
DateTimePicker1.CustomFormat = "MM-dd-yyyy"

Dim insertStatement = "INSERT INTO


staff(staffid,staffname,qualification,experience,dateofjoined,role) VALUES "
& _

"(@staffid,@staffname,@qualification,@experience,@dateofjoined,@role)"
Using cmd As New SqlCommand(insertStatement, dbConnection)
dbConnection.Open()
cmd.Parameters.AddWithValue("@staffid", TextBox1.Text)
cmd.Parameters.AddWithValue("@staffname", TextBox2.Text)
cmd.Parameters.AddWithValue("@qualification",
TextBox3.Text)
cmd.Parameters.AddWithValue("@experience", TextBox4.Text)
cmd.Parameters.AddWithValue("@dateofjoined",
DateTimePicker1.Value.ToString("MM-dd-yyyy")
)
cmd.Parameters.AddWithValue("@role", TextBox5.Text)

cmd.ExecuteNonQuery()
MsgBox("Data Inserted Succeddfully !")
Me.StaffTableAdapter.ClearBeforeFill = True
Me.StaffTableAdapter.Fill(Me.Gsm_staffDataSet.Staff)

End Using
End Using
ClearAll()
End If
End Sub
Public Sub ClearAll()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
End Sub

Private Sub TextBox4_LostFocus(ByVal sender As Object, ByVal e As


System.EventArgs) Handles TextBox4.LostFocus
If IsNumeric(TextBox4.Text) = False Then
MsgBox("Enter numbers only !")
TextBox4.Text = ""
TextBox4.Focus()
End If
End Sub
End Class

NewStudent.vb

Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
Public Class NewStudent
Public Sub ClearAll()
txtaddress.Text = ""
txtbgroup.Text = ""
txtcity.Text = ""
txtcommunity.Text = ""
txtcourse.Text = ""
txtdob.Text = ""
txtfname.Text = ""
txtfoccu.Text = ""
txtlaststudied.Text = ""
txtmailid.Text = ""
txtmname.Text = ""
txtmocc.Text = ""
txtpincode.Text = ""
txtpmobileno.Text = ""
txtreligion.Text = ""
txtsex.Text = ""
txtstdid.Text = ""
txtstdmobileno.Text = ""
txtstdname.Text = ""
txtyear.Text = ""
txtbusstation.Text = ""
PictureBox1.ImageLocation = ""
Button1.Enabled = True

End Sub
Public Function EmptyTest() As String
Dim status As String = "NotEmpty"

'MsgBox("hi")
'MsgBox(GroupBox1.Controls.OfType(Of TextBox)().Count)

For Each cntrl As Control In GroupBox1.Controls.OfType(Of TextBox)()


If cntrl.Text = "" Then
status = "Empty"
MsgBox("TextBox Cannot Be Empty !")
cntrl.Focus()

Exit For
End If

Next
Return status
End Function

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
Dim s As String
s = EmptyTest()
If s = "Empty" Then

Else

Using dbConnection = New SqlConnection(GetConnectionString())

DateTimePicker1.Format = DateTimePickerFormat.Custom
DateTimePicker1.CustomFormat = "MM-dd-yyyy"

Dim insertStatement = "INSERT INTO student


(stdno,stdname,course,year,fname,mname,dob,sex,religion,bgroup,community,focc
upation,moccupation,laststudied,address,city,pincode,mailid,mobileno,pmobilen
o,busstation,stdpicture)" +

"VALUES(@stdno,@stdname,@course,@year,@fname,@mname,@dob,@sex,@religion,@bgro
up,@community,@foccupation,@moccupation,@laststudied,@address,@city,@pincode,
@mailid,@mobileno,@pmobileno,@busstation,@stdpicture)"
Using cmd As New SqlCommand(insertStatement, dbConnection)
dbConnection.Open()
cmd.Parameters.AddWithValue("@stdno", txtstdid.Text)
cmd.Parameters.AddWithValue("@stdname", txtstdname.Text)
cmd.Parameters.AddWithValue("@course", txtcourse.Text)
cmd.Parameters.AddWithValue("@year",
Convert.ToInt32(txtyear.Text))
cmd.Parameters.AddWithValue("@fname", txtfname.Text)
cmd.Parameters.AddWithValue("@mname", txtmname.Text)
cmd.Parameters.AddWithValue("@dob", txtdob.Text)
cmd.Parameters.AddWithValue("@sex", txtsex.Text)
cmd.Parameters.AddWithValue("@religion",
txtreligion.Text)
cmd.Parameters.AddWithValue("@bgroup", txtbgroup.Text)
cmd.Parameters.AddWithValue("@community",
txtcommunity.Text)
cmd.Parameters.AddWithValue("@foccupation",
txtfoccu.Text)
cmd.Parameters.AddWithValue("@moccupation", txtmocc.Text)
cmd.Parameters.AddWithValue("@laststudied",
txtlaststudied.Text)
cmd.Parameters.AddWithValue("@address", txtaddress.Text)
cmd.Parameters.AddWithValue("@city", txtcity.Text)
cmd.Parameters.AddWithValue("@pincode",
Convert.ToInt64(txtpincode.Text))
cmd.Parameters.AddWithValue("@mailid", txtmailid.Text)
cmd.Parameters.AddWithValue("@mobileno",
Convert.ToInt64(txtstdmobileno.Text))
cmd.Parameters.AddWithValue("@pmobileno",
Convert.ToInt64(txtpmobileno.Text))
cmd.Parameters.AddWithValue("@busstation",
txtbusstation.Text)

If PictureBox1.ImageLocation <> "" Then


MsgBox("h")
End If
Dim ms As New MemoryStream()
PictureBox1.Image.Save(ms, PictureBox1.Image.RawFormat)
Dim data As Byte() = ms.GetBuffer()
Dim p As New SqlParameter("@stdpicture", SqlDbType.Image)
p.Value = data
cmd.Parameters.Add(p)

cmd.ExecuteNonQuery()
MsgBox("Student Data Inserted Succeddfully !")
Me.StudentTableAdapter.ClearBeforeFill = True

Me.StudentTableAdapter.Fill(Me.Gsm_studentDataSet.student)

End Using
End Using

ClearAll()
End If
End Sub
Private Sub NewStudent_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the
'Gsm_studentDataSet.student' table. You can move, or remove it, as needed.

' Me.MdiParent = AdminPanel


Me.StudentTableAdapter.Fill(Me.Gsm_studentDataSet.student)
Button5.Enabled = False

End Sub

Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles DateTimePicker1.ValueChanged
txtdob.Text = DateTimePicker1.Value.ToString("MM-dd-yyyy")

End Sub

Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles GroupBox1.Enter

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
Dim fdlg As OpenFileDialog = New OpenFileDialog()
fdlg.Title = "Choose a Profile Photo"
fdlg.InitialDirectory = "c:\"
fdlg.Filter = "Picture
Files(*.jpg;*.jpeg;*.png;*.bmp;*.gif)|*.jpg;*.jpeg;*.png;*.bmp;*.gif"
fdlg.FilterIndex = 2
fdlg.RestoreDirectory = True
If fdlg.ShowDialog() = DialogResult.OK Then
If File.Exists(fdlg.FileName) = False Then
MessageBox.Show("Sorry, The File You Specified Does Not
Exist.")
Else
PictureBox1.ImageLocation = fdlg.FileName
Label10.Text = fdlg.FileName
End If

End If
End Sub

Private Sub txtpmobileno_LostFocus(ByVal sender As Object, ByVal e As


System.EventArgs) Handles txtpmobileno.LostFocus
If txtpmobileno.TextLength < 10 Or txtpmobileno.TextLength > 10 Then
MsgBox("Mobile Number should 10 digits !",
MsgBoxStyle.Exclamation)

End If
End Sub

Private Sub txtstdmobileno_LostFocus(ByVal sender As Object, ByVal e As


System.EventArgs) Handles txtstdmobileno.LostFocus
If txtstdmobileno.TextLength < 10 Or txtstdmobileno.TextLength > 10
Then
MsgBox("Mobile Number should 10 digits !",
MsgBoxStyle.Exclamation)

End If
End Sub

Private Sub txtstdid_LostFocus(ByVal sender As Object, ByVal e As


System.EventArgs) Handles txtstdid.LostFocus
Using con = New SqlConnection(GetConnectionString())
Dim cmd As New SqlCommand("select stdno from student where
stdno='" & txtstdid.Text.Trim() & "'", con)
con.Open()
Dim dr As SqlDataReader = cmd.ExecuteReader()
If dr.HasRows = True Then
MsgBox("Sorry This Student id already Givrn ! Choose another
")
txtstdid.Text = ""
txtstdid.Focus()
End If
End Using
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button3.Click
Call ClearAll()

End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button4.Click
SearchStudent.Show()
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button5.Click
Using dbConnection = New SqlConnection(GetConnectionString())

DateTimePicker1.Format = DateTimePickerFormat.Custom
DateTimePicker1.CustomFormat = "MM-dd-yyyy"

Dim updatestatement = "update student set stdname=@stdname,


course=@course, year=@year, fname=@fname, mname=@mname, dob=@dob,
sex=@sex, religion=@religion, bgroup=@bgroup, community=@community,
foccupation=@foccupation, moccupation=@moccupation,
laststudied=@laststudied, address=@address, city=@city, pincode=@pincode,
mailid=@mailid, mobileno=@mobileno, pmobileno=@pmobileno,
busstation=@busstation where stdno=@stdno"
Using cmd As New SqlCommand(updatestatement, dbConnection)
dbConnection.Open()

cmd.Parameters.AddWithValue("@stdname", txtstdname.Text)
cmd.Parameters.AddWithValue("@course", txtcourse.Text)
cmd.Parameters.AddWithValue("@year",
Convert.ToInt32(txtyear.Text))
cmd.Parameters.AddWithValue("@fname", txtfname.Text)
cmd.Parameters.AddWithValue("@mname", txtmname.Text)
cmd.Parameters.AddWithValue("@dob", txtdob.Text)
cmd.Parameters.AddWithValue("@sex", txtsex.Text)
cmd.Parameters.AddWithValue("@religion", txtreligion.Text)
cmd.Parameters.AddWithValue("@bgroup", txtbgroup.Text)
cmd.Parameters.AddWithValue("@community", txtcommunity.Text)
cmd.Parameters.AddWithValue("@foccupation", txtfoccu.Text)
cmd.Parameters.AddWithValue("@moccupation", txtmocc.Text)
cmd.Parameters.AddWithValue("@laststudied",
txtlaststudied.Text)
cmd.Parameters.AddWithValue("@address", txtaddress.Text)
cmd.Parameters.AddWithValue("@city", txtcity.Text)
cmd.Parameters.AddWithValue("@pincode",
Convert.ToInt64(txtpincode.Text))
cmd.Parameters.AddWithValue("@mailid", txtmailid.Text)
cmd.Parameters.AddWithValue("@mobileno",
Convert.ToInt64(txtstdmobileno.Text))
cmd.Parameters.AddWithValue("@pmobileno",
Convert.ToInt64(txtpmobileno.Text))
cmd.Parameters.AddWithValue("@busstation",
txtbusstation.Text)

cmd.Parameters.AddWithValue("@stdno", txtstdid.Text)

Dim i As Integer = cmd.ExecuteNonQuery()


MsgBox("Student Data Inserted Succeddfully ! " & i)
Me.StudentTableAdapter.ClearBeforeFill = True
Me.StudentTableAdapter.Fill(Me.Gsm_studentDataSet.student)

End Using
End Using
ClearAll()
End Sub

Private Sub DataGridView1_CellDoubleClick(ByVal sender As System.Object,


ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles
DataGridView1.CellDoubleClick
Dim stdno As String
If DataGridView1.SelectedRows.Count <> 0 Then
Dim row As DataGridViewRow = DataGridView1.SelectedRows(0)
stdno = row.Cells("StdnoDataGridViewTextBoxColumn1").Value
MsgBox(stdno)

txtaddress.Text =
row.Cells("addressDataGridViewTextBoxColumn1").Value
txtbgroup.Text =
row.Cells("bgroupDataGridViewTextBoxColumn1").Value
txtcity.Text = row.Cells("cityDataGridViewTextBoxColumn1").Value
txtcommunity.Text =
row.Cells("communityDataGridViewTextBoxColumn1").Value
txtcourse.Text =
row.Cells("courseDataGridViewTextBoxColumn1").Value
txtdob.Text = row.Cells("dobDataGridViewTextBoxColumn1").Value
txtfname.Text =
row.Cells("fnameDataGridViewTextBoxColumn1").Value
txtfoccu.Text =
row.Cells("foccupationDataGridViewTextBoxColumn1").Value
txtlaststudied.Text =
row.Cells("laststudiedDataGridViewTextBoxColumn1").Value
txtmailid.Text =
row.Cells("mailidDataGridViewTextBoxColumn1").Value
txtmname.Text =
row.Cells("mnameDataGridViewTextBoxColumn1").Value
txtmocc.Text =
row.Cells("moccupationDataGridViewTextBoxColumn1").Value
txtpincode.Text =
row.Cells("pincodeDataGridViewTextBoxColumn1").Value
txtpmobileno.Text =
row.Cells("pmobilenoDataGridViewTextBoxColumn1").Value
txtreligion.Text =
row.Cells("religionDataGridViewTextBoxColumn1").Value
txtsex.Text = row.Cells("sexDataGridViewTextBoxColumn1").Value
txtstdid.Text =
row.Cells("StdnoDataGridViewTextBoxColumn1").Value
txtstdmobileno.Text =
row.Cells("mobilenoDataGridViewTextBoxColumn1").Value
txtstdname.Text =
row.Cells("stdnameDataGridViewTextBoxColumn1").Value
txtyear.Text = row.Cells("YearDataGridViewTextBoxColumn1").Value
txtbusstation.Text =
row.Cells("busstationDataGridViewTextBoxColumn1").Value
'PictureBox1.ImageLocation =
row.Cells("StdpictureDataGridViewImageColumn").Value
Button1.Enabled = False
Button5.Enabled = True

End If

End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button6.Click
Using dbConnection = New SqlConnection(GetConnectionString())

DateTimePicker1.Format = DateTimePickerFormat.Custom
DateTimePicker1.CustomFormat = "MM-dd-yyyy"

Dim delStatement = "delete from student where stdno=@stdno"


Using cmd As New SqlCommand(delStatement, dbConnection)
dbConnection.Open()
cmd.Parameters.AddWithValue("@stdno", txtstdid.Text)

Dim i As Integer = cmd.ExecuteNonQuery()


MsgBox("Student Data Removed Succeddfully ! " & i)

Me.StudentTableAdapter.ClearBeforeFill = True
Me.StudentTableAdapter.Fill(Me.Gsm_studentDataSet.student)

End Using
End Using
ClearAll()

End Sub
End Class
CONCLUSION

Seating Arrangement System provides a lot of facility to their user. The objective and scope
of my Project Seating Arrangement System is to record the details various activities of user. It will
simplify the task and reduce the paper work. Here with, the complete system is prepared in object
oriented programming for multi platform purpose. The system is checked and validated for
customer requirement.
BIBLIOGRAPHY
The Black Book – Visual Basic 2010

The complete Guide- Visual Studio 2010

The Black books Ms-SQL server 2005

Potrebbero piacerti anche