Professional Documents
Culture Documents
A Project ON "Repository & Search Engine For Alumni of University"
A Project ON "Repository & Search Engine For Alumni of University"
A Project ON "Repository & Search Engine For Alumni of University"
Mathura
A PROJECT ON Repository & Search Engine for Alumni of University (In ASP.net and Sql Server)
MS. Priti BALA Mr. Arman Rasool Faridi Ms. Arshia jalal
-1
MCA V
www.aspspider.net/AlumniSearchEngine
CONTENTS
1. ABSTRACT 2. ACKNOWLEDEMENT 3. INTRODUCTION 4. OVERVIEW OF THE PROJECT 5. DESCRIPTON OF TABLES 6. OVERVIEW OF TECHNOLOGY USED 7. FEASIBILITY STUDY 8. NEED OF COMPUTERIZED SYSTEM 9. SYSTEM IMPLEMENTATION 10. CODING 11. REFERENCES
3 4 5 6 8 9 12 13 14 15 62
ABSTRACT
-2 MCA V
www.aspspider.net/AlumniSearchEngine
The enormous growth of paper works almost in all the Government Office/ University have created a lot of problem to staff members, rate of this growth is posing many problems to office Management and staff. Providing access to an ever growing corpus of information using manual methods has serious limitation. It is impossible for an office/department however big to collect and catalogue every thing that is useful material is difficult due to this volume of newly published of produced information on any subject. Mostly information in University, institutions or departments is handled manually. In such system it is very difficult task to get the information about all the papers or any material stored by office worker. This project REPOSITORY & SEARCH ENGINE FOR ALUMNI OF UNIVERSITY enables the people to get the information about alumni of university across the world over the internet. The present project is especially developed for alumni of AMU, but it can be used in any other University or Institution to manage information of alumni of university .This project will fulfill the requirement of peoples and provides fast access to alumni of university.
ACKNOWLEDGEMENT
-3 MCA V
www.aspspider.net/AlumniSearchEngine
Many of the ideas that lead us to design and develop the Repository & Search Engine for Alumni of University resulted from a distillation of the experience and opinions of many people. It would be prudent to commence this report with a sincere tribute to all those who have played an indispensable role in the accomplishment of this work providing whenever and wherever their able guidance was required. It is indeed a matter of great pleasure to record my great sense of gratitude towards my teachers Ms. Priti Bala, Mr. Aasim Zafar, Mr. Arman Rasool Faridi and Ms. Arshia Jalal for their valuable help in completion of this project. I would also like to extend my thanks to Mr. S. Maheshwari, honorable Chairman of Department of Computer Science AMU Aligarh, for regular guidance and encouragement throughout my project. I am also very thankful to my class fellows for their mutual support and helping attitude.
(SHIV NARAYAN)
INTRODUCTION
-4 MCA V
www.aspspider.net/AlumniSearchEngine
With the advent of the computer and advance technology, it is said that todays modern and advancing world has entered into a computer age. Computer is a powerful tool that has accelerated, enhanced and improved greatly the process of development, planning and making in nearly all the fields. Today almost all organization has to computerized information and management system of their own, enabling them to utilize all their resources to the resulting in greater efficiency. This project is aimed at developing a repository for the alumni of the University, which is of importance to a University. Development of a Repository and Search Engine for Alumni (DRASEA) is an Internet based application that can be accessed throughout the World. Anyone can access the search Engine to know about any Alumni of that college but can not able to add. Alumni can only update the database when they are in the University. This project is a step forward towards online access to Alumni of University. It provides important role in providing the peoples with detailed and updated information about the Alumni of university regarding their current place, qualification, job etc. This also helps the alumni to be registered and update their information. The project named REPOSITORY & SEARCH ENGINE FOR ALUMNI OF UNIVERSITY has been designed in such a way that it covers all information needed for the peoples as well as alumni of university and also efforts has been made to make it self explanatory as far as possible. For this project ASP.Net has been used as front-end and SQL SERVR 2005 as back-end.
-5
MCA V
www.aspspider.net/AlumniSearchEngine
This module enables the Alumni to be registered in database. Alumni fill the following types of information in this module. Academic Related Information Contact Related Information General Information Security Related Information
2. Search:
This module provides facility of the advanced search based on different criteria searched:
By Name By Hall By Course By Faculty By Current Place By Origin Place By Course Duration
3. Alumni List:
-6 MCA V
www.aspspider.net/AlumniSearchEngine
This module displays the list of all alumni residing in certain region. This module displays alumni list: By Current Country By Current State By Current City By Origin Country By Origin State By Origin City
By Course
4. My Directory
This module enables alumni for updating and viewing their information. In this module an alumni can do following things: Edit Academic Information Edit General Information Edit Contact Information Change Password Upload Photo Add New Friends Update Friends List
5. Login:
This module enables to alumni to log in their directory for updating and viewing their information.
6. Password Help:
This module helps in password recovery in case of forgetting password. In this module alumni enter enrollment number with giving answer of security question, after these alumni get password in case of valid alumni.
Technology Used
Front End: ASP.NET. With VB.Net Back End: SQL SERVER EXPRESS 2005 -7 MCA V
www.aspspider.net/AlumniSearchEngine
1.) Alumni -- This table contains details of alumni of the university. Fields
Eroll Name Hq Hall Fyear Tyear Rnum Onum Mobile Emailid Ccountry Cstate Ccity Ocountry Ostate Ocity
Width
Char(6) Char(30) Char(30) Char(20) Numeric(4) Numeric(4) Numeric(10) Numeric(10) Numeric(10) Char(30) Char(30) Char(30) Char(30) Char(30) Char(30) Char(30)
2.) Course1: -- This table contains details of courses offered by alumni and
has following fields:
Fields
Eroll Faculty Course Syear Eyear
Width
Char(6) Char(50) Char(50) Numeric(4) Numeric(4)
3.) Course: This table contains information about the Courses and Faculties in
University:
Fields
Faculty Course
Width
Char(50) Char(50)
Fields
Eroll Password
Width
Char(6) Char(10)
-8
MCA V
www.aspspider.net/AlumniSearchEngine
5.) Friend -- This table contains information about friends of register alumni. Fields
Enroll Name Contact_Number EmailId Job_Location
Width
Char(6) Char(30) Numeric(10) Char(30) Char(50)
-9
MCA V
www.aspspider.net/AlumniSearchEngine
To provide a code-execution environment that eliminates the performance problems of scripted or interpreted environments. To make the developer experience consistent across widely varying types of applications, such as Windows-based applications and Web-based applications. To build all communication on industry standards to ensure that code based on the .NET Framework can integrate with any other code. The .NET Framework has two main components: the common language runtime and the .NET Framework class library. The common language runtime is the foundation of the .NET Framework. You can think of the runtime as an agent that manages code at execution time, providing core services such as memory management, thread management, and remoting, while also enforcing strict type safety and other forms of code accuracy that ensure security and robustness. In fact, the concept of code management is a fundamental principle of the runtime. Code that targets the runtime is known as managed code, while code that does not target the runtime is known as unmanaged code. The class library, the other main component of the .NET Framework, is a comprehensive, object-oriented collection of reusable types that you can use to develop applications ranging from traditional command-line or graphical user interface (GUI) applications to applications based on the latest innovations provided by ASP.NET, such as Web Forms and XML Web services.
Visual studio.NET
Visual Studio .NET is the tool for rapidly building enterprise-scale ASP Web applications and high performance desktop applications. Visual Studio includes component-based development tools, such as Visual C#, Visual Basic, and Visual C++, as well as a number of additional technologies to simplify teambased design, development, and deployment of your solutions. Visual Studio supports the .NET Framework, which provides a common language runtime and unified programming classes; ASP.NET uses these components to create ASP Web applications and XML Web services. Also
- 10
MCA V
www.aspspider.net/AlumniSearchEngine
included is the MSDN Library, which contains all the documentation for these development tools.
VB.NET
Visual Basic and C# both have RAD (rapid-application development) support in Visual Studio .NET, with project templates, designers, and other features of the development environment. Both languages use the .NET Framework base classes. Visual Basic .NET, the next generation of the Visual Basic language, is designed to be a fast and easy way to create .NET applications, including XML Web services and ASP.NET Web applications. Visual Basic .NET has many new and improved features such as inheritance, interfaces, and overloading that makes it a powerful object-oriented programming language. Other new language features include free threading and structured exception handling. Visual Basic .NET fully integrates the .NET Framework and the Common Language Runtime, which together provide language interoperability, garbage collection, enhanced security, and improved versioning support.
ASP.NET
ASP.NET makes application development much easier than it was with classic ASP, and hence it has dramatically improved developers' productivity. ASP.NET enables you to provide richer functionality to your Web applications by writing the least amount of code. The best part is that ASP.NET enables you to select any of the available .NET programming languages. So, unlike classic ASP, in which you had to depend on interpreted VBScript and JScript languages, ASP.NET provides a wide choice of programming languages. In addition to the usual Web applications, ASP.NET allows you to create other types, which enables you to extend your applications' reach to new customers and business partners. For example, XML Web services enable sharing of data
- 11 MCA V
www.aspspider.net/AlumniSearchEngine
across the Internet regardless of the operating system and the programming language
Feasibility Study:The viability of the system is checked. The check is done under the following heads. (A) Technical (B) Operational (C) Economical
Technical:This is a study with respect to the machines to be used for the new system. Whether with the hardware/software available with the user the new system can be developed or not. The user is to be told what new hardware/soft wares are to be procured. The user is to be given a set of options from which best on is chosen. At times the user needs to be guided by the system team for such selection.
Operational:-Deals with the human aspect of the organization. It is seen whether with the existing manpower, the new system can be handled efficiently of not. If the users are not taken into confidence, resentment from them is inevitable. The users are to be convinced about the advantages of the new system.
Economical:It is seen whether the expenditure incurred for developing the new system will be cost effective or not. This basically involves the top level management of the company who are the decision makers. At the end of the feasibility study, a
- 12 MCA V
www.aspspider.net/AlumniSearchEngine
report is prepared and submitted to the user for his approval. It is highly probable that the initial report does not come up to with in the possible limit till it is approved by the user. A repeated study is done till the system become feasible for both, the user and the system development team.
NEED OF COMPUTERIZATION:
Now days each and every field of work need a computerized system due to the following limitations of a manual system: Delay in information retrieval. Problem in updating of current information Possible damage of paper carrying the information thereby chances of loosing valuable information. Considerable time taken for report generation for periodic requirements. Suspect reliability and maintainability of data Secrecy of information may not be maintained due to visible facts on paper Problem in compilation of data in various sorting order to achieve the rerequired requiring complicated sorting is extremely inconvenient.
- 13
MCA V
www.aspspider.net/AlumniSearchEngine
very quick response of any query report generation with less effort and high accuracy
SYSTEM IMPLEMENTATION:
The system has been developed and implemented on the following guidelines: This system is an interactive package. It is based on modular approach.
The modular approach incorporates the flexibility in terms of modification of the system.
The system is designed in a user friendly manner so that even a novice user of the computer can handle it without much difficulty.
CODING
Default.aspx
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="repository._Default" %> <%@ Register src="WebUserControl1.ascx" tagname="WebUserControl1" tagprefix="uc1" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> <style type="text/css"> .style53
- 14
MCA V
www.aspspider.net/AlumniSearchEngine
width: 100%; } .style54 { width: 454px; } .style56 { color: #FF0000; } .style58 { color: #000000; font-weight: bold; text-decoration: blink; } .style59 { color: #000000; } </style> </head> <body bgcolor="white" background="New%20Folder/BG001.jpg" > <form id="form1" runat="server"> <div style="width: 1017px; height: 736px;"> <uc1:WebUserControl1 ID="WebUserControl11" runat="server" /> <table class="style53" bgcolor="Aqua" frame="border" border="dotted"> <tr> <td colspan="4"> <maquee direction ="left" behaviour="Move"> WELCOME TO ALUMNI OF ALIGARH MUSLIM UNIVERSITY   ; &n bsp;   ; WELCOME TO ALUMNI OF ALIGARH MUSLIM UNIVERSITY </maquee> </td> </tr> <tr> <td></embed> <img alt="" src="wsi.jpg" style="width: 249px; height: 161px" /></td> <td bgcolor="Aqua" class="style54"> <asp:Image ID="Image1" runat="server" ImageUrl="~/New Folder/Search.jpg" Width="109px" /> <span class="style58" style="text-decoration: blink">RESISTER</span><br class="style56" /> <span class="style59">This Link provides the facility to alumni to resister yourself</span><br class="style56" /> <span class="style56">Enter Academic Information</span><br class="style56" /> <span class="style56">Enter General Information</span><br class="style56" />
- 15
MCA V
www.aspspider.net/AlumniSearchEngine
- 16
MCA V
www.aspspider.net/AlumniSearchEngine
Register.aspx.vb
Imports System.Data.SqlClient Partial Public Class WebForm9 Inherits System.Web.UI.Page
Protected Sub Button4_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button4.Click Label67.Text = "" Label68.Text = "" Label69.Text = "" Label70.Text = "" Label71.Text = "" Label72.Text = "" Dim i As Integer i = 1 CheckBoxList2.Items.Clear() CheckBoxList3.Items.Clear() CheckBoxList4.Items.Clear() CheckBoxList5.Items.Clear() CheckBoxList6.Items.Clear() CheckBoxList7.Items.Clear() For Each item As ListItem In CheckBoxList1.Items If item.Selected Then Select Case i Case 1 Label67.Text = item.Value Dim ds As DataSet
- 17
MCA V
www.aspspider.net/AlumniSearchEngine
- 18
MCA V
www.aspspider.net/AlumniSearchEngine
ds = New DataSet() Dim mysql As String mysql = "select distinct course from course where faculty=" + "'" + item.Value + "'" Dim myconnection As SqlConnection myconnection = New SqlConnection("Data Source=RAVI-95989F410F\SQLEXPRESS;Initial Catalog=shiv;Integrated Security=True") myconnection.Open() Dim da As SqlDataAdapter da = New SqlDataAdapter(mysql, myconnection) da.Fill(ds, "course") Dim dt As DataTable Dim n As Integer dt = ds.Tables("course") n = dt.Rows.Count Dim dr As DataRow For j = 0 To n - 1 dr = dt.Rows(j) CheckBoxList4.Items.Add(dr(0).ToString) Next myconnection.Close() Case 4 Label70.Text = item.Value Dim ds As DataSet ds = New DataSet() Dim mysql As String mysql = "select distinct course from course where faculty=" + "'" + item.Value + "'" Dim myconnection As SqlConnection myconnection = New SqlConnection("Data Source=RAVI-95989F410F\SQLEXPRESS;Initial Catalog=shiv;Integrated Security=True") myconnection.Open() Dim da As SqlDataAdapter da = New SqlDataAdapter(mysql, myconnection) da.Fill(ds, "course") Dim dt As DataTable Dim n As Integer dt = ds.Tables("course") n = dt.Rows.Count Dim dr As DataRow For j = 0 To n - 1 dr = dt.Rows(j) CheckBoxList5.Items.Add(dr(0).ToString) Next myconnection.Close() Case 5 Label71.Text = item.Value Dim ds As DataSet
- 19
MCA V
www.aspspider.net/AlumniSearchEngine
- 20
MCA V
www.aspspider.net/AlumniSearchEngine
For Each item As ListItem In CheckBoxList1.Items If item.Selected Then n = n + 1 Select Case n Case 1 f1 = item.Value Case 2 f2 = item.Value Case 3 f3 = item.Value Case 4 f4 = item.Value Case 5 f5 = item.Value Case 6 f6 = item.Value End Select End If Next For j = 11 To n + 10
- 21
MCA V
www.aspspider.net/AlumniSearchEngine
- 22
MCA V
www.aspspider.net/AlumniSearchEngine
Select Case s Case 1 Label74.Text = item.Value Label87.Text = f2 DropDownList2.Visible = True DropDownList3.Visible = True Case 2 Label88.Text = f2 Label75.Text = item.Value DropDownList4.Visible = True DropDownList5.Visible = True Case 3 Label76.Text = item.Value Label89.Text = f2 DropDownList6.Visible = True DropDownList7.Visible = True Case 4 Label90.Text = f2 Label77.Text = item.Value DropDownList8.Visible = True DropDownList9.Visible = True Case 5 Label78.Text = item.Value Label91.Text = f2 DropDownList10.Visible = True DropDownList11.Visible = True Case 6 Label92.Text = f2 Label79.Text = item.Value DropDownList12.Visible = True DropDownList13.Visible = True Case 7 Label93.Text = f2 Label80.Text = item.Value DropDownList14.Visible = True DropDownList15.Visible = True Case 8 Label94.Text = f2 Label81.Text = item.Value DropDownList16.Visible = True DropDownList17.Visible = True Case 9 Label95.Text = f2 Label82.Text = item.Value DropDownList18.Visible = True DropDownList19.Visible = True End Select s = s + 1 End If Next Case 13 For Each item As ListItem In CheckBoxList4.Items If item.Selected Then Select Case s Case 1 Label74.Text = item.Value Label87.Text = f3
- 23
MCA V
www.aspspider.net/AlumniSearchEngine
Next Case 14 For Each item As ListItem In CheckBoxList5.Items If item.Selected Then Select Case s Case 1 Label74.Text = item.Value Label87.Text = f4 DropDownList2.Visible = True DropDownList3.Visible = True Case 2 Label88.Text = f4 Label75.Text = item.Value
- 24
MCA V
www.aspspider.net/AlumniSearchEngine
- 25
MCA V
www.aspspider.net/AlumniSearchEngine
Next Case 16 For Each item As ListItem In CheckBoxList7.Items If item.Selected Then Select Case s Case 1 Label74.Text = item.Value Label87.Text = f6 DropDownList2.Visible = True DropDownList3.Visible = True Case 2 Label88.Text = f6 Label75.Text = item.Value DropDownList4.Visible = True DropDownList5.Visible = True Case 3 Label76.Text = item.Value Label89.Text = f6 DropDownList6.Visible = True DropDownList7.Visible = True Case 4 Label90.Text = f6
- 26
MCA V
www.aspspider.net/AlumniSearchEngine
- 27
MCA V
www.aspspider.net/AlumniSearchEngine
- 28
MCA V
www.aspspider.net/AlumniSearchEngine
- 29
MCA V
www.aspspider.net/AlumniSearchEngine
- 30
MCA V
www.aspspider.net/AlumniSearchEngine
- 31
MCA V
www.aspspider.net/AlumniSearchEngine
Next FileCopy("C:\Documents and Settings\RAVI\Desktop\repo1\repository\New Folder\Noimage.jpg", "C:\Documents and Settings\RAVI\Desktop\repo1\repository\New Folder\" + TextBox16.Text + ".jpg") Dim mycookie1 As HttpCookie = New HttpCookie("message", "Congrulations ! You have been resistered ") Response.Cookies.Add(mycookie1) myconnection.Close() Response.Redirect("message.aspx") End If End If
- 32
MCA V
www.aspspider.net/AlumniSearchEngine
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load Label16.Text = "" DropDownList22.Items.Add("Choose Year") DropDownList23.Items.Add("Choose Year") Dim c As Integer For c = 1960 To 2015 DropDownList22.Items.Add(c.ToString) DropDownList23.Items.Add(c.ToString) Next End Sub Protected Sub TextBox16_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles TextBox16.TextChanged Label16.Text = "" Dim myconnection As SqlConnection myconnection = New SqlConnection("Data Source=RAVI95989F410F\SQLEXPRESS;Initial Catalog=shiv;Integrated Security=True") Dim mysql As String mysql = "select eroll from alumni where eroll=" + "'" + TextBox16.Text + "'"
- 33
MCA V
www.aspspider.net/AlumniSearchEngine
Search.aspx.vb
Imports System.Data.SqlClient Imports System.Data Imports System.Web.UI.WebControls.DropDownList Partial Public Class WebForm5 Inherits System.Web.UI.Page Private Sub DropDownList2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList2.SelectedIndexChanged DropDownList3.Items.Clear() DropDownList3.Items.Add("[Choose Course]") End Sub Protected Sub Button5_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button5.Click Dim myconnection As SqlConnection Dim sql As String Dim i As Integer i = 0 Dim s, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14 As String Dim mycommand As SqlCommand myconnection = New SqlConnection("Data Source=RAVI95989F410F\SQLEXPRESS;Initial Catalog=shiv;Integrated Security=True") s = "select distinct name,hq,hall,ccity,cstate,ccountry,ocountry,ostate,ocity,mobile,email id,fyear,tyear from alumni INNER JOIN course1 ON alumni.eroll=course1.eroll where " If TextBox1.Text <> "" Then s1 = "name=" + "'" + TextBox1.Text + "'" + " and " s = s + s1
- 34
MCA V
www.aspspider.net/AlumniSearchEngine
"
"
"
"
If DropDownList8.SelectedValue <> "[Choose Country]" Then s9 = "ocountry=" + "'" + DropDownList8.SelectedValue + "'" + " and " s = s + s9 i = i + 1 End If If DropDownList9.SelectedValue <> "[Choose State]" Then s10 = "ostate=" + "'" + DropDownList9.SelectedValue + "'" + " and " s = s + s10 i = i + 1 End If If DropDownList10.SelectedValue <> "[Choose City]" Then s11 = "ocity=" + "'" + DropDownList10.SelectedValue + "'" + " and " s = s + s11
- 35
MCA V
www.aspspider.net/AlumniSearchEngine
Alumnilist1.aspx.vb
Imports System.Data.SqlClient Partial Public Class WebForm4 Inherits System.Web.UI.Page Dim i As Integer
- 36
MCA V
www.aspspider.net/AlumniSearchEngine
- 37
MCA V
www.aspspider.net/AlumniSearchEngine
Case 5 sql = "select name,hq,hall,fyear,tyear,mobile,emailid,ccountry,cstate,ccity,ocountr y,ostate,ocity from alumni where ostate like " + "'" + DropDownList1.SelectedValue + "%" + "'" Case 6 sql = "select name,hq,hall,fyear,tyear,mobile,emailid,ccountry,cstate,ccity ,ocountry,ostate,ocity from alumni where ocity like " + "'" + DropDownList1.SelectedValue + "%" + "'" Case 7 sql = "select name,hq,hall,fyear,tyear,mobile,emailid,ccountry,cstate,ccity,course, ocountry,ostate,ocity from Course1 INNER JOIN Alumni ON course1.eroll=alumni.eroll where course like " + "'" + DropDownList1.SelectedValue + "%" + "'" End Select mycommand = New SqlCommand(sql, myconnection) myconnection.Open() Dim ds As SqlDataReader = mycommand.ExecuteReader() GridView1.Visible = True GridView1.DataSource = ds GridView1.DataBind() myconnection.Close() End Sub End Class
Edit.aspx.vb
Imports System.Data.SqlClient Partial Public Class edit Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim mycookie As HttpCookie mycookie = Request.Cookies.Get("login") Image1.ImageUrl = "~/New Folder/" + mycookie.Value + ".jpg" Dim ds As DataSet ds = New DataSet() Dim mysql1, mysql2 As String mysql2 = "select faculty,course,syear,eyear from course1 where eroll=" + "'" + mycookie.Value + "'" mysql1 = "select name,fyear,tyear,hq,hall,ccity,cstate,ccountry,ocity,ostate,ocountry ,rnum,mobile,emailid from alumni where eroll=" + "'" + mycookie.Value + "'" Dim myconnection As SqlConnection myconnection = New SqlConnection("Data Source=RAVI95989F410F\SQLEXPRESS;Initial Catalog=shiv;Integrated Security=True") myconnection.Open() Dim da1, da2 As SqlDataAdapter da1 = New SqlDataAdapter(mysql1, myconnection) da2 = New SqlDataAdapter(mysql2, myconnection) da1.Fill(ds, "alumni") da2.Fill(ds, "course1") Dim dt1, dt2 As DataTable
- 38
MCA V
www.aspspider.net/AlumniSearchEngine
TextBox1.Text = dr(0).ToString TextBox2.Text = "from " + dr(1).ToString + " to " + dr(2).ToString TextBox3.Text = dr(3).ToString TextBox4.Text = dr(4).ToString TextBox5.Text = dr(5).ToString + "/" + dr(6).ToString + "/" + dr(7).ToString TextBox6.Text = dr(8).ToString + "/" + dr(9).ToString + "/" + dr(10).ToString For n = 0 To j - 1 dr1 = dt2.Rows(n) Dim faculty1, course1, syear1, eyear1 As New TextBox() faculty1.ID = "f" + n.ToString course1.ID = "c" + n.ToString syear1.ID = "s" + n.ToString eyear1.ID = "e" + n.ToString faculty1.Text = dr1(0).ToString course1.Text = dr1(1).ToString syear1.Text = dr1(2).ToString eyear1.Text = dr1(3).ToString Panel2.Controls.Add(faculty1) Panel2.Controls.Add(course1) Panel2.Controls.Add(syear1) Panel2.Controls.Add(eyear1) Panel2.Controls.Add(New LiteralControl("<br>")) Next TextBox7.Text = dr(11).ToString TextBox8.Text = dr(12).ToString TextBox9.Text = dr(13).ToString myconnection.Close() End Sub Protected Sub LinkButton3_Click(ByVal sender As Object, ByVal e As EventArgs) Handles LinkButton3.Click Response.Redirect("editai.aspx") End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click Dim mycookie As HttpCookie mycookie = Request.Cookies.Get("login") If FileUpload1.HasFile Then
- 39
MCA V
www.aspspider.net/AlumniSearchEngine
Editgi.aspc.vb
Imports System.Data.SqlClient Partial Public Class editgi Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Page.IsPostBack = False Then TextBox13.Enabled = True Dim mycookie As HttpCookie mycookie = Request.Cookies.Get("login") Dim ds As DataSet ds = New DataSet() Dim mysql1 As String mysql1 = "select name,fyear,tyear,hq,hall,ccity,cstate,ccountry,ocity,ostate,ocountry ,eroll from alumni where eroll=" + "'" + mycookie.Value + "'" Dim myconnection As SqlConnection myconnection = New SqlConnection("Data Source=RAVI95989F410F\SQLEXPRESS;Initial Catalog=shiv;Integrated Security=True") myconnection.Open() Dim da1 As SqlDataAdapter da1 = New SqlDataAdapter(mysql1, myconnection) da1.Fill(ds, "alumni") Dim dt1 As DataTable dt1 = ds.Tables("alumni") Dim dr As DataRow dr = dt1.Rows(0) TextBox14.Text = dr(0).ToString TextBox4.Text = dr(3).ToString TextBox5.Text = dr(1).ToString TextBox6.Text = dr(2).ToString DropDownList1.Items.Add(dr(4).ToString) TextBox7.Text = dr(5).ToString TextBox8.Text = dr(6).ToString TextBox9.Text = dr(7).ToString TextBox10.Text = dr(8).ToString TextBox11.Text = dr(9).ToString TextBox12.Text = dr(10).ToString TextBox13.Text = dr(11).ToString TextBox13.Enabled = False myconnection.Close() End If End Sub
- 40
MCA V
www.aspspider.net/AlumniSearchEngine
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click Dim mycookie As HttpCookie mycookie = Request.Cookies.Get("login") Dim mysql1 As String Dim mycommand As SqlCommand Dim myconnection As SqlConnection myconnection = New SqlConnection("Data Source=RAVI95989F410F\SQLEXPRESS;Initial Catalog=shiv;Integrated Security=True") mysql1 = "update alumni set name=@name,fyear=@fyear,tyear=@tyear,hall=@hall,hq=@hq,ccity=@ccity,c country=@ccountry,cstate=@cstate,ocity=@ocity,ocountry=@ocountry,osta te=@ostate where eroll=" + "'" + mycookie.Value + "'" mycommand = New SqlCommand(mysql1, myconnection) mycommand.Parameters.Add(New SqlParameter("@name", SqlDbType.Char, 30)) mycommand.Parameters.Add(New SqlParameter("@fyear", SqlDbType.NChar, 4)) mycommand.Parameters.Add(New SqlParameter("@tyear", SqlDbType.NChar, 4)) mycommand.Parameters.Add(New SqlParameter("@hall", SqlDbType.Char, 30)) mycommand.Parameters.Add(New SqlParameter("@hq", SqlDbType.Char, 30)) mycommand.Parameters.Add(New SqlParameter("@ccountry", SqlDbType.Char, 30)) mycommand.Parameters.Add(New SqlParameter("@cstate", SqlDbType.Char, 30)) mycommand.Parameters.Add(New SqlParameter("@ccity", SqlDbType.Char, 30)) mycommand.Parameters.Add(New SqlParameter("@ocountry", SqlDbType.Char, 30)) mycommand.Parameters.Add(New SqlParameter("@ostate", SqlDbType.Char, 30)) mycommand.Parameters.Add(New SqlParameter("@ocity", SqlDbType.Char, 30)) mycommand.Parameters("@name").Value = TextBox14.Text mycommand.Parameters("@fyear").Value = TextBox5.Text mycommand.Parameters("@tyear").Value = TextBox6.Text mycommand.Parameters("@hall").Value = DropDownList1.SelectedValue mycommand.Parameters("@hq").Value = TextBox4.Text mycommand.Parameters("@ccountry").Value = TextBox7.Text mycommand.Parameters("@cstate").Value = TextBox8.Text mycommand.Parameters("@ccity").Value = TextBox9.Text mycommand.Parameters("@ocountry").Value = TextBox10.Text mycommand.Parameters("@ostate").Value = TextBox11.Text mycommand.Parameters("@ocity").Value = TextBox12.Text mycommand.Connection.Open() mycommand.ExecuteNonQuery() mycommand.Connection.Close() Response.Redirect("edit.aspx")
- 41
MCA V
www.aspspider.net/AlumniSearchEngine
End Sub Protected Sub TextBox13_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles TextBox13.TextChanged End Sub End Class
Editci.aspx.vb
Imports System.Data.SqlClient Partial Public Class editci Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Page.IsPostBack = False Then Dim mycookie As HttpCookie mycookie = Request.Cookies.Get("login") Dim ds As DataSet ds = New DataSet() Dim mysql1 As String mysql1 = "select rnum,mobile,emailid from alumni where eroll=" + "'" + mycookie.Value + "'" Dim myconnection As SqlConnection myconnection = New SqlConnection("Data Source=RAVI95989F410F\SQLEXPRESS;Initial Catalog=shiv;Integrated Security=True") myconnection.Open() Dim da1 As SqlDataAdapter da1 = New SqlDataAdapter(mysql1, myconnection) da1.Fill(ds, "alumni") Dim dt1 As DataTable dt1 = ds.Tables("alumni") Dim dr As DataRow dr = dt1.Rows(0) TextBox1.Text = dr(0).ToString TextBox2.Text = dr(1).ToString TextBox3.Text = dr(2).ToString myconnection.Close() End If End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click Dim mycookie As HttpCookie mycookie = Request.Cookies.Get("login") Dim mysql1 As String Dim mycommand As SqlCommand Dim myconnection As SqlConnection myconnection = New SqlConnection("Data Source=RAVI95989F410F\SQLEXPRESS;Initial Catalog=shiv;Integrated Security=True") mysql1 = "update alumni set rnum=@rnum,mobile=@mobile,emailid=@emailid where eroll=" + "'" + mycookie.Value + "'"
- 42
MCA V
www.aspspider.net/AlumniSearchEngine
mycommand = New SqlCommand(mysql1, myconnection) mycommand.Parameters.Add(New SqlParameter("@rnum", SqlDbType.NChar, 13)) mycommand.Parameters.Add(New SqlParameter("@mobile", SqlDbType.NChar, 13)) mycommand.Parameters.Add(New SqlParameter("@emailid", SqlDbType.Char, 30)) mycommand.Parameters("@rnum").Value = TextBox1.Text mycommand.Parameters("@mobile").Value = TextBox2.Text mycommand.Parameters("@emailid").Value = TextBox3.Text mycommand.Connection.Open() mycommand.ExecuteNonQuery() mycommand.Connection.Close() Response.Redirect("edit.aspx") End Sub Protected Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button2.Click Response.Redirect("edit.aspx") End Sub End Class
Edidai.aspx.vb
Imports System.Data.SqlClient Partial Public Class editai Inherits System.Web.UI.Page Protected Sub Page_load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load, Me.Load, Me.Load Dim mycookie As HttpCookie mycookie = Request.Cookies.Get("login") End Sub Public Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click Label27.Text = "" Label28.Text = "" Label29.Text = "" Label30.Text = "" Label31.Text = "" Dim i As Integer i = 1 CheckBoxList3.Items.Clear() CheckBoxList4.Items.Clear() CheckBoxList5.Items.Clear() CheckBoxList6.Items.Clear() CheckBoxList7.Items.Clear() For Each item As ListItem In CheckBoxList1.Items If item.Selected Then Select Case i
- 43
MCA V
www.aspspider.net/AlumniSearchEngine
Case 3
- 44
MCA V
www.aspspider.net/AlumniSearchEngine
Label29.Text = item.Value Dim ds As DataSet ds = New DataSet() Dim mysql As String mysql = "select distinct course from course where faculty=" + "'" + item.Value + "'" Dim myconnection As SqlConnection myconnection = New SqlConnection("Data Source=RAVI-95989F410F\SQLEXPRESS;Initial Catalog=shiv;Integrated Security=True") myconnection.Open() Dim da As SqlDataAdapter da = New SqlDataAdapter(mysql, myconnection) da.Fill(ds, "course") Dim dt As DataTable Dim n As Integer dt = ds.Tables("course") n = dt.Rows.Count Dim dr As DataRow For j = 0 To n - 1 dr = dt.Rows(j) CheckBoxList5.Items.Add(dr(0).ToString) Next myconnection.Close() Case 4 Label30.Text = item.Value Dim ds As DataSet ds = New DataSet() Dim mysql As String mysql = "select distinct course from course where faculty=" + "'" + item.Value + "'" Dim myconnection As SqlConnection myconnection = New SqlConnection("Data Source=RAVI-95989F410F\SQLEXPRESS;Initial Catalog=shiv;Integrated Security=True") myconnection.Open() Dim da As SqlDataAdapter da = New SqlDataAdapter(mysql, myconnection) da.Fill(ds, "course") Dim dt As DataTable Dim n As Integer dt = ds.Tables("course") n = dt.Rows.Count Dim dr As DataRow For j = 0 To n - 1 dr = dt.Rows(j) CheckBoxList6.Items.Add(dr(0).ToString) Next myconnection.Close()
- 45
MCA V
www.aspspider.net/AlumniSearchEngine
End Sub Protected Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button2.Click Dim t As Integer For t = 1960 To 2015 DropDownList1.Items.Add(t.ToString) DropDownList2.Items.Add(t.ToString) DropDownList3.Items.Add(t.ToString) DropDownList4.Items.Add(t.ToString) DropDownList5.Items.Add(t.ToString) DropDownList6.Items.Add(t.ToString) DropDownList7.Items.Add(t.ToString) DropDownList8.Items.Add(t.ToString) DropDownList9.Items.Add(t.ToString) DropDownList10.Items.Add(t.ToString) DropDownList11.Items.Add(t.ToString) DropDownList12.Items.Add(t.ToString) DropDownList13.Items.Add(t.ToString) DropDownList14.Items.Add(t.ToString) DropDownList15.Items.Add(t.ToString) DropDownList16.Items.Add(t.ToString) DropDownList17.Items.Add(t.ToString)
- 46
MCA V
www.aspspider.net/AlumniSearchEngine
For Each item As ListItem In CheckBoxList1.Items If item.Selected Then n = n + 1 Select Case n Case 1 f1 = item.Value Case 2 f2 = item.Value Case 3 f3 = item.Value Case 4 f4 = item.Value Case 5 f5 = item.Value Case 6 f6 = item.Value
- 47
MCA V
www.aspspider.net/AlumniSearchEngine
- 48
MCA V
www.aspspider.net/AlumniSearchEngine
- 49
MCA V
www.aspspider.net/AlumniSearchEngine
Next Case 14 For Each item As ListItem In CheckBoxList6.Items If item.Selected Then Select Case s Case 1 Label32.Text = item.Value Label42.Text = f4 DropDownList1.Visible = True DropDownList2.Visible = True Case 2 Label33.Text = item.Value Label43.Text = f4 DropDownList3.Visible = True DropDownList4.Visible = True
- 50
MCA V
www.aspspider.net/AlumniSearchEngine
- 51
MCA V
www.aspspider.net/AlumniSearchEngine
Protected Sub Button4_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button4.Click Label32.Text = "" Label33.Text = "" Label34.Text = "" Label35.Text = "" Label36.Text = "" Label37.Text = "" Label38.Text = "" Label39.Text = "" Label40.Text = "" Label42.Text = "" Label43.Text = "" Label44.Text = "" Label45.Text = "" Label46.Text = "" Label47.Text = "" Label48.Text = "" Label49.Text = "" Label50.Text = "" DropDownList2.Visible = False DropDownList3.Visible = False DropDownList4.Visible = False
- 52
MCA V
www.aspspider.net/AlumniSearchEngine
- 53
MCA V
www.aspspider.net/AlumniSearchEngine
For n = 1 To n1 mysql1 = "Insert into course1(eroll,course,faculty,syear,eyear) values(@eroll,@course,@faculty,@syear,@eyear)" mycommand = New SqlCommand(mysql1, myconnection) mycommand.Parameters.Add(New SqlParameter("@eroll", SqlDbType.Char, 6)) mycommand.Parameters.Add(New SqlParameter("@faculty", SqlDbType.Char, 50)) mycommand.Parameters.Add(New SqlParameter("@course", SqlDbType.Char, 50)) mycommand.Parameters.Add(New SqlParameter("@syear", SqlDbType.NChar, 4)) mycommand.Parameters.Add(New SqlParameter("@eyear", SqlDbType.Char, 4))
Select Case n Case 1 mycommand.Parameters("@eroll").Value = mycookie.Value mycommand.Parameters("@faculty").Value = Label42.Text mycommand.Parameters("@course").Value = Label32.Text mycommand.Parameters("@syear").Value = DropDownList1.Text mycommand.Parameters("@eyear").Value = DropDownList2.Text Case 2 mycommand.Parameters("@eroll").Value = mycommand.Parameters("@faculty").Value =
mycookie.Value Label43.Text
- 54
MCA V
www.aspspider.net/AlumniSearchEngine
Label33.Text DropDownList3.Text
mycommand.Parameters("@eyear").Value = DropDownList4.Text Case 3 mycommand.Parameters("@eroll").Value = mycookie.Value mycommand.Parameters("@faculty").Value = Label44.Text mycommand.Parameters("@course").Value = Label34.Text mycommand.Parameters("@syear").Value = DropDownList5.Text mycommand.Parameters("@eyear").Value = DropDownList6.Text Case 4 mycommand.Parameters("@eroll").Value = mycookie.Value mycommand.Parameters("@faculty").Value = Label45.Text mycommand.Parameters("@course").Value = Label35.Text mycommand.Parameters("@syear").Value = DropDownList7.Text mycommand.Parameters("@eyear").Value = DropDownList8.Text Case 5 mycookie.Value Label46.Text Label36.Text DropDownList9.Text mycommand.Parameters("@eroll").Value = mycommand.Parameters("@faculty").Value = mycommand.Parameters("@course").Value = mycommand.Parameters("@syear").Value =
- 55
MCA V
www.aspspider.net/AlumniSearchEngine
DropDownList13.Text
mycommand.Parameters("@eyear").Value = DropDownList14.Text Case 8 mycommand.Parameters("@eroll").Value = mycookie.Value mycommand.Parameters("@faculty").Value = Label49.Text mycommand.Parameters("@course").Value = Label39.Text mycommand.Parameters("@syear").Value = DropDownList15.Text mycommand.Parameters("@eyear").Value = DropDownList16.Text Case 9 mycommand.Parameters("@eroll").Value = mycookie.Value mycommand.Parameters("@faculty").Value = Label50.Text mycommand.Parameters("@course").Value = Label40.Text mycommand.Parameters("@syear").Value = DropDownList17.Text mycommand.Parameters("@eyear").Value = DropDownList18.Text End Select mycommand.Connection.Open() mycommand.ExecuteNonQuery() mycommand.Connection.Close()
Friend.aspx.vb
Imports System.Data.SqlClient Partial Public Class _friend Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click Dim mycookie As HttpCookie mycookie = Request.Cookies.Get("login") Dim myconnection As SqlConnection myconnection = New SqlConnection("Data Source=RAVI95989F410F\SQLEXPRESS;Initial Catalog=shiv;Integrated Security=True") Dim mycommand As SqlCommand Dim mysql As String
- 56
MCA V
www.aspspider.net/AlumniSearchEngine
Friendedit.aspx.vb
Imports System.Data.SqlClient Partial Public Class friendedit Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim mycookie As HttpCookie mycookie = Request.Cookies.Get("login") Dim myconnection As SqlConnection Dim s As String Dim i As Integer i = 0 Dim mycommand As SqlCommand myconnection = New SqlConnection("Data Source=RAVI95989F410F\SQLEXPRESS;Initial Catalog=shiv;Integrated Security=True")
- 57
MCA V
www.aspspider.net/AlumniSearchEngine
Changep.aspx.vb
Imports System.Data.SqlClient Partial Public Class changep Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click Dim mycookie As HttpCookie mycookie = Request.Cookies.Get("login") Dim mysql1 As String Dim mycommand As SqlCommand Dim myconnection As SqlConnection myconnection = New SqlConnection("Data Source=RAVI95989F410F\SQLEXPRESS;Initial Catalog=shiv;Integrated Security=True") mysql1 = "update alumni set password=@password where eroll=" + "'" + mycookie.Value + "'" mycommand = New SqlCommand(mysql1, myconnection) mycommand.Parameters.Add(New SqlParameter("@password", SqlDbType.Char, 10)) mycommand.Parameters("@password").Value = Password1.Value mycommand.Connection.Open() mycommand.ExecuteNonQuery() mycommand.Connection.Close() Response.Redirect("edit.aspx") End Sub Protected Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button2.Click Response.Redirect("edit.aspx") End Sub End Class
Login.aspx.vb
Imports System.Data.SqlClient
- 58
MCA V
www.aspspider.net/AlumniSearchEngine
Partial Public Class WebForm7 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click Dim ds As DataSet ds = New DataSet() Dim mysql As String mysql = "select eroll,password from password where eroll=" + "'" + TextBox1.Text + "'" + "and" + " " + "password" + "=" + "'" + Password1.Value + "'" Dim myconnection As SqlConnection myconnection = New SqlConnection("Data Source=RAVI95989F410F\SQLEXPRESS;Initial Catalog=shiv;Integrated Security=True") myconnection.Open() Dim da As SqlDataAdapter da = New SqlDataAdapter(mysql, myconnection) da.Fill(ds, "password") Dim dt As DataTable dt = ds.Tables("password") Dim n As Integer n = dt.Rows.Count If n = 0 Then Label5.Text = "SORRY!Enrolment And Password does not match" Else Dim mycookie As HttpCookie = New HttpCookie("login", TextBox1.Text) Response.Cookies.Add(mycookie) Response.Redirect("edit.aspx") End If myconnection.Close() End Sub End Class
Message.aspx.vb
Public Partial Class message Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim mycookie1 As HttpCookie mycookie1 = Request.Cookies.Get("message") Label1.Text = mycookie1.Value End Sub End Class
Passwordhelp.aspx.vb
Imports System.Data.SqlClient
- 59
MCA V
www.aspspider.net/AlumniSearchEngine
Partial Public Class passwordhelp Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click Label6.Text = "" Dim ds As DataSet ds = New DataSet() Dim mysql As String mysql = "select password from password where eroll =" + "'" + TextBox1.Text + "'" + " and " + "ques1 =" + "'" + DropDownList1.SelectedValue + "'" + " and " + "ans1 =" + "'" + TextBox3.Text + "'" Dim myconnection As SqlConnection myconnection = New SqlConnection("Data Source=RAVI95989F410F\SQLEXPRESS;Initial Catalog=shiv;Integrated Security=True") myconnection.Open() Dim da As SqlDataAdapter da = New SqlDataAdapter(mysql, myconnection) da.Fill(ds, "password") Dim dr As DataRow Dim dt As DataTable dt = ds.Tables("password") Dim n As Integer n = dt.Rows.Count If n = 0 Then Label6.Text = "Security question and answer does not match" Else dr = dt.Rows(0) Label6.Text = "Your password is " + dr(0).ToString End If myconnection.Close() End Sub End Class
Webusercontrol1.aspx.vb
Public Partial Class WebUserControl1 Inherits System.Web.UI.UserControl Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load End Sub Protected Sub Menu1_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemClick If Menu1.SelectedItem.Text = "By Current Country" Then Dim mycookie1 As HttpCookie = New HttpCookie("Menu1", Menu1.SelectedValue) Response.Cookies.Add(mycookie1)
- 60
MCA V
www.aspspider.net/AlumniSearchEngine
REFERENCES
Black Book by Holzmer. Visual Studio Professional 2005 by Wrox publication. ASP.NET, by NIIT. Complete reference of SQL SERVER Evan Bay Ross (DBMS)
- 61 MCA V
www.aspspider.net/AlumniSearchEngine
- 62
MCA V
www.aspspider.net/AlumniSearchEngine