final documentation (rupai bhadra)

65
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. _____________________________ _____________________________

Upload: rupai-bhadra

Post on 23-Jan-2017

48 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: FINAL documentation (Rupai Bhadra)

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 ExaminerAsst. 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.

Page 2: FINAL documentation (Rupai Bhadra)

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

ChapterNo.

InsideTopic Title

Page

No.

Preface

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 3

Page 3: FINAL documentation (Rupai Bhadra)

Smart Board 2014

Acknowledgement 3

1Abstract 5

2Introduction 6

2.1Project Profile 6

2.2Project summary 6

2.3Objective 7

3Analysis of Project 7

3.1Analysis Existing System 7

3.2Description of Proposed System 8

3.3Features of New system 9

3.4Tools To Be Used 9

4Hardware & Software Requirement 10

4.1Hardware Requirement 10

4.2Software Requirement 11

5System Design 12

5.1 Data Flow Diagram 12

5.2 ER-Diagram 15

5.3 Page Flow Diagram 17

5.4 Database Design 19

6Snap shot 22

7Coding 29

8Bibliography 75

1. ABSTRACT

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 4

Page 4: FINAL documentation (Rupai Bhadra)

Smart Board 2014

“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.

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

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 5

Page 5: FINAL documentation (Rupai Bhadra)

Smart Board 2014

Internal Guide Mrs. Sharmishtha Dey

External Guide Mr. Majid Mallik

Developed By Kaushik Bhadra(8981690445)Kaushik Chakraborty(9804896906)Saikat Rakshit (9038291906)Rupai Bhadra (9038164832)

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.

3. ANALYSIS OF PROJECT

3.1. Description of Existing System

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 6

Page 6: FINAL documentation (Rupai Bhadra)

Smart Board 2014

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

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.

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 7

Page 7: FINAL documentation (Rupai Bhadra)

Smart Board 2014

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, timeand efforts as compare to the previous manual system. It is economically feasible, it will only require a single operator to operate the system, whois 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 informationregarding the students who are either taken admission or to take admission, since it requiresonly 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 likeASP.NET and MS Access and SQL Server which are the most recent technologies todevelop 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 theOperator or end user, so he feels very easy to work onto it. Response to operator/end user isVery 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.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.

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 8

Page 8: FINAL documentation (Rupai Bhadra)

Smart Board 2014

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 Microsoftwindows, 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:

The common language runtime(CLR)

The base class libraries.

Object oriented interring web forms

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 9

Page 9: FINAL documentation (Rupai Bhadra)

Smart Board 2014

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 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.

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 10

Page 10: FINAL documentation (Rupai Bhadra)

Smart Board 2014

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

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

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 11

Page 11: FINAL documentation (Rupai Bhadra)

Smart Board 2014

5.1 Data Flow Diagram

DATA FLOW DIAGRAM SYMBOLS

-Source or Destination of data

- Data Flow

- 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.

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 12

Page 12: FINAL documentation (Rupai Bhadra)

Smart Board 2014

Draw all data flow around the outside of the diagram.

Data Flow Diagrams Of College Information System

DFD for Staff Management

5.2 ENTITY RELATIONSHIP DIAGRAM

Entity-Relation AnalysisEntity-relationship analysis uses three major abstractions to describe data.

1. Entity

2. Attribute

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 13

Page 13: FINAL documentation (Rupai Bhadra)

Smart Board 2014

3. Relationship

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.-14301211019Page 14

Page 14: FINAL documentation (Rupai Bhadra)

Smart Board 2014

5.6 Page Flow Diagram

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 15

Page 15: FINAL documentation (Rupai Bhadra)

Smart Board 2014

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 16

L1 L2

Page 16: FINAL documentation (Rupai Bhadra)

Smart Board 2014

5.5 Database Design

1. Contact_info

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 17

L1

L2

Page 17: FINAL documentation (Rupai Bhadra)

Smart Board 2014

