You are on page 1of 71

Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.

com

COLLEGE MANAGEMENT SYSTEM

1.Introduction

College management software is prepared to maintain the day to day operations in a


leading college. This software helps them to maintain the student and employee records. So the
maintain becomes easier. This is a general software serve the purpose of maintenance of records
in colleges. This software provides them very easier option to search for the student details, his
fee status. Attendance, test marks, test result etc.,

2.Purpose

The purpose of this document is to specify requirements and to give guidelines for the
development of above said projects.in particular it gives guidelines on how to prepare the above
said project.

This document is intended to be a practical guide for people who developing this application.

3.Scope

This is of generic type software, suitable to all colleges. This software has all the
modules to manage college transactions. Separate division is provided to maintain admission
process. Student management, Staff management, etc.,

4.Goal

The main goal of the application is to maintain the record of the college, this software is
helpful to the colleges to maintain the student and employee management.

5.STRUCTURE OF THE PROJECT

5.1 Existing System:

1
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

At present in colleges all records maintained manually. There are thousands of students joining
each year. As the years goes then number of students also get increases, for the staff to maintain
all these students records is very tedious and time consuming. Update fee, test marks, test result
all these need to be done in time to achieve college management need to be recruit more peoples.
To solve this problem this project is prepared which help the management to maintain the
records accurately.
The existing system has some disadvantages. They are as below:

• Lack of security data.

• More man power.

• Its time consuming.

• Consumes large volume of pare work.

• Needs manual calculations.

• No direct role for the higher officials.

• Damage of machines due to lack of attention.

To avoid all these limitations and make the working more accurately the system needs to be
computerized in the effective manner

5.2 Proposed System:

In the proposed system all the parameter are considered to maintain neat and easier solutions. In
college to maintain all student records they need have more staff and also place to maintain the
records. Even maintained properly when ever required they are not available. To solve this
problem this program is designed. It serve the purpose of maintain records. Collecting fee.
Announcing the test results. Etc.,

The main objective of the existing system is to provide a user friendly interface. The
system, which is proposed now computerized all the details that are maintained manually. Once
the details are fed into the computer there is no need for various persons to deal with separate

2
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

sections. Only a single person is enough to maintain all the reports. The security can also be
given as per the requirement of the user.

 Large volumes of data can be stored with case.

 Maintenance of file is flexible.

 Records stored are updated now and then.

 Stored data and procedures can be easily edited.

 Reports can be generated with case.

 Accurate calculations are made.

 Less manpower required

3
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

6.SYSTEM REQUIREMENTS

6.1 HARDWARE REQUIREMENTS:

The hardware thus used here are consists of:

Processor AMD A4-5000 APU

RAM 1 GB

Graphics 1.50 GHz

Quality 64-bit Screen

Resolution 1366* 768

Mouse Standard Optical

6.2 SOFTWARE REQUIREMENTS:

The software used here consists of:

Operating System : windows 7 and above

Developing Tool : MS visual Studio 2010

Front End (Design) : VB.NET

Back End (Database) : MS SQL server 2008

4
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

FEASIBILITY STUDY

Economically Feasibility:

The system being developed is economic with respect to School or Collage’s point of view. It is
cost effective in the sense that has eliminated the paper work completely.

The system is also time effective because the calculations are automated which are made at the
end of the month or as per the user requirement.

The result obtained contains minimum errors and are highly accurate as the data is required.

Technical feasibility:

The technical requirement for the system is economic and it does not use any other additional
Hardware and software.

Behavioral Feasibility:

The system working is quite easy to use and learn due to its simple but attractive interface. User
requires no special training for operating the system.

Working Of Present System

In the present system all work is done on paper. The whole session attendance is stored in
register and at the and of the session the reports are generated. We are not interested in
generating report in the middle of the session or as per the requirement because it takes more
time in calculation. At the end of session the students who don’t have 75% attendance get a
notice.

DISADVANTAGES OF PRESENT WORKING SYSTEM

• Not User Friendly: The existing system is not user friendly because the retrieval of data is
very slow and data is not maintained efficiently.

• Difficulty in report generating: We require more calculations to generate the report so it is


generated at the end of the session. And the student not get a single chance to improve their
attendance

5
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

• Manual control: All calculations to generate report is done manually so there is greater chance
of errors.

• Lots of paperwork: Existing system requires lot of paper work. Loss of even a single
register/record led to difficult situation because all the papers are needed to generate the reports.

• Time consuming: Every work is done manually so we cannot generate report in the middle of
the session or as per the requirement because it is very time consuming.

CHAREACTERSTIC OF THE PROPOSED SYSTEM

• User Friendly:- The proposed system is user friendly because the retrieval and storing of data is
fast and data is maintained efficiently. Moreover the graphical user interface is provided in the
proposed system, which provides user to deal with the system very easily.

• Reports are easily generated: reports can be easily generated in the proposed system so user can
generate the report as per the requirement (monthly) or in the middle of the session. User can
give the notice to the students so he/she become regular.

• Very less paper work: The proposed system requires very less paper work. All the data is feted
into the computer immediately and reports can be generated through computers. Moreover work
become very easy because there is no need to keep data on papers.

• Computer operator control: Computer operator control will be there so no chance of errors.
Moreover storing and retrieving of information is easy. So work

can be done speedily and in time.

6
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

SDLC (Software Development Life Cycle)

7
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Data Tables

Attendance Tab

column Name Data Type


date smalldatetime
course nvarchar(MAX)
sem nvarchar(MAX)
sub nvarchar(MAX)
regno nvarchar(MAX)
name nvarchar(MAX)
attendance nvarchar(MAX)

Course Details

Column Name Data Type


coursename nvarchar(MAX)
details nvarchar(MAX)

Exam Marks

