Sei sulla pagina 1di 102

COLLEGE MANAGEMENT

SYSTEM
A Minor Project Report
Submitted in fulfillment of the requiremsent for the award of the degree
of
Bachelor of Technology

In
Computer Science &Engineering
by
DINESH KUMAR 1408052(A3)
VIRENDER SINGH 1408043(A3)

Under the Supervision


of
Er. ANU
Department of Computer Engineering
Shri Krishan Polytechnic,
Kurukshetra 136118
State Board Of Technical Education, Panchkula, Haryana, India May-2015

List of Certificate

ShriKrishan Institute of Engineering & Technology


Kurukshetra 136118
(Affiliated to KurukshetraUniversity, Kurukshetra)

CERTIFICATE
This
is
to
certify
that
DEEPAK
SHARMA(1408104,A3),GANESH
SHARMA(1409179,A3),
DINESH
KUMAR(1408052,A3),VIRENDER
SINGH(1408043) bonafide students of Bachelor of Technology in Computer Science
&Engineering being run by Shri Krishan Institute of Engineering & Technology,
Kurukshetra of batch 2008 2012 have completed their Minor Project entitled
COLLEGE MANAGEMENT SYSTEMat SKIET, Kurukshetra
under the
supervision of Er. Anu

Date ..

Er. Anu
Department of Computer Engineering
SKIET

CERTIFICATE
I herby certify that DEEPAK SHARMA (1408104,A3), GANESH SHARMA
(1409179,A3), VIRENDER SINGH(1408043,A3), DINESH KUMAR (1408052)
bonafide students of Bachelor of Technology in Computer Science & Engineering being
run by Shri Krishan Institute of Engineering & Technology, Kurukshetra of batch 2008
2012 have completed their Minor Project entitled COLLEGE MANAGEMENT
SYSTEM at SKIET, Kurukshetra under my supervision & guidance.
It is further certified that the work done in this Project is a result of candidates
own efforts
Date

Er. ANU
Department of Computer Engineering
SKIET

ACKNOWLEDGEMENT
The satisfaction accompanies the successful completion of any task would be incomplete
Without mentioning the people who made it possible and whose constant guidance and
encouragement crown all efforts with success.
First

and

formost,we

DEEPAK

SHARMA,GANESH

SHARMA,DINESH

KUMAR,VIRENDER SINGH deem it our foremost duty to express our sincerest


gratitude to our supervisor Er. ANU we are thankful to her for providing the right
direction for the conduct of the dissertation and also for his keen interest,methodological
approach ,and timely suggestion and faith in us.We feel privileged to have carried out this
report under her able guidance.
We also thankful to Dr. P.C Chaturvedi the Principal of Shrikrishan institution of
engineering & technology, Kurukshetra . We are glad to Mr. ParveenSharma,Head CSE
for proper guidance regarding training. We acknowledge continuous guidance and
incessant support rendered by Er. Anu. not only for this project but also for overall career
development.
Without any dilution, We would also like to thank all the staff members of CSE
Department .Since their co-operation and help to arrange the entire necessary instructure
for the carrying out the project was invaluable.
Last but not the least, we offer our deepest gratefulness and thus owe a large amount of
credit for this success to our respected parents ,brother and sister for being our support
throughout the ups and downs,sharing the most precious bond of love and affection to
have ever known in this life.

DEEPAK SHARMA
GANESH SHARMA

DINESH
KUMAR
VIRENDER SINGH

CANDIDATES DECLARATION
We hereby declare that the project work which entitled COLLEGE MANAGEMENT
SYSTEM in partial fullfillment of the requirement for the award of the course
curriculum of Bachelor of degree with specialization in COMPUTER SCIENCE AND
ENGINEERING submitted in the department of computer engineering, Shri krishan
institute of engineering & technology, Kurukshetra is an authentic record of our own
original work carried out in my training period under the guidance and supervision of
Er. Anu

Place: Kurukshetra
DEEPAK SHARMA
GANESH SHARMA
DINESH KUMAR
VIRENDER SINGH

TABLE OF CONTENTS:
Title
1. INTRODUCTION
2. FEATURE OF PROJECT
3. TECHNOLOGY USED
4. HARDWARE & SOFTWARE REQUIREMENT
5. DFDS
6. CODING
7. SNAPSHOTS
8.TESTING
9. ADVANTAGES
10. LIMITATIONS
11. FUTURE SCOPE
12. REFERENCES

INTRODUCTION
INTRODUCTION OF THE PROJECT:
Team
Project Leader: Pooja Rani.
Team Members: 2
Objective and aim:
The College management system can be used to manage the data of all
type of educational institutes. It will support both stand alone and also
networking environment. The system uses C#. Net Technology. The main
modules involved in this system are:
1. Login
2. Forms
3. Reports
4. Window
Login
Login module is used to check whether the user is an authorized person to
use the system or not. For this the user should give the correct user name and
password.
The different types of users are

1. Admin
2. User

Forms
This module consists of the following sub modules
1.

Student Registration Form

2.

Student Fee Form

3.

Student Marks Form

4.

Student ID Form

5.

Employee Detail Form

6.

Employee ID Form

The Student Registration Form is designed for registering the new students
details and course details.
The Student Fee Form is used to enter the students fee details.
The Student Marks Form is designed for submitting the semester or exam
marks of the students for a particular course or an individual student.
The Student Id Form is used to create the identity number for each student for
different course.
The Employee details form is designed for entering the staff details and
other relevant details .

The Employee Id used to create the identity number for each student for
different course.

Reports
All the above mentioned data are stored in the back end and can be retrieved
as reports with filtering options. The Following are the reports can be taken
from this system
1.

Student Report

2.

Employee Report

3.

Fee Detail Report

4.

Marks Detail Report

Technical Detail:
The main objective of the existing system is to provide a user-friendly
interface. The system, which is proposed, now computerizes all the details
that are maintained manually. Once the details are fed into the computer
there is no need for various persons to deal with separate sections. Only a
single person is enough to maintain all the reports. In this project we use the
addvance technology of ASP.NET along with the C# and MS-SQL
Server for backend. Windows 7 has been as a developing platform for
this project.

FEATURES
FEATURES OF THE PROJECT

The project is related to the college management activities like maintain student

records , teacher records, financial record etc.


The main aim of the project is to minimise the headache of the college
management (no need to store records in paper files. ), and make them feel the

difference.
The project is inspired from the modern era of the management.
In this software the special thing is that this software can be operated by any kind

of user /administrator.
In this software user can easily get information about his status.

TECHNOLOGY USED
INTRODUCTION OF .NET & ASP.NET
The .NET Strategy
Microsoft wants to make the World Wide Web (WWW) more vibrant by enabling
individual devices, computers and web services to work together intelligently to provide
richer solutions to users. By the intelligent integration of web sites on the Internet, users
can create a wide variety of value-based applications such as unified banking services,
electronic bill payment, stock trading and insurances services etc. Microsoft calls this
Web service and the software strategy for implementing and delivering these services is
.NET
.NET is a software framework that includes everything required for developing software
for web services. It integrates presentation technologies on a single platform so as to
enable users to develop Internet applications as easily as they do on desktop so as to
enable users to develop Internet applications as easily as they do on desktop systems. The
Microsoft .NET software solution strategy includes three key approaches as shown
below.

Microsoft
.NET

Microsoft
.NET
Platform

Microsoft
.NET
Products &

Third- party
.NET Services

Microsoft .NET strategy

NET Technology
.NET Technology is a third-generation component model. This provides a new level of
inter-operability compared to COM technology.

COM provides a standard binary

mechanism for inter-module communication. This mechanism is replaced by an


intermediate language called Microsoft Intermediate Language (MSIL) or simply IL in
the .NET technology. Various .NET-language compilers enforce inter- operability by
compiling code into IL, which is automatically compatible with other IL modules. An
inherent characteristic of IL code is Metadata. Metadata is data about data and describes
its characteristics, including data types and locations. IL allows for true cross-language
integration. In addition to IL, .NET includes a host of other technologies and tools that
will enable us develop and implement Web-based application easily.
Client-side and Server-side interaction
If webpage content can be customized or used to complete an activity, interaction is
either client-side or server-side
Client-side
Client-side scripting supports interaction within a webpage.
Client-side scripting enables interaction within a webpage. The code required to process
user-input is downloaded and compiled by the browser or plug-in.
Client-side scripting languages include JavaScript.
An example of a client-side interaction is a rollover (typically triggered when choosing a
navigation option).
Server-side
In Server-side scripting information is sent to a server to be processed.
With server-side scripting, completing an activity involves sending information to
another computer (server) across the internet. The server then runs a program that
processes the information and returns the results, typically a webpage.
Server-side scripting languages include ASP and PHP.

Search engines use server-side processing. When a keyword is sent, a program on a


server matches the word or phrase entered against an index of website content.
How the user connects to the internet affects both forms of interaction. For client-side
scripting, the connection type affects the time it takes program code to be downloaded.
For server-side processing, it affects the time taken for information to be sent to the
server and the response downloaded.