No Field Name Data Type Constraints1 id Int Primary key2 name Varchar(50) Not null5 address Varchar(50) Not null4 state Varchar(50) Not null5 city Varchar(50) Not null6 Country Varchar(50) Not null7 email Varchar(50) Not null8 phone Varchar(50) Not null

2. Course

No Field Name Data Type Constraints1 C_name Varchar(50) Primary key2 C_intake int Not null3 C_code Varchar(10) Not null

3. department

No Field Name Data Type Constraints1 dept_id Int Primary key2 Dept_name Varchar(50) Not null

4. faculty_list

No Field Name Data Type Constraints1 f_name Varchar(50) Primary key2 desg Varchar(50) Not null3 branch Varchar(50) Foreign key

5. faculty_info

No Field Name Data Type Constraints1 id Varchar(50) Primary key2 fname Varchar(50) Not null3 lname Varchar(50) Not null4 qualification Varchar(50) Foreign key5 desg Varchar(50) Not null

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 18

Page 18: FINAL documentation (Rupai Bhadra)

Smart Board 2014

6 Exep int Not null7 Interest Varchar(max) Not null8 Img_url Varchar(max) Not null

6. file_upload

No Field Name Data Type Constraints1 File_title Varchar(50) Not null2 File_url Varchar(50) Not null

7. NewsTitle

No Field Name Data Type Constraints1 id int Primary Key2 Title Varchar(50) Not Null3 NewsUrl Varchar(MAX) Not Null

8. Stu_corner

No Field Name Data Type Constraints1 Image_title Varchar(max) Primary key2 Branch_title Varchar(max) Not null3 Result_detail Varchar(max) Not null4 Stu_feedback Varchar(max) Not null5 Image_url Varchar(max) Foreign key

9. Stu_data

No Field Name Data Type Constraints1 En Varchar(50) Primary key2 Sname Varchar(50) Not null3 Branch Varchar(50) Not null4 Sem Varchar(50) Not null5 Contact Varchar(50) Not null6 Email Varchar(50) Not null7 result Varchar(50) Not null

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 19

Page 19: FINAL documentation (Rupai Bhadra)

Smart Board 2014

10. Student_profile

No Field Name Data Type Constraints1 s_name Varchar(50) Primary key2 Gen Varchar(50) Not null3 branch Varchar(50) Not null4 year Varchar(50) Not null

11. Login

No Field Name Data Type Constraints1 Login_id Varchar(50) Primary key2 Login_pwd Varchar(50) Not null

12. stu_mail

No Field Name Data Type Constraints1 stu_name Varchar(50) Primary key2 Stu_en Varchar(50) Not null3 Stu_email Varchar(50) Not null4 Stu_contactno int Not null

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 20

Page 20: FINAL documentation (Rupai Bhadra)

Smart Board 2014

6. Snap shots

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 21

Page 21: FINAL documentation (Rupai Bhadra)

Smart Board 2014

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 22

Page 22: FINAL documentation (Rupai Bhadra)

Smart Board 2014

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 23

Page 23: FINAL documentation (Rupai Bhadra)

Smart Board 2014

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 24

Page 24: FINAL documentation (Rupai Bhadra)

Smart Board 2014

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 25

Page 25: FINAL documentation (Rupai Bhadra)

Smart Board 2014

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 26

Page 26: FINAL documentation (Rupai Bhadra)

Smart Board 2014

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 27

Page 27: FINAL documentation (Rupai Bhadra)

Smart Board 2014

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 28

Page 28: FINAL documentation (Rupai Bhadra)

Smart Board 2014

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 29

Page 29: FINAL documentation (Rupai Bhadra)

Smart Board 2014

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 30

Page 30: FINAL documentation (Rupai Bhadra)

Smart Board 2014

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 31

Page 31: FINAL documentation (Rupai Bhadra)

Smart Board 2014

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 32

Page 32: FINAL documentation (Rupai Bhadra)

Smart Board 2014

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 33

Page 33: FINAL documentation (Rupai Bhadra)

Smart Board 2014

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 34

Page 34: FINAL documentation (Rupai Bhadra)

Smart Board 2014

7. CODING

