Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
-:PROJECT TITLE :-
Group Members:-
www.globsynskills.com
Table of Contents
Acknowledgement.................................................................................................................................4
Project Objective .................................................................................................................................. 5
Project Scope ........................................................................................................................................ 6
Requirement Specification .................................................................................................................... 7
Database Design .................................................................................................................................... 8
Application Work Flow .......................................................................................................................... 9
Screenshots .......................................................................................................................................... 10
Future Scope of Improvements ........................................................................................................... 11
Code...................................................................................................................................................... 12
Certificate ............................................................................................................................................ 13
www.globsynskills.com
Acknowledgement
I take this opportunity to express my profound gratitude and deep regards to my faculty Mr. RAKESH
KUMAR PANDIT for his exemplary guidance, monitoring and constant encouragement throughout
the course of this project. The blessing, help and guidance given by him/her time to time shall carry
me a long way in the journey of life on which I am about to embark.
I am obliged to my project team members for the valuable information provided by them in their
respective fields. I am grateful for their cooperation during the period of my assignment.
RAKESH SHAW
SAYANTAN SAMADDAR
PRASENJIT SAMANTA
TUHIN DEY
www.globsynskills.com
Project Objective
Develop and implement a Web based Student Enrollment System to help students, so that they can
have 24 x 7 access to enroll them in an institute.
The primary project goals consist of:
www.globsynskills.com
Project Scope
The broad scope of the Online Student Enrollment System project includes:
The system will be available on an online platform for 24x7 access to the students, the faculty
and the administration.
www.globsynskills.com
Requirement Specification
Domain Description
Problem Definition
-Design a Website that is used for Student Enrollment System.
Functional Requirements
-ASP.NET, ADO.NET, RDBMS, .NET Framework
www.globsynskills.com
Database Design
www.globsynskills.com
We have 3 Modules:
1. Admin
2. Faculty
3. Student
www.globsynskills.com
Screenshots
www.globsynskills.com
10
www.globsynskills.com
11
www.globsynskills.com
12
www.globsynskills.com
13
www.globsynskills.com
14
www.globsynskills.com
15
www.globsynskills.com
16
www.globsynskills.com
17
www.globsynskills.com
18
www.globsynskills.com
19
www.globsynskills.com
20
www.globsynskills.com
21
www.globsynskills.com
22
www.globsynskills.com
23
www.globsynskills.com
24
Code
FOR ADMIN
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
}
protected void btn_signout_Click(object sender, EventArgs e)
www.globsynskills.com
25
{
Response.Redirect("~/Login.aspx");
}
protected void btn_home_Click(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("~/Change_Password.aspx");
}
}
FOR ADMIN/DEFAULT
using System;
using System.Collections.Generic;
using System.Linq;
www.globsynskills.com
26
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
}
protected void txt_viewstud_Click(object sender, EventArgs e)
{
Response.Redirect("View_Student.aspx");
}
protected void btn_managefac_Click(object sender, EventArgs e)
{
Response.Redirect("Manage_Fac.aspx");
}
www.globsynskills.com
27
www.globsynskills.com
28
{
SqlUtility su = new SqlUtility();
query = "select Faculty_id from Faculty_Registration";
DataTable dt = su.getdatatable(query, null);
if (dt.Rows.Count == 0)
{
eid = "F001";
}
else
{
eid = dt.Rows[dt.Rows.Count - 1]["Faculty_id"].ToString();
www.globsynskills.com
29
eid = "F00" + y;
}
if (y >= 9 && y < 99)
{
y = y + 1;
eid = "F0" + y;
}
if (y >= 99)
{
y = y + 1;
eid = "F" + y;
}
}
return eid;
}
protected void Page_Load(object sender, EventArgs e)
{
txt_fid.Text = autogenerate();
www.globsynskills.com
30
}
SqlUtility su = new SqlUtility();
string query,query1;
SqlParameter[] list, list1;
int x,x1;
protected void btn_regfac_Click(object sender, EventArgs e)
{
string Faculty;
if (rbtn_male.Checked)
{
Faculty = rbtn_male.Text;
}
else
{
Faculty = rbtn_female.Text;
}
SqlConnection con = su.getcon();
www.globsynskills.com
31
x = su.ins_up_del(query, list);
query1="Insert into Login(E_mail,Password,Logon_Type)
Values(@E_mail,@Password,@Logon_Type)";
list1 = new SqlParameter[3];
list1[0] = new SqlParameter("@E_mail", txt_email.Text);
www.globsynskills.com
32
}
protected void btn_reset_Click(object sender, EventArgs e)
{
txt_fname.Text = "";
txt_lname.Text = "";
txt_addr.Text = "";
txt_email.Text = "";
txt_phno.Text = "";
rbtn_male.Checked = false;
www.globsynskills.com
33
rbtn_female.Checked = false;
}
}
MANAGE FACULTY
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
www.globsynskills.com
34
SqlConnection con;
string x, query;
SqlDataAdapter da;
SqlUtility su = new SqlUtility();
protected void gv_faculty_Sorting(object sender, GridViewSortEventArgs e)
{
try
{
ds.Clear();
query = "select * from Faculty_Registration order by " + e.SortExpression;
ds = su.getDataSet(query, "Faculty", null);
gv_faculty.DataSource = ds.Tables["Faculty"];
gv_faculty.DataBind();
}
catch (Exception ex)
{
// Alert.Show("Exception Caught");
Response.Write(" " + ex);
www.globsynskills.com
35
}
protected void gv_faculty_RowEditing(object sender, GridViewEditEventArgs e)
{
try
{
int index = e.NewEditIndex;
gv_faculty.EditIndex = index;
gv_faculty.DataSource = ds;
gv_faculty.DataBind();
www.globsynskills.com
36
{
// Alert.Show("Exception Caught");
Console.WriteLine("Exception = " + ex);
}
}
protected void gv_faculty_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
try
{
int index = e.RowIndex;
GridViewRow gvr = gv_faculty.Rows[index];
DataTable dt = ds.Tables["Faculty"];
DataRow dr = dt.Rows[index];
dr.BeginEdit();
x = ((TextBox)gvr.Cells[1].Controls[0]).Text;
dr[1] = ((TextBox)gvr.Cells[2].Controls[0]).Text;
dr[2] = ((TextBox)gvr.Cells[3].Controls[0]).Text;
www.globsynskills.com
37
dr[3] = ((TextBox)gvr.Cells[4].Controls[0]).Text;
dr[4] = ((TextBox)gvr.Cells[5].Controls[0]).Text;
dr[5] = ((TextBox)gvr.Cells[6].Controls[0]).Text;
dr[6] = ((TextBox)gvr.Cells[7].Controls[0]).Text;
dr[7] = ((TextBox)gvr.Cells[8].Controls[0]).Text;
dr.EndEdit();
con = su.getcon();
con.Open();
da = new SqlDataAdapter();
da.SelectCommand = new SqlCommand("Select * from Faculty_Registration", con);
//ds = su.getDataSet("select * from employees", "employees", null);
SqlCommandBuilder scb = new SqlCommandBuilder(da);
scb.GetUpdateCommand();
da.Update(ds, "Faculty");
gv_faculty.EditIndex = -1;
gv_faculty.DataSource = ds;
gv_faculty.DataBind();
}
www.globsynskills.com
38
}
protected void gv_faculty_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
gv_faculty.EditIndex = -1;
gv_faculty.DataSource = ds.Tables["Faculty"];
gv_faculty.DataBind();
}
protected void gv_faculty_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
try
www.globsynskills.com
39
{
ds.Clear();
con = su.getcon();
con.Open();
ds = su.getDataSet("Select * from Faculty_Registration", "Faculty", null);
int index = e.RowIndex;
DataTable dt = ds.Tables["Faculty"];
DataRow dr = dt.Rows[index];
dr.Delete();
da = new SqlDataAdapter();
da.SelectCommand = new SqlCommand("select * from Faculty_Registration", con);
SqlCommandBuilder scb = new SqlCommandBuilder(da);
scb.GetDeleteCommand();
da.Update(dt);
gv_faculty.DataSource = ds.Tables["Faculty"];
gv_faculty.DataBind();
}
catch (Exception ex)
www.globsynskills.com
40
{
//Alert.Show("Exception caught");
Response.Write("Exception = " + ex);
}
}
}
protected void Page_Load(object sender, EventArgs e)
{
try
{
query = "select * from Faculty_Registration";
ds = su.getDataSet(query, "Faculty", null);
if (!Page.IsPostBack)
{
www.globsynskills.com
41
gv_faculty.DataSource = ds.Tables["Faculty"];
gv_faculty.DataBind();
}
}
catch (Exception ex)
{
//Alert.Show("Exception Caught");
Response.Write(" " + ex);
}
}
using System;
using System.Collections.Generic;
www.globsynskills.com
42
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
www.globsynskills.com
43
}
catch (Exception ex)
{
//Alert.Show("Exception Caught");
Response.Write(" " + ex);
}
}
protected void gv_student_Sorting(object sender, GridViewSortEventArgs e)
{
www.globsynskills.com
44
try
{
ds.Clear();
query = "select * from Student_Registration order by " + e.SortExpression;
ds = su.getDataSet(query, "Student", null);
gv_student.DataSource = ds.Tables["Student"];
gv_student.DataBind();
}
catch (Exception ex)
{
// Alert.Show("Exception Caught");
Response.Write(" " + ex);
}
}
protected void gv_student_RowEditing(object sender, GridViewEditEventArgs e)
{
try
www.globsynskills.com
45
{
int index = e.NewEditIndex;
gv_student.EditIndex = index;
gv_student.DataSource = ds;
gv_student.DataBind();
www.globsynskills.com
46
www.globsynskills.com
47
dr[9] = ((TextBox)gvr.Cells[10].Controls[0]).Text;
dr.EndEdit();
con = su.getcon();
con.Open();
da = new SqlDataAdapter();
da.SelectCommand = new SqlCommand("Select * from Student_Registration", con);
//ds = su.getDataSet("select * from employees", "employees", null);
SqlCommandBuilder scb = new SqlCommandBuilder(da);
scb.GetUpdateCommand();
da.Update(ds, "Student");
gv_student.EditIndex = -1;
gv_student.DataSource = ds;
gv_student.DataBind();
}
catch (Exception ex)
{
Response.Write("Exception = " + ex);
}
www.globsynskills.com
48
}
protected void gv_student_RowUpdated(object sender, GridViewUpdatedEventArgs e)
{
}
protected void gv_student_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
gv_student.EditIndex = -1;
gv_student.DataSource = ds.Tables["Student"];
gv_student.DataBind();
}
protected void gv_student_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
try
{
ds.Clear();
con = su.getcon();
con.Open();
www.globsynskills.com
49
www.globsynskills.com
50
}
}
ALERT.CS
using System.Web;
using System.Text;
using System.Web.UI;
/// <summary>
/// A JavaScript alert
/// </summary>
public static class Alert
www.globsynskills.com
51
/// <summary>
/// Shows a client-side JavaScript alert in the browser.
/// </summary>
/// <param name="message">The message to appear in the alert.</param>
public static void Show(string message)
{
// Cleans the message to allow single quotation marks
string cleanMessage = message.Replace("'", "\\'");
string script = "<script type=\"text/javascript\">alert('" + cleanMessage + "');</script>";
// Checks if the handler is a Page and that the script isn't allready on the Page
if (page != null && !page.ClientScript.IsClientScriptBlockRegistered("alert"))
{
www.globsynskills.com
52
SQULITITY.CS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
/// <summary>
/// Summary description for SqlUtility
/// </summary>
www.globsynskills.com
53
www.globsynskills.com
54
try
{
con.Open();
rows = cmd.ExecuteNonQuery();
}
catch (Exception ex)
{
throw ex;
}
return rows;
}
www.globsynskills.com
55
if (list != null)
{
cmd.Parameters.AddRange(list);
}
try
{
SqlDataAdapter sda = new SqlDataAdapter(cmd);
sda.Fill(dt);
}
catch (Exception ex)
{
throw ex;
}
return dt;
}
www.globsynskills.com
56
if (list != null)
{
cmd.Parameters.AddRange(list);
}
try
{
SqlDataAdapter sda = new SqlDataAdapter(cmd);
sda.Fill(ds, table);
}
catch (Exception ex)
{
www.globsynskills.com
57
throw ex;
}
return ds;
}
www.globsynskills.com
58
www.globsynskills.com
59
if (dr != null)
{
dr.Close();
dr = null;
}
}
}
ADD_COURSE
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
www.globsynskills.com
60
using System.Data.SqlClient;
www.globsynskills.com
61
www.globsynskills.com
62
return eid;
}
protected void Page_Load(object sender, EventArgs e)
{
txt_cid.Text = autogenerate();
}
SqlUtility su = new SqlUtility();
string query;
SqlParameter[] list;
int x;
www.globsynskills.com
63
//query="Insert into
Student(S_id,name,address,phone_no)values(@S_id,@name,@address,@ph_no");
list = new SqlParameter[6];
list[0] = new SqlParameter("@cid", txt_cid.Text);
list[1] = new SqlParameter("@Course_Name",txt_cname.Text);
list[2] = new SqlParameter("@Total_Seat", Convert.ToInt32(txt_capacity.Text));
list[3] = new SqlParameter("@Duration", Convert.ToInt32(txt_Duration.Text));
list[4] = new SqlParameter("@Syllabus",txt_syllabus.Text);
list[5] = new SqlParameter("@Fees", Convert.ToInt32(txt_fees.Text));
x = su.ins_up_del(query, list);
if (x > 0)
{
Alert.Show("Details Successfully saved");
}
}
www.globsynskills.com
64
DEFAULT.CS
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
www.globsynskills.com
65
www.globsynskills.com
66
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
}
protected void btn_logout_Click(object sender, EventArgs e)
{
www.globsynskills.com
67
FormsAuthentication.SignOut();
Session.Clear();
Response.Redirect("~/Login.aspx");
}
MANAGE_COURSE
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
www.globsynskills.com
68
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
www.globsynskills.com
69
}
protected void gv_cms_RowEditing(object sender, GridViewEditEventArgs e)
{
try
{
int index = e.NewEditIndex;
gv_cms.EditIndex = index;
gv_cms.DataSource = ds;
www.globsynskills.com
70
gv_cms.DataBind();
}
protected void gv_cms_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
try
{
www.globsynskills.com
71
www.globsynskills.com
72
}
protected void gv_cms_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
www.globsynskills.com
73
gv_cms.EditIndex = -1;
gv_cms.DataSource = ds.Tables["Course"];
gv_cms.DataBind();
}
protected void gv_cms_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
try
{
ds.Clear();
con = su.getcon();
con.Open();
ds = su.getDataSet("Select * from Add_Course", "Course", null);
int index = e.RowIndex;
DataTable dt = ds.Tables["Course"];
DataRow dr = dt.Rows[index];
dr.Delete();
da = new SqlDataAdapter();
da.SelectCommand = new SqlCommand("select * from Add_Course", con);
www.globsynskills.com
74
}
protected void Page_Load(object sender, EventArgs e)
www.globsynskills.com
75
{
try
{
query = "select * from Add_Course";
ds = su.getDataSet(query, "Course", null);
if (!Page.IsPostBack)
{
gv_cms.DataSource = ds.Tables["Course"];
gv_cms.DataBind();
}
}
catch (Exception ex)
{
//Alert.Show("Exception Caught");
Response.Write(" " + ex);
}
}
www.globsynskills.com
76
}
MANAGE_STUDENT
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
www.globsynskills.com
77
SqlDataAdapter da;
SqlUtility su = new SqlUtility();
www.globsynskills.com
78
}
protected void gv_student_RowEditing(object sender, GridViewEditEventArgs e)
{
try
{
int index = e.NewEditIndex;
gv_student.EditIndex = index;
gv_student.DataSource = ds;
gv_student.DataBind();
www.globsynskills.com
79
// Alert.Show("Exception Caught");
Console.WriteLine("Exception = " + ex);
}
}
protected void gv_student_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
try
{
int index = e.RowIndex;
GridViewRow gvr = gv_student.Rows[index];
DataTable dt = ds.Tables["Student"];
DataRow dr = dt.Rows[index];
dr.BeginEdit();
x = ((TextBox)gvr.Cells[1].Controls[0]).Text;
dr[1] = ((TextBox)gvr.Cells[2].Controls[0]).Text;
dr[2] = ((TextBox)gvr.Cells[3].Controls[0]).Text;
dr[3] = ((TextBox)gvr.Cells[4].Controls[0]).Text;
www.globsynskills.com
80
dr[4] = ((TextBox)gvr.Cells[5].Controls[0]).Text;
dr[5] = ((TextBox)gvr.Cells[6].Controls[0]).Text;
dr[6] = ((TextBox)gvr.Cells[7].Controls[0]).Text;
dr[7] = ((TextBox)gvr.Cells[8].Controls[0]).Text;
dr[8] = ((TextBox)gvr.Cells[9].Controls[0]).Text;
dr[9] = ((TextBox)gvr.Cells[10].Controls[0]).Text;
dr.EndEdit();
con = su.getcon();
con.Open();
da = new SqlDataAdapter();
da.SelectCommand = new SqlCommand("Select * from Student_Registration", con);
//ds = su.getDataSet("select * from employees", "employees", null);
SqlCommandBuilder scb = new SqlCommandBuilder(da);
scb.GetUpdateCommand();
da.Update(ds, "Student");
gv_student.EditIndex = -1;
gv_student.DataSource = ds;
gv_student.DataBind();
www.globsynskills.com
81
}
catch (Exception ex)
{
Response.Write("Exception = " + ex);
}
}
protected void gv_student_RowUpdated(object sender, GridViewUpdatedEventArgs e)
{
}
protected void gv_student_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
gv_student.EditIndex = -1;
gv_student.DataSource = ds.Tables["Student"];
gv_student.DataBind();
}
protected void gv_student_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
www.globsynskills.com
82
try
{
ds.Clear();
con = su.getcon();
con.Open();
ds = su.getDataSet("Select * from Student_Registration", "Student", null);
int index = e.RowIndex;
DataTable dt = ds.Tables["Student"];
DataRow dr = dt.Rows[index];
dr.Delete();
da = new SqlDataAdapter();
da.SelectCommand = new SqlCommand("select * from Student_Registration", con);
SqlCommandBuilder scb = new SqlCommandBuilder(da);
scb.GetDeleteCommand();
da.Update(dt);
gv_student.DataSource = ds.Tables["Student"];
gv_student.DataBind();
}
www.globsynskills.com
83
www.globsynskills.com
84
}
catch (Exception ex)
{
//Alert.Show("Exception Caught");
Response.Write(" " + ex);
}
}
protected void gv_student_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
STUDENT_DEFAULT
using System;
using System.Collections.Generic;
www.globsynskills.com
85
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
www.globsynskills.com
86
STUDENT_MASTER
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
}
protected void btn_logout_Click(object sender, EventArgs e)
{
www.globsynskills.com
87
Response.Redirect("~/Login.aspx");
}
protected void Button2_Click(object sender, EventArgs e)
{
Response.Redirect("~/Change_Password.aspx");
}
}
VIEW _COURSE
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
www.globsynskills.com
88
www.globsynskills.com
89
}
protected void gv_cms_RowEditing(object sender, GridViewEditEventArgs e)
{
try
{
int index = e.NewEditIndex;
gv_cms.EditIndex = index;
gv_cms.DataSource = ds;
gv_cms.DataBind();
www.globsynskills.com
90
}
protected void gv_cms_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
try
{
int index = e.RowIndex;
GridViewRow gvr = gv_cms.Rows[index];
DataTable dt = ds.Tables["Course"];
DataRow dr = dt.Rows[index];
www.globsynskills.com
91
dr.BeginEdit();
x = ((TextBox)gvr.Cells[1].Controls[0]).Text;
dr[1] = ((TextBox)gvr.Cells[2].Controls[0]).Text;
dr[2] = ((TextBox)gvr.Cells[3].Controls[0]).Text;
dr[3] = ((TextBox)gvr.Cells[4].Controls[0]).Text;
dr[4] = ((TextBox)gvr.Cells[5].Controls[0]).Text;
dr[5] = ((TextBox)gvr.Cells[6].Controls[0]).Text;
dr[6] = ((TextBox)gvr.Cells[7].Controls[0]).Text;
dr.EndEdit();
con = su.getcon();
con.Open();
da = new SqlDataAdapter();
da.SelectCommand = new SqlCommand("Select * from Add_Course", con);
//ds = su.getDataSet("select * from employees", "employees", null);
SqlCommandBuilder scb = new SqlCommandBuilder(da);
scb.GetUpdateCommand();
da.Update(ds, "Course");
gv_cms.EditIndex = -1;
www.globsynskills.com
92
gv_cms.DataSource = ds;
gv_cms.DataBind();
}
catch (Exception ex)
{
Response.Write("Exception = " + ex);
}
}
protected void gv_cms_RowUpdated(object sender, GridViewUpdatedEventArgs e)
{
}
protected void gv_cms_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
gv_cms.EditIndex = -1;
gv_cms.DataSource = ds.Tables["Course"];
gv_cms.DataBind();
}
www.globsynskills.com
93
www.globsynskills.com
94
gv_cms.DataBind();
}
catch (Exception ex)
{
//Alert.Show("Exception caught");
Response.Write("Exception = " + ex);
}
}
www.globsynskills.com
95
if (!Page.IsPostBack)
{
gv_cms.DataSource = ds.Tables["Course"];
gv_cms.DataBind();
}
}
catch (Exception ex)
{
//Alert.Show("Exception Caught");
Response.Write(" " + ex);
}
}
protected void gv_cms_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
www.globsynskills.com
96
FACULTY_ASPX
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
www.globsynskills.com
97
www.globsynskills.com
98
www.globsynskills.com
99
}
protected void gv_faculty_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
try
{
int index = e.RowIndex;
GridViewRow gvr = gv_faculty.Rows[index];
DataTable dt = ds.Tables["Faculty"];
DataRow dr = dt.Rows[index];
dr.BeginEdit();
x = ((TextBox)gvr.Cells[1].Controls[0]).Text;
dr[1] = ((TextBox)gvr.Cells[2].Controls[0]).Text;
dr[2] = ((TextBox)gvr.Cells[3].Controls[0]).Text;
dr[3] = ((TextBox)gvr.Cells[4].Controls[0]).Text;
dr[4] = ((TextBox)gvr.Cells[5].Controls[0]).Text;
dr[5] = ((TextBox)gvr.Cells[6].Controls[0]).Text;
www.globsynskills.com
10
0
dr[6] = ((TextBox)gvr.Cells[7].Controls[0]).Text;
dr[7] = ((TextBox)gvr.Cells[8].Controls[0]).Text;
dr.EndEdit();
con = su.getcon();
con.Open();
da = new SqlDataAdapter();
da.SelectCommand = new SqlCommand("Select * from Faculty_Registration", con);
//ds = su.getDataSet("select * from employees", "employees", null);
SqlCommandBuilder scb = new SqlCommandBuilder(da);
scb.GetUpdateCommand();
da.Update(ds, "Faculty");
gv_faculty.EditIndex = -1;
gv_faculty.DataSource = ds;
gv_faculty.DataBind();
}
catch (Exception ex)
{
Response.Write("Exception = " + ex);
www.globsynskills.com
10
1
}
}
protected void gv_faculty_RowUpdated(object sender, GridViewUpdatedEventArgs e)
{
}
protected void gv_faculty_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
gv_faculty.EditIndex = -1;
gv_faculty.DataSource = ds.Tables["Faculty"];
gv_faculty.DataBind();
}
protected void gv_faculty_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
try
{
ds.Clear();
con = su.getcon();
www.globsynskills.com
10
2
con.Open();
ds = su.getDataSet("Select * from Faculty_Registration", "Faculty", null);
int index = e.RowIndex;
DataTable dt = ds.Tables["Faculty"];
DataRow dr = dt.Rows[index];
dr.Delete();
da = new SqlDataAdapter();
da.SelectCommand = new SqlCommand("select * from Faculty_Registration", con);
SqlCommandBuilder scb = new SqlCommandBuilder(da);
scb.GetDeleteCommand();
da.Update(dt);
gv_faculty.DataSource = ds.Tables["Faculty"];
gv_faculty.DataBind();
}
catch (Exception ex)
{
//Alert.Show("Exception caught");
Response.Write("Exception = " + ex);
www.globsynskills.com
10
3
}
}
}
protected void Page_Load(object sender, EventArgs e)
{
try
{
query = "select * from Faculty_Registration";
ds = su.getDataSet(query, "Faculty", null);
if (!Page.IsPostBack)
{
gv_faculty.DataSource = ds.Tables["Faculty"];
gv_faculty.DataBind();
}
www.globsynskills.com
10
4
}
catch (Exception ex)
{
//Alert.Show("Exception Caught");
Response.Write(" " + ex);
}
}
}
HOME_PAGE
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
www.globsynskills.com
10
5
}
protected void btn_reg_Click(object sender, EventArgs e)
{
Response.Redirect("Registration.aspx");
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("Login.aspx");
}
protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("Home.aspx");
}
www.globsynskills.com
10
6
www.globsynskills.com
10
7
Response.Redirect("Gallery.aspx");
}
protected void btn_faculty_Click(object sender, EventArgs e)
{
Response.Redirect("Faculty.aspx");
}
protected void btn_admission_Click(object sender, EventArgs e)
{
Response.Redirect("Admission.aspx");
}
}
LOG_IN
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
www.globsynskills.com
10
8
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
}
protected void btn_login_Click(object sender, EventArgs e)
{
www.globsynskills.com
10
9
www.globsynskills.com
11
0
www.globsynskills.com
11
1
{
lbl_note.Text = "Invalid Username and Password";
}
con.Close();
}
else if (ddl_login.SelectedItem.ToString() == "Student")
{
Session["E_mail"] = txt_email.Text;
str = "select count(*) from Login where E_mail=@E_mail and Password =@Password";
com = new SqlCommand(str, con);
com.CommandType = CommandType.Text;
com.Parameters.AddWithValue("@E_mail", Session["E_mail"]);
com.Parameters.AddWithValue("@Password", txt_password.Text);
obj = com.ExecuteScalar();
if ((int)(obj) != 0)
{
Response.Redirect("Student/Default.aspx");
}
www.globsynskills.com
11
2
else
{
lbl_note.Text = "Invalid Username and Password";
}
con.Close();
}
}
protected void btn_reset_Click(object sender, EventArgs e)
{
txt_email.Text = "";
txt_password.Text = "";
}
}
REGISTATION_ASPX
www.globsynskills.com
11
3
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
{
SqlUtility su = new SqlUtility();
query = "select Student_id from Student_Registration";
DataTable dt = su.getdatatable(query, null);
if (dt.Rows.Count == 0)
www.globsynskills.com
11
4
{
eid = "S001";
}
else
{
eid = dt.Rows[dt.Rows.Count - 1]["Student_id"].ToString();
www.globsynskills.com
11
5
}
if (y >= 99)
{
y = y + 1;
eid = "S" + y;
}
}
return eid;
}
protected void Page_Load(object sender, EventArgs e)
{
txt_sid.Text = autogenerate();
}
www.globsynskills.com
11
6
txt_addr.Text = "";
txt_email.Text = "";
txt_phno.Text = "";
rbtn_male.Checked = false;
rbtn_female.Checked = false;
}
SqlUtility su = new SqlUtility();
string query, query1;
SqlParameter[] list, list1;
int x, x1;
www.globsynskills.com
11
7
else
{
Student = rbtn_female.Text;
}
try
{
SqlConnection con = su.getcon();
query = "Insert into
Student_Registration(Student_id,Firstname,Lastname,Address,Gender,Timing,Phone_no,Course)
values(@sid,@Firstname,@Lastname,@Address,@Gender,@Timing,@Phone_no,@Course)";
//query="Insert into
Student(S_id,name,address,phone_no)values(@S_id,@name,@address,@ph_no");
list = new SqlParameter[8];
list[0] = new SqlParameter("@sid", txt_sid.Text);
list[1] = new SqlParameter("@Firstname", txt_fname.Text);
list[2] = new SqlParameter("@Lastname", txt_lname.Text);
list[3] = new SqlParameter("@Address", txt_addr.Text);
list[4] = new SqlParameter("@Gender", Student);
list[5] = new SqlParameter("@Timing", lbx_timing.Text);
www.globsynskills.com
11
8
www.globsynskills.com
11
9
}
}
catch (Exception ex)
{
Alert.Show("Exception :" + ex);
}
}
}
www.globsynskills.com
12
0
Certificate
This is to certify that Mr. RAKESH SHAW, of COLLEGE OF ENGINEERING & MANAGEMENT,
KOLAGHAT, Registration number: 111070110097 of 2011-2012, has successfully completed a
project on ONLINE STUDENT ENROLLMENT SYSTEM using .NET under the guidance of Mr.
RAKESH KUMAR PANDIT.
--- --------------------------------------------------MR.RAKESH KUMAR PANDIT
www.globsynskills.com
12
1
Certificate
www.globsynskills.com
12
2
Certificate
www.globsynskills.com
12
3
Certificate
This is to certify that Mr. TUHIN DEY, of COLLEGE OF ENGINEERING & MANAGEMENT,
KOLAGHAT, Registration number: 111070110118 of 2011-2012, has successfully
completed a project on ONLINE STUDENT ENROLLMENT SYSTEM using .NET under
the guidance of Mr. RAKESH KUMAR PANDIT.
www.globsynskills.com
12
4