1. Smart Board 2014
BONAFIDE CERTIFICATE
This is to certify that the minor project work entitled “SMART BOARD
(Departmental E-info System)” being submitted by Rupai Bhadra (Roll
No.14301211019), in partial fulfillment of the requirements for the award of the
degree of Bachelor of Computer Application (BCA) in the Department of
Computer Applications at GNIT under West Bengal University Of Technology,
Kolkata for the Academic Year 2011-2014. It is a record of bonafide work done by
them under my supervision. These students who participated in this Project were
loyal to their work.
Wish her all the success.
_________________________ _________________________
Mr. Chiranjib Dutta Ms. Sharmihtha Dey
Asst. Prof. & Project Coordinator (BCA) Assistant Professor & Project Guide
Department of Computer Application, Department of Computer Application,
GNIT, Kolkata. GNIT, Kolkata.
_____________________________ _____________________________
Mr. Animesh Kar, External Examiner
Asst. Prof. & Head,
Department of Computer Application,
GNIT, Kolkata.
Date:
Place:
Acknowledgement
We are taking this opportunity to express our gratitude and thanks to all our faculties, staff
members and all other people of this esteemed institution.
2. Smart Board 2014
We also owe a great deal to our classmates and teachers, without whom we would have never,
succeed in approaching the project systematically.
Our special thanks to-
1. Mr. Animesh Kar (Asst. Professor & Head of Department (HOD) Department Of
Computer Application).
2. Ms. Sharmistha Dey (Assistant Professor & Project Guide(BCA))
We are once again grateful to above mention people who deserve due credit for enabling us
to take on this project and for being with us till the end.
______________________________
Ms. Rupai Bhadra
CONTENT OF TABLE
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 3
3. Smart Board 2014
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 4
C
h
a
p
t
e
r
N
o
.
I
T
Title
Page
No.
Preface
Acknowledgement 3
1
Abstract 5
2
Introduction 6
2
Project Profile 6
2
Project summary 6
2
Objective 7
3
Analysis of Project 7
3
Analysis Existing System 7
3
Description of Proposed System 8
3
Features of New system 9
3
Tools To Be Used 9
4
Hardware & Software Requirement 10
4
Hardware Requirement 10
4
Software Requirement 11
5
System Design 12
5.1 Data Flow Diagram 12
5.2 ER-Diagram 15
5.3 Page Flow Diagram 17
5.4 Database Design 19
Snap shot 22
4. Smart Board 2014
1. ABSTRACT
“Smart Board” is basically for the digital information system for the computer
application department containing the information regarding questions, assignments and other
departmental events or activities. At front-end, this site facilitates the interested students or
teachers to get them-selves registered, and there by search information as per their preference or
to download or upload assignments or question paper. “Smart Board” is a website where students
and teachers can get a glimpse of the departmental activities.
It has mainly three types of users – Admin, Teacher and Students. Other external users can
visit the website without logging in to the system. Admin has the power to create, delete or
manipulate an user, can create any news event, view overall status of the system, read students’
feedback or comment. Teacher can upload any assignment or update their personal profile
mainly. Students are allowed to download questions or assignment, post comment, view status,
but they cannot upload any information.
ASP.NET version 2010 and SQL Server 2008 has been used to develop this web based systems
and design databases.
Since, as we mentioned above that it requires much less amount of cost, it uses computer
Work so it is very fast to operate and it is very easy for user to work on it.
2. Introduction of the project:
In today’s world, lots of new inventions are made according to our needs. The mostly used
invention today, is a computer and its latest software. In all fields we came across the use of
computer. We use them in every field. Likewise, using the “Smart Board” system we can get a
quick look of the overall system and an easy accessibility of the system.
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 5
5. Smart Board 2014
2.1 Project Profile
2.2. Project summaries
Now day internet areas Most of youngster now saves their time on website such as find
any information of related college or any other. I tried to make my web site user friendly. User
can do sing up, do register, and find to information of my college.
User can add comment on their experience but it cannot able to delete it. User can find the
product from product name or model. User can see and sale product, it cannot change or upgrade
product, it can do only admin.
2.3 objectives
My project Smart board is an website to get the information about several events and
activities regarding our department. In this user can create own personal account. Each User
easily logs in personal account and get the data for college. User can also be search the faculty,
our friends and etc.
The system can access by every students/faculties/ or any other users of the institution
through the website by signing in.
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 6
Project Name Smart Board
Project Objective Maintain digital information.
Developed For GNIT
Developed At Gurunanak Institute Of Technology
Front-End Microsoft Visual Studio 2010,ASP.NET
Back-End MS SQL Server 2005
Internal Guide Mrs. Sharmishtha Dey
External Guide Mr. Majid Mallik
Developed By Kaushik Bhadra(8981690445)
Kaushik Chakraborty(9804896906)
Saikat Rakshit (9038291906)
Rupai Bhadra (9038164832)
6. Smart Board 2014
3. ANALYSIS OF PROJECT
3.1. Description of Existing System
Presently the system is in a discrete form. There is no as such centralized form for
keeping each and every activity in the department. File system has been maintained mostly. Data
is maintained in excel files.
LIMITATIONS OF PRESENT SYSTEM
The user must always be available with the system to do the process. The
user has to enter the details all time. So the process is time consuming.
3.2 Proposed System
“Smart Board” is the departmental website for keeping track of departmental activities and
current events. Website makes it simple and easy to gather information when you're searching
through the Internet. The Internet is the largest source of knowledge in the world. All you need is
a website.
To grow as a premier education and research institute in the field of Engineering with global
view point and serving world class standards conferring excellence to the engineering products
through dedicated and competent engineers.
To grow Engineering institution of excellence with the environment of commitments and
continuous learning approach.
The proposed system Follow:
1. It is automated computerized web based software system.
2. It uses latest technologies like ASP.NET and SQL Server.
3. It is easy to operate.
4. Attractive User Interface
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 7
7. Smart Board 2014
ADVANTAGES
This website is benefit to the student for Admission section and saving the timing. This
website is benefit to the college activities, and other details are known. This website is
used academic Institute Technology. This website is advantage for content all faculties
and students friends and solved to the any problem easily.
Feasibility Study
It is to serve as a decision document. It has three questions to answer.
Since, the present system is manual all the work is done in papers and ink by hand so it is much
costly and difficult to use and to operate and it is also time consuming. So our automated
computerized student admission system is much feasible, in cost, time
and efforts as compare to the previous manual system. It is economically feasible, it will only
require a single operator to operate the system, who
is responsible for entering the data into the database via a user interface provided to him,
who can also able to show all the data in html tabular form so to provide information
regarding the students who are either taken admission or to take admission, since it requires
only a single person to operate the whole system thus reduces the cost to operate the system.
It is technically feasible, since the whole system is designed into the latest technologies like
ASP.NET and MS Access and SQL Server which are the most recent technologies to
develop web based systems and design databases.
It uses the latest hardware technologies like P4 Systems so easy to operate.
It is Behavioral feasible, since the system is providing a attractive user interface to the
Operator or end user, so he feels very easy to work onto it. Response to operator/end user is
Very fast and very good.
Since, as we mentioned above that it requires much less amount of cost, it uses computer work
so it is very fast to operate and it is very easy for user to work on it.
Working of the Present System:-
In present, all work is done manually by hand in bulk of files which is hard to operate and hard
to maintain the reports of the student presently, took admission in institute.
1. When the student comes in college.
2. First of all, he/she takes admission form from reception.
3. Fills it and submits it into office.
4. Filled form is first checked with documents like merit list and details came from university
and verified by an official person, if there is any mistake then it is corrected.
5. At the time of submission of it the fees is deposited by the candidate.
6. At the time of submission of admission form enrollment no. is assigned to the candidate by the
institute.
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 8
8. Smart Board 2014
7. Candidate gets the receipt of fees deposition.
Disadvantages of Present System:-
1. Require much man power i.e. much efforts, much cost and hard to operate and maintain.
2. Since, all the work is done in papers so it is very hard to locate a particular student record
when it is required.
3.3 Features of New system
Evaluated links complement the web site’s content.
Educational web sites should be accessible or useable on all computer systems in the
school.
Using computerize system time is saving and it less man power required.
Quick problems or requirement solved through new system.
3.4 TOOLS TO BE USED
MICROSOFT VISUAL STUDIO
Microsoft Visual Studio is Microsoft’s flagship software development product for
computer programmers. It centers on an integrated distribution environment which has
programmers create stand alone, and web services that run on any platforms supported by
Microsoft’s .Net Framework (for all versions after 6). Supported platforms include Microsoft
windows, servers and workstations, Pocket PC, Smart Phones and World Wide Web browsers
not the Java Virtual Machine that all other java tools target.
VISUAL STUDIO 2010
.NET FRAMEWORK SDK
The .NET framework is an integral windows component that supports building and
running the next generation of applications and XML web services. The key component of the
.NET frame work are the common language run time and the. NET frame work class library,
which includes ADO.NET, ASP.NET and windows forms. The .NET framework provides a
managed execution environment simplified development and deployment and integration with a
wide variety of programming languages.
This framework is made up of the following parts:
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 9
9. Smart Board 2014
The common language runtime(CLR)
The base class libraries.
Object oriented interring web forms
4. HARDWARE & SOFTWARE REQUIREMENT
4.1. HARDWARE REQUIREMENT
The selection of hardware is very important in the existence and proper working of any
software. When selecting hardware, the size and requirements are also important.
Server Side
HARDWARE
PROCESSOR : Intel Pentium core2 UDO
HARD DISK : 60 GB
RAM : 512 MB
Client Side
HARDWARE
PROCESSOR : Intel Pentium-IV (533 MHz)
HARD DISK : 1 GB
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 10
10. Smart Board 2014
RAM : 512 MB
4.2. SOFTWARE REQUIREMENT
The selection of Software is very important in the existence and proper working of
any hardware. When selecting hardware or Software, the size and requirements are also
important.
Server Side
SOFTWARE
OPERATING SYSTEM : Windows XP or above
SOFTWARE FRAMEWORK : .NET Framework 3.5 with c#
DATABASE SERVER : SQL Server 2005
WEB SERVER : IIS 5.0
Client Side
SOFTWARE
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 11
11. Smart Board 2014
OPERATING SYSTEM : Windows xp-sp3
WEB BROWSER : Microsoft Internet Explorer (equally
Compatible or above)
Front-End:- Asp.Net-2010
ASP.NET is the Microsoft Technology for building dynamic, database driven Website.
ASP.NET is one of the most popular Technologies for building scalable, interactive Website. It
is a new and Powerful server side technology for creating dynamic web pages.
ASP.NET is a technology that comprises the Microsoft. NET framework. It allows us to
use a full featured programming language such as c# or VB.NET to build web application
easily. ASP.NET application is built on Common Language Runtime (CLR).
Back end:-Microsoft SQL Server 2008
SQL Server 2008 Database Engine Enhancements
The database engine in the new Microsoft SQL Server has been extensively
re-worked to improve both absolute performance and multiprocessor scaling in DSS
environments, without the need for the administrator to manually tune the system. The
details of these improvements are summarized below.
5. SYSTEM DESIGN
5.1 Data Flow Diagram
DATA FLOW DIAGRAM SYMBOLS
-Source or Destination of data
- Data Flow
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 12
12. Smart Board 2014
- Process
- Storage
Steps to Construct Data Flow Diagrams
Four steps are commonly used to construct a DFD
Process should be named and numbered for easy reference. Each name should be
representative of the process.
The destination of flow is from top to bottom and from left to right.
When a process is exploded in to lower level details they are numbered.
The names of data stores, sources and destinations are written in capital letters.
Rules for constructing a Data Flow Diagram
Arrows should not cross each other.
Squares, circles and files must bear names.
Decomposed data flow squares and circles can have same names.
Draw all data flow around the outside of the diagram.
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 13
13. Smart Board 2014
Data Flow Diagrams Of College Information System
DFD for Staff Management
5.2 ENTITY RELATIONSHIP DIAGRAM
Entity-Relation Analysis
Entity-relationship analysis uses three major abstractions to describe data.
1. Entity
2. Attribute
3. Relationship
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 14
14. Smart Board 2014
Entity: Which are distinct things in the enterprise?
Symbol:
Attribute: Which are meaningful interactions between the objects.
Symbol:
Relationship: Which are the properties of the entities and relationship
Symbol:
Entity relationship is described by their dependence on each other, as well as by the extent of
relationship.
5.3 ER Diagram:
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 15
15. Smart Board 2014
5.6 Page Flow Diagram
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 16
17. Smart Board 2014
5.5 Database Design
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 18
L1
L2
18. Smart Board 2014
1. Contact_info
No Field Name Data Type Constraints
1 id Int Primary key
2 name Varchar(50) Not null
5 address Varchar(50) Not null
4 state Varchar(50) Not null
5 city Varchar(50) Not null
6 Country Varchar(50) Not null
7 email Varchar(50) Not null
8 phone Varchar(50) Not null
2. Course
No Field Name Data Type Constraints
1 C_name Varchar(50) Primary key
2 C_intake int Not null
3 C_code Varchar(10) Not null
3. department
No Field Name Data Type Constraints
1 dept_id Int Primary key
2 Dept_name Varchar(50) Not null
4. faculty_list
No Field Name Data Type Constraints
1 f_name Varchar(50) Primary key
2 desg Varchar(50) Not null
3 branch Varchar(50) Foreign key
5. faculty_info
No Field Name Data Type Constraints
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 19
19. Smart Board 2014
1 id Varchar(50) Primary key
2 fname Varchar(50) Not null
3 lname Varchar(50) Not null
4 qualification Varchar(50) Foreign key
5 desg Varchar(50) Not null
6 Exep int Not null
7 Interest Varchar(max) Not null
8 Img_url Varchar(max) Not null
6. file_upload
No Field Name Data Type Constraints
1 File_title Varchar(50) Not null
2 File_url Varchar(50) Not null
7. NewsTitle
No Field Name Data Type Constraints
1 id int Primary Key
2 Title Varchar(50) Not Null
3 NewsUrl Varchar(MAX) Not Null
8. Stu_corner
No Field Name Data Type Constraints
1 Image_title Varchar(max) Primary key
2 Branch_title Varchar(max) Not null
3 Result_detail Varchar(max) Not null
4 Stu_feedback Varchar(max) Not null
5 Image_url Varchar(max) Foreign key
9. Stu_data
No Field Name Data Type Constraints
1 En Varchar(50) Primary key
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 20
20. Smart Board 2014
2 Sname Varchar(50) Not null
3 Branch Varchar(50) Not null
4 Sem Varchar(50) Not null
5 Contact Varchar(50) Not null
6 Email Varchar(50) Not null
7 result Varchar(50) Not null
10. Student_profile
No Field Name Data Type Constraints
1 s_name Varchar(50) Primary key
2 Gen Varchar(50) Not null
3 branch Varchar(50) Not null
4 year Varchar(50) Not null
11. Login
No Field Name Data Type Constraints
1 Login_id Varchar(50) Primary key
2 Login_pwd Varchar(50) Not null
12. stu_mail
No Field Name Data Type Constraints
1 stu_name Varchar(50) Primary key
2 Stu_en Varchar(50) Not null
3 Stu_email Varchar(50) Not null
4 Stu_contactno int Not null
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 21
21. Smart Board 2014
6. Snap ShotS
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 22
35. Smart Board 2014
7. CODING
CONTACT US
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Security;
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 36
36. Smart Board 2014
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.Windows.Forms;
public partial class client_contact : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data
Source=.SQLEXPRESS;AttachDbFilename=C:UserscomputerDocumentsVisual Studio
2010ProjectsCollege_InformationApp_Dataserver.mdf;Integrated Security=True;User Instance=True");
SqlCommand cmd;
protected void Button1_Click(object sender, EventArgs e)
{
try
{
SqlCommand cmd = new SqlCommand("insert into contact_info values('" + TextBox1.Text.ToString()
+ "','" + TextBox2.Text.ToString() + "','" + TextBox3.Text.ToString() + "','" + TextBox8.Text.ToString() +
"','" + TextBox4.Text.ToString() + "','" + TextBox5.Text.ToString() + "','" + TextBox6.Text.ToString() +
"','" + TextBox7.Text.ToString() + "')", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("Successfully......");
}
catch (Exception ex)
{
MessageBox.Show("error.." + ex.Message);
}
}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox1.Text = string.Empty;
TextBox2.Text = string.Empty;
TextBox3.Text = string.Empty;
TextBox4.Text = string.Empty;
TextBox5.Text = string.Empty;
TextBox6.Text = string.Empty;
TextBox7.Text = string.Empty;
TextBox8.Text = string.Empty;
MessageBox.Show("All Field Are Cleared......");}
}
Department
using System;
using System.Collections;
using System.Configuration;
using System.Data;
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.Data.SqlClient;
public partial class client_department : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=.SQLEXPRESS;AttachDbFilename=|
DataDirectory|server.mdf;Integrated Security=True;User Instance=True");
SqlCommand cmd;
public void BCA ()
{
SqlDataAdapter dit = new SqlDataAdapter("select * from faculty_list where branch='BCA'", con);
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 37
37. Smart Board 2014
DataSet ds = new DataSet();
dit.Fill(ds);
DataList1.DataSource = ds;
DataList1.DataBind();
}
public void MCA()
{
SqlDataAdapter dce = new SqlDataAdapter("select * from faculty_list where branch='MCA'", con);
DataSet ds = new DataSet();
dce.Fill(ds);
DataList1.DataSource = ds;
DataList1.DataBind();
}
protected void LinkButton1_Click1(object sender, EventArgs e)
{
Label1.Text = "Faculty of BCA Department";
BCA();
}
protected void LinkButton2_Click(object sender, EventArgs e)
{
Label1.Text = "Faculty of MCA Department";
MCA();
}
}
Download
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
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.Windows.Forms;
public partial class client_download : System.Web.UI.Page
{
// SqlConnection con = new SqlConnection(@"Data Source=.sqlexpress;Initial
Catalog=college_information;Integrated Security=True");
SqlConnection con = new SqlConnection(@"Data
Source=.SQLEXPRESS;AttachDbFilename=C:UserscomputerDocumentsVisual Studio
2010ProjectsCollege_InformationApp_Datacollege_information.mdf;Integrated Security=True;User
Instance=True");
SqlCommand cmd;
protected void Page_Load(object sender, EventArgs e)
{
string str = "select * from NewsEvents order by id ASC";
SqlDataAdapter da = new SqlDataAdapter(str,con);
DataSet ds = new DataSet();
da.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
}
Faculty Information
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 38
38. Smart Board 2014
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
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.Windows.Forms;
public partial class client_faculty : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=.SQLEXPRESS;AttachDbFilename=|
DataDirectory|server.mdf;Integrated Security=True;User Instance=True");
SqlCommand cmd;
protected void Page_Load(object sender, EventArgs e)
{
Default_show();
}
protected void LinkButton3_Click(object sender, EventArgs e)
{
Default_show();
}
protected void LinkButton4_Click(object sender, EventArgs e)
{
second_data();
}
public void Default_show()
{
SqlDataAdapter da = new SqlDataAdapter("select * from feculty_info where id IN (2,3,4,5) ", con);
DataSet ds = new DataSet();
da.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
public void second_data()
{
SqlDataAdapter da = new SqlDataAdapter("select * from feculty_info where id IN (6,7,8,9,10) ",
con);
DataSet ds = new DataSet();
da.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
}
Faculty Search
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
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;
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 39
39. Smart Board 2014
using System.Xml.Linq;
using System.Windows.Forms;
public partial class client_faculty_search : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=.SQLEXPRESS;AttachDbFilename=|
DataDirectory|server.mdf;Integrated Security=True;User Instance=True");
SqlCommand cmd;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
if (TextBox1.Text == "")
{
Label7.Text = "";
MessageBox.Show("Must Fill up the field....");
}
else
{
Label7.Text = TextBox1.Text.ToString();
SqlCommand cmd = new SqlCommand("SELECT [fname], [qualification], [desg], [exp], [interest],
[imageurl] FROM feculty_info WHERE fname='" + TextBox1.Text.ToString() + "'", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
}
}
Student Information
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
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.Windows.Forms;
public partial class client_Student : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=.SQLEXPRESS;AttachDbFilename=|
DataDirectory|server.mdf;Integrated Security=True;User Instance=True");
SqlCommand cmd;
protected void Page_Load(object sender, EventArgs e)
{
Default_show();
}
protected void LinkButton2_Click(object sender, EventArgs e)
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 40
41. Smart Board 2014
SqlDataAdapter da = new SqlDataAdapter("select * from student_profile where id IN (6,7,8,9,10) ",
con);
DataSet ds = new DataSet();
da.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
public void third_data()
{
SqlDataAdapter da = new SqlDataAdapter("select * from student_profile where id IN (11,12,13,14,15)
", con);
DataSet ds = new DataSet();
da.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
public void fourth_data()
{
SqlDataAdapter da = new SqlDataAdapter("select * from student_profile where id IN (18,19,20,21,22)
", con);
DataSet ds = new DataSet();
da.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
public void fifth_data()
{
SqlDataAdapter da = new SqlDataAdapter("select * from student_profile where id IN (23,24,25,26,27)
", con);
DataSet ds = new DataSet();
da.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
public void sixth_data()
{
SqlDataAdapter da = new SqlDataAdapter("select * from student_profile where id IN (28,29,30,31,32)
", con);
DataSet ds = new DataSet();
da.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
public void seventh_data()
{
SqlDataAdapter da = new SqlDataAdapter("select * from student_profile where id IN (33,34,35,36) ",
con);
DataSet ds = new DataSet();
da.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
public void eight_data()
{
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 42
42. Smart Board 2014
SqlDataAdapter da = new SqlDataAdapter("select * from student_profile where id IN (37,38,39,40) ",
con);
DataSet ds = new DataSet();
da.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
public void nineth_data()
{
SqlDataAdapter da = new SqlDataAdapter("select * from student_profile where id IN (41,42,43,44,45)
", con);
DataSet ds = new DataSet();
da.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
public void tenth_data()
{
SqlDataAdapter da = new SqlDataAdapter("select * from student_profile where id IN (46,47,48,49,50)
", con);
DataSet ds = new DataSet();
da.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
public void eleven_data()
{
SqlDataAdapter da = new SqlDataAdapter("select * from feculty_info where id IN (51,52,53,54) ",
con);
DataSet ds = new DataSet();
da.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
public void twelve_data()
{
SqlDataAdapter da = new SqlDataAdapter("select * from student_profile where id IN (55,56,57,58) ",
con);
DataSet ds = new DataSet();
da.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
public void thirteen_data()
{
SqlDataAdapter da = new SqlDataAdapter("select * from student_profile where id IN (59,60,61,62) ",
con);
DataSet ds = new DataSet();
da.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
public void fourteen_data()
{
SqlDataAdapter da = new SqlDataAdapter("select * from student_profile where id IN (63,64,65) ",
con);
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 43
43. Smart Board 2014
DataSet ds = new DataSet();
da.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("Student_Search.aspx");
}
protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
{
}
}
Student Search
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
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.Windows.Forms;
public partial class client_Student_Search : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=.SQLEXPRESS;AttachDbFilename=|
DataDirectory|server.mdf;Integrated Security=True;User Instance=True");
SqlCommand cmd;
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
//string str = "select sname,Branch,sem,contact,email,result from stu_data where
en='"+TextBox1.Text.ToString()+"'";
SqlCommand cmd = new SqlCommand("select sid,en,sname,Branch,sem,contact,email,result from stu_data
where en='" + TextBox1.Text.ToString() + "'", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
DataList1.DataSource = ds;
DataList1.DataBind();
}
protected void DataList1_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
Admin Login
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web;
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 44
44. Smart Board 2014
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.Windows.Forms;
public partial class admin_admin_login : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=.sqlexpress;Initial
Catalog=college_information;Integrated Security=True");
SqlCommand cmd;
protected void Button1_Click(object sender, EventArgs e)
{
// Response.Redirect("admin_home.aspx");
try
{
SqlCommand cmd = new SqlCommand("insert into login values('" + TextBox1.Text.ToString() +
"','" + TextBox2.Text.ToString() + "') ", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
catch (Exception ex)
{
MessageBox.Show("Error..." + ex.Message);
}
}
protected void Button2_Click(object sender, EventArgs e)
{
try
{
SqlCommand cmd = new SqlCommand("update login set logid_id='" + TextBox1.Text.ToString() +
"',login_pwd='" + TextBox2.Text.ToString() + "' where logid='"+TextBox3.Text.ToString()+"' ", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("Record Updated...");
}
catch (Exception ex)
{
MessageBox.Show("Error..." + ex.Message);
}
}
}
Admin Home
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
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.Windows.Forms;
public partial class admin_admin_home : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=.sqlexpress;Initial
Catalog=college_information;Integrated Security=True");
SqlCommand cmd;
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 45
45. Smart Board 2014
protected void Page_Load(object sender, EventArgs e)
{
Label2.Text = DateTime.Now.ToString();
display();
}
public void display()
{
SqlDataAdapter da = new SqlDataAdapter("select * from contact_info ",con);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}
}
Admin Courses
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
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.Windows.Forms;
public partial class admin_admin_cources : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=.sqlexpress;Initial
Catalog=college_information;Integrated Security=True");
SqlCommand cmd;
protected void Page_Load(object sender, EventArgs e)
{
display();
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
SqlCommand cmd = new SqlCommand("insert into course values('" + TextBox4.Text.ToString() +
"','" + TextBox1.Text.ToString() + "','" + TextBox2.Text.ToString() + "') ", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
catch(Exception ex)
{
MessageBox.Show("Error..."+ex.Message);
}
}
protected void Button2_Click(object sender, EventArgs e)
{
try
{
SqlCommand cmd = new SqlCommand("update course set course_id='" + TextBox4.Text.ToString() +
"',course_name='" + TextBox1.Text.ToString() + "',course_intake='" + TextBox2.Text.ToString() + "' where
id='" + TextBox4.Text.ToString() + "' ", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
catch (Exception ex)
{
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 46
46. Smart Board 2014
MessageBox.Show("Error..." + ex.Message);
}
}
protected void Button3_Click(object sender, EventArgs e)
{
try
{
SqlCommand cmd = new SqlCommand("delete from course where id='" + TextBox4.Text.ToString() +
"'", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
catch (Exception ex)
{
MessageBox.Show("Record Not Deleted...." + ex.Message);
}
}
public void display()
{
SqlDataAdapter da = new SqlDataAdapter("select * from course",con);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}
Admin Department
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
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.Windows.Forms;
public partial class admin_admin_department : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=.sqlexpress;Initial
Catalog=college_information;Integrated Security=True");
SqlCommand cmd;
protected void Button1_Click(object sender, EventArgs e)
{
try
{
SqlCommand cmd = new SqlCommand("insert into department values('" + TextBox1.Text.ToString() +
"') ", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
catch (Exception ex)
{
MessageBox.Show("Error..." + ex.Message);
}
}
protected void Button2_Click(object sender, EventArgs e)
{
try
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 47
47. Smart Board 2014
{
SqlCommand cmd = new SqlCommand("update department set deptname='" + TextBox1.Text.ToString()
+ "' where id='" + TextBox4.Text.ToString() + "' ", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
catch (Exception ex)
{
MessageBox.Show("Error..." + ex.Message);
}
}
protected void Button3_Click(object sender, EventArgs e)
{
try
{
SqlCommand cmd = new SqlCommand("delete from department where id='" + TextBox4.Text.ToString()
+ "'", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
catch (Exception ex)
{
MessageBox.Show("Record Not Deleted...." + ex.Message);
}
}
}
Admin Download
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
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.Windows.Forms;
public partial class admin_admin_download : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=.sqlexpress;Initial
Catalog=college_information;Integrated Security=True");
SqlCommand cmd;
protected void Button1_Click(object sender, EventArgs e)
{
string[] validFileTypes = { "txt", "doc", "xls", "pdf" };
string ext = System.IO.Path.GetExtension(FileUpload1.PostedFile.FileName);
bool isValidFile = false;
for (int i = 0; i < validFileTypes.Length; i++)
{
if (ext == "." + validFileTypes[i])
{
isValidFile = true;
break;
}
}
if (!isValidFile)
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 48
48. Smart Board 2014
MessageBox.Show("File Extension Not Mathed....");
}
else
{
string strfilepath = Path.GetFileName(FileUpload1.PostedFile.FileName.ToString());
string mypath = Server.MapPath(@"~/admin/NewsAndEvents/" + strfilepath);
FileUpload1.PostedFile.SaveAs(mypath);
SqlCommand cmd = new SqlCommand("insert into NewsEvents values('" + TextBox1.Text.ToString() +
"','" + TextBox2.Text.ToString() + "','" + "~/admin/NewsAndEvents/" + strfilepath + "') ", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("Successfully Uploaded....");
}
}
}
Admin Faculty
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
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.Windows.Forms;
public partial class admin_admin_feculty : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=.sqlexpress;Initial
Catalog=college_information;Integrated Security=True");
SqlCommand cmd;
protected void Page_Load(object sender, EventArgs e)
{
show();
}
protected void Button1_Click(object sender, EventArgs e)
{
string[] validFileTypes = { "bmp", "gif", "png", "jpg", "jpeg","GIF" };
string ext = System.IO.Path.GetExtension(FileUpload1.PostedFile.FileName);
bool isValidFile = false;
for (int i = 0; i < validFileTypes.Length; i++)
{
if (ext == "." + validFileTypes[i])
{
isValidFile = true;
break;
}
}
if (!isValidFile)
{
MessageBox.Show("File Extension Not Mathed....");
}
else
{
string strfilepath = Path.GetFileName(FileUpload1.PostedFile.FileName.ToString());
string mypath = Server.MapPath(@"~/admin/feculty/" + strfilepath);
FileUpload1.PostedFile.SaveAs(mypath);
SqlCommand cmd = new SqlCommand("insert into feculty_info values('" + TextBox1.Text.ToString()
+ "','" + TextBox2.Text.ToString() + "','" + TextBox3.Text.ToString() + "','" + TextBox4.Text.ToString() +
"','" + TextBox6.Text.ToString() + "','" + TextBox5.Text.ToString() + "','" + "~/admin/feculty/" +
strfilepath + "')", con);
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 49
49. Smart Board 2014
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("File Successfully Stored In DataBase....");
}
}
protected void Button2_Click(object sender, EventArgs e)
{
}
protected void Button3_Click(object sender, EventArgs e)
{
try
{
SqlCommand cmd = new SqlCommand("delete from feculty_info where id='" +
TextBox7.Text.ToString() + "'", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("Delete Record...ID is :'" + TextBox7.Text.ToString() + "'");
}
catch (Exception ex)
{
MessageBox.Show("Record Not Deleted...." + ex.Message);
}
}
protected void Button4_Click(object sender, EventArgs e)
{
TextBox1.Text = string.Empty;
TextBox2.Text = string.Empty;
TextBox3.Text = string.Empty;
TextBox4.Text = string.Empty;
TextBox5.Text = string.Empty;
TextBox6.Text = string.Empty;
TextBox7.Text = string.Empty;
}
public void show()
{
SqlDataAdapter da = new SqlDataAdapter("select * from feculty_info",con);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}
}
Admin Faculty list
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
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.Windows.Forms;
public partial class admin_admin_fecultylist : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=.sqlexpress;Initial
Catalog=college_information;Integrated Security=True");
SqlCommand cmd;
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 50
51. Smart Board 2014
GridView1.DataBind();}
}
Admin File Upload
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
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.Windows.Forms;
public partial class admin_admin_fileupload : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data
Source=.SQLEXPRESS;AttachDbFilename=C:UserscomputerDocumentsVisual Studio
2010ProjectsCollege_InformationApp_Dataserver.mdf;Integrated Security=True;User Instance=True");
SqlCommand cmd;
protected void Page_Load(object sender, EventArgs e)
{
show();
}
protected void Button1_Click(object sender, EventArgs e)
{
//FileUpload1.PostedFile.FileName=="*.pdf" || FileUpload1.PostedFile.FileName=="*.docx" ||
FileUpload1.PostedFile.FileName=="*.txt"
string[] validFileTypes = { "txt", "doc", "xls", "pdf" };
string ext = System.IO.Path.GetExtension(FileUpload1.PostedFile.FileName);
bool isValidFile = false;
for (int i = 0; i < validFileTypes.Length; i++)
{
if (ext == "." + validFileTypes[i])
{
isValidFile = true;
break;
}
}
if (!isValidFile)
{
MessageBox.Show("File Extension Not Mathed....");
}
else
{
string strfilepath = Path.GetFileName(FileUpload1.PostedFile.FileName.ToString());
string mypath = Server.MapPath(@"~/admin/files/" + strfilepath);
FileUpload1.PostedFile.SaveAs(mypath);
SqlCommand cmd = new SqlCommand("insert into file_upload values('" + TextBox1.Text.ToString()
+ "','" + "~/admin/files/" + strfilepath + "') ", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("Successfully Uploaded....");
}
}
public void show()
{
SqlDataAdapter da = new SqlDataAdapter("select * from file_upload ",con);
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 52
52. Smart Board 2014
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}
}
Admin News Event
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
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.Windows.Forms;
public partial class admin_admin_newsevents : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=.sqlexpress;Initial
Catalog=college_information;Integrated Security=True");
SqlCommand cmd;
protected void Button1_Click(object sender, EventArgs e)
{
string[] validFileTypes = { "txt", "doc", "xls", "pdf" };
string ext = System.IO.Path.GetExtension(FileUpload1.PostedFile.FileName);
bool isValidFile = false;
for (int i = 0; i < validFileTypes.Length; i++)
{
if (ext == "." + validFileTypes[i])
{
isValidFile = true;
break;
}
}
if (!isValidFile)
{
MessageBox.Show("File Extension Not Mathed....");
}
else
{
string strfilepath = Path.GetFileName(FileUpload1.PostedFile.FileName.ToString());
string mypath = Server.MapPath(@"~/admin/NewsAndEvents/" + strfilepath);
FileUpload1.PostedFile.SaveAs(mypath);
SqlCommand cmd = new SqlCommand("insert into NewsEvents values('" + TextBox1.Text.ToString() +
"','" + "~/admin/NewsAndEvents/" + strfilepath + "','" + TextBox2.Text.ToString() + "','" +
TextBox3.Text.ToString() + "') ", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("Successfully Uploaded....");
}
}
protected void Button3_Click(object sender, EventArgs e)
{
string str = "delete from NewsEvents where id='"+TextBox4.Text.ToString()+"'";
SqlDataAdapter da = new SqlDataAdapter(str,con);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 53
53. Smart Board 2014
GridView1.DataBind();
MessageBox.Show("Record are Deleted...:'"+TextBox4.Text.ToString()+"'");
}
}
Student Info
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
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.Windows.Forms;
public partial class admin_stu_info : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=.sqlexpress;Initial
Catalog=college_information;Integrated Security=True");
SqlCommand cmd;
protected void Page_Load(object sender, EventArgs e)
{
show();
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
SqlCommand cmd = new SqlCommand("insert into student_profile values('" +
TextBox1.Text.ToString() + "','" + TextBox2.Text.ToString() + "')", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("Success....");
}
catch (Exception ex)
{
MessageBox.Show("error.." + ex.Message);
}
}
protected void Button2_Click(object sender, EventArgs e)
{
try
{
SqlCommand cmd = new SqlCommand("update student_profile set stu_en='" +
TextBox1.Text.ToString() + "',stu_name='" + TextBox2.Text.ToString() + "' where id='" +
TextBox3.Text.ToString() + "' ", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
catch (Exception ex)
{
MessageBox.Show("Error..." + ex.Message);
}
}
protected void Button3_Click(object sender, EventArgs e)
{
TextBox1.Text = string.Empty;
TextBox2.Text = string.Empty;
TextBox3.Text = string.Empty;
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 54
54. Smart Board 2014
MessageBox.Show("Clear....");
}
public void show()
{
SqlDataAdapter da = new SqlDataAdapter("select * from student_profile",con);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}
}
Student E-mail
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
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.Windows.Forms;
public partial class admin_stu_email : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=.sqlexpress;Initial
Catalog=college_information;Integrated Security=True");
SqlCommand cmd;
protected void Button1_Click(object sender, EventArgs e)
{
try
{
SqlCommand cmd=new SqlCommand("insert into stu_mail values('" + TextBox1.Text.ToString() +
"','" + TextBox2.Text.ToString() + "','" + TextBox3.Text.ToString() + "','" + TextBox4.Text.ToString() +
"')",con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
catch(Exception ex)
{
MessageBox.Show("error.."+ex.Message);
}
}
protected void Button2_Click(object sender, EventArgs e)
{
try
{
SqlCommand cmd = new SqlCommand("update stu_mail set stu_name='" + TextBox1.Text.ToString() +
"',stu_en='" + TextBox2.Text.ToString() + "',stu_email='" + TextBox3.Text.ToString() + "','" +
TextBox4.Text.ToString() + "' where mailid='" + TextBox5.Text.ToString() + "' ", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
catch (Exception ex)
{
MessageBox.Show("error...."+ex.Message);
}
}
protected void Button3_Click(object sender, EventArgs e)
{
try
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 55
55. Smart Board 2014
{
SqlCommand cmd = new SqlCommand("delete form stu_mail where mailid='" +
TextBox5.Text.ToString() + "'", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
}
catch (Exception ex)
{
MessageBox.Show("Record Not Deleted...." + ex.Message);
}
}
}
Student Corner
using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
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.Windows.Forms;
public partial class admin_student_corner : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=.sqlexpress;Initial
Catalog=college_information;Integrated Security=True");
SqlCommand cmd;
protected void Page_Load(object sender, EventArgs e)
{
display();
}
protected void Button1_Click(object sender, EventArgs e)
{
try
{
string strfilepath = Path.GetFileName(FileUpload1.PostedFile.FileName.ToString());
string mypath = Server.MapPath(@"~/admin/student_topers/" + strfilepath);
FileUpload1.PostedFile.SaveAs(mypath);
SqlCommand cmd = new SqlCommand("insert into stu_corner values('" + TextBox1.Text.ToString() +
"','" + TextBox2.Text.ToString() + "','" + TextBox3.Text.ToString() + "','" + TextBox4.Text.ToString() +
"','" + "~/admin/student_topers/" + strfilepath + "') ", con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("Successfully Uploaded...");
}
catch (Exception ex)
{
MessageBox.Show("File Not Uploaded...." + ex.Message);
}
}
public void display()
{
SqlDataAdapter da = new SqlDataAdapter("select * from stu_corner",con);
DataSet ds = new DataSet();
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 56
56. Smart Board 2014
}
Style CSS
h1 {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:16px;
font-weight:bold;
margin:0;
padding:0;
}
hr {
border:none;
border-top:1px solid #CCCCCC;
height:1px;
margin-bottom:25px;
}
/* ---------------------- Dolphin nav ---------------------- */
#dolphincontainer{
position:relative;
height:56px;
color:#E0E0E0;
background:#143D55;
width:100%;
font-family:Helvetica,Arial,Verdana,sans-serif;
}
#dolphinnav{
position:relative;
height:33px;
font-size:12px;
text-transform:uppercase;
font-weight:bold;
background:#fff url(dolphin_bg.gif) repeat-x bottom left;
padding:0 0 0 20px;
}
#dolphinnav ul{
margin:0;
padding:0;
list-style-type:none;
width:auto;
float:left;
}
#dolphinnav ul li{
display:block;
float:left;
margin:0 1px;
}
#dolphinnav ul li a{
display:block;
float:left;
color:#EAF3F8;
text-decoration:none;
padding:0 0 0 20px;
height:33px;
}
#dolphinnav ul li a span{
padding:12px 20px 0 0;
height:21px;
float:left;
}
#dolphinnav ul li a:hover{
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 57
57. Smart Board 2014
color:#fff;
background:transparent url(dolphin_bg-OVER.gif) repeat-x bottom left;
}
#dolphinnav ul li a:hover span{
display:block;
width:auto;
cursor:pointer;
}
#dolphinnav ul li a.current,#dolphinnav ul li a.current:hover{
color:#fff;
background:#1D6893 url(dolphin_left-ON.gif) no-repeat top left;
line-height:275%;
}
#dolphinnav ul li a.current span{
display:block;
padding:0 20px 0 0;
width:auto;
background:#1D6893 url(dolphin_right-ON.gif) no-repeat top right;
height:33px;
}
/* ---------------------- END Dolphin nav ---------------------- */
8. BIBLIOGRAPHY
Windows programming :-Charles Petzoid
ASP. NET Unleashed :-Stephen Walther
Visual Basic .NET Black Book :-Steven Holzer
SQL Server Essential Reference :-Sharon Dooley
Professional ASP. NET Web services :-Alex Homer, Dave
Sussman
Rupai Bhadra, BCA 6th
Sem, Roll No.-14301211019
Page 58