Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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)
List of Certificate
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
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.
2.
3.
4.
Student ID Form
5.
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.
4.
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
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
NET Technology
.NET Technology is a third-generation component model. This provides a new level of
inter-operability compared to COM technology.
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
.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
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.
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
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.
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
ASP.NET.
:
C#.Net.
= Data flow
=Data store
Purpose:
Login Details
Registered User
User
New User
Registration
Registration
Process
User
Details
Authentication of The User
Login
Process
New account
Admin
User
Status
Applicant
Login
Information Form
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
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)
{
}
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;
}
}
}
}
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.
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.
FUTURE SCOPE
To admit any student ,there is only need to fill one form called student admission
form.No need to do any extra activity.
REFRENCES
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.
Database Files
Sr. No.
Table Name
Description
1.
admission
2.
branch
3.
Class
4.
Date
Contain date
5.
Leave
information
6.
Login
7.
Month
8.
Resetpwd
9.
section
10.
semester
11.
Stdmarks
information
Sr. No.
Table Name
12.
studentattendance1
Description
Contains student attendance
information
13.
studentfee1
14.
STUDENTREG
15.
Subjects
16.
teacherattendance1
17.
Teacherreg
18.
Userlogin
Contents
Head of the Departments Declaration Certificate
Supervisors Declaration Certificate
Acknowledgement
Abstract
List of Figures
Chapter 1. INTRODUCTION
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>
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
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;
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;
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;
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();
}
}
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
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;
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;