Student Attendance Management System
Student Attendance Management System
Submitted by
KALAISANKARAN B
Roll No: 11MCA020
MAY 2013
This is to certify that the project entitled
KALAISANKARAN B
Roll No: 11MCA020
of Master of Computer Applications during the year 2012-2013.
------------------------Project Guide
Mr.R.MUTHUSAMI MCA.,M.Phil.
Asst.Prof(SS)/CA
------------------------Internal Examiner
-------------------------External Examiner
DECLARATION
I affirm that the mini project work titled STUDENT ATTENDANCE
MANAGEMENT SYSTEM being submitted in partial fulfillment for the award of
Master of Computer Applications is the original work carried out by me. It has not
formed the part of any other project work submitted for award of any degree or diploma,
either in this or any other University.
ACKNOWLDGEMENT
I express my gratitude to Prof. C. RAMASWAMY, M.E., F.I.V., Secretary,
NIA Educational Institutions, Pollachi, for having provided me the facilities to do the
project successfully.
My heartful thanks to Dr. S. VIJAYARANGAN, M.E, F.I.E., Ph.D.,
Director(Academic),
Pollachi, for his patronage and giving us an opportunity to undertake this Project.
My sincere thanks to Dr. S. CHENTHUR PANDIAN, B.Sc., LLB.,
ME., P.hd., MISTE., FIE., MIEEE., (USA), Principal , who has allowed me to do this
project and encouragement given to me.
I owe
deep
sense
of
gratitude
to
Dr.V.S.MEENAKSHI
M.Phil.,
Assistant
Professor(Senior
Scale),Department
of
Computer
Applications for his valuable guidance and support to meet the successful completion of
my project.
I express my sincere thanks to my mini project guide Mr. R. MUTHUSAMI
M.C.A., M.Phil., Assistant Professor(Senior Scale), and staff members of Department of
Computer Applications for their encouragement and valuable guidance throughout this
project.
Last but not the least; I extend my sincere thanks to my family members and my
friends for their constant support throughout this project.
TABLE OF CONTENTS
CHAPTER NO
TITLE
PAGE NO
ABSTRACT
vii
LIST OF FIGURES
viii
LIST OF TABLES
ix
INTRODUCTION
1.1 Objective
SYSTEM ANALYSIS
SYSTEM SPECIFICATION
SOFTWARE DESCRIPTION
4.2.2 Oracle10g
4.2.3 ADO.Net
PROJECT DESCRIPTION
12
13
15
15
16
17
20
21
SYSTEM TESTING
22
6.1 Introduction
22
22
23
6.2.2 SystemTesting
23
23
24
SYSTEM IMPLEMENTATION
28
7.1 Purpose
28
29
ENHANCEMENTS
10
30
8.1 Conclusion
30
30
APPENDICES
37
31
50
REFERENCES
59
ABSTRACT
Student attendance management system deals with the maintenance of the
students attendance details. It is generates the attendance of the student on basis of
presence in class. It is maintained on the daily basis of their attendance. the staffs will be
provided with the separate username & password to make the students status.
The staffs handling the particular subjects responsible to make the attendance for
all students. Only if the student present on that particular period, the attendance will be
calculated. The students attendance reports based on weekly and consolidate will be
generated.
LIST OF FIGURES
Chapter
Contents
Page no
5.4
12
5.5
13
5.6.1
14
5.6.2
17
Contents
Page no
5.7.2.1
Login Table
17
5.7.2.2
Staff details
17
5.7.2.3
18
5.7.2.4
Time Table
19
5.7.2.5
Attendance Table
20
CHAPTER 1
INTRODUCTION
1.1 OBJECTIVE:
Attendance Management System is software developed for
maintaining the attendance of the student on the daily basis in the collage. Here the
staffs, who are handling the subjects, will be responsible to mark the attendance of the
students. Each staff will be given with a separate username and password based on
the subject they handle. An accurate report based on the student attendance is
generated here. This system will also help in evaluating attendance eligibility criteria
of a student. Report of the students attendance on weekly and monthly basis is
generated.
CHAPTER 2
SYSTEM ANALYSIS
2.1 INTRODUCTION
Analysis can be defined as breaking up of any whole so as to find out their nature,
function etc. It defines design as to make preliminary sketches of; to sketch a pattern or
outline for plan. To plan and carry out especially by artistic arrangement or in a skillful
wall. System analysis and design can be characterized as a set of techniques and
processes, a community of interests, a culture and an intellectual orientation.
The various tasks in the system analysis include the following.
Understanding application.
Planning.
Scheduling.
Developing candidate solution.
Performing trade studies.
Performing cost benefit analysis.
Recommending alternative solutions.
Selling of the system.
Supervising, installing and maintaining the system.
This system manages to the analysis of the report creation and develops manual
entry of the student attendance. First design the students entry form , staff allocation and
time table allocation forms. This project will helps the attendance system for the
department calculate percentage and reports for eligibility criteria of examination .The
application attendance entry system will provide flexible report for all students.
The Existing system is a manual entry for the students. Here the attendance will
be carried out in the hand written registers. It will be a tedious job to maintain the record
for the user. The human effort is more here. The retrieval of the information is not as easy
as the records are maintained in the hand written registers.
This application requires correct feed on input into the respective field. Suppose
the wrong inputs are entered, the application resist to work. so the user find it difficult to
use.
2.3 PROPOSED SYSTEM:
To overcome the drawbacks of the existing system, the proposed system has been
evolved. This project aims to reduce the paper work and saving time to generate accurate
results from the students attendance. The system provides with the best user interface.
The efficient reports can be generated by using this proposed system.
2.3.1 Advantages of Proposed System
It is trouble-free to use.
It is a relatively fast approach to enter attendance
Is highly reliable, approximate result from user
Best user Interface
Efficient reports
3. FEASIBILITY STUDY:
Feasibility analysis begins once the goals are defined. It starts by generating broad
possible solutions, which are possible to give an indication of what the new system
should look lime. This is where creativity and imagination are used. Analysts must think
up new ways of doing things- generate new ideas. There is no need to go into the detailed
system operation yet. The solution should provide enough information to make
reasonable estimates about project cost and give users an indication of how the new
system will fit into the organization. It is important not to exert considerable effort at this
stage only to find out that the project is not worthwhile or that there is a need
significantly change the original goal.
Feasibility of a new system means ensuring that the new system, which we are
going to implement, is efficient and affordable. There are various types of feasibility to
be determined. They are,
CHAPTER 3
SYSTEM SPECIFICATION
3.1 HARDWARE REQUIREMENTS (Minimum Requirement)
Minimum RAM:-1GB
Hard Disk:-128 GB
Processor:-Intel Pentium 4( 1.50 GHZ) or above
CHAPTER 4
SOFTWARE DESCRIPTION
4.1 PACKAGE - VISUAL STUDIO 2010
Microsoft Visual Studio is an integrated development environment (IDE)
from Microsoft.It
is
used
to
user
interface applications along with Windows Forms or WPF applications, web sites, web
applications, and web services in both native codetogether with managed code for all
platforms supported by Microsoft Windows, Windows Mobile, Windows CE, .NET
Framework, .NET Compact Framework and Microsoft Silver light.
Visual Studio supports different programming languages by means of language
services, which allow the code editor and debugger to support (to varying degrees) nearly
any programming language, provided a language-specific service exists.
Visual Studio also includes a web-site editor and designer that allows web pages
to be authored by dragging and dropping widgets. It is used for developing VB.NET
application efficiently to get input and output design easiest one. It will be run at
windows application based services provide the user.
Clustering
Grid computing
Server manageability
Network management
Storage management
Space,object transaction management
Back up recovery management
Reduce down time for application and database upgrades
ADO.Net:
An evolutionary, more flexible successor to ADO.A system designed for
connected environments. A programming model with advanced XML support A set of
classes, interfaces, structures, and enumerations that manage data access from within the
.NET Framework
Data Providers
MS SQL Server 7.0+
Oracle
OLE DB (old SQL & Access- Jet 4.0)
Open Database Connectivity (ODBC)- earlier Visual Studio, Access
Driver, ODBC for Oracle
CHAPTER 5
PROJECT DESCRIPTION
5.1PROBLEM DEFINITION:
This system developed will reduce the manual work and avoid
redundant data. By maintaining the attendance manually, then efficient reports cannot
be generated. The system can generate efficient weekly,consolidate report based on
the attendance. As the attendances are maintained in registers it has been a tough task
for admin and staff to maintain for long time. Instead the software can keep long and
retrieve the information when needed.
Student Details:
In this module deals with the allocation of roll no and personal
details for new batch.It will generate of personal details of student and
academic details of the students with the photos.
Staff Details:
It helps to allot the subject and the subject code to the
particular staffs.
It provides the facility to have a user name and password to
the staffs .
Attendance details:
It will be makes to the attendance database all students.
Entered attendance to stored in the database subject ,period
wise into the particular date.
It will help s to the get report of weekly and consolidate of
the attendance.
Report details:
Report can be taken by daily,weekly and consolidate:
weekly report get all hour details of attendance starting date to ending
date and display the status
Consolidate report get all student attendance details starting date to
ending date status help for the eligibility criteria of the student to
attend the examination.
5.3.2 STAFFS MODULE:
Attendance details:
It assists the staff to mark attendance to the students for their subject. This
will authenticate the staff before making the entry.
Report details:
1. weekly report get particular hour details of attendance from starting
date to ending date and display the status .
2. consolidate report get all student attendance details from starting date
to ending date status help for the eligibility criteria of the student to
attend the examination
ATTANDANCE
MANAGEMENT
SYSTEM
USER
REPORT
DATABASE
LOGIN
INVALID
UID / PWD
AUTHENDICAT
ION
ADMIN
ACCESS
CHECK
STAFF
ACCESS
USER
DATABASE
5.5.3.1 Admin:
tri
bu
tio
n
ALLOCATION
co
n
Get details
ADMIN
om
a fr
d at s e
d
a
e
b
r
Sto data
contribution
STUDENTS
ATTANDANCE
VIEW
ACCESS
STAFFS
Get details
Sto
n
co
red
dat data
aba fro
se m
bu
tri
eta
Get d
ils
n
tio
TIME TABLE
UPDATE
REPORT
Up
UPDATE
ATTENDANCE
e
anc
end
t
t
ea
dat
Input
dan
Atten
ce
Attendance
entry
Sto
red
att
end
anc
e
Store
d atte
ndan
USER
ce
Attendance table
REPORT
nt
ude
l st ance
l
a
t
Ge ttend
a
year
year
III
III
IV
IV
IIII
dept
dept
VV
Address
Address
Name
Name
VI
VI
II
DoB
DoB
VII
VII
mno
mno
Roll
Roll no
no
Status
Status
day
day
Table
Table name
name
Student
details
Time table
user
1
date
date
*
1
Attandance
hour
hour
* Attendance
details
subject
subject
*
Authendication
Roll
Roll no
no
*
*
subject
subject
Staffs
details
password
password
Subject
Subject
code
code
Staff
Staff name
name
DATATYPE
CONTRAINTS
DESCRIPTION
Tablename
varchar(20)
primarykey
Stored
number
of
DATATYPE
CONSTRAINTS
DESCRIPTION
Scode
varchar(20)
primarykey
Define
separate
subject code id
ssname
Varchar(15)
NotNull
sname
Varchar(20)
NotNull
Staffs name
Password
Varchar(20)
NotNull
FIELDS
DATATYPE
CONSTRAINTS
DESCRIPTION
Rollno
Varchar(15)
Primarykey
Student rollnumber
Name
Varchar(20)
NotNull
Student name
Dept
Varchar(30)
NotNull
Department name
Year
Number
NotNull
Batch year
DOB
Varchar(20)
NotNull
ADDRESS
Varchar(20)
NotNull
Student
permanent
address
MNO
Varchar(20)
NotNull
Student
mobile
number
EID
Varchar(30)
NotNull
Student E-mail id
CSTATUS
Varchar(20)
NotNull
Student
status
for
dayscholler/Hosteller
Table:5.7.2.3 Staff Details Table
FIELDS
DATATYPE
CONSTRAINTS
DESCRIPTION
Day
Varchar(20)
Primarykey
Days
insert
(ex:Monday)
I
Varchar(20)
NotNull
II
Varchar(20)
NotNull
III
Varchar(20)
NotNull
IV
Varchar(20)
NotNull
Varchar(20)
NotNull
VI
Varchar(20)
NotNull
VII
Varchar(20)
NotNull
DATATYPE
CONSTRAINTS
DESCRIPTION
Dates
Date
Primarykey
Enter day
attendance
Hour
Number
primarykey
Subject
Varchar(15)
NotNull
Particular Subject
Rollno
(1 to 60)
Varcahar(20)
NotNull
by
day
CHAPTER 6
SYSTEM TESTING
6.1 Introduction
Once source code has been generated, software must be tested to uncover (and
correct) as many errors as possible before delivery to customer. Our goal is to design a
series of test cases that have a high likelihood of finding errors. To uncover the errors
software techniques are used. These techniques provide systematic guidance for
designing test that
(1) Exercise the internal logic of software components, and
(2) Exercise the input and output domains of the program to uncover errors
In program function, behavior and performance.
6.1.1 Steps: Software is tested from two different perspectives:
(1) Internal program logic is exercised using White box test case design
Techniques.
(2) Software requirements are exercised using block box test case
Design techniques.
In both cases, the intent is to find the maximum number of errors with the
Minimum amount of effort and time.
Test case is an object for execution for other modules in the architecture does not
represent any interaction by itself. A test case is a set of sequential steps to execute a test
operating on a set of predefined inputs to produce certain expected outputs. There are two
types of test cases:-manual and automated. A manual test case is executed manually
while an automated test case is executed using automation.
In system testing, test data should cover the possible values of each parameter
based on the requirements. Since testing every value is impractical, a few values should
be chosen from each equivalence class. An equivalence class is a set of values that should
all be treated the same.
Ideally, test cases that check error conditions are written separately from the
functional test cases and should have steps to verify the error messages and logs.
Realistically, if functional test cases are not yet written, it is ok for testers to check for
error conditions when performing normal functional test cases. It should be clear which
test data, if any is expected to trigger errors.
TEST CASE:
6.3.1 Agent and admin login form
Sno
Login
admin
Validate
login
Login
Staff
Validate
login
Password
Validate
password
To verify
that login
name on
login
page
Enter the
login
name and
password
and click
submit
button
Expected
result
Login
successful
or an error
message
In valid
login or
password
must be
displayed
To verify Enter the Login
that login login
successful
name on name and or an error
login
password message
page
and click In valid
submit
login or
button
password
must be
displayed
To verify Enter
An error
that
password message
password and login password
on login name
invalid
page
click
must be
submit
displayed
button
Actual
Result
Login
successful
Login
successful
Test
case
status
pass/fail
Pass
Pass
An error
fail
message
password
invalid
must be
displayed
Test
case
id
Test
case
name
Creat
e
suden
t
detail
s
Creat
e staff
detail
s
Validate
allocatio
n form
Test
case
desc
To
allocate
separate
roll no
for the
students
Validate To
allocatio allocate
n form
separate
subject
usernam
e
passwor
d for the
staffs
Creat Validate To
e time allocate
verify
table period
that data
form
stored
on
database
View Check
To
details of verify
all data
that data
stored
on
database
Step
Expected result
Actual
Result
Nothing
entered
and click
submit
button
An error message
student name not
equal to null must
be displayed
Inserted
succesfu
l
Nothing
entered
and click
submit
button
An error message
staff details
password,usernam
e not equal to null
must be displayed
Inserted
succesfu
l
Pass
Nothing
entered
and click
submit
button
An error message
not click not
allocation subject
table not equal to
null must be
displayed
An error message
return null will be
displayed
Inserted
succesfu
l
Pass
An error
message
return
null will
be
displaye
d
fail
generate
d
Test
case
status
pass/fai
l
Pass
Test case
name
Test case
desc
Step
Expected Actual
result
Result
Test
case
status
pass/fail
Pass
Weekly
report
Validate
class
attendance
form
To select
that source
and
destination
An error
message
on not
selected
Retrived
data
successful
Consolidate Validate
report
class
attendance
form
To select
that depart
on and
time
Nothing
entered
and
click
submit
button
Nothing
entered
and
click
submit
button
An error
message
on not
selected
Retrived
Pass
data
successful
CHAPTER 7
SYSTEM IMPLEMENTATION
7.1 Purpose
System implementation is the important stage of project when the theoretical
design is tuned into practical system. The main stages in the implementation are as
follows:
Planning
Training
System testing and
Changeover Planning
Planning is the first task in the system implementation.
At the time of
implementation of any system people from different departments and system analysis
involve. They are confirmed to practical problem of controlling various activities of
people outside their own data processing departments.
The line managers controlled through an implementation coordinating committee.
The committee considers ideas, problems and complaints of user department, it must also
consider:
The implication of system environment
Self selection and allocation for implementation tasks
Consultation with unions and resources available
Standby facilities and channels of communication
Student Attendance management system will implement student details ,staff handle
subjects details, separate login details ,time table details. It will used to entered subject
wise attendance .This application elaborate attendance table generate weekly, consolidate
report provide to the End user. Mostly this application will calculate date wise attendance
.To select starting date to end date generate reports at the time of activities.
CHAPTER 8
CONCLUSION AND FUTURE ENHANCEMENT
8.1 Conclusion
To conclude, Project Data Grid works like a component which can access all the
databases and picks up different functions. It overcomes the many limitations
incorporated in the attendance.
Easy implementation Environment
Generate report Flexibly
CHAPTER 9
APPENDICES
9.1 Source code:
LOGIN:
Imports System.Data
Public Class login
Dim con As New ADODB.Connection
Dim rs, rs1 As New ADODB.Recordset
Public str, temp1, temp2, temp3, temp4 As String
Dim i As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
rs = New ADODB.Recordset
rs1 = New ADODB.Recordset
If String.Equals(TextBox1.Text, "Admin") Or String.Equals(TextBox1.Text,
"admin") Or String.Equals(TextBox1.Text, "ADMIN") And
String.Equals(TextBox2.Text, "Admin") Or String.Equals(TextBox2.Text, "admin") Or
String.Equals(TextBox2.Text, "ADMIN") Then
temp4 = "MDIParent2"
TextBox1.Text = ""
TextBox2.Text = ""
MDIParent2.Show()
Me.Hide()
i=1
Else
Try
str = "select * from logintable"
rs.Open(str, con, ADODB.CursorTypeEnum.adOpenDynamic,
ADODB.LockTypeEnum.adLockPessimistic)
rs.MoveFirst()
While (rs.EOF <> True)
str = "select * from " & rs.Fields("tablename").Value & ""
rs1.Open(str, con, ADODB.CursorTypeEnum.adOpenDynamic,
ADODB.LockTypeEnum.adLockPessimistic)
While (rs1.EOF <> True)
If String.Equals(rs1.Fields("sname").Value, TextBox1.Text) And
String.Equals(rs1.Fields("pass").Value, TextBox2.Text) Then
temp1 = rs1.Fields("sname").Value
temp2 = rs1.Fields("scode").Value
temp3 = rs1.Fields("ssname").Value
temp4 = "MDIParent1"
TextBox1.Text = ""
TextBox2.Text = ""
MDIParent1.Show()
Me.Hide()
i=1
Exit While
End If
rs1.MoveNext()
End While
rs1.Close()
rs.MoveNext()
End While
If i = 0 Then
MsgBox("LOGIN NOT VAILD")
End If
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End If
End Sub
Private Sub Form6_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
con = New ADODB.Connection
If (con.State = ConnectionState.Open) Then
con.Close()
End If
con.Open("driver={microsoft ODBC for
Oracle};server=test;uid=M11MCA20;pwd=M11MCA20;")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
End
End Sub
End Class
Attendance Entry:
Public Class attentry
Dim con As New ADODB.Connection
Dim rs, rs1 As New ADODB.Recordset
Dim str, dat As String
Dim att As String
Dim i As Integer = 1
Dim flag As Integer = 1
Dim chk1 As New DataGridViewCheckBoxColumn()
Dim chk As New DataGridViewCheckBoxColumn()
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
rs = New ADODB.Recordset
Try
str = "select * from " & ComboBox1.SelectedItem & "_" &
ComboBox5.SelectedItem & ""
rs.Open(str, con, ADODB.CursorTypeEnum.adOpenDynamic,
ADODB.LockTypeEnum.adLockOptimistic)
rs.MoveFirst()
DataGridView1.Rows.Clear()
i=1
While (rs.EOF <> True)
Dim row As String() = New String() {i, rs.Fields("rollno").Value,
rs.Fields("name").Value}
DataGridView1.Rows.Add(row)
i=i+1
rs.MoveNext()
End While
rs.Close()
DataGridView1.Columns.Add(chk)
chk.HeaderText = "PRESENT/ABSENT"
chk.Name = "chk"
chk.Selected = True
DataGridView1.Columns.Add(chk1)
chk1.HeaderText = "ONDUTY"
chk1.Name = "chk1"
timetb()
Catch ex As Exception
'rs.Close()
MsgBox(ex.ToString)
End Try
End Sub
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
con = New ADODB.Connection
'If (con.State = ConnectionState.Open) Then
' con.Close()
'End If
con.Open("driver={microsoft ODBC for
Oracle};server=test;uid=M11MCA20;pwd=M11MCA20;")
Label15.Text = login.temp1
Label16.Text = login.temp2
Label7.Text = login.temp3
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
str = String.Empty
att = ""
flag = 1
dat = DateTimePicker1.Value.Date.ToString("dd-MMM-yyyy")
For Me.i = 0 To DataGridView1.RowCount - 1
If DataGridView1.Rows(i).Cells(3).Value = True Then
If (flag < 2) Then
att = "'P'"
flag = 3
Else
att = att + ",'P'"
End If
ElseIf DataGridView1.Rows(i).Cells(4).Value = True Then
If (flag < 2) Then
att = "'O'"
flag = 3
Else
End Sub
Private Sub CREATEToolStripMenuItem_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles CREATEToolStripMenuItem.Click
rs1 = New ADODB.Recordset
str = "select * from " & ComboBox1.Text & "_" & ComboBox5.Text & ""
rs1.Open(str, con, ADODB.CursorTypeEnum.adOpenDynamic,
ADODB.LockTypeEnum.adLockPessimistic)
rs1.MoveFirst()
str = "create table " & ComboBox1.Text & "_" & ComboBox5.Text & "_" &
ComboBox2.Text & "_" & ComboBox3.Text & "_att(days Date,hour number,subject
varchar(15),primary key(days,hour))"
con.Execute(str)
While (rs1.EOF <> True)
str = "alter table " & ComboBox1.Text & "_" & ComboBox5.Text & "_" &
ComboBox2.Text & "_" & ComboBox3.Text & "_att add(M" &
rs1.Fields("rollno").Value & " varchar(20))"
con.Execute(str)
rs1.MoveNext()
End While
End Sub
Private Sub timetb()
Dim temp As String
rs1 = New ADODB.Recordset
ComboBox4.Text = "Select One"
Try
temp = "select * from " & ComboBox1.Text & "_" & ComboBox5.Text &
"_" & ComboBox2.Text & "_" & ComboBox3.Text & "_time where(day='" &
DateTimePicker1.Value.ToString("dddd") & "')"
rs1.Open(temp, con, ADODB.CursorTypeEnum.adOpenUnspecified,
ADODB.LockTypeEnum.adLockPessimistic)
ComboBox4.Items.Clear()
For Me.i = 1 To 7
If String.Equals(rs1.Fields(i).Value, Label7.Text) Then
ComboBox4.Items.Add(i)
End If
Next
rs1.Close()
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles DateTimePicker1.ValueChanged
timetb()
End Sub
Private Sub DELETEToolStripMenuItem_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles DELETEToolStripMenuItem.Click
str = "drop table " & ComboBox1.Text & "_" & ComboBox5.Text & "_" &
ComboBox2.Text & "_" & ComboBox3.Text & "_" & Label7.Text & " "
con.Execute(str)
MsgBox("TABLE DELETED SUCCESSFULLY")
End Sub
Private Sub HOMEToolStripMenuItem_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles HOMEToolStripMenuItem.Click
MDIParent1.Show()
Me.Close()
End Sub
Imports Microsoft.Office.Interop
Public Class awreport
Dim conn As New ADODB.Connection
Dim rs, rs1 As New ADODB.Recordset
Dim str, dat As String
Dim i, j, flag, diff, count1 As New Integer
Dim ro, temp, tot_day, pre_day, ab_day As Integer
Dim holiday As String
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
holiday = String.Empty
Try
rs = New ADODB.Recordset
rs1 = New ADODB.Recordset
DataGridView1.Rows.Clear()
DataGridView1.Columns.Clear()
DataGridView2.Rows.Clear()
DataGridView2.Columns.Clear()
Dim clm1 As New DataGridViewTextBoxColumn()
DataGridView2.Columns.Add(clm1)
clm1.HeaderText = ComboBox1.Text + "-" + ComboBox5.Text
clm1.Name = "clm1"
Dim clm2 As New DataGridViewTextBoxColumn()
DataGridView2.Columns.Add(clm2)
clm2.HeaderText = "SEMESTER" + "-" + ComboBox3.Text
clm2.Name = "clm3"
DataGridView2.Columns(1).Width = 130
dtxt1.Width = 20
Dim rcount As Integer = 0
Dim count As Integer = 3
While (rs1.Fields.Count > count)
DataGridView1.Rows(rcount).Cells(j).Value = rs1.Fields(count).Value
DataGridView1.Rows(rcount).HeaderCell.Value = (rcount +
1).ToString
If String.Equals(rs1.Fields(count).Value, "A") Then
DataGridView1.Rows(rcount).Cells(j).Style.BackColor = Color.Red
End If
rcount = rcount + 1
count = count + 1
End While
count1 = count1 + 1
j=j+1
rs1.MoveNext()
End While
rs1.Close()
d = DateAdd(DateInterval.Day, 1, d)
diff = diff - 1
Catch ex As Exception
holiday += "(" + d.Date.ToString("dd-MMM-yyyy") + "-HOLIDAY) "
d = DateAdd(DateInterval.Day, 1, d)
diff = diff - 1
rs1.Close()
End Try
End While
' MsgBox(holiday)
DataGridView1.Rows.Add(holiday)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
Private Sub creport_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
conn = New ADODB.Connection
rs = New ADODB.Recordset
xlWorkSheet.Cells(6, 1) = "SNO".ToString
flag = 0
For Each col As DataGridViewColumn In DataGridView1.Columns
If flag < 2 Then
xlWorkSheet.Cells(6, col.Index + 2) = col.HeaderText.ToString
flag = flag + 1
Else
xlWorkSheet.Cells(7, col.Index + 2) = col.HeaderText.ToString
End If
Next
For i = 1 To DataGridView1.Rows.Count - 1
xlWorkSheet.Cells(i + 7, 1) = i.ToString
flag = 0
For j = 0 To DataGridView1.ColumnCount - 1
Dim vv As String
If DataGridView1(j, i - 1).Value Is Nothing Then
vv = "Niet ingevuld"
Else
vv = DataGridView1(j, i - 1).Value.ToString
xlWorkSheet.Cells(i + 7, j + 2) = vv
If flag < 2 Then
xlWorkSheet.Columns(j + 2).ColumnWidth = 15
'xlWorkSheet.Columns.Merge(2)
flag = flag + 1
Else
xlWorkSheet.Columns(j + 2).ColumnWidth = 1
End If
End If
Consolidate Report:
Imports Microsoft.Office.Interop
Public Class consli
Dim con As New ADODB.Connection
Label8.Text = login.temp1
Label11.Text = login.temp2
Label10.Text = login.temp3
End Sub
Private Sub daycalc()
Dim pre_hours(100), tot_hours(100), ab_hours(100) As Integer
Try
Dim d As Date
d = DateTimePicker1.Value.Date
Dim d1 As Date
d1 = DateTimePicker2.Value.Date
diff = DateDiff(DateInterval.Day, d, d1)
j=2
While diff >= 0
Try
str = "Select * from " & ComboBox1.SelectedItem & "_" &
ComboBox5.Text & "_" & ComboBox2.SelectedItem & "_" &
ComboBox3.SelectedItem & "_att where(days='" & d.Date.ToString("dd-MMM-yyyy")
& "' and subject='" & Label10.Text & "')order by hour asc "
rs.Open(str, con, ADODB.CursorTypeEnum.adOpenDynamic,
ADODB.LockTypeEnum.adLockPessimistic)
rs.MoveFirst()
Dim temp(100), temp1(100) As Integer
Dim flag1(100) As Integer
While (rs.EOF <> True)
Dim rcount As Integer = 0
Dim count As Integer = 3
k=0
While (rs.Fields.Count > count)
If String.Equals(rs.Fields(count).Value, "P") Or
String.Equals(rs.Fields(count).Value, "O") Then
pre_hours(k) = pre_hours(k) + 1
ElseIf String.Equals(rs.Fields(count).Value, "A") Then
ab_hours(k) = ab_hours(k) + 1
End If
tot_hours(k) = tot_hours(k) + 1
rcount = rcount + 1
count = count + 1
k=k+1
End While
j=j+1
rs.MoveNext()
End While
For Me.i = 0 To DataGridView1.Rows.Count - 1
tot_day(i) = tot_day(i) + 1
Next
d = DateAdd(DateInterval.Day, 1, d)
diff = diff - 1
rs.Close()
Catch ex As Exception
d = DateAdd(DateInterval.Day, 1, d)
diff = diff - 1
rs.Close()
End Try
End While
Catch ex As Exception
MsgBox(ex.ToString)
End Try
i=0
While (i < DataGridView1.Rows.Count - 1)
DataGridView1.Rows(i).Cells(2).Value = pre_hours(i)
DataGridView1.Rows(i).Cells(3).Value = ab_hours(i)
DataGridView1.Rows(i).Cells(4).Value = tot_hours(i)
DataGridView1.Rows(i).Cells(5).Value = Math.Round((pre_hours(i) /
tot_hours(i) * 100), 2)
i=i+1
End While
End Sub
Private Sub HOMEToolStripMenuItem_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles HOMEToolStripMenuItem.Click
MDIParent1.Show()
Me.Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Panel1.Visible = True
ProgressBar1.Minimum = 0
ProgressBar1.Maximum = 100
End If
Next
ProgressBar1.Value = (i / DataGridView1.Rows.Count) * 100
Next
xlWorkBook.Activate()
xlWorkBook.SaveAs("D:\Consolidate.xls")
xlWorkBook.Close()
xlApp.Quit()
Panel1.Visible = False
MsgBox("You can find your report at " & "D:\Consolidate.xls")
End Sub
End Class
Figure: 9.2.1-login
9.2.2ADMIN HOME PAGE:
9.2.2.3TIME TABLE:
9.2.2.5Staffs details:
9.2.2.7UPDATE:
Figure:9.3.1daily attendance
9.3.2 UPDATE ATTENDANCE:
CHAPTER 10
REFERENCES
Books References
1. Introducing Microsoft .NET, Second Edition author David S. Platt.
2. Joe Mayo, Microsoft Visual Studio 2010: A Beginner's Guide, Tata McGraw
Hill, 2010.
3. Alex Mackey, Introducing .NET 4.0: With Visual Studio 2010, Press, USA,
2010.
WEBSITES
1.
2.
3.
4.
5.
6.
7.
http://www.msdn.net/
http://msdn.microsoft.com/en-us/library/orm-9780596518455-02.aspx
http://www.w3schools.com/asp.net/
http://www.cramerz.com/aspdotnet
http://www.dotnetspider.net/
http://www.stackoverflow.com
http://www.codeproject.com