Column Name Data Type


examdate nvarchar(MAX)
course nvarchar(MAX)
sem nvarchar(MAX)
sub nvarchar(MAX)
regno nvarchar(MAX)
name nvarchar(MAX)
marks1 nvarchar(MAX)
marks2 nvarchar(MAX)

8
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

marks3 nvarchar(MAX)
marks4 nvarchar(MAX)
marks5 nvarchar(MAX)

Login

Column Name Data Type


Uname nvarchar(MAX)
pword nvarchar(MAX)

Fees collection

Column Name Data Type


regno nvarchar(MAX)
name nvarchar(MAX)
admission varchar(MAX)
tuition nvarchar(MAX)
library nvarchar(MAX)
sports nvarchar(MAX)
others nvarchar(MAX)
total nvarchar(MAX)
balance nvarchar(MAX)

Staff Details

Column Name Data Type


staffcode nvarchar(MAX)
name nvarchar(MAX)
address nvarchar(MAX)

9
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

pincode nvarchar(MAX)
phne nvarchar(MAX)
email nvarchar(MAX)
quali nvarchar(MAX)
desi nvarchar(MAX)

Student Details

Column Name Data Type


regno nvarchar(MAX)
name nvarchar(MAX)
parent nvarchar(MAX)
address nvarchar(MAX)
course nvarchar(MAX)
sem nvarchar(MAX)

Subject Details

Column Name Data Type


course nvarchar(MAX)
sem nvarchar(MAX)
short nvarchar(MAX)
fullname nvarchar(MAX)

10
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Data flow diagram

11
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Entity relation diagram

12
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

SCREENSHOT OF FORM
Splash screen

Login Form

13
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

MDI form

Course details

14
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Subject details

Staff details

15
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Student details

Fees collection

16
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Attendance

Exam marks entry

17
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

REPORT

Staff list

Student list

18
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Fees collection report

Exam result all

19
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Exam result

20
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Testing:
"Testing is the process of analysing a software item to detect the differences between existing
and required conditions and to evalaute the features of software item". The system is tested under
adverse situations and environment to test its performance, reliability and robustness. Verification
and validation is done for the system and it is reviewed against each and every customer
requirement specification.

The main objective of testing are:

 Testing is a process of executing a program with the interest of finding an error.

 A good test is one that has high probability of finding the yet undiscovered errors.

 A successful test is the one that has high portability of finding the undiscovered errors.

 Tests designed to reflect the frequency of user inputs used for reliability estimation.

To test the process two classes of inputs are provided, they are:

a. A software configuration that includes a software requirement specification, a design


specification and source code.

b. A software configuration that includes a test plan and procedure, any testing tool and test
cases and their expected results.

Testing is performed to prove that there are no errors in program. This is extremely difficult since
designer cannot prove hundred percent accurate. Therefore, testing is done with a explicit intension
of finding errors that make the program fail. Testing has its own cycle. It requires 5 basic critical
factors: planning , project and process management, risk management, inspirits, measurement
tools.

Types of Testing:

Software testing is a critical element of software quality assurance and represents the
ultimate review of specification, design and code generation. there are three types of testing under
which a system is tested under different perspectives.they are:

1. White box testing

2. Black box testing

3. Alpha Testing

21
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

4. Beta testing

5. Clean Room testing

6. Defect Testing

White Box Testing:

This is a method of testing software that that tests internal structures or working of an
application, as opposed to its functionality. Internal program logic is excercised using this
technique. The tester chooses inputs to exercise paths through the code and determine the
appropriate outputs. This can be applied at the unit, integration and system levels of software
testing process.

White box test design techniques include the following code coverage criteria:

 control flow testing

 data flow testing

 branch testing

 statement coverage

 decision coverage

 prime path testing

 path testing

White box testing use these above criteria as guidelines to create an error free environment by
examining any fragile code. So these are the building blocks of white box testing. The whole point
of white box testing is the ability to know which line of the code is being executed and being able
to identify what the correct output should be.

Black box Testing:

Black box testing is a method of software testing that examines the functionality of an
application without peering into its internal structures and working. Software requirements are
exercised using this technique. This method can be applied to every level of software testing.

Typical black box test design techniques include:

 decision table testing

 all-pairs testing

22
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

 equivalence partitioning

 boundary value analysis

 cause - effect graph

 error guessing

 state transition

 user story testing

 domain analysis

 combining technique

Test cases are built around specifications and requirements. Although the tests used are primarily
functional in nature, non functional tests may also be used. The test designer selects both valid and
invalid inputs and determines the correct output.

Test Process:

The general testing process is the creation of a test stratergy, creation of test plan/design and the
execution of tests. Tests data are the inputs that have been divised tp test the system.

Stages in testing process are:

1. Unit Testing
2. Module Testing
3. Sub-System Testing
4. System Testing
5. Acceptance Testing

VALIDATION:

At the culmination of integration testing, software is completely assembled as a package, interface


error have been uncovered and corrected and final serves of software tests-validation testing may
begin. Validation can defined in many ways. Buta simple defination is that validation succeeds
when software function in a manner that can be reasonably expected by the customer, software
validation is achieved through a series of black box test that will be used to demonstrate
conformity with the requirements.

A test plan outlines the class tests that will be used to demonstrate the conformity with
requirements. Both the plan and procedure are designed to ensure that all the functional

23
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

requirements are satisfied. All the behavioral characteristics are achieved. All performance
requirements are attained documentation is correct and human engineering and other requirements
are met.

24
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Source code

Course details

Imports System.Data.SqlClient
Public Class coursedetails
Dim pkvar As String
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
TextBox1.Text = ""
TextBox2.Text = ""
End Sub