CONTACT USusing 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_contact : System.Web.UI.Page{

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 35

Page 35: FINAL documentation (Rupai Bhadra)

Smart Board 2014

SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\\Users\\computer\\Documents\\Visual Studio 2010\\Projects\\College_Information\\App_Data\\server.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......");}}

Departmentusing 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); DataSet ds = new DataSet(); dit.Fill(ds); DataList1.DataSource = ds; DataList1.DataBind();

} public void MCA()

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 36

Page 36: FINAL documentation (Rupai Bhadra)

Smart Board 2014

{ 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(); } }

Downloadusing 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:\\Users\\computer\\Documents\\Visual Studio 2010\\Projects\\College_Information\\App_Data\\college_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 Informationusing 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.-14301211019Page 37

Page 37: FINAL documentation (Rupai Bhadra)

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 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 Searchusing 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_search : System.Web.UI.Page{

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 38

Page 38: FINAL documentation (Rupai Bhadra)

Smart Board 2014

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 Informationusing 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) { Default_show(); } protected void LinkButton3_Click(object sender, EventArgs e) {

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 39

Page 39: FINAL documentation (Rupai Bhadra)

Smart Board 2014

second_data(); } protected void LinkButton4_Click(object sender, EventArgs e) { third_data(); } protected void LinkButton5_Click(object sender, EventArgs e) { fourth_data(); } protected void LinkButton6_Click(object sender, EventArgs e) { fifth_data(); } protected void LinkButton7_Click(object sender, EventArgs e) { sixth_data(); } protected void LinkButton8_Click(object sender, EventArgs e) { seventh_data(); } protected void LinkButton9_Click(object sender, EventArgs e) { eight_data(); } protected void LinkButton10_Click(object sender, EventArgs e) { nineth_data(); } protected void LinkButton11_Click(object sender, EventArgs e) { tenth_data(); } protected void LinkButton12_Click(object sender, EventArgs e) { eleven_data(); } protected void LinkButton13_Click(object sender, EventArgs e) { twelve_data(); } protected void LinkButton14_Click(object sender, EventArgs e) { thirteen_data(); } protected void LinkButton15_Click(object sender, EventArgs e) { fourteen_data(); } public void Default_show() { SqlDataAdapter da = new SqlDataAdapter("select * from student_profile where id IN (1,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 student_profile where id IN (6,7,8,9,10) ", con); DataSet ds = new DataSet(); da.Fill(ds); Repeater1.DataSource = ds;

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 40

Page 40: FINAL documentation (Rupai Bhadra)

Smart Board 2014

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() {

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();

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 41

Page 41: FINAL documentation (Rupai Bhadra)

Smart Board 2014

} 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); DataSet ds = new DataSet(); da.Fill(ds); Repeater1.DataSource = ds; Repeater1.DataBind();

} protected void LinkButton1_Click(object sender, EventArgs e) {

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 42

Page 42: FINAL documentation (Rupai Bhadra)

Smart Board 2014

Response.Redirect("Student_Search.aspx"); } protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e) {

}}

Student Searchusing 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 Loginusing 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_login : System.Web.UI.Page

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 43

Page 43: FINAL documentation (Rupai Bhadra)

Smart Board 2014

{ 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 Homeusing 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; 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);

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 44

Page 44: FINAL documentation (Rupai Bhadra)

Smart Board 2014

DataSet ds = new DataSet(); da.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); }}

Admin Coursesusing 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) { MessageBox.Show("Error..." + ex.Message); } } protected void Button3_Click(object sender, EventArgs e) { try {

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 45

Page 45: FINAL documentation (Rupai Bhadra)

Smart Board 2014

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 Departmentusing 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 { SqlCommand cmd = new SqlCommand("update department set deptname='" + TextBox1.Text.ToString() + "' where id='" + TextBox4.Text.ToString() + "' ", con); con.Open(); cmd.ExecuteNonQuery(); con.Close(); }

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 46

Page 46: FINAL documentation (Rupai Bhadra)

Smart Board 2014

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 Downloadusing 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) 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);

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 47

Page 47: FINAL documentation (Rupai Bhadra)