NET FRAMEWORK
. Net Framework is a Programming model of the .NET environment for building,
deploying, and running Web-based applications, smart client applications, and XML Web
services. It enables the developers to focus on writing the business logic code for their
applications. The .NET Framework includes the common language runtime and class
libraries.
NET Frameworks keywords:
Easier and quicker programming
Reduced amount of code
Declarative programming model
Richer server control hierarchy with events
Larger class library
Better support for development tools
Core Features of .Net Framework
Programming Language Integration
Garbage Collection
Consistent Error Handling
Components of .Net Framework
Common Language Runtime (CLR)
Common type system for all languages
Rich runtime environment
Rich class libraries (.NET Framework)
Base class libraries, ADO.NET and XML
Windows Forms for rich, Win32 applications

Web application platform ASP.NET


Rich, interactive pages
Powerful web services
Net Framework Architecture

Common Language Runtime


The Common Language Runtime (CLR) is a runtime engine that manages .NET Code
(such as C# applications). It Provides features such as memory management, thread
management, object type safety, security, etc. It is a part of the .NET Framework
Managed code is a code that targets the CLR. Any .NET Language, including C#, Visual
Basic, C++, Java, COBOL, etc.

Framework Class Library

.net framework contains a huge collection of reusable types (class, enumerations and
structures). These types are used for common task such as IO, Memory and Thread
management. A complete object oriented toolbox is available with Visual Studio .Net.
Assemblies
Assemblies are the basic unit of any application. It is a logical grouping of one or more
modules or files. Smallest unit of reuse, security, and versioning. Assemblies can be
created directly by compiler (e.g. DCCIL.exe, CSC.exe, and VBC.exe). It contains
resource data (strings, icons, etc.) and is loaded at runtime based on user locale.
Assemblies can be private or shared. It can also be stored in Global Assembly Cache
(GAC)
Namespaces
A namespace is a logical container for types. It is designed to eliminate name collisions.
An assembly can contribute to multiple namespaces, multiple assemblies can contributed
to a namespace

Conversion of MSIL Code into the Native Code

What is Classic ASP?


Microsoft's previous server side scripting technology ASP (Active Server Pages) is now
often called classic ASP.
ASP 4.5 was the last version of classic ASP.
Asp.net is not ASP.
ASP.NET is the next generation ASP, but it's not an upgraded version of ASP.
ASP.NET is an entirely new technology for server-side scripting. It was written from the
ground up and is not backward compatible with classic ASP.

ASP.NET is the major part of the Microsoft's .NET Framework.


3.5.1 What is ASP.NET?
ASP.NET is a server side scripting technology that enables scripts (embedded in web
pages) to be executed by an Internet server.
ASP.NET is a Microsoft Technology
ASP stands for Active Server Pages
ASP.NET is a program that runs inside IIS
IIS (Internet Information Services) is Microsoft's Internet server
IIS comes as a free component with Windows servers
IIS is also a part of Windows 2000 and XP Professional
What is an ASP.NET File?
An ASP.NET file is just the same as an HTML file
An ASP.NET file can contain HTML, XML, and scripts
Scripts in an ASP.NET file are executed on the server
An ASP.NET file has the file extension ".aspx"
How Does ASP.NET Work?
When a browser requests an HTML file, the server returns the file
When a browser requests an ASP.NET file, IIS passes the request to the ASP.NET engine
on the server
The ASP.NET engine reads the file, line by line, and executes the scripts in the file
Finally, the ASP.NET file is returned to the browser as plain HTML
What is ASP+?
ASP+ is the same as ASP.NET.
ASP+ is just an early name used by Microsoft when they developed ASP.NET.
ASP.NET 2.0
ASP.NET 2.0 improves upon ASP.NET by adding support for several new features.
3.5.4.2ASP.NET 3.0

ASP.NET 3.0 is not a new version of ASP.NET. It's just the name for a new ASP.NET 2.0
framework library with support for Windows Presentation Foundation, Windows
Communication Foundation, Windows Workflow Foundation; and Windows CardSpace.

Language Support
ASP.NET uses ADO.NET.
ASP.NET supports full Visual Basic, not VBScript.
ASP.NET supports C# (C sharp) and C++.
ASP.NET supports JScript.

ASP.NET Controls
ASP.NET contains a large set of HTML controls. Almost all HTML elements on a page
can be defined as ASP.NET control objects that can be controlled by scripts.
ASP.NET also contains a new set of object-oriented input controls, like programmable
list-boxes and validation controls.
A new data grid control supports sorting, data paging, and everything you can expect
from a dataset control.
Event Aware Controls
All ASP.NET objects on a Web page can expose events that can be processed by
ASP.NET code.
Load, Click and Change events handled by code makes coding much simpler and much
better organized.
ASP.NET Components
ASP.NET components are heavily based on XML. Like the new AD Rotator, that uses
XML to store advertisement information and configuration.

Advantages of ASP.Net:
User Authentication
ASP.NET supports form-based user authentication, cookie management, and automatic
redirecting of unauthorized logins.
User Accounts and Roles

ASP.NET allows user accounts and roles, to give each user (with a given role) access to
different server code and executables.
High Scalability
Much has been done with ASP.NET to provide greater scalability.
Server-to-server communication has been greatly enhanced, making it possible to scale
an application over several servers. One example of this is the ability to run XML parsers,
XSL transformations.
Compiled Code
The first request for an ASP.NET page on the server will compile the ASP.NET code and
keep a cached copy in memory. The result of this is greatly increased performance.
Source hungry session objects on other servers.
Easy Configuration
Configuration of ASP.NET is done with plain text files.
Configuration files can be uploaded or changed while the application is running. No
need to restart the server. No more metabase or registry puzzle.
Easy Deployment
No more server-restart to deploy or replace compiled code. ASP.NET simply redirects all
new requests to the new code.
Compatibility
ASP.NET is not fully compatible with earlier versions of ASP, so most of the old ASP
code will need some changes to run under ASP.NET.
To overcome this problem, ASP.NET uses a new file extension ".aspx". This will make
ASP.NET applications able to run side by side with standard ASP applications on the
same server.
Multiple platform Support
.Net platform has been designed keeping multiple platform support as a key feature. For
version 2.0 this means that the code written using the .Net platform can run on all
versions of Windows. i.e. Windows 98, 95, NT, 2000 and so on.
Microsoft has included rich support for all the platforms. Also this code shall also work
on any 64-bit processor that may be used by Microsoft later.

It is also expected that .Net shall run on other platforms like UNIX also, however it is not
for sure that all functionality will be available for the same.
Net as a clean start
On the windows platform, the technologies available often depend on the programming
language that they are written in, so they are very different. Depending on the chosen
programming language, these technologies can be restrictive.
The problem with this approach is that it makes the Windows platform harder to
understand.
Using .Net there is just one simple object oriented way of accessing the functionality of
the .Net Framework.

. Net Framework

VB FORM

MFC

Windows

ASP

API

Performance
. Net has been designed to provide great performance and scalability. For .Net to succeed,
the companies must be able to migrate their applications and not suffer due to the way the
CLR works. To ensure this CLR converts the code into native machine code. So the

conversion can take step-by-step method and will make use of the given machines
resources and processor features.
As newer versions of the CLR are released and technologies like windows forms are
released, each release will have a better performance and smaller memory footprints.
Also .Net has succeeded in replacing completely the older technologies like COM with
better and efficient design equivalents. At the heart of the .Net platform is the CLR.

Difference between ASP and ASP.NET


ASP stands for Active Server Pages. ASP.NET is the next generation of ASP. After the
introduction of ASP.NET, old ASP is called 'Classic ASP'.
Classic ASP uses VB script for server side coding. VB Script is not supported any more
in ASP.NET. Instead, ASP.NET supports more languages including C#, VB.NET, J# etc.
VB.NET is very similar to VB script, so it should be easy for old Visual Basic or ASP
programmers to switch to VB.NET and ASP.NET
VB Script is a simple scripting language, whereas VB.NET or C# is modern, very
powerful, object oriented programming languages. Just for that reason, you will be able
to write much more robust and reliable programs in ASP.NET compared to ASP.
In classic ASP, there was no server controls. You have to write all html tags manually.
ASP.NET offers a very rich set of controls called Server Controls and Html Controls. It is
very easy to drag and drop any controls to a web form. The VS.NET will automatically
write the required HTML tags automatically for you.
ASP is interpreted, ASP.NET is compiled. Since ASP uses VB script, there is no
compilation. All ASP pages are interpreted when the page is executed. ASP.NET uses
modern .NET languages like C#, VB.NET etc. They can be compiled to efficient
Microsoft Intermediate Language (MSIL). When you compile an ASP.NET application,
the server side code is compiled to assemblies. These assemblies are loaded at run time
which makes the ASP.NET pages perform better than classic ASP.

MICROSOFT SQL SERVER 2005


Microsoft SQL Server 2005 is a full-featured relational database management
system (RDBMS) that offers a variety of administrative tools to ease the burdens of

database development, maintenance and administration. In this article, we'll cover six of
the more frequently used tools: Enterprise Manager, Query Analyzer, SQL Profiler,
Service Manager, Data Transformation Services and Books Online.
Components of Microsoft SQL Server 2005

Enterprise Manager: is the main administrative console for SQL


Server installations. It provides you with a graphical "birds-eye" view of
all of the SQL Server installations on your network. You can perform
high-level administrative functions that affect one or more servers,
schedule common maintenance tasks or create and modify the
structure of individual databases.

Query Analyzer: offers a quick and dirty method for performing


queries against any of your SQL Server databases. It's a great way to
quickly pull information out of a database in response to a user
request, test queries before implementing them in other applications,
create/modify stored procedures and execute administrative tasks.

SQL Profiler: provides a window into the inner workings of your


database. You can monitor many different event types and observe
database performance in real time. SQL Profiler allows you to capture
and replay system "traces" that log various activities. It's a great tool
for optimizing databases with performance issues or troubleshooting
particular problems.

Service Manager: is used to control the MS-SQL Server (the main SQL
Server process), MSDTC (Microsoft Distributed Transaction Coordinator)
and SQL Server Agent processes. An icon for this service normally
resides in the system tray of machines running SQL Server. You can use
Service Manager to start, stop or pause any one of these services.

Data Transformation Services (DTS): provide an extremely flexible method for


importing and exporting data between a Microsoft SQL Server installation and a large
variety of other formats. The most commonly used DTS application is the "Import and
Export Data" wizard found in the SQL Server program group.
Features of Microsoft SQL Server 2008
User-Defined Functions: SQL Server 2000 introduces the long-awaited support for userdefined functions. User-defined functions can take zero or more input parameters and
return a single valueeither a scalar value like the system-defined functions, or a table
result. Table-valued functions can be used anywhere table or view expressions can be
used in queries, and they can perform more complex logic than is allowed in a view.
Indexed Views: Views are often used to simplify complex queries, and they can contain
joins and aggregate functions. In SQL Server 2000 Enterprise or Developer Edition, you
can define indexes on views to improve query performance against the view. When
creating an index on a view, the result set of the view is stored and indexed in the
database. Existing applications can take advantage of the performance improvements
without needing to be modified.

HARDWARE & SOFTWARE


REQUIREMENT
In this step we analyzed the processing capabilities of the system on which the proposed
system would be developed and the specification is divided into two categories namely:

HARDWARE REQUIREMENTS
Processor
Minimum: 600 megahertz (MHz) Pentium processor
Recommended: 1 gig hertz (GHz) Pentium processor
RAM
Minimum: 192 megabytes (MB)
Recommended: 256 MB
Hard Disk
2 GB of available space required on installation drive
1 GB of available space required on system drive
Display
Minimum: 800 x 600 256 colors
Recommended: 1024 x 768 High Color - 16-bit

SOFTWARE REQUIREMENTS
Development:
.NET Framework 4.0.
Microsoft Visual Studio 2008/2010(IDE for .net framework3.5/ 4.0).
TOOL

Code Behind Language

ASP.NET.
:

C#.Net.

SQL Server 2008.


Internet Explorer 6.0 & later/Mozilla Firefox 3.5 or any other internet operator.
Deployment:

.NET Framework 3.5/ 4.0.


SQL Server 2008.
Internet Explorer 6.0 & later/Mozilla Firefox 4.0.(Client side)

DATA FLOW DIAGRAM


Data Flow Diagram
DFD shows the flow of data. These diagrams help to understand the basic Working of
the system. It helps to make and recognize various parts and their inter relationships. It is
a way of expressing system requirement in a graphical form; this leads to a modular
design. It is also known as bubble chart, has the purpose of clarifying system
requirements and identifying major transformations that will become program in system
design. So it is the starting point of the design phase that functionally decomposes the
requirement specifications down to the lowest level of details. A DFD consist of a series
of bubbles joined by lines. The bubbles represent data transformation and the lines
represent data flows in the system.
DFD SYMBOLS:

= Source or Destination of data

= Data flow

= Process that transform data flow

=Data store

Purpose:

To store all the information about the student.

Easy access of data


Easy maintenance
Maintaining data consistency
Providing better performance
Increasing the efficiency through automation
Proper authorization
Proper security
Providing timely information to the users

Data Flow Diagram 1

Login Details

Registered User
User

New User
Registration

Registration

Process

User
Details
Authentication of The User

Login
Process

Data Flow Diagram -2

New account

Admin

User

Status

Issue new account and Status for the Users


Data Flow Diagram -3

Applicant

Login

Information Form

User fill the registration form

Data Flow Diagram -4

3. INPUT DESIGN:
The input design is the link between the information system and the user. It comprises
developing specification and procedure for data preparation and those steps that are
necessary to put transaction data into a usable form for processing data entry. The activity
of putting data into the computer for processing can be achieved by instructing the
computer to read data from a written or printed document or it can occur by having
people key data directly into the system. The design of inputs focuses on controlling the
amount of inputs required, controlling errors, avoiding delay, avoiding extra steps and
keeping the process simple.
The system needs the following information for processing:
Information regarding Project Details
Information regarding Project Design Details
Information regarding Category, Location Details
Information Employees Details

4. OUTPUT DESIGN:
In output design, emphasis is given on producing a hard copy of the information required
as the output on the CRT screen in some predefined manner. Computer output is the most
important and direct source of information to the use. Output design is a process that
involves designing necessary outputs that should be given to various users according to
their requirements. Efficient, intelligible output design should improve the systems

relationship with the user and help in decision making. Since the reports are directly
referred by the management for taking the decisions and to draw conclusions, they must
be designed with utmost care and the details in the reports must be simple, descriptive
and clear to the user. The options for the outputs and reports are given the system menu.

CODING

Main program page:using System;


using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Configuration;
using System.Threading;
namespace WindowsFormsApplication1
{
static class Program
{
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
first Splash = new first();
Splash.Show();
Splash.Update();
System.Threading.Thread.Sleep(3000);
Splash.Close();
Application.Run(new Login());
}
}
}
Connection page:<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<connectionStrings>