Sub saverecord()
If TextBox1.Text = "" Then
MsgBox("please enter the necessary details")
Exit Sub
End If
If TextBox2.Text = "" Then
MsgBox("please enter the necessary details")
Exit Sub
End If
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd0 As New SqlCommand("select coursename from coursedetails where coursename='"
& UCase(TextBox1.Text) & "'", conn)
Dim d1 As SqlDataReader = cmd0.ExecuteReader()
If d1.HasRows Then
MsgBox("this record is already present in the database")
If conn.State = ConnectionState.Open Then conn.Close()
Exit Sub

25
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

End If
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
q1var = "Insert into coursedetails("
q2var = "values("
q1var = q1var & "coursename" & ","
q2var = q2var & "'" & TextBox1.Text & "',"
q1var = q1var & "details" & ")"
q2var = q2var & "'" & TextBox2.Text & "')"
Dim cmd1 As New SqlCommand(q1var & q2var, conn)
cmd1.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()
MsgBox("Registered Successfully")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
saverecord()
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click
If vbNo = MsgBox("Are you sure you want modify this record", MsgBoxStyle.YesNo, "delete")
Then Exit Sub
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd1 As New SqlCommand("delete from coursedetails where coursename='" & pkVar &
"'", conn)
cmd1.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()
saverecord()
End Sub

26
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Private Sub coursedetails_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
Me.WindowState = FormWindowState.Maximized