Smart Board 2014

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 Facultyusing 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); con.Open(); cmd.ExecuteNonQuery(); con.Close(); MessageBox.Show("File Successfully Stored In DataBase...."); } }

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 48

Page 48: FINAL documentation (Rupai Bhadra)

Smart Board 2014

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 listusing 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; protected void Page_Load(object sender, EventArgs e) { display(); } protected void Button1_Click(object sender, EventArgs e) {

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 49

Page 49: FINAL documentation (Rupai Bhadra)

Smart Board 2014

try { SqlCommand cmd = new SqlCommand("insert into faculty_list values('" + TextBox1.Text.ToString() + "','" + TextBox2.Text.ToString() + "','" + TextBox3.Text.ToString() + "') ", con); con.Open(); cmd.ExecuteNonQuery(); con.Close(); MessageBox.Show("Successfully Stored....."); } catch (Exception ex) { MessageBox.Show("Error..." + ex.Message); } } protected void Button3_Click(object sender, EventArgs e) { try { SqlCommand cmd = new SqlCommand("delete from faculty_list where fid='" + TextBox4.Text.ToString() + "'", con); con.Open(); cmd.ExecuteNonQuery(); con.Close(); MessageBox.Show("You Success"); } 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;

} protected void Button2_Click(object sender, EventArgs e) { try { SqlCommand cmd = new SqlCommand("update faculty_list set fname='" + TextBox1.Text.ToString() + "',desg='" + TextBox2.Text.ToString() + "',branch='" + TextBox3.Text.ToString() + "' where fid='" + TextBox4.Text + "' ", con); con.Open(); cmd.ExecuteNonQuery(); con.Close(); } catch (Exception ex) { MessageBox.Show("Error..." + ex.Message); }

} public void display() { SqlDataAdapter da = new SqlDataAdapter("Select * from faculty_list", con); DataSet ds = new DataSet(); da.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind();}}

Admin File Uploadusing System;using System.Configuration;using System.Data;

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 50

Page 50: FINAL documentation (Rupai Bhadra)

Smart Board 2014

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:\\Users\\computer\\Documents\\Visual Studio 2010\\Projects\\College_Information\\App_Data\\server.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); DataSet ds = new DataSet(); da.Fill(ds); GridView1.DataSource = ds; GridView1.DataBind(); }}

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 51

Page 51: FINAL documentation (Rupai Bhadra)

Smart Board 2014

Admin News Eventusing 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; GridView1.DataBind(); MessageBox.Show("Record are Deleted...:'"+TextBox4.Text.ToString()+"'"); }}

Student Info

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 52

Page 52: FINAL documentation (Rupai Bhadra)

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 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; MessageBox.Show("Clear...."); } public void show() { SqlDataAdapter da = new SqlDataAdapter("select * from student_profile",con); DataSet ds = new DataSet(); da.Fill(ds);

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 53

Page 53: FINAL documentation (Rupai Bhadra)

Smart Board 2014

GridView1.DataSource = ds; GridView1.DataBind(); }}

Student E-mailusing 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 { SqlCommand cmd = new SqlCommand("delete form stu_mail where mailid='" + TextBox5.Text.ToString() + "'", con); con.Open(); cmd.ExecuteNonQuery(); con.Close();

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 54

Page 54: FINAL documentation (Rupai Bhadra)

Smart Board 2014

} catch (Exception ex) { MessageBox.Show("Record Not Deleted...." + ex.Message); } }}

Student Cornerusing 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(); }}

Style CSSh1 {

font-family:Verdana, Arial, Helvetica, sans-serif;

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 55

Page 55: FINAL documentation (Rupai Bhadra)

Smart Board 2014

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{color:#fff;background:transparent url(dolphin_bg-OVER.gif) repeat-x bottom left;}

#dolphinnav ul li a:hover span{display:block;width:auto;

Rupai Bhadra, BCA 6th Sem, Roll No.-14301211019Page 56

Page 56: FINAL documentation (Rupai Bhadra)

Smart Board 2014

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.-14301211019Page 57