<add name ="cn" connectionString=".=POOJA-PC\SQLEXPRESS;database=erp by


ravi;uid=sa;pwd=pooja" providerName ="System.Data.Sqlclient"/>
</connectionStrings>
</configuration>

Login Page:using System;


using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Configuration;
namespace WindowsFormsApplication1
{
public partial class Login : Form
{
SqlConnection con = new SqlConnection();
public Login()
{
InitializeComponent();
}
private void btncreateacc_Click(object sender, EventArgs e)
{
}
private void label1_Click(object sender, EventArgs e)
{
}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
private void btnlogin_Click(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "select * from login where username=@username and
password=@password";
cmd.Connection = con;

cmd.Parameters.Add("@username", SqlDbType.VarChar).Value =
txtusername.Text;
cmd.Parameters.Add("@password", SqlDbType.VarChar).Value =
txtpassword.Text;
SqlDataReader dr = cmd.ExecuteReader();
if(dr.Read())
{
home h = new home();
this.Hide();
h.Show();
}
else
{
MessageBox.Show("wrong user name or password");
Login lg = new Login();
this.Hide();
lg.Show();
}
dr.Close();
cmd.Dispose();
}
private void Login_Load(object sender, EventArgs e)
{
con.ConnectionString =
ConfigurationManager.ConnectionStrings["cn"].ConnectionString;
con.Open();
}
private void lbforgetpwd_LinkClicked(object sender,
LinkLabelLinkClickedEventArgs e)
{
FORGET_PWD fp = new FORGET_PWD();
this.Hide();
fp.Show();
}
private void label2_Click(object sender, EventArgs e)
{
}
private void txtusername_TextChanged(object sender, EventArgs e)
{
}

private void groupBox2_Enter(object sender, EventArgs e)


{
}
private void button3_Click(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "select username,password from userlogin where
username=@username
and password=@password";
cmd.Connection = con;
cmd.Parameters.Add("@username", SqlDbType.VarChar).Value =
txtusername2.Text;
cmd.Parameters.Add("@password", SqlDbType.VarChar).Value =
txtpassword2.Text;
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
userhome uh = new userhome();
this.Hide();
uh.Show();
}
else
{
MessageBox.Show("wrong user name or password");
Login lg = new Login();
this.Hide();
lg.Show();
}
dr.Close();
cmd.Dispose();
}
private void linkLabel1_LinkClicked(object sender,
LinkLabelLinkClickedEventArgs e)
{
FORGET_UserPWD fp = new FORGET_UserPWD();
this.Hide();
fp.Show();
}
private void btnsubmit_Click(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "insert into userlogin
values(@name,@desireid,@username,@password)";
cmd.Connection = con;

cmd.Parameters.Add("@name", SqlDbType.VarChar).Value = txtname.Text;


cmd.Parameters.Add("@desireid", SqlDbType.VarChar).Value = txtd_id.Text;
cmd.Parameters.Add("@username", SqlDbType.VarChar).Value = txtusern.Text;
cmd.Parameters.Add("@password", SqlDbType.VarChar).Value = txtnpwd.Text;
{
cmd.ExecuteNonQuery();
cmd.Dispose();
txtname.Text = "";
txtd_id.Text = "";
txtusern.Text = "";
txtnpwd.Text = "";
}
}
private void groupBox3_Enter(object sender, EventArgs e)
{
}
}
}
Home Page:using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class home : Form
{
public home()
{
InitializeComponent();
}
private void toolStripButton3_Click(object sender, EventArgs e)
{
studentadmission sa = new studentadmission();
sa.MdiParent = this;
sa.Show();
}

private void toolStripMenuItem1_Click(object sender, EventArgs e)


{
student_reg sreg = new student_reg();
sreg.MdiParent = this;
sreg.Show();
}
private void toolStripMenuItem4_Click(object sender, EventArgs e)
{
sfee sf = new sfee();
sf.MdiParent = this;
sf.Show();
}
private void toolStripMenuItem7_Click(object sender, EventArgs e)
{
stu_marks sm = new stu_marks();
sm.MdiParent = this;
sm.Show();
}
private void toolStripMenuItem8_Click(object sender, EventArgs e)
{
Marksrecord mr = new Marksrecord();
mr.Show();
}
private void toolStripMenuItem11_Click(object sender, EventArgs e)
{
studentrecords sr = new studentrecords();
sr.MdiParent = this;
sr.Show();
}
private void toolStripMenuItem13_Click(object sender, EventArgs e)
{
teacher_reg tr = new teacher_reg();
tr.MdiParent = this;
tr.Show();
}
private void toolStripMenuItem2_Click(object sender, EventArgs e)
{
stdattendance sa = new stdattendance();
sa.MdiParent = this;
sa.Show();
}
private void toolStripMenuItem9_Click(object sender, EventArgs e)
{
leave sl = new leave();
sl.MdiParent = this;

sl.Show();
}
private void toolStripMenuItem15_Click(object sender, EventArgs e)
{
leave sl = new leave();
sl.MdiParent = this;
sl.Show();
}
private void toolStripMenuItem14_Click(object sender, EventArgs e)
{
techerattendence ta = new techerattendence();
ta.MdiParent = this;
ta.Show();
}
private void toolStripMenuItem16_Click(object sender, EventArgs e)
{
sfee s = new sfee();
s.MdiParent = this;
s.Show();
}
private void toolStripMenuItem12_Click(object sender, EventArgs e)
{
feerecord fr = new feerecord();
fr.Show();
}
private void totalCollegeBalanceToolStripMenuItem_Click(object sender,
EventArgs e)
{
collegetotalfee tf = new collegetotalfee();
tf.Show();
}
private void btnhometologin_Click(object sender, EventArgs e)
{
Login lg = new Login();
lg.Show();
this.Hide();
}
private void toolStripMenuItem19_Click(object sender, EventArgs e)
{
teachattform ta = new teachattform();
ta.Show();
}
private void toolStripMenuItem22_Click(object sender, EventArgs e)
{
tchrinfoform tf = new tchrinfoform();

tf.Show();
}
private void toolStripMenuItem27_Click(object sender, EventArgs e)
{
stdinfoform si = new stdinfoform();
si.Show();
}
private void toolStripMenuItem26_Click(object sender, EventArgs e)
{
stdfeeform sf = new stdfeeform();
sf.Show();
}
private void toolStripMenuItem24_Click(object sender, EventArgs e)
{
Stuattform sa = new Stuattform();
sa.Show();
}
private void toolStripMenuItem25_Click(object sender, EventArgs e)
{
sturesultform sr = new sturesultform();
sr.Show();
}
}
}
Forget Password:using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Configuration;
namespace WindowsFormsApplication1
{
public partial class FORGET_PWD : Form

{
SqlConnection con = new SqlConnection();
public FORGET_PWD()
{
InitializeComponent();
}
private void btnresetpwd_Click(object sender, EventArgs e)
{
RESET_PASS rs = new RESET_PASS();
this.Hide();
rs.Show();
}
private void btnupdate_Click(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "update login set password=@password where
username=@username";
cmd.Connection = con;
cmd.Parameters.Add("@username", SqlDbType.VarChar).Value = txtuname.Text;
cmd.Parameters.Add("@password", SqlDbType.VarChar).Value =
txtnewpwd.Text;
cmd.Connection = con;
cmd.ExecuteNonQuery();
cmd.Dispose();
lblupdate.Text = "Password Has Updated";
Login lg = new Login();
this.Hide();
lg.Show();
}
private void FORGET_PWD_Load(object sender, EventArgs e)
{
con.ConnectionString =
ConfigurationManager.ConnectionStrings["cn"].ConnectionString;
con.Open();
}
private void btnselect_Click(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "select * from login where username=@username";

cmd.Connection = con;
cmd.Parameters.Add("@username", SqlDbType.VarChar).Value = txtuname.Text;
cmd.Parameters.Add("@password", SqlDbType.VarChar).Value =
txtnewpwd.Text;
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
txtnewpwd.Text = dr[1].ToString();
}
dr.Close();
cmd.Dispose();
}
}
}
Student Admission:using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Configuration;
namespace WindowsFormsApplication1
{
public partial class studentadmission : Form
{
SqlConnection con = new SqlConnection();
public studentadmission()
{
InitializeComponent();
}
private void studentadmission_Load(object sender, EventArgs e)
{
con.ConnectionString =
ConfigurationManager.ConnectionStrings["cn"].ConnectionString;
con.Open();
}
private void groupBox2_Enter(object sender, EventArgs e)

{
}
private void button1_Click(object sender, EventArgs e)
{
}
private void maskedTextBox1_MaskInputRejected(object sender,
MaskInputRejectedEventArgs e)
{
}
private void button1_Click_1(object sender, EventArgs e)
{
this.Hide();
}
private void btnsubmit_Click_1(object sender, EventArgs e)
{
con.ConnectionString =
ConfigurationManager.ConnectionStrings["cn"].ConnectionString;
con.Open();
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "insert into admission
values(@admno,@name,@dob,@fname,@mname,@gname,@rcaddress,@pincode,@mo
bileno,@pclass,@pschoolname,@pmarks,@pyear,@pmedium,@pschoolaffiliated,@class
,@rollno,@date,@chkbirth,@chkdmc,@chkmig,@chkcharacter,@rdincome)";
cmd.Connection = con;
if (txtadmno.Text == "")
{
MessageBox.Show("Enter Admission no.", "Important Note",
MessageBoxButtons.OK, MessageBoxIcon.Question);
return;
}
if (txtname.Text == "")
{
MessageBox.Show("Enter Name.", "Important Note",
MessageBoxButtons.OK, MessageBoxIcon.Question);
return;
}
if (dateTimePicker2.Text == "")

{
MessageBox.Show("Enter DOB.", "Important Note", MessageBoxButtons.OK,
MessageBoxIcon.Question);
return;
}
if (txtfname.Text == "")
{
MessageBox.Show("Enter Father Name.", "Important Note",
MessageBoxButtons.OK, MessageBoxIcon.Question);
return;
}
if (txtmname.Text == "")
{
MessageBox.Show("Enter Mother Name.", "Important Note",
MessageBoxButtons.OK, MessageBoxIcon.Question);
return;
}
if (txtgname.Text == "")
{
MessageBox.Show("Enter Guardian Name.", "Important Note",
MessageBoxButtons.OK, MessageBoxIcon.Question);
return;
}
if (cmbclass.Text == "")
{
MessageBox.Show("Enter Class.", "Important Note", MessageBoxButtons.OK,
MessageBoxIcon.Question);
return;
}
if (txtrollno.Text == "")
{
MessageBox.Show("Enter Roll No.", "Important Note",
MessageBoxButtons.OK, MessageBoxIcon.Question);
return;
}
cmd.Parameters.Add("@admno", SqlDbType.VarChar).Value = txtadmno.Text;
cmd.Parameters.Add("@name", SqlDbType.VarChar).Value = txtname.Text;
cmd.Parameters.Add("@dob", SqlDbType.VarChar).Value =
dateTimePicker2.Text;
cmd.Parameters.Add("@fname", SqlDbType.VarChar).Value = txtfname.Text;
cmd.Parameters.Add("@mname", SqlDbType.VarChar).Value = txtmname.Text;
cmd.Parameters.Add("@gname", SqlDbType.VarChar).Value = txtgname.Text;
cmd.Parameters.Add("@rcaddress", SqlDbType.VarChar).Value =
txtrcaddress.Text;
cmd.Parameters.Add("@pincode", SqlDbType.VarChar).Value =
maskedTextBox2.Text;

cmd.Parameters.Add("@mobileno", SqlDbType.VarChar).Value =
maskedTextBox1.Text;
cmd.Parameters.Add("@pclass", SqlDbType.VarChar).Value = cmbpclass.Text;
cmd.Parameters.Add("@pschoolname", SqlDbType.VarChar).Value =
txtpschoolname.Text;
cmd.Parameters.Add("@pmarks", SqlDbType.VarChar).Value = txtpmarks.Text;
cmd.Parameters.Add("@pyear", SqlDbType.VarChar).Value = txtpyear.Text;
cmd.Parameters.Add("@pmedium", SqlDbType.VarChar).Value =
cbmedium.Text;
cmd.Parameters.Add("@pschoolaffiliated", SqlDbType.VarChar).Value =
cmbpsa.Text;
cmd.Parameters.Add("@class", SqlDbType.VarChar).Value = cmbclass.Text;
cmd.Parameters.Add("@rollno", SqlDbType.VarChar).Value = txtrollno.Text;
cmd.Parameters.Add("@date", SqlDbType.VarChar).Value =
dateTimePicker1.Text;
if (rdinc1.Checked == true)
{
cmd.Parameters.Add("@rdincome", SqlDbType.VarChar).Value = rdinc1.Text;
}
if (rdinc2.Checked == true)
{
cmd.Parameters.Add("@rdincome", SqlDbType.VarChar).Value = rdinc2.Text;
}
if (rdinc3.Checked == true)
{
cmd.Parameters.Add("@rdincome", SqlDbType.VarChar).Value = rdinc3.Text;
}
if (chkbirth.Checked == true)
{
cmd.Parameters.Add("@chkbirth", SqlDbType.VarChar).Value = chkbirth.Text;
}
else
{
cmd.Parameters.Add("@chkbirth", SqlDbType.VarChar).Value = "";
}
if (chkdmc.Checked == true)
{
cmd.Parameters.Add("@chkdmc", SqlDbType.VarChar).Value = chkdmc.Text;
}
else
{
cmd.Parameters.Add("@chkdmc", SqlDbType.VarChar).Value = "";
}
if (chkmigration.Checked == true)
{

cmd.Parameters.Add("@chkmig", SqlDbType.VarChar).Value =
chkmigration.Text;
}
else
{
cmd.Parameters.Add("@chkmig", SqlDbType.VarChar).Value = "";
}
if (chkcharacter.Checked == true)
{
cmd.Parameters.Add("@chkcharacter", @SqlDbType.VarChar).Value =
chkcharacter.Text;
}
else
{
cmd.Parameters.Add("@chkcharacter", SqlDbType.VarChar).Value = "";
}
cmd.ExecuteNonQuery();
cmd.Dispose();
txtadmno.Text = "";
txtname.Text = "";
dateTimePicker2.Text = "";
txtfname.Text = "";
txtmname.Text = "";
txtgname.Text = "";
txtrcaddress.Text = "";
maskedTextBox2.Text = "";
cmbpclass.Text = "";
txtpschoolname.Text = "";
txtpmarks.Text = "";
txtpyear.Text = "";
cbmedium.Text = "";
cmbpsa.Text = "";
cmbclass.Text = "";
txtrollno.Text = "";
dateTimePicker1.Text = "";
}
private void groupBox2_Enter_1(object sender, EventArgs e)
{
}
private void dateTimePicker2_ValueChanged(object sender, EventArgs e)
{

}
private void pictureBox1_Click(object sender, EventArgs e)
{
}
private void studentadmission_Load_1(object sender, EventArgs e)
{
}
private void txtname_TextChanged(object sender, EventArgs e)
{
}
private void txtfname_TextChanged(object sender, EventArgs e)
{
}
private void txtmname_TextChanged(object sender, EventArgs e)
{
}
private void txtgname_TextChanged(object sender, EventArgs e)
{
}
private void cmbclass_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void txtrollno_TextChanged(object sender, EventArgs e)
{
}
private void txtrcaddress_TextChanged(object sender, EventArgs e)
{

}
private void maskedTextBox2_MaskInputRejected(object sender,
MaskInputRejectedEventArgs e)
{
}
private void maskedTextBox1_MaskInputRejected_1(object sender,
MaskInputRejectedEventArgs e)
{
}
private void txtadmno_TextChanged(object sender, EventArgs e)
{
}
private void txtpmarks_TextChanged(object sender, EventArgs e)
{
}
private void txtpyear_TextChanged(object sender, EventArgs e)
{
}
private void cbmedium_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void txtpschoolname_TextChanged(object sender, EventArgs e)
{
}
private void cmbpsa_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void cmbpclass_SelectedIndexChanged(object sender, EventArgs e)
{

}
}
}
Student Marks record:using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Configuration;
namespace WindowsFormsApplication1
{
public partial class Marksrecord : Form
{
SqlConnection con = new SqlConnection();
public Marksrecord()
{
InitializeComponent();
}
private void Marksrecord_Load(object sender, EventArgs e)
{
con.ConnectionString =
ConfigurationManager.ConnectionStrings["cn"].ConnectionString;
con.Open();
}
private void btnviewmarks_Click(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "select
SNAME,COURSE,SEMESTER,SUB1,SESS1,FINALEXAM1,TOTALMARK1,SUB2,S
ESS2,FINALEXAM2,TOTALMARK2,SUB3,SESS3,FINALEXAM3,TOTALMARK3,S
UB4,SESS4,FINALEXAM4,TOTALMARK4,SUB5,SESS5,FINALEXAM5,TOTALMA
RK5,SUB6,SESS6,FINALEXAM6,TOTALMARK6 from stdmarks where
ROLLNO=@ROLLNO";
cmd.Connection = con;

cmd.Parameters.Add("@ROLLNO", SqlDbType.VarChar).Value = txtrollno.Text;


SqlDataReader dr = cmd.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
txtsname.Text = dr[0].ToString();
txtcoursename.Text = dr[1].ToString();
txtsemester.Text = dr[2].ToString();
txtsub1.Text = dr[3].ToString();
txtsessional1.Text = dr[4].ToString();
txtfexam1.Text = dr[5].ToString();
txttotmarks1.Text = dr[6].ToString();
txtsub2.Text = dr[7].ToString();
txtsessional2.Text = dr[8].ToString();
txtfexam2.Text = dr[9].ToString();
txttotmarks2.Text = dr[10].ToString();
txtsub3.Text = dr[11].ToString();
txtsessional3.Text = dr[12].ToString();
txtfexam3.Text = dr[13].ToString();
txttotmarks3.Text = dr[14].ToString();
txtsub4.Text = dr[15].ToString();
txtsessional4.Text = dr[16].ToString();
txtfexam4.Text = dr[17].ToString();
txttotmarks4.Text = dr[18].ToString();
txtsub5.Text = dr[19].ToString();
txtsessional5.Text = dr[20].ToString();
txtfexam5.Text = dr[21].ToString();
txttotmarks5.Text = dr[22].ToString();
txtsub6.Text = dr[23].ToString();
txtsessional6.Text = dr[24].ToString();
txtfexam6.Text = dr[25].ToString();
txttotmarks6.Text = dr[26].ToString();
}
dr.Close();
cmd.Dispose();
}
else
{
MessageBox.Show("The Information About This Roll_No Are Not Found");
Marksrecord mr = new Marksrecord();
this.Hide();
mr.Show();

}
}
}
}
Student fee record:using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Configuration;
namespace WindowsFormsApplication1
{
public partial class feerecord : Form
{
SqlConnection con = new SqlConnection();
public feerecord()
{
InitializeComponent();
}
private void btnviewrecord_Click(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "select
name,branch,coursename,semester,mobileno,categories,address,state,city,feerequired,dep
ositedfee,balanceedfee,recivedby,doddd,dodmm,dodyyyy from studentfee1 where
rollno=@rollno";
cmd.Connection = con;
cmd.Parameters.Add("@ROLLNO", SqlDbType.VarChar).Value = txtrollno.Text;
SqlDataReader dr = cmd.ExecuteReader();
if (dr.HasRows)
{
while (dr.Read())
{
txtname.Text = dr[0].ToString();
txtbranch.Text = dr[1].ToString();
txtcourse.Text = dr[2].ToString();
txtsemester.Text = dr[3].ToString();

txtmobile.Text = dr[4].ToString();
txtcategory.Text = dr[5].ToString();
txtaddress.Text = dr[6].ToString();
txtstate.Text = dr[7].ToString();
txtcity.Text = dr[8].ToString();
Txtfeereqired.Text = dr[9].ToString();
Txtdeposit.Text = dr[10].ToString();
Txtbalance.Text = dr[11].ToString();
txtrecivedby.Text = dr[12].ToString();
txtday.Text = dr[13].ToString();
txtmonth.Text = dr[14].ToString();
txtyear.Text = dr[15].ToString();
}
dr.Close();
cmd.Dispose();
}
else
{
MessageBox.Show("The Information About This Roll_No Are Not Found");
feerecord fr = new feerecord();
this.Hide();
fr.Show();
}
}
private void feerecord_Load(object sender, EventArgs e)
{
con.ConnectionString =
ConfigurationManager.ConnectionStrings["cn"].ConnectionString;
con.Open();
}
private void txtrollno_TextChanged(object sender, EventArgs e)
{
}
private void groupBox1_Enter(object sender, EventArgs e)
{
}
}
}
Teacher registration:-

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Configuration;
namespace WindowsFormsApplication1
{
public partial class teacher_reg : Form
{
SqlConnection con = new SqlConnection();
public teacher_reg()
{
InitializeComponent();
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
}
private void teacher_reg_Load(object sender, EventArgs e)
{
con.ConnectionString =
ConfigurationManager.ConnectionStrings["cn"].ConnectionString;
con.Open();
}
private void btnRegister_Click(object sender, EventArgs e)
{
home h = new home();
this.Hide();
h.Show();
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "insert into teacherreg
values(@NAME,@FNAME,@DOBDD,@DOBMM,@DOBYYYY,@INDIAN,@OTHE
R,@STATE,@CITY,@ADDRESS,@PHONENO,@EMAIL,@EXPER,@QUALIFICATI
ON,@TEACHINGSUBJECT,@LANGUAGEKNOWN,@PROGLANG,@MARRIEDST
ATUS,@BLOODGROUP,@HOBBIES,@DOJDD,@DOJMM,@DOJYYYY,@GENDE
R,@ID)";

cmd.Connection = con;
cmd.Parameters.Add("@NAME", SqlDbType.VarChar).Value = Txt_Name.Text;
cmd.Parameters.Add("@FNAME", SqlDbType.VarChar).Value =
Txt_FName.Text;
{
if (Rdmale.Checked == true)
cmd.Parameters.Add("@GENDER", SqlDbType.VarChar).Value =
Rdmale.Text;
}
{
if (Rdfemale.Checked == true)
cmd.Parameters.Add("@GENDER", SqlDbType.VarChar).Value =
Rdfemale.Text;
}
cmd.Parameters.Add("@DOBDD", SqlDbType.VarChar).Value =
cmd.Parameters.Add("@DOBMM", SqlDbType.VarChar).Value =
cmbdobmm.SelectedItem.ToString();
cmd.Parameters.Add("@DOBYYYY", SqlDbType.VarChar).Value =
cmbdobyyyy.SelectedItem.ToString();
{
if (chk_indian.Checked == true)
cmd.Parameters.Add("@INDIAN", SqlDbType.VarChar).Value =
chk_indian.Text;
else
cmd.Parameters.Add("@INDIAN", SqlDbType.VarChar).Value = "";
}
{
if (Chk_oth.Checked == true)
cmd.Parameters.Add("@OTHER", SqlDbType.VarChar).Value =
Chk_oth.Text;
else
cmd.Parameters.Add("@OTHER", SqlDbType.VarChar).Value = "";
}
{
cmd.Parameters.Add("@STATE", SqlDbType.VarChar).Value =
cmbstate.SelectedItem.ToString();
cmd.Parameters.Add("@CITY", SqlDbType.VarChar).Value =
cmbcity.SelectedItem.ToString();
cmd.Parameters.Add("@ADDRESS", SqlDbType.VarChar).Value =
Txtaddress.Text;

cmd.Parameters.Add("@PHONENO", SqlDbType.VarChar).Value =
Txtphoneno.Text;
cmd.Parameters.Add("@EMAIL", SqlDbType.VarChar).Value =
Txtemail.Text;
cmd.Parameters.Add("@EXPER", SqlDbType.VarChar).Value = txtexp.Text;
cmd.Parameters.Add("@QUALIFICATION", SqlDbType.VarChar).Value =
cmbqualification.SelectedItem.ToString();
cmd.Parameters.Add("@TEACHINGSUBJECT", SqlDbType.VarChar).Value
= Txtsubject.Text;
cmd.Parameters.Add("@LANGUAGEKNOWN", SqlDbType.VarChar).Value
= cmbmedium.SelectedItem.ToString();
cmd.Parameters.Add("@PROGLANG", SqlDbType.VarChar).Value =
cmbprogknow.SelectedItem.ToString();
cmd.Parameters.Add("@MARRIEDSTATUS", SqlDbType.VarChar).Value =
cmbmartial.SelectedItem.ToString();
cmd.Parameters.Add("@BLOODGROUP", SqlDbType.VarChar).Value =
cmbbloodgroup.SelectedItem.ToString();
cmd.Parameters.Add("@HOBBIES", SqlDbType.VarChar).Value =
Txthobbies.Text;
cmd.Parameters.Add("@DOJDD", SqlDbType.VarChar).Value =
cmbdojdd.SelectedItem.ToString();
cmd.Parameters.Add("@DOJMM", SqlDbType.VarChar).Value =
cmbdojmm.SelectedItem.ToString();
cmd.Parameters.Add("@DOJYYYY", SqlDbType.VarChar).Value =
cmbdojyyyy.SelectedItem.ToString();
cmd.Parameters.Add("@ID", SqlDbType.VarChar).Value = TXT_id.Text;
cmd.ExecuteNonQuery();
cmd.Dispose();
Txt_Name.Text = "";
Txt_FName.Text = "";
cmbdobdd.Text = "";
cmbdobmm.Text = "";
cmbdobyyyy.Text = "";
cmbstate.Text = "";
cmbcity.Text = "";
Txtaddress.Text = "";
Txtphoneno.Text = "";
Txtemail.Text = "";
txtexp.Text = "";
cmbqualification.Text = "";
Txtsubject.Text = "";
cmbmedium.Text = "";
cmbprogknow.Text = "";
cmbmartial.Text = "";

cmbbloodgroup.Text = "";
Txthobbies.Text = "";
cmbdojdd.Text = "";
cmbdojmm.Text = "";
cmbdojyyyy.Text = "";
TXT_id.Text = "";
}
}
private void btnexit_Click(object sender, EventArgs e)
{
this.Hide();
}
}
}
Student information report:namespace WindowsFormsApplication1 {
using System;
using System.ComponentModel;
using CrystalDecisions.Shared;
using CrystalDecisions.ReportSource;
using CrystalDecisions.CrystalReports.Engine;
public class stdinforeport : ReportClass {
public stdinforeport() {
}
public override string ResourceName {
get {
return "stdinforeport.rpt";
}
set {
// Do nothing
}
}
public override bool NewGenerator {
get {
return true;
}
set {
// Do nothing
}

}
public override string FullResourceName {
get {
return "WindowsFormsApplication1.stdinforeport.rpt";
}
set {
// Do nothing
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializatio
nVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section1 {
get {
return this.ReportDefinition.Sections[0];
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializatio
nVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section2 {
get {
return this.ReportDefinition.Sections[1];
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializatio
nVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section3 {
get {
return this.ReportDefinition.Sections[2];
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializatio
nVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section4 {
get {

return this.ReportDefinition.Sections[3];
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializatio
nVisibility.Hidden)]
public CrystalDecisions.CrystalReports.Engine.Section Section5 {
get {
return this.ReportDefinition.Sections[4];
}
}
}
[System.Drawing.ToolboxBitmapAttribute(typeof(CrystalDecisions.Shared.ExportOption
s), "report.bmp")]
public class Cachedstdinforeport : Component, ICachedReport {
public Cachedstdinforeport() {
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializatio
nVisibility.Hidden)]
public virtual bool IsCacheable {
get {
return true;
}
set {
//
}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializatio
nVisibility.Hidden)]
public virtual bool ShareDBLogonInfo {
get {
return false;
}
set {
//

}
}
[Browsable(false)]
[DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializatio
nVisibility.Hidden)]
public virtual System.TimeSpan CacheTimeOut {
get {
return CachedReportConstants.DEFAULT_TIMEOUT;
}
set {
//
}
}
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument
CreateReport() {
stdinforeport rpt = new stdinforeport();
rpt.Site = this.Site;
return rpt;
}
public virtual string GetCustomizedCacheKey(RequestContext request) {
String key = null;
return key;
}
}
}

OUTPUT
SNAPSHOTS

ADVANTAGES
ADVANTAGES OF THE PROJECT
This project is related to the college management activities. So this project has
vast scope in field of the college management.

This software is very easy to use. Even the user who are using this first time can
easily register their name for user account.

The users can get information about their marks, attendance and fee records easily
.

Only the admin can control overall activities of this project .Admin can edit
,delete,save any record of student and teacher.

The user see their information by using their account.

LIMITATIONS
Limitation of the project:
This project is based on data storing activities.
If anyone know admin name and password then he can easily operate
it.

Only admin can use this properly.

It maintain only basic information like fee, marks,attendance etc.

It is not on Web Based software.

FUTURE SCOPE

FUTURE SCOPE OF THE PROJECT


The user can create an account to see their information.

The admin can save whole data without any intruption.

To admit any student ,there is only need to fill one form called student admission
form.No need to do any extra activity.

REFRENCES

REFRENCES FOR THE PROJECT:

Teaches Web developers how to build powerful applications using the .NET
Framework and Microsofts ASP.NET.

ASP.NET using Visual Basic and C# with this comprehesive reference tool.

ASP.NET 3.5 Unleashed Copyright 2008 by Sams Publishing


byKarenGettman.

Database Files
Sr. No.

Table Name

Description

1.

admission

2.

branch

Contain branch names

3.

Class

Contain classes of coolage

4.

Date

Contain date

5.

Leave

Contain student leave

Contain student admission data

information
6.

Login

Contain login information

7.

Month

Contain name of months

8.

Resetpwd

9.

section

Contain sections of class

10.

semester

Contain semester of class

11.

Stdmarks

Used to store student marks

Contain reset password


information

information

Sr. No.

Table Name

12.

studentattendance1

Description
Contains student attendance
information

13.

studentfee1

Contains student fee records

14.

STUDENTREG

Contain student registration


information

15.

Subjects

Contain name of subject in a


class

16.

teacherattendance1

Contains teacher attendance


records

17.

Teacherreg

Contain teacher registration


records

18.

Userlogin

Contains login information for


students etc.

Contents
Head of the Departments Declaration Certificate
Supervisors Declaration Certificate
Acknowledgement
Abstract
List of Figures
Chapter 1. INTRODUCTION

Introduction about Project

Brief Introduction about Technology

Chapter 2 REQUIREMENT ANALYSIS AND DESIGN.

Database Desiging etc

Chapter 3. IMPLEMENTATION
Chapter 4 TESTING AND MAINTEANANCE

Test Cases

Chapter 5 SNAPSHOTS
Chapter 6. CONCLUSION AND FUTURE WORKS

Source Code
References

<?xml version="1.0"?>
<!-Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
<appSettings/>
<connectionStrings>

<add name="courseinfo" connectionString="Data


Source=.\SQLEXPRESS;AttachDbFilename=F:\courseinfo\courseinfo\App_Data\courseinfo4
me.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"
providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<!-Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true" targetFramework="4.0">
</compilation>
<!-The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows"/>
<!-The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<pages controlRenderingCompatibilityVersion="3.5"
clientIDMode="AutoID"/></system.web>
<!-The system.webServer section is required for running ASP.NET AJAX under Internet
Information Services 7.0. It is not necessary for previous version of IIS.
-->
</configuration>

using
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;

public partial class home_home : System.Web.UI.Page


{
void Page_PreInit()
{
if (Session["id"] == null)
{
Page.MasterPageFile = "~/master/Masterhometable.master";
}
else
{
Page.MasterPageFile = "~/master/User.master";
}
}
protected void Page_Load(object sender, EventArgs e)
{
}

using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Data.SqlClient;

public partial class login : System.Web.UI.Page


{
SqlConnection cn = new
SqlConnection(ConfigurationManager.ConnectionStrings["courseinfo"].ToString());
SqlDataAdapter da;
DataTable dt = new DataTable();
protected void Page_Load(object sender, EventArgs e)
{
//Session.Abandon();
}
protected void btnsignup_Click(object sender, EventArgs e)
{
if (Session["invalid"] == null)
{
da = new SqlDataAdapter("select id from login where email='" +
txtusername.Text.ToString() + "' and password='" + txtpassword.Text.ToString() + "'", cn);
da.Fill(dt);
if (dt.Rows.Count > 0)
{
Session["id"] = dt.Rows[0][0].ToString();
if (Session["prepageurl"] != null)
{
Response.Redirect(Session["prepageurl"].ToString());
}
else
{
Response.Redirect("home.aspx");
}
}
else
{
lblMsg.Visible = true;
}
}
else
{
lblMsg.Visible = true;
}
}
}

using
using
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;
System.Data.SqlClient;

public partial class home_Contactus : System.Web.UI.Page


{
SqlConnection cn = new
SqlConnection(ConfigurationManager.ConnectionStrings["courseinfo"].ToString());
SqlDataAdapter da;
DataTable dt = new DataTable();
SqlCommand cmd;
string id, num;
void Page_PreInit()
{
if (Session["id"] == null)
{
Page.MasterPageFile = "~/master/Masterhometable.master";
}
else
{
Page.MasterPageFile = "~/master/User.master";
}
}
protected void Page_Load(object sender, EventArgs e)
{
da = new SqlDataAdapter("select id from contactus order by id desc", cn);
da.Fill(dt);
if (dt.Rows.Count <= 0)
{
id = ("c" + 101).ToString();
}
else
{
id = dt.Rows[0][0].ToString();
num = id.Remove(0, 1);
id = "c" + (Int32.Parse(num) + 1).ToString();
}
//Response.Write(id.ToString());
}
protected void sndbtn_Click(object sender, EventArgs e)
{
cmd = new SqlCommand("insert into
contactus(id,fname,lname,organization,country,email,phno,assist) values
(@id,@fname,@lname,@organization,@country,@email,@phno,@assist)",cn);
cmd.Parameters.AddWithValue("@id", id.ToString());
cmd.Parameters.AddWithValue("@fname",frstnmetxt.Text.ToString());
cmd.Parameters.AddWithValue("@lname", lstnmetxt.Text.ToString());
cmd.Parameters.AddWithValue("@organization",orgtxt.Text.ToString());
cmd.Parameters.AddWithValue("@country", cntrytxt.Text.ToString());
cmd.Parameters.AddWithValue("@email", emailtxt.Text.ToString());
cmd.Parameters.AddWithValue("@phno", phntxt.Text.ToString());
cmd.Parameters.AddWithValue("@assist", assisttxt.Text.ToString());
cn.Open();
cmd.ExecuteNonQuery();
cn.Close();
cleartext();
}
protected void cleartext()
{
frstnmetxt.Text = "";

lstnmetxt.Text = "";
orgtxt.Text = "";
cntrytxt.Text = "";
emailtxt.Text = "";
phntxt.Text = "";
assisttxt.Text = "";
}

using
using
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Data.SqlClient;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;

public partial class feedback_feedback : System.Web.UI.Page


{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["courseinfo"].ToString());
Int32 maxfeedid = 0;
void Page_PreInit()
{
if (Session["id"] == null)
{
Page.MasterPageFile = "~/master/Masterhometable.master";
}
else
{
Page.MasterPageFile = "~/master/User.master";
}
}
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnfeedback_Click(object sender, EventArgs e)
{
string date = System.DateTime.Now.ToString();
SqlDataAdapter da = new SqlDataAdapter("select max(feed_id) from feedback",
con);

DataTable dt = new DataTable();


da.Fill(dt);
if (Convert.IsDBNull(dt.Rows[0][0]) == true)
{
maxfeedid = 1;
}
else
{
maxfeedid = Convert.ToInt32(dt.Rows[0][0]) + 1;
}

con.Open();
SqlCommand cmd = new SqlCommand("insert into feedback values ('" + maxfeedid
+ "','" + txtbxName.Text + "','" + txtbxEmail.Text + "','" + date + "','" +
txtbxfeedback.Text + "')", con);
cmd.ExecuteScalar();
con.Close();
txtbxfeedback.Text = "";
txtbxEmail.Text = "";
txtbxName.Text = "";
lblmsg.Text = "Your Feeddback is submited to Site ADMIN. Thank's for giving us
feedback.";
lblmsg.Visible = true;
}
}

using
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;

using System.Data.SqlClient;
public partial class admin_coursedetail : System.Web.UI.Page
{
SqlConnection cn = new
SqlConnection(ConfigurationManager.ConnectionStrings["courseinfo"].ToString());
SqlDataAdapter da;
DataTable dt = new DataTable();
string courseid, idnum;
protected void Page_Load(object sender, EventArgs e)
{
if (Session["id"] == null)
{
Response.Redirect("..\\home\\home.aspx");
}
msglbl.Visible = false;
if (!IsPostBack)
{
getid();
}
}
protected void saveBtn_Click(object sender, EventArgs e)
{
if (rblInsertmodify.SelectedIndex == 0)
{
if (txtCoursecode.Text != "")
{
SqlCommand cmd = new SqlCommand("insert into
courses(courseid,coursecode,coursename,duration_corres,duration_regular,courseinfo)
values('" + txtCourseid.Text + "','" + txtCoursecode.Text + "','" + txtCoursename.Text +
"','" + txtDurcorres.Text + "','" + txtDurregular.Text + "','" + txtCourseinfo.Text + "') ", cn);
cn.Open();
cmd.ExecuteNonQuery();
cn.Close();
cleartext();
msglbl.Visible = true;
}
}
else
{
if (ddlCoursecode.SelectedIndex != 0)
{
SqlCommand cmd = new SqlCommand("update courses set coursename='" +
txtCoursename.Text + "',duration_corres='" + txtDurcorres.Text + "',duration_regular='"
+ txtDurregular.Text + "',courseinfo='" + txtCourseinfo.Text + "' where courseid='" +
txtCourseid.Text + "'", cn);
cn.Open();
cmd.ExecuteNonQuery();
cn.Close();
txtCourseid.Text = "";
ddlCoursecode.SelectedIndex = 0;
cleartext();
msglbl.Visible = true;
}
}
}
protected void cancelbtn_Click(object sender, EventArgs e)
{
Response.Redirect("..\\admin\\adminhome.aspx");

}
protected void cleartext()
{
txtCoursecode.Text = "";
txtCourseinfo.Text="";
txtCoursename.Text="";
txtDurcorres.Text="";
txtDurregular.Text="";
}
protected void rblInsertmodify_SelectedIndexChanged(object sender, EventArgs e)
{
if (rblInsertmodify.SelectedIndex == 0)
{
ddlCoursecode.Visible = false;
txtCoursecode.Visible = true;
saveBtn.Text = "Save";
msglbl.Text = "1 Record Inserted Successfully.";
getid();
}
else
{
txtCourseid.Text = "";
txtCoursecode.Visible = false;
ddlCoursecode.Visible = true;
saveBtn.Text = "Update";
msglbl.Text = "1 Record Updated Successfully.";
bindcoursecode();
}
cleartext();
}
protected void getid()
{
cn.Open();
da = new SqlDataAdapter("select courseid from courses order by courseid desc",
cn);
dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count <= 0)
{
courseid = ("co" + 1001).ToString();
}
else
{
courseid = dt.Rows[0][0].ToString();
idnum = courseid.Remove(0, 2);
courseid = "co" + (Int32.Parse(idnum) + 1).ToString();
}
cn.Close();
txtCourseid.Text = courseid;
}
protected void bindcoursecode()
{
cn.Open();
da = new SqlDataAdapter("select distinct(coursecode) from courses", cn);
dt = new DataTable();
da.Fill(dt);
ddlCoursecode.Items.Clear();

ddlCoursecode.Items.Insert(0, "------Select------");
for (int i = 0; i < dt.Rows.Count; i++)
{
ddlCoursecode.Items.Add(dt.Rows[i][0].ToString());
}
cn.Close();
}
protected void ddlCoursecode_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddlCoursecode.SelectedIndex != 0)
{
cn.Open();
da = new SqlDataAdapter("select * from courses where coursecode='" +
ddlCoursecode.SelectedValue + "'", cn);
dt = new DataTable();
da.Fill(dt);
txtCourseid.Text = dt.Rows[0]["courseid"].ToString();
txtCoursename.Text = dt.Rows[0]["coursename"].ToString();
txtDurcorres.Text = dt.Rows[0]["duration_corres"].ToString();
txtDurregular.Text = dt.Rows[0]["duration_regular"].ToString();
txtCourseinfo.Text = dt.Rows[0]["courseinfo"].ToString();
cn.Close();
}
else
{
txtCourseid.Text = "";
cleartext();
}
}
}

using
using
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;
System.IO;

using System.Data.SqlClient;
public partial class advertise_with_us_enter_info : System.Web.UI.Page
{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["courseinfo"].ToString());
string id,imgid,CurrentPath,CurrentFileName;
void Page_PreInit()
{
if (Session["id"] == null)
{
Page.MasterPageFile = "~/master/Masterhometable.master";
}
else
{
Page.MasterPageFile = "~/master/User.master";
id = Session["id"].ToString();
}
}
protected void Page_Load(object sender, EventArgs e)
{
lblWarning.Visible = false;
getimgid();
}
protected void btnSave_Click(object sender, EventArgs e)
{
imageupload();
string imgadd = "~/images/Advertise/" + CurrentFileName;
//try
//{
if (fuImages.HasFile == true)
{
SqlCommand cmd = new SqlCommand("insert into
advertise(id,name,country,state,city,pincode,contact,email,description,imgaddress,viewe
d,approved) values
(@id,@name,@country,@state,@city,@pincode,@contact,@email,@description,@imgaddr
ess,@viewed,@approved)", con);
cmd.Parameters.AddWithValue("@id", imgid);
cmd.Parameters.AddWithValue("@name", txtName.Text);
cmd.Parameters.AddWithValue("@country", txtCountry.Text);
cmd.Parameters.AddWithValue("@state", txtState.Text);
cmd.Parameters.AddWithValue("@city", txtCity.Text);
cmd.Parameters.AddWithValue("@pincode", txtPincode.Text);
cmd.Parameters.AddWithValue("@contact", txtContact.Text);
cmd.Parameters.AddWithValue("@email", txtEmail.Text);
cmd.Parameters.AddWithValue("@description", txtDescription.Text);
cmd.Parameters.AddWithValue("@imgaddress", imgadd);
cmd.Parameters.AddWithValue("@viewed", "no");
cmd.Parameters.AddWithValue("@approved", "no");
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
//}
//catch
//{
// lblWarning.Text = "Can't fulfil your request";
// lblWarning.Visible = true;

//}
clear();
}
protected void imageupload()
{
string ExtFile;
CurrentFileName = fuImages.FileName;
ExtFile = Path.GetExtension(CurrentFileName);
if (fuImages.PostedFile.ContentLength > 131072)
{
lblWarning.Text = "The size of image is too big , the size of the image must 128 KB
not exceed!!! ";
lblWarning.Visible = true;
return;
}
CurrentPath = Server.MapPath("~/images/Advertise/");
if (fuImages.HasFile)
{
if (!(ExtFile == ".jpg" || ExtFile == ".gif" || ExtFile == ".JPG" || ExtFile == ".GIF"))
{
lblWarning.Text = "You choose the incorrect image format !!!";
lblWarning.Visible = true;
return;
}
CurrentFileName = imgid + ExtFile.ToString();
CurrentPath += CurrentFileName;
fuImages.SaveAs(CurrentPath);
//lblWarning.Text = "Your image has been Uploaded !!!";
//lblWarning.Visible = true;
}
else
{
lblWarning.Text = "Can not load the image !!!";
lblWarning.Visible = true;
}
}
protected void btnCancel_Click(object sender, EventArgs e)
{
clear();
}
protected void getimgid()
{
string num;
SqlDataAdapter da = new SqlDataAdapter("select id from advertise order by id
desc", con);
DataTable dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count <= 0)
{
imgid = ("ads" + 1001).ToString();
}
else
{
imgid = dt.Rows[0][0].ToString();
num = imgid.Remove(0, 3);
imgid = "ads" + (Int32.Parse(num) + 1).ToString();
}
}

protected void clear()


{
txtCity.Text = "";
txtContact.Text = "";
txtCountry.Text = "";
txtDescription.Text = "";
txtEmail.Text = "";
txtName.Text = "";
txtPincode.Text = "";
txtState.Text = "";
}

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class streamwisecollge : System.Web.UI.Page

SqlConnection con = new


SqlConnection(ConfigurationManager.ConnectionStrings["courseinfo"].ToString());
SqlDataAdapter da;
DataTable dt = new DataTable();
void Page_PreInit()
{
if (Session["id"] == null)
{
Page.MasterPageFile = "~/master/Masterhometable.master";
}
else
{
Page.MasterPageFile = "~/master/User.master";
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
da = new SqlDataAdapter("select distinct (coursename) from courses", con);
da.Fill(dt);
for (int i = 0; i < dt.Rows.Count; i++)
{
ddlcoursename.Items.Add(dt.Rows[i][0].ToString());
}
}
}
protected void ddlcoursename_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddlcoursename.SelectedIndex != 0)
{
da = new SqlDataAdapter("select clgname,uniname from
university,college,course_clg,courses where college.clgid = course_clg.clgid and
courses.courseid=course_clg.courseid and courses.coursename='" + ddlcoursename.Text
+ "' and college.uniid=university.uniid", con);
dt.Clear();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
}
else
{
GridView1.DataSource = "";
GridView1.DataBind();
}
}
}

using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Data.SqlClient;

public partial class course_probyclg : System.Web.UI.Page


{

SqlConnection cn = new
SqlConnection(ConfigurationManager.ConnectionStrings["courseinfo"].ToString());
SqlDataAdapter da;
DataTable dt = new DataTable();
void Page_PreInit()
{
if (Session["id"] == null)
{
Page.MasterPageFile = "~/master/Masterhometable.master";
}
else
{
Page.MasterPageFile = "~/master/User.master";
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
da = new SqlDataAdapter("SELECT distinct(uniname) FROM [university]", cn);
da.Fill(dt);
for (int i = 0; i < dt.Rows.Count; i++)
{
universityDDL.Items.Add(dt.Rows[i][0].ToString());
}
}
//tabdetail.Visible = false;
}
protected void universityDDL_SelectedIndexChanged(object sender, EventArgs e)
{
collegeDDL.Items.Clear();
collegeDDL.Items.Insert(0, "--------------------Select--------------------");
if (universityDDL.SelectedIndex != 0)
{
da = new SqlDataAdapter("select distinct(clgname) from college where
uniid=(select uniid from university where
uniname='"+universityDDL.SelectedValue.ToString()+"')", cn);
da.Fill(dt);
for (int i = 0; i < dt.Rows.Count; i++)
{
collegeDDL.Items.Add(dt.Rows[i][0].ToString());
}
}
GridView1.DataSource = "";
GridView1.DataBind();
DetailsView1.DataSource = "";
DetailsView1.DataBind();
DetailsView2.DataSource = "";
DetailsView2.DataBind();
//tabdetail.Visible = false;
}
protected void collegeDDL_SelectedIndexChanged(object sender, EventArgs e)
{
da=new SqlDataAdapter("select clginfo from college where
clgname='"+collegeDDL.SelectedValue.ToString()+"'",cn);
dt.Clear();
da.Fill(dt);

DetailsView1.DataSource = dt;
DetailsView1.DataBind();
da = new SqlDataAdapter("select coursecode from courses where courseid in (select
courseid from course_clg where clgid=(select clgid from college where clgname='" +
collegeDDL.SelectedValue.ToString() + "'))", cn);
dt.Clear();
da.Fill(dt);
GridView1.DataSource = dt;
GridView1.DataBind();
DetailsView2.DataSource = "";
DetailsView2.DataBind();
//tabdetail.Visible = false;
}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
da = new SqlDataAdapter("SELECT * FROM courses WHERE coursecode='" +
GridView1.SelectedRow.Cells[0].Text + "' and courseid in (select courseid from course_clg
where clgid=(select clgid from college where clgname='" +
collegeDDL.SelectedValue.ToString() + "' and uniid=(select uniid from university where
uniname='" + universityDDL.SelectedValue.ToString() + "')))", cn);
dt.Clear();
da.Fill(dt);
DetailsView2.DataSource = dt;
DetailsView2.DataBind();
//tabdetail.Visible = true;
//cinfotext.Text = dt.Rows[0][5].ToString();
}
}

using
using
using
using
using
using
using
using
using
using
using
using
using

System;
System.Collections;
System.Configuration;
System.Data;
System.Data.SqlClient;
System.Linq;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.HtmlControls;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Xml.Linq;

public partial class forumnew_forum : System.Web.UI.Page


{
SqlConnection con = new
SqlConnection(ConfigurationManager.ConnectionStrings["courseinfo"].ToString());
//string prepageurl = HttpContext.Current.Request.Url.AbsolutePath;
void Page_PreInit()
{
if (Session["id"] == null)
{
Page.MasterPageFile = "~/master/Masterhometable.master";
}
else
{
Page.MasterPageFile = "~/master/User.master";
}
}
protected void Page_Load(object sender, EventArgs e)
{
//string catid = Request.QueryString["catid"].ToString();
if (Session["id"] == null)
{
//string prepageurl1 = prepageurl.Replace("/courseinfo/home", "..");
////string prepageurl2 = prepageurl1 + "?catid=" + catid;
Session["prepageurl"] = "../forumnew/forum.aspx";
btnnewtopic.Visible = false;
}
else
{
btnnewtopic.Visible = true;
}
SqlDataAdapter da = new SqlDataAdapter("select
forumq.Id,email,firstname,lastname,Date_Of_Posting,Description,Views from profile
p,forumq where p.id=forumq.userid order by Question_Id Desc", con);
DataTable dt = new DataTable();
da.Fill(dt);
gvissue.DataSource = dt;
gvissue.DataBind();
}

protected void btnnewtopic_Click(object sender, EventArgs e)


{
Session["qid"] = null;
if (Session["id"] != null)
{
Response.Redirect("newtopic.aspx");
}
else
{
Response.Redirect("../home/login.aspx");
}
}

Potrebbero piacerti anche