End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button4.Click
If vbNo = MsgBox("Are you sure you want delete this record", MsgBoxStyle.YesNo, "delete")
Then Exit Sub
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd1 As New SqlCommand("delete from coursedetails where coursename='" & pkvar &
"'", conn)
cmd1.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()
disrecords()
End Sub
Sub disrecords()
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim DS1 As New DataSet
Dim adp As New SqlDataAdapter("select coursename,details from coursedetails order by
coursename", conn)
adp.Fill(DS1)
dg1.DataSource = DS1.Tables(0)

If conn.State = ConnectionState.Open Then conn.Close()


End Sub

27
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button5.Click
disrecords()

End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button6.Click
Me.Close()
End Sub

Private Sub dg1_CellContentClick(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles dg1.CellContentClick
pkvar = dg1.CurrentRow.Cells(0).Value
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim Cmd0 As New SqlCommand("select * from coursedetails where coursename = '" & pkvar
& "'", conn)
Dim D1 As SqlDataReader = Cmd0.ExecuteReader()
If D1.HasRows Then
D1.Read()

TextBox1.Text = D1(0).ToString
TextBox2.Text = D1(1).ToString

Else
TextBox1.Text = ""
TextBox2.Text = ""

28
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

End If
If conn.State = ConnectionState.Open Then conn.Close()
End Sub

Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If Char.IsLetter(e.KeyChar) = False And Char.IsControl(e.KeyChar) = False Then
e.Handled = True
MsgBox("Please enter a valid name")

End If
End Sub

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles TextBox1.TextChanged

End Sub
End Class

exam
Imports System.Data.SqlClient

Public Class exam

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
Me.Close()

End Sub

29
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim DS1 As New DataSet
Dim adp As New SqlDataAdapter("select * from exammaks order by course", conn)
adp.Fill(DS1)
DataGridView1.DataSource = DS1.Tables(0)

If conn.State = ConnectionState.Open Then conn.Close()


End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As
System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim XPos, YPos As Long
YPos = 50
Dim MyFont As New Font("Arial", 18)
XPos = 10
e.Graphics.DrawString("ABC College Administration", MyFont, Brushes.Black, XPos, YPos)
YPos += 50
MyFont = New Font("Arial", 12)
e.Graphics.DrawString("No. 101, 4th floor, UB City, Bangalore - 560001", MyFont,
Brushes.Black, XPos, YPos)
YPos += 100
XPos = 10
e.Graphics.DrawString("Emp List Report", MyFont, Brushes.Black, XPos, YPos)
YPos += 50
XPos = 10
MyFont = New Font("Arial", 12)

e.Graphics.DrawString("sub", MyFont, Brushes.Black, XPos, YPos)


XPos = XPos + 75

30
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

e.Graphics.DrawString("regno", MyFont, Brushes.Black, XPos, YPos)


XPos = XPos + 75
e.Graphics.DrawString("name", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString("marks1", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString("marks2", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString("marks3", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString("marks4", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString("marks5", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75

YPos += 25
For Each r As DataGridViewRow In DataGridView1.Rows

XPos = 10
e.Graphics.DrawString(r.Cells(3).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString(r.Cells(4).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString(r.Cells(5).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString(r.Cells(6).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString(r.Cells(7).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75

31
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

e.Graphics.DrawString(r.Cells(8).Value, MyFont, Brushes.Black, XPos, YPos)


XPos = XPos + 75
e.Graphics.DrawString(r.Cells(9).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString(r.Cells(10).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75

YPos += 25
Next
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click
PP1.ShowDialog()

End Sub

Private Sub exam_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load
Me.WindowState = FormWindowState.Maximized

End Sub
End Class

Exam result

Imports System.Data.SqlClient

Public Class examresult

32
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
i=1
DataGridView1.Rows.Clear()
DataGridView1.RowCount = 20
DataGridView1.Rows(i).Cells(0).Value = "regno"
DataGridView1.Rows(i).Cells(1).Value = TextBox1.Text
i=i+1
Dim cmd2a As New SqlCommand("select * from stddetails where regno='" &
Val(TextBox1.Text) & "'", conn)
Dim d2a As SqlDataReader = cmd2a.ExecuteReader()
If d2a.Read Then
DataGridView1.Rows(i).Cells(0).Value = "name"
DataGridView1.Rows(i).Cells(1).Value = d2a.GetValue(1).ToString
i=i+1
DataGridView1.Rows(i).Cells(0).Value = "course"
DataGridView1.Rows(i).Cells(1).Value = d2a.GetValue(4).ToString
i=i+1
DataGridView1.Rows(i).Cells(0).Value = "sem"
DataGridView1.Rows(i).Cells(1).Value = d2a.GetValue(5).ToString
i=i+1

End If

If conn.State = ConnectionState.Open Then conn.Close()


conn.Open()
Dim cmd0 As New SqlCommand("select attendance from AttendanceTab where regno='" &
Val(TextBox1.Text) & "'", conn)
Dim d1 As SqlDataReader = cmd0.ExecuteReader()

33
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

If d1.Read Then
DataGridView1.Rows(i).Cells(0).Value = "attendance"
DataGridView1.Rows(i).Cells(1).Value = d1.GetValue(0).ToString
i=i+2

End If
conn.Close()

If conn.State = ConnectionState.Open Then conn.Close()


conn.Open()
Dim cmd4 As New SqlCommand("select * from exammaks where regno='" &
Val(TextBox1.Text) & "'", conn)
Dim d4 As SqlDataReader = cmd4.ExecuteReader()
Do While d4.Read
DataGridView1.Rows(i).Cells(0).Value = d4.GetValue(3).ToString
DataGridView1.Rows(i).Cells(1).Value = d4.GetValue(6).ToString
i=i+1

Loop
conn.Close()

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
Me.Close()

End Sub

34
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Private Sub examresult_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load
DataGridView1.RowCount = 25
DataGridView1.ColumnCount = 3
DataGridView1.Columns(0).Width = 150
DataGridView1.Columns(1).Width = 150
DataGridView1.Columns(0).HeaderText = ""
DataGridView1.Columns(0).HeaderText = ""
Me.WindowState = FormWindowState.Maximized
End Sub

Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If Char.IsDigit(e.KeyChar) = False And Char.IsControl(e.KeyChar) = False Then
e.Handled = True
MsgBox("Please enter a valid number")
End If
End Sub

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles TextBox1.TextChanged
End Sub

Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As


System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim XPos, YPos As Long
YPos = 50
Dim MyFont As New Font("Arial", 18)
XPos = 10
e.Graphics.DrawString("ABC College Administration", MyFont, Brushes.Black, XPos, YPos)
YPos += 50

35
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

MyFont = New Font("Arial", 12)


e.Graphics.DrawString("No. 101, 4th floor, UB City, Bangalore - 560001", MyFont,
Brushes.Black, XPos, YPos)
YPos += 100
XPos = 10
e.Graphics.DrawString("Emp List Report", MyFont, Brushes.Black, XPos, YPos)
YPos += 50
XPos = 10
MyFont = New Font("Arial", 12)

e.Graphics.DrawString("Column Name ", MyFont, Brushes.Black, XPos, YPos)


XPos = XPos + 150
e.Graphics.DrawString("Result", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150

YPos += 25
For Each r As DataGridViewRow In DataGridView1.Rows

XPos = 10
e.Graphics.DrawString(r.Cells(0).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150
e.Graphics.DrawString(r.Cells(1).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150

YPos += 25
Next
End Sub

36
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click
pp1.ShowDialog()
End Sub

End Class

Feescollection
Imports System.Data.SqlClient

Public Class feescollection

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim DS1 As New DataSet
Dim adp As New SqlDataAdapter("select * from feecoll order by regno", conn)
adp.Fill(DS1)
DataGridView1.DataSource = DS1.Tables(0)

If conn.State = ConnectionState.Open Then conn.Close()


End Sub

Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As


System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim XPos, YPos As Long
YPos = 50
Dim MyFont As New Font("Arial", 18)

37
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

XPos = 10
e.Graphics.DrawString("ABC College Administration", MyFont, Brushes.Black, XPos, YPos)
YPos += 50
MyFont = New Font("Arial", 12)
e.Graphics.DrawString("No. 101, 4th floor, UB City, Bangalore - 560001", MyFont,
Brushes.Black, XPos, YPos)
YPos += 100
XPos = 10
e.Graphics.DrawString("Student Fee List Report", MyFont, Brushes.Black, XPos, YPos)
YPos += 50
XPos = 10
MyFont = New Font("Arial", 12)
e.Graphics.DrawString("Reg No", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString("Student Name", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150
e.Graphics.DrawString("Fee1", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString("Fee2", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString("Fee3", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString("Fee4", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString("Fee5", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString("Fee Total", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString("Balance", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75

38
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

YPos += 25
For Each r As DataGridViewRow In DataGridView1.Rows

XPos = 10
e.Graphics.DrawString(r.Cells(0).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString(r.Cells(1).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150
e.Graphics.DrawString(r.Cells(2).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString(r.Cells(3).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString(r.Cells(4).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString(r.Cells(5).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString(r.Cells(6).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString(r.Cells(7).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
e.Graphics.DrawString(r.Cells(8).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 75
YPos += 25
Next
End Sub

Private Sub pp1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


pp1.Load

39
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
pp1.ShowDialog()
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click
Me.Close()
End Sub

Private Sub feescollection_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
Me.WindowState = FormWindowState.Maximized

End Sub
End Class

Form1

Imports System.Data.SqlClient

Public Class Form1

Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles OK.Click
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()

40
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Dim Cmd0 As New SqlCommand("select * from login where uname='" &


UCase(UsernameTextBox.Text) & "'and pword='" & PasswordTextBox.Text & "'", conn)
Dim D1 As SqlDataReader = Cmd0.ExecuteReader()
If D1.HasRows Then
MDIParent1.Show()
Me.Hide()
If conn.State = ConnectionState.Open Then conn.Close()
Else
MsgBox("username or password is not correct please check")
End If
End Sub

Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Cancel.Click
Me.Close()
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load
Me.WindowState = FormWindowState.Maximized
End Sub
End Class

Front

Public Class front

Private Sub front_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load
Me.WindowState = FormWindowState.Maximized

41
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Timer1.Tick
i=i+1
If (i >= 20) Then
Timer1.Enabled = False
Me.Hide()
Form1.Show()
End If

End Sub

End Class

Login form1

Imports System.Data.SqlClient

Public Class LoginForm1

' TODO: Insert code to perform custom authentication using the provided username and
password
' (See http://go.microsoft.com/fwlink/?LinkId=35339).
' The custom principal can then be attached to the current thread's principal as follows:
' My.User.CurrentPrincipal = CustomPrincipal
' where CustomPrincipal is the IPrincipal implementation used to perform authentication.
' Subsequently, My.User will return identity information encapsulated in the CustomPrincipal
object
' such as the username, display name, etc.

42
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles OK.Click
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim Cmd0 As New SqlCommand("select * from login where uname='" &
UCase(UsernameTextBox.Text) & "'and pword='" & PasswordTextBox.Text & "'", conn)
Dim D1 As SqlDataReader = Cmd0.ExecuteReader()
If D1.HasRows Then
MDIParent1.Show()
Me.Hide()
If conn.State = ConnectionState.Open Then conn.Close()
Else
MsgBox("username or password is not correct please check")
End If
End Sub

Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Cancel.Click
Me.Close()
End Sub

Private Sub LogoPictureBox_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles LogoPictureBox.Click

End Sub
End Class

Marks

43
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Imports System.Data.SqlClient

Public Class marks

Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Label1.Click

End Sub

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles ComboBox1.SelectedIndexChanged

End Sub

Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Label3.Click

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click
If ComboBox3.Text = "" Then
MsgBox("please enter subject name")
Exit Sub
End If
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim DS1 As New DataSet
Dim adp As New SqlDataAdapter("Select regno,name,marks1,marks2,marks3,marks4,marks5
From exammaks where course='" & ComboBox1.Text & "' and sem='" & ComboBox2.Text & "'
and sub='" & ComboBox3.Text & "' order by regno", conn)

44
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

adp.Fill(DS1)
DataGridView1.DataSource = DS1.Tables(0)
If conn.State = ConnectionState.Open Then conn.Close()
End Sub

Private Sub marks_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load
Me.WindowState = FormWindowState.Maximized

If conn.State = ConnectionState.Open Then conn.Close()


conn.Open()
Dim Cmd1 As New SqlCommand("select coursename from coursedetails order by coursename",
conn)
Dim D1 As SqlDataReader = Cmd1.ExecuteReader()
While D1.Read
ComboBox1.Items.Add(D1(0).ToString)
End While
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim Cmd2 As New SqlCommand("select short from subjectdetails order by short", conn)
Dim D2 As SqlDataReader = Cmd2.ExecuteReader()
While D2.Read
ComboBox3.Items.Add(D2(0).ToString)
End While
If conn.State = ConnectionState.Open Then conn.Close()

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
Dim DS1 As New DataSet

45
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Dim Tab1 As DataTable = DS1.Tables.Add("AttnTab")


Tab1.Columns.Add("RegNo", GetType(Long))
Tab1.Columns.Add("sName", GetType(String))
Tab1.Columns.Add("tMarks1", GetType(String))
Tab1.Columns.Add("tMarks2", GetType(String))
Tab1.Columns.Add("tMarks3", GetType(String))
Tab1.Columns.Add("tMarks4", GetType(String))
Tab1.Columns.Add("tMarks5", GetType(String))

If conn.State = ConnectionState.Open Then conn.Close()


conn.Open()
Dim Cmd0 As New SqlCommand("Select regno,name from stddetails where course='" &
ComboBox1.Text & "' and sem='" & ComboBox2.Text & "' order by regno", conn)
Dim D1 As SqlDataReader = Cmd0.ExecuteReader()
While D1.Read
Dim dRow As DataRow = Tab1.NewRow
dRow(0) = D1(0).ToString
dRow(1) = D1(1).ToString
dRow(2) = ""
dRow(3) = ""
dRow(4) = ""
dRow(5) = ""
dRow(6) = ""
Tab1.Rows.Add(dRow)
End While
If conn.State = ConnectionState.Open Then conn.Close()
DataGridView1.DataSource = DS1.Tables(0)
End Sub

46
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
If ComboBox1.Text = "" Then
MsgBox("Please select the course Name")
Exit Sub
End If
If ComboBox2.Text = "" Then
MsgBox("Please select the sem")
Exit Sub
End If
If ComboBox3.Text = "" Then
MsgBox("Please select the Subject Name")
Exit Sub
End If

If conn.State = ConnectionState.Open Then conn.Close()


conn.Open()
Dim cmd2 As New SqlCommand("Delete from exammaks where course='" & ComboBox1.Text
& "' and sem='" & ComboBox2.Text & "' and sub='" & ComboBox3.Text & "'", conn)
cmd2.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()

For Each r As DataGridViewRow In DataGridView1.Rows


If r.Cells(1).Value = "" Then Exit For
q1var = "insert into exammaks("
q2var = " values("
q1var = q1var & "examdate" & ","
q2var = q2var & "'" & Format(DateTimePicker1.Value, "dd/MMM/yyyy") & "',"
q1var = q1var & "course" & ","
q2var = q2var & "'" & ComboBox1.Text & "',"

47
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

q1var = q1var & "sem" & ","


q2var = q2var & "'" & ComboBox2.Text & "',"
q1var = q1var & "sub" & ","
q2var = q2var & "'" & ComboBox3.Text & "',"
q1var = q1var & "regno" & ","
q2var = q2var & "" & r.Cells(0).Value & ","
q1var = q1var & "name" & ","
q2var = q2var & "'" & r.Cells(1).Value & "',"
q1var = q1var & "marks1" & ","
q2var = q2var & "'" & UCase(r.Cells(2).Value) & "',"
q1var = q1var & "marks2" & ","
q2var = q2var & "'" & UCase(r.Cells(3).Value) & "',"
q1var = q1var & "marks3" & ","
q2var = q2var & "'" & UCase(r.Cells(4).Value) & "',"
q1var = q1var & "marks4" & ","
q2var = q2var & "'" & UCase(r.Cells(5).Value) & "',"
q1var = q1var & "marks5" & ")"
q2var = q2var & "'" & UCase(r.Cells(6).Value) & "')"

If conn.State = ConnectionState.Open Then conn.Close()


conn.Open()
MsgBox(q1var & q2var)
Dim cmd1 As New SqlCommand(q1var & q2var, conn)
cmd1.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()
Next
MsgBox("Records saved successfully")

End Sub

48
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button4.Click
Me.Close()

End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

End Sub

Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles
DataGridView1.CellContentClick

End Sub

Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Label2.Click

End Sub

Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Label4.Click

End Sub
End Class

Mdi parent1

Imports System.Windows.Forms

49
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Public Class MDIParent1

Private Sub ShowNewForm(ByVal sender As Object, ByVal e As EventArgs)


' Create a new instance of the child form.
Dim ChildForm As New System.Windows.Forms.Form
' Make it a child of this MDI form before showing it.
ChildForm.MdiParent = Me

m_ChildFormNumber += 1
ChildForm.Text = "Window " & m_ChildFormNumber

ChildForm.Show()
End Sub

Private Sub OpenFile(ByVal sender As Object, ByVal e As EventArgs)


Dim OpenFileDialog As New OpenFileDialog
OpenFileDialog.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.MyDocuments
OpenFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"
If (OpenFileDialog.ShowDialog(Me) = System.Windows.Forms.DialogResult.OK) Then
Dim FileName As String = OpenFileDialog.FileName
' TODO: Add code here to open the file.
End If
End Sub

Private Sub SaveAsToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)


Dim SaveFileDialog As New SaveFileDialog
SaveFileDialog.InitialDirectory = My.Computer.FileSystem.SpecialDirectories.MyDocuments
SaveFileDialog.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"

If (SaveFileDialog.ShowDialog(Me) = System.Windows.Forms.DialogResult.OK) Then

50
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Dim FileName As String = SaveFileDialog.FileName


' TODO: Add code here to save the current contents of the form to a file.
End If
End Sub

Private Sub ExitToolsStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)


Me.Close()
End Sub

Private Sub CutToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)


' Use My.Computer.Clipboard to insert the selected text or images into the clipboard
End Sub

Private Sub CopyToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)


' Use My.Computer.Clipboard to insert the selected text or images into the clipboard
End Sub

Private Sub PasteToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)


'Use My.Computer.Clipboard.GetText() or My.Computer.Clipboard.GetData to retrieve
information from the clipboard.
End Sub

Private Sub CascadeToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)


Me.LayoutMdi(MdiLayout.Cascade)
End Sub

Private Sub TileVerticalToolStripMenuItem_Click(ByVal sender As Object, ByVal e As


EventArgs)
Me.LayoutMdi(MdiLayout.TileVertical)

51
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

End Sub

Private Sub TileHorizontalToolStripMenuItem_Click(ByVal sender As Object, ByVal e As


EventArgs)
Me.LayoutMdi(MdiLayout.TileHorizontal)
End Sub

Private Sub ArrangeIconsToolStripMenuItem_Click(ByVal sender As Object, ByVal e As


EventArgs)
Me.LayoutMdi(MdiLayout.ArrangeIcons)
End Sub

Private Sub CloseAllToolStripMenuItem_Click(ByVal sender As Object, ByVal e As


EventArgs)
' Close all child forms of the parent.
For Each ChildForm As Form In Me.MdiChildren
ChildForm.Close()
Next
End Sub

Private m_ChildFormNumber As Integer

Private Sub MDIParent1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load
Me.WindowState = FormWindowState.Maximized

End Sub

Private Sub CourseDetailsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles CourseDetailsToolStripMenuItem.Click
coursedetails.MdiParent = Me

52
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

coursedetails.Show()

End Sub

Private Sub SubjectDetailsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles SubjectDetailsToolStripMenuItem.Click
subjectdetails.MdiParent = Me
subjectdetails.Show()
End Sub

Private Sub StaffDetailsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles StaffDetailsToolStripMenuItem.Click
staffdetails.MdiParent = Me
staffdetails.Show()
End Sub

Private Sub StudentDetailsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles StudentDetailsToolStripMenuItem.Click
stddetails.MdiParent = Me
stddetails.Show()
End Sub

Private Sub FeesCollectionToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles FeesCollectionToolStripMenuItem.Click
feecoll.MdiParent = Me
feecoll.Show()
End Sub

Private Sub AttendenceToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles AttendenceToolStripMenuItem.Click
attend.MdiParent = Me

53
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

attend.Show()
End Sub

Private Sub ExamMarksEntryToolStripMenuItem_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles ExamMarksEntryToolStripMenuItem.Click
marks.MdiParent = Me
marks.Show()
End Sub

Private Sub StaffListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles StaffListToolStripMenuItem.Click
staff.MdiParent = Me
staff.Show()

End Sub

Private Sub StudentListToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles StudentListToolStripMenuItem.Click
student.MdiParent = Me
student.Show()

End Sub

Private Sub FeeCollectionToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles FeeCollectionToolStripMenuItem.Click
feescollection.MdiParent = Me
feescollection.Show()

End Sub

54
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Private Sub ExamResultAllToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e


As System.EventArgs) Handles ExamResultAllToolStripMenuItem.Click
exam.MdiParent = Me
exam.Show()

End Sub

Private Sub ExamResultToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles ExamResultToolStripMenuItem.Click
examresult.MdiParent = Me
examresult.Show()

End Sub

End Class

Module

Imports System.Data.SqlClient

Module Module1

Public conn As New SqlConnection("Data


Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\admin.mdf;Integrated
Security=True;User Instance=True")
Public sqlstr, q1var, q2var As String
Public colvar, rovar, i, j As Long

End Module

55
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Splash screen1

Public NotInheritable Class SplashScreen1


Dim i As Integer

'TODO: This form can easily be set as the splash screen for the application by going to the
"Application" tab
' of the Project Designer ("Properties" under the "Project" menu).

Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load
'Set up the dialog text at runtime according to the application's assembly information.

'TODO: Customize the application's assembly information in the "Application" pane of the
project
' properties dialog (under the "Project" menu).

'Application title
If My.Application.Info.Title <> "" Then
ApplicationTitle.Text = My.Application.Info.Title
Else
'If the application title is missing, use the application name, without the extension

56
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

ApplicationTitle.Text =
System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
End If

'Format the version information using the text set into the Version control at design time as the
' formatting string. This allows for effective localization if desired.
' Build and revision information could be included by using the following code and changing the
' Version control's designtime text to "Version {0}.{1:00}.{2}.{3}" or something similar. See
' String.Format() in Help for more information.
'
' Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major,
My.Application.Info.Version.Minor, My.Application.Info.Version.Build,
My.Application.Info.Version.Revision)

Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major,


My.Application.Info.Version.Minor)

'Copyright info
Copyright.Text = My.Application.Info.Copyright

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Timer1.Tick
i=i+1
If (i >= 5) Then
Timer1.Enabled = False
Me.Hide()
LoginForm1.Show()
End If

57
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

End Sub

End Class

Staff

Imports System.Data.SqlClient

Public Class staff

Private Sub staff_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load
Me.WindowState = FormWindowState.Maximized

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim DS1 As New DataSet
Dim adp As New SqlDataAdapter("select staffcode,name,address,pincode,phne,email,quali,desi
from staffdetails order by staffcode", conn)
adp.Fill(DS1)
DataGridView1.DataSource = DS1.Tables(0)

If conn.State = ConnectionState.Open Then conn.Close()


End Sub

58
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
Me.Close()

End Sub

Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As


System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim XPos, YPos As Long
YPos = 50
Dim MyFont As New Font("Arial", 18)
XPos = 10
e.Graphics.DrawString("ABC College Administration", MyFont, Brushes.Black, XPos, YPos)
YPos += 50
MyFont = New Font("Arial", 12)
e.Graphics.DrawString("No. 101, 4th floor, UB City, Bangalore - 560001", MyFont,
Brushes.Black, XPos, YPos)
YPos += 100
XPos = 10
e.Graphics.DrawString("Emp List Report", MyFont, Brushes.Black, XPos, YPos)
YPos += 50
XPos = 10
MyFont = New Font("Arial", 12)
e.Graphics.DrawString("SaffCode", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150
e.Graphics.DrawString("Name", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150
e.Graphics.DrawString("PhoneNo", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150
e.Graphics.DrawString("Qualification", MyFont, Brushes.Black, XPos, YPos)

59
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

XPos = XPos + 150


e.Graphics.DrawString("Designation", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150

YPos += 25
For Each r As DataGridViewRow In DataGridView1.Rows

XPos = 10
e.Graphics.DrawString(r.Cells(0).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150
e.Graphics.DrawString(r.Cells(1).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150
e.Graphics.DrawString(r.Cells(4).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150
e.Graphics.DrawString(r.Cells(6).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150
e.Graphics.DrawString(r.Cells(7).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150

YPos += 25
Next
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click
pp1.ShowDialog()
End Sub

60
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Private Sub pp1_PrintPage(ByVal sender As System.Object, ByVal e As


System.Drawing.Printing.PrintPageEventArgs)

End Sub

Private Sub PrintPreviewDialog1_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles pp1.Load

End Sub

End Class

Student

Imports System.Data.SqlClient

Public Class student

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
Me.Close()

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim DS1 As New DataSet
Dim adp As New SqlDataAdapter("select * from stddetails order by course,sem,regno", conn)

61
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

adp.Fill(DS1)
DataGridView1.DataSource = DS1.Tables(0)

If conn.State = ConnectionState.Open Then conn.Close()


End Sub

Private Sub student_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load
Me.WindowState = FormWindowState.Maximized
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As
System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim XPos, YPos As Long
YPos = 50
Dim MyFont As New Font("Arial", 18)
XPos = 10
e.Graphics.DrawString("ABC College Administration", MyFont, Brushes.Black, XPos, YPos)
YPos += 50
MyFont = New Font("Arial", 12)
e.Graphics.DrawString("No. 101, 4th floor, UB City, Bangalore - 560001", MyFont,
Brushes.Black, XPos, YPos)
YPos += 100
XPos = 10
e.Graphics.DrawString("Emp List Report", MyFont, Brushes.Black, XPos, YPos)
YPos += 50
XPos = 10
MyFont = New Font("Arial", 12)
e.Graphics.DrawString("RegNo", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150
e.Graphics.DrawString("Name", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150

62
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

e.Graphics.DrawString("Parent", MyFont, Brushes.Black, XPos, YPos)


XPos = XPos + 150
e.Graphics.DrawString("Course", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150
e.Graphics.DrawString("Sem", MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150

YPos += 25
For Each r As DataGridViewRow In DataGridView1.Rows

XPos = 10
e.Graphics.DrawString(r.Cells(0).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150
e.Graphics.DrawString(r.Cells(1).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150
e.Graphics.DrawString(r.Cells(2).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150
e.Graphics.DrawString(r.Cells(4).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150
e.Graphics.DrawString(r.Cells(5).Value, MyFont, Brushes.Black, XPos, YPos)
XPos = XPos + 150

YPos += 25
Next
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click
pp1.ShowDialog()

63
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

End Sub
End Class

Subjectdetails

Imports System.Data.SqlClient

Public Class subjectdetails


Dim pkvar As String

Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Label4.Click

End Sub

Private Sub TextBox2_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress
If Char.IsLetter(e.KeyChar) = False And Char.IsControl(e.KeyChar) = False Then
e.Handled = True
MsgBox("Please enter a valid name")

End If
End Sub

Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles TextBox2.TextChanged

End Sub
Sub disrecords()

64
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

If conn.State = ConnectionState.Open Then conn.Close()


conn.Open()
Dim DS1 As New DataSet
Dim adp As New SqlDataAdapter("select course,sem,short,fullname from subjectdetails order by
course", conn)
adp.Fill(DS1)
DataGridView1.DataSource = DS1.Tables(0)

If conn.State = ConnectionState.Open Then conn.Close()


End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button5.Click
disrecords()

End Sub

Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Label3.Click

End Sub

Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Label1.Click

End Sub

Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Label2.Click

End Sub

65
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles
DataGridView1.CellContentClick
pkvar = DataGridView1.CurrentRow.Cells(0).Value
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim Cmd0 As New SqlCommand("select * from subjectdetails where course = '" & pkvar & "'",
conn)
Dim D1 As SqlDataReader = Cmd0.ExecuteReader()
If D1.HasRows Then
D1.Read()

ComboBox1.Text = D1(0).ToString
ComboBox2.Text = D1(1).ToString
TextBox1.Text = D1(2).ToString
TextBox2.Text = D1(3).ToString

Else
ComboBox1.Text = ""
ComboBox2.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""

End If
If conn.State = ConnectionState.Open Then conn.Close()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
ComboBox1.Text = ""

66
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

ComboBox2.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
End Sub
Sub saverecord()
If ComboBox1.Text = "" Then
MsgBox("please enter the necessary details")
Exit Sub
End If
If ComboBox2.Text = "" Then
MsgBox("please enter the necessary details")
Exit Sub
End If
If TextBox1.Text = "" Then
MsgBox("please enter the necessary details")
Exit Sub
End If
If TextBox2.Text = "" Then
MsgBox("please enter the necessary details")
Exit Sub
End If
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd0 As New SqlCommand("select course from subjectdetails where course='" &
UCase(TextBox1.Text) & "'", conn)
Dim d1 As SqlDataReader = cmd0.ExecuteReader()
If d1.HasRows Then
MsgBox("this record is already present in the database")
If conn.State = ConnectionState.Open Then conn.Close()
Exit Sub
End If

67
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

If conn.State = ConnectionState.Open Then conn.Close()


conn.Open()
q1var = "Insert into subjectdetails("
q2var = "values("
q1var = q1var & "course" & ","
q2var = q2var & "'" & ComboBox1.Text & "',"
q1var = q1var & "sem" & ","
q2var = q2var & "'" & ComboBox2.Text & "',"
q1var = q1var & "short" & ","
q2var = q2var & "'" & TextBox1.Text & "',"
q1var = q1var & "fullname" & ")"
q2var = q2var & "'" & TextBox2.Text & "')"
Dim cmd1 As New SqlCommand(q1var & q2var, conn)
cmd1.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()
MsgBox("Registered Successfully")
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
saverecord()

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click
If vbNo = MsgBox("Are you sure you want modify this record", MsgBoxStyle.YesNo, "delete")
Then Exit Sub
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()

68
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Dim cmd1 As New SqlCommand("delete from subjectdetails where course='" & pkVar & "'",
conn)
cmd1.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()
saverecord()
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button4.Click
If vbNo = MsgBox("Are you sure you want delete this record", MsgBoxStyle.YesNo, "delete")
Then Exit Sub
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd1 As New SqlCommand("delete from subjectdetails where course='" & pkvar & "'",
conn)
cmd1.ExecuteNonQuery()
If conn.State = ConnectionState.Open Then conn.Close()
disrecords()
End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button6.Click
Me.Close()

End Sub

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles ComboBox1.SelectedIndexChanged

End Sub

69
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If Char.IsLetter(e.KeyChar) = False And Char.IsControl(e.KeyChar) = False Then
e.Handled = True
MsgBox("Please enter a valid name")

End If
End Sub

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles TextBox1.TextChanged

End Sub

Private Sub subjectdetails_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
Me.WindowState = FormWindowState.Maximized
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim cmd1 As New SqlCommand("select coursename from coursedetails order by coursename",
conn)
Dim d1 As SqlDataReader = cmd1.ExecuteReader()
While d1.Read
ComboBox1.Items.Add(d1(0).ToString)
End While

End Sub

End Class

70
Dept of BCA COLLEGE MANAGEMENT SYSTEM www.vidyasanskaar.com

Conclusion
The Attendance Management System is developed using Visual Basic.NET fully meets the
objectives of the system which it has been developed. The system has reached a steady state
where all bugs have been eliminated. The system is operated at a high level of efficiency and all
the teachers and user associated with the system understands its advantage. The system solves
the problem. It was intended to solve as requirement specification.

Bibliography
1. The complete Reference Visual Basic.NET
2. Beginning VB.NET (Wrox Publication)
3. System Analysis and Design – Alias M. Awad
4. Software Engineering – Roger Pressman

Websites
1. www.microsoft.com
2. www.w3schools.com
3. www.dotnetspider.com

71

You might also like