Post on 28-Apr-2015
description
MGM’SDR. G. Y. PATHRIKAR COLLEGE OF COMPUTER
SCIENCE AND INFORMATION TECHNOLOGY, AURANGABAD
A PROJECT REPORT
ON
“STUDENT RESULT ANALYSIS SYSTEM”
GUIDED BY MR. ASHISH BHALERAO SIR
SUBMITTED BY MR. UMESH MUNDADA
YEAR2012-2013
IN PARTIAL FULFILLMENT OF THE REQUIREMENT OF THE AWARD THE DIGREE OF BCA (Sci) FROM DR. BABASAHEB AMBEDKAR
MARATHWADA UNIVERSITY,AURANGABAD
MGM’S
DR. G. Y. PATHRIKAR COLLEGE OF COMPUTER SCIENCE AND INFORMATION TECHNOLOGY,
AURANGABAD
CERTIFICATE
This is to certify that Mr. Umesh Mundada, are the student of this college.
We are successfully completed the Project on “Student Result Snalysis System” as partial fulfillment of the course BCA (Sci) affiliated to Dr. Babasaheb Ambedkar Marathwada University, Aurangabad During the Academic Year ( 2011-2012 ).
Principal Project Guide Examiner MGM’ Dr. GYPCCSIT MR. BHALERAO SIR AURANGABAD
Place: ____________Date: ____________
ACKNOWLEDGEMENT
The success of this project is an outcome of sincere efforts challenged
in the right direction, efficient supervision and most valuable technical
assistance.
The project wouldn’t have been completed without the help and
guidance of management. We express our deep gratitude to Dr. P.D.
Deshmukh Principal MGM’s Dr. G. Y. Pahtrikar CS & IT and Mr.Ashish
Bhalerao Sir With great pleasure, we would like to opportunity to thank my
practical in charge for her valuable guidance, support he gave to me for the
completion of the “Project”. He provided with me the necessary resource,
encouragement for better understand and learning.
We will always carry the memories of my training period. Last, but not
least we will fail in duty if we don’t express regards and grateful to my parents
and friends.
INDEXSR.NO CONTENTS PAGE.NO
1. INTRODUCTION
2. Existing System
3. Drawback of Existing System
4. Need of Computerization
5. System requirements
6. System analysis
7. Requirement analysis
8. Data flow diagram(DFD)
9. Entity Relationship Diagram(ERD)
10. Test Procedure
11. Coding
12. CONCLUSION
13. BIBLOGRAPHY
15. System limitation &Enhancement
INTRODUCTION
Student Result Analysis System is software which is helpful for students as well as the college authorities. In the current system all the activities are done manually.
It is very time consuming and costly. Our Student Result Analysis System deals with the various activities related to the students. During analysis, data
collected on the various files, decision points and transactions handled by the present system. The commonly used tools in the system are Data Flow Diagram, interviews, etc.
In the Software we can register as a user and user has of three types,
student, admin and manager. Admin has the power to add new user and can
edit and delete a user. A student can register as user and can use visible for
mark list and attendance his profile. The admin can add edit and delete marks
for the student. All the users can see the marks. The manager can add and
delete new student and staff performance,
EXISTING SYSTEM
Student Result Analysis System is software which is helpful for students as well as the college authorities. In the current system all the activities are done manually.
In the Software we can register as a user and user has of three types,
student, admin and Teacher. Admin has the power to add new user and can edit
and delete a user. A student can register as user and can use visible for mark list
and attendance his profile. The admin can add edit and delete marks for the
student. All the users can see the marks. The Teacher can add and delete new
student and staff performance,
Sometimes, these records may get misplaced or destroyed due
to some reason, in such cases problems arise when reference to those records
are required. The manual data entry on paper forms and maintenance of not as
efficient as it is required to be. Thus, it contradicts the concept of paperless
DRAWBACK OF EXISTING SYSTEM
1. The present system requires lot of manpower and there may be a delay for some work in case of absence/ shortage of Teachers.
2. The organization may lose their data because of- i. Ignorance of Teacher towards their responsibility.
ii. Misplacement of register.
iii. Lack of Care.iv. Wrong data entry in register.v. Inconvenience of maintenance of registers or records. (storage
space).
3. College may face problem in case of reassignment some Student.
4. Teacher may add wrong marks.
5. In case of forms having particular format, College may find problem to take Xerox again and again,
NEED FOR COMPUTERIZATION
The migration from a traditional (manual) system of working to a modern system by using computer wherever possible is known as computerization.
With computerization Student Result analysis will have the following
Advantage:
1. Accuracy, Automation.2. Much more detail of customer can be recorded in little time.3. Information on fingerprint detail like service provided and bill for
individual customer can be maintained.4. G.U.I. & user friendly environment.5. Searching and sorting of any record can be done.6. Very easily very quickly without any hassle7. Information of all kinds is kept much more secured. Unauthorized
personnel are prohibited from accessing any data for reading or modifying.
8. It helps in maintain a paperless office. Paper is merely used for banking up of customer record.
9. To avoid redundancy.
SYSTEM REQUMENT
HARDWARE REQUIREMENTS:
System : Pentium IV 2.4 GHz.
Hard Disk : 40 GB.
Monitor : 15 VGA Colour..
Ram : 1 GB.
SOFTWARE REQUIREMENTS:
Operating system : Windows XP. Windows 7, Windows 8
Coding Language : VB.net
IDE : Visual Studio 2010
Database Tool : Microsoft SQL Server 2008 S MGMT studio
SYSTEM ANALYSIS
EXISTING SYSTEM:
System Analysis is a detailed study of the various operations performed by a
system and their relationships within and outside of the system. Here the key
question is- what all problems exist in the present system? What must be done to
solve the problem? Analysis begins when a user or manager begins a study of the
program using existing system.
During analysis, data collected on the various files, decision points and
transactions handled by the present system. The commonly used tools in the system
are Data Flow Diagram, interviews, etc. Training, experience and common sense are
required for collection of relevant information needed to develop the system. The
success of the system depends largely on how clearly the problem is defined,
thoroughly investigated and properly carried out through the choice of solution. A
good analysis model should provide not only the mechanisms of problem
understanding but also the frame work of the solution. Thus it should be studied
thoroughly by collecting data about the system. Then the proposed system should be
analyzed thoroughly in accordance with the needs.
System analysis can be categorized into four parts.
System planning and initial investigation
Information Gathering
Applying analysis tools for structured analysis
Feasibility study
Cost/ Benefit analysis.
In the current system we need to keep a number of records related to the
student and want to enter the details of the student and the marks manually. In this
system only the teacher or the school authority views the mark of the student and
they want to enter the details of the student. This is time consuming and has much
cost.
PROPOSED SYSTEM:
In our proposed system we have the provision for adding the details of the
students by themselves. So the overhead of the college authorities and the teachers is
become less. Another advantage of the system is that it is very easy to edit the
details of the student and delete a student when it found unnecessary. The marks of
the student are added in the database and so students can also view the marks
whenever they want.
Our proposed system has several advantages
User friendly interface
Fast access to database
Less error
More Storage Capacity
Search facility
Look and Feel Environment
Quick transaction
All the manual difficulties in managing the student details in a college
have been rectified by implementing computerization.
FEASIBILITY ANALYSIS
Whatever we think need not be feasible .It is wise to think about the
feasibility of any problem we undertake. Feasibility is the study of impact, which
happens in the organization by the development of a system. The impact can be
either positive or negative. When the positives nominate the negatives, then the
system is considered feasible. Here the feasibility study can be performed in two
ways such as technical feasibility and Economical Feasibility.
Technical Feasibility:
We can strongly says that it is technically feasible, since there will not be much
difficulty in getting required resources for the development and maintaining the
system as well. All the resources needed for the development of the software as well
as the maintenance of the same is available in the organization here we are utilizing
the resources which are available already.
Economical Feasibility
Development of this application is highly economically feasible .The
organization needed not spend much money for the development of t he system
already available. The only thing is to be done is making an environment for the
development with an effective supervision. I f we are doing so, we can attain the
maximum usability of the corresponding resources .Even after the development, the
organization will not be in condition to invest more in the organization. Therefore,
the system is economically feasible.
REQUIREMENT ANALYSIS
Modules: There are mainly 3 modules in this software
Student module Admin Module Teacher Module
Following Description of each module
Some of the Modules in RAS
Student View Result Module:
Used to view result.
Used to print result.
Teacher Login Module:
Used to view student details by using student Roll no.
Used to change the existing mark.
Administrator Login Module:
Used to insert student details & marks.
Used to add new teacher
Used to change password.
Used to edit student details.
Exit Module:
TESTING PROCEDURE
Test program includes of providing the program with a set o test
inputs (test cases) & observing that programs behaves as expected or not. If the
programs fails to behave as expected, then the condition under which the
failure occur are added for debugging and correction. Following are some
commonly used terms associated with testing:
1) Failure:
This condition includes presence of an error or defect or bug. They
were presence of error does not necessarily leads to failure.
2) Fault: It is incorrect intermediate stage that may have been entered during
program execution. For e.g.: unexpected change in the value of variable. A
fault may of May or may not lead to failure.
3) Test case:
It is a triplet (I, S, O) where I is data input; S is a state of system at
which data is inputted. & O is expected output of the system.
4) Test suit: It is a set of all test cases with which a given software product is
tested
1.2.3.
‘
‘
TYPES OF TESTING:
Following are the major types of testing:
1) Unit testing.
2) Integration testing.
3) System testing.
4) Black box testing.
5) White box testing.
1) UNIT TESTING:
Unit testing is the testing of different modules of system in
isolation. The reason why unit testing modules of a system in isolation. The
reason why unit testing is necessary is that the other modules. With which this
module needs to be interface may not be ready. Also it is always good to test
the module in isolation because debugging. (Removal of errors in independent
module is faster than integrated system) In order to test single module we
need the complete environment for its execution. Testing a module is giving a
desired result or not. If the module with asset of inputs and observing that the
module is gaining a desired result or not. If the module fails for giving the
desired result then the condition under which failure occur is noted or
debugging & correction. This is called as unit testing.
2) INTEGRATION TESTING:
During integration testing different module of the system are integrate
using integration plan specific the steps and order in which modules are
combined to realize the full system, after each integration step the partly
integrated system is tested. The primary objective of integration testing is to
test module interface. There are different approaches of integrated testing.
a) Bio-bang approach.
b) Top –Down approach.
c) Bottom-Up approach.
d) Mixed approach.
a) Bio-bang integration testing:
It is simplest approach to integration testing where all the
modules are integrated in a single step. In simple words all the modules are
simply put together and tested.
b) Top-Down approach:
Top-Down integration testing starts with the main routine i.e. the
root modules & one or two sub-ordinate routines in the system. The top-down
integration testing approach requires the use of program to simulate the effect
of lower level routines that are called by the routines under test.
c) Bottom-up approach:
In this testing each sub system is tested separately and then full
system is tested. A subsystem may consist of many modules which
communicate among each other through well-defined interfaces.
d) Mixed integration testing:
A mixed (sandwiches) integration testing focuses on both top- down
and bottom-up approach. In top-down approach testing starts only after top
level module have been coded & unit tested. Similarly bottom-up testing can
start only after bottom level modules are ready. The mixed approach overcame
the shortcomings of both top-down & bottom up approach as testing can start
when module becomes available. Therefore this is one of the most commonly
used approaches to perform integration testing.
3) SYSTEM TESTING:
Software may consist of other system elements hardware,
information, people etc. at the end of development system integration and
validation. Tests are conducted. These tests are not conducted by the software
engineers however the step is taken during design & testing can improve the
probability of successful system integration testing. System testing is a series
of different tests whose aim is to ensure that the
System elements are properly integrated and they type are performing the
allocated function properly. There are different types of system testing
available software based system as follows:
A) Recovery testing:
Many computer based system are having a facility to recover faults
within specified time. In some cases we require system which is fault tolerant
i.e. the fault should not becomes the cause of overall system failure. In other
cases a system failure must be corrected within specified time.
Recovery testing is a system is a test that forces the software to become
fail in variety of ways verifies hat recovery is properly performed or not. It
recovery is performed by the system itself then check-pointing mechanism,
data recovery, restart activities are performed. If a system requires human
interface then mean time to repair (MTPR) activity is performed.
B) Security testing:
Any computer based system that manager sensitive information may
causes harmful action due to improper or illegal penetration. Penetration
includes variety of activities like hackers who attempt to penetrate a system,
Employer who attempts to penetrate a system for revenge etc.
Security testing is performed to verity that protection mechanism built into
system will protect from improper penetration or not.
During security testing tester attempts to penetrate the system in variety of
ways he may try to access the password, or he may attack the system to break
any defenses which is constructed into system, or be may corrupt the system,
he may brows insecure data, he may try to find key of data entry etc.
c) Stress testing:
Stress testing is executed in such a way that tester can demand
resources in abnormal way.
For example:-
i. A special test may be designed hat generate to interrupts per records
when ½ is the average rate.
ii. Input data rate can be increased by a magnitude to determine how input
functional will respond.
iii. Test career that requires maximum memory etc. a variation of stress
testing is a technique called sensitive testing. It is performed to uncover
improper processing
D) Performance testing:
For real time 7 embedded system software that performs required
function, but performance testing is necessary because in embedded system
software, required function & the performance both are importance
factors. Performance testing is design to test performance of software within a
particular time.
Performance test are often carried out along with stress testing &
usually requires both hardware & software elements
5) BLACK BOX TESTING:
In black box testing test career are form an examination of input &
output value n this testing knowledge of design code is not required.
Following are the two main approaches in black box testing.
a) Equivalence class partitioning.
b) Boundary value analysis.
a) Equivalence class partitioning:
In this approach input velour to program is portioned into a set
of equivalence class. The main idea of defining the equivalence is that
belonging to an equivalence class is good test in the software withall
values belonging to that equivalence class. Following are the general.
If the input data velour to system can specify by a range of velour, them one valid & two invalid equivalence class is generated.
If data assumes values from a set of discrete members then on
equivalence class of valid input values & other for invalid input should be
generated. For e.g.: a software that computers a square root of any integer
]which can takes values from i-5000 then there are 3 equivalence set
of integer from i-5000 & set of integer larger than 5000.
b) Boundary value analysis:
Some typical programming errors occur at the boundaries, of
different equivalent classer of input. The reason for such a error might
be due to some specific velour a programmer often fail to see the special
processing required by the input values that lies at boundary of different
equivalence.
Boundary value analysis is due to selection of test career of
boundaries of different equivalent class.
For example:-
For a function that computer the square root of integer values in
range i-5000 then the test care must include following
values {0, 1, 5000, and 5001}
5) WHITE BOX TESTING:
There are several white box testing methodologies used.
Each testing strategy is based on some Conclusions. One white box
testing may be stronger that other or may be equivalent i.e. errors are
uncovered by start egg. ‘A’ may be more than strategy ‘B’
When two testing strategies data errors that are different then
they are called are complementary testing strategies.
Various testing strategies come under white box testing is are
Follows
a) Statement coverage.
b) Branch coverage.
c) Condition coverage.
a) Statement coverage:
The statement coverage methodology aims to design test care
so art to force the execution of every statement. In a program at learn
once the main idea behind this strategy is that unless we execute a
statement. We cannot determine error in that statement. On the other
hand we also unable to determine whether the statement works
properly for all input velour or not
b) Branch coverage:
In branch coverage testing strategy the test career are designed to
make each branch condition true & false in terms. This is because each edge of
program control traversed at learns once. It is better testing strategy that
statement based testing strategy.
C) Condition coverage:
It is a structural testing in which test cares are designed
such that each component of conditional expression is give for e.. in a
conditional values. ((c1 and c2) or c3), (c1, c2 and c3) are executed
altered on according to true or false values. The condition coverage
based testing practical only if numbers of condition are small. For each
composite conditional expression all the elements must be tested
individually.
DATA FLOW DIAGRAM
CODING
Login Page
Imports System.Data.SqlClient
Public Class User_Login
Dim con As SqlConnection
Dim cmd As SqlCommand
Dim dr As SqlDataReader
Dim da As SqlDataAdapter
Dim check As Boolean = False
Public userType As String = ""
Dim obj As New Student_View
Dim id As String = ""
Private Sub User_Login_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
putUserRole()
End Sub
Private Sub putUserRole()
con = getconnection()
Try
con.Open()
cmd = New SqlCommand("select user_Role from user_Role_Info", con)
dr = cmd.ExecuteReader
While dr.Read
ComboBox1.Items.Add(dr(0))
End While
con.Close()
Catch ex As Exception
MsgBox("Put User Role ERROR!" & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text <> "" And TextBox2.Text <> "" And ComboBox1.Text <> "" Then
con = getconnection()
Try
con.Open()
cmd = New SqlCommand("select * from user_Info", con)
dr = cmd.ExecuteReader
While dr.Read
If TextBox1.Text = dr(0) And TextBox2.Text = dr(1) And ComboBox1.SelectedItem = dr(2) Then
check = True
userType = dr(2).ToString
id = dr(3).ToString
End If
End While
Catch ex As Exception
MsgBox("Login Error" & ex.Message, MsgBoxStyle.Information)
End Try
Else
MsgBox("Please Enter All Detail", MsgBoxStyle.Critical)
TextBox1.Focus()
Exit Sub
End If
If check = True Then
'AdminView.Show()
If userType.Equals("ADMIN") Then
' MsgBox("Login Successfull", MsgBoxStyle.Information)
Me.Hide()
AdminView.Show()
Exit Sub
ElseIf userType.Equals("TEACHER") Then
' MsgBox("Login Successfull", MsgBoxStyle.Information)
Me.Hide()
teacher_View.Show()
Exit Sub
ElseIf userType.Equals("STUDENT") Then
' MsgBox("Login Successfull", MsgBoxStyle.Information)
obj.idCode = id.ToString
obj.ShowDialog()
Me.Hide()
Exit Sub
End If
Else
MsgBox("Login Failed Try Again", MsgBoxStyle.Information)
TextBox1.Text = ""
TextBox2.Text = ""
ComboBox1.Text = ""
TextBox1.Focus()
Exit Sub
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
ComboBox1.Items.Clear()
con = getconnection()
Try
con.Open()
cmd = New SqlCommand("select user_Role from user_Info where user_Name like '" & TextBox1.Text & "%" & "'", con)
dr = cmd.ExecuteReader
While dr.Read
ComboBox1.Items.Add(dr(0))
End While
con.Close()
Catch ex As Exception
MsgBox("Error-->" & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
End Class
Public Class AdminView
Admin ViewPrivate Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
Student_Info.Show()
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
Me.Hide()
Create_User.Show()
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
End
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.Hide()
EditExistingDetail.Show()
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Me.Hide()
View_Student_Mark.Show()
End Sub
Private Sub Panel2_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel2.Paint
End Sub
End Class
Create User
Imports System.Data
Imports System.Data.SqlClient
Public Class Create_User
Dim con As SqlConnection
Dim cmd, cmd1 As SqlCommand
Dim dr As SqlDataReader
Dim da As SqlDataAdapter
Dim ID As String = ""
'Dim Sname As String = ""
'Dim studClass As String = ""
'Dim rollNo As String = ""
Private Sub Create_User_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
putUserRole()
ComboName.Enabled = False
End Sub
Private Sub putUserRole()
con = getconnection()
Try
con.Open()
cmd = New SqlCommand("select user_Role from user_Role_Info", con)
dr = cmd.ExecuteReader
While dr.Read
comboUserType.Items.Add(dr(0))
End While
con.Close()
Catch ex As Exception
MsgBox("Put User Role ERROR!" & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If txtUserName.Text = "" Then
MsgBox("Enter User Name First", MsgBoxStyle.Information)
txtUserName.Focus()
Exit Sub
ElseIf txtPssword.Text = "" Then
MsgBox("Enter Password", MsgBoxStyle.Information)
txtPssword.Focus()
Exit Sub
ElseIf comboUserType.Text = "" Then
MsgBox("Select User Type", MsgBoxStyle.Information)
comboUserType.Focus()
Exit Sub
End If
' Get Conection String Into Con
con = getconnection()
Try
If ComboName.Enabled = True And comboUserType.SelectedItem = "STUDENT" Then
con.Open()
cmd = New SqlCommand("select stud_ID from user_Info", con)
dr = cmd.ExecuteReader
While dr.Read
If dr(0).ToString = ID.ToString Then
MsgBox("This User Already Exits", vbInformation)
clearText()
ComboName.Text = ""
ComboName.Items.Clear()
comboUserType.Items.Clear()
Exit Sub
End If
End While
con.Close()
con.Open()
cmd = New SqlCommand("insert into user_Info values('" & txtUserName.Text & "','" & txtPssword.Text & "','" & comboUserType.SelectedItem & "','" & ID.ToString & "')", con)
cmd.ExecuteNonQuery()
MsgBox("User Created", vbInformation)
con.Close()
Else
con.Open()
'Command For Create User
cmd = New SqlCommand("select user_Name from user_Info", con)
dr = cmd.ExecuteReader
While dr.Read
If dr(0).ToString = txtUserName.Text.ToString Then
MsgBox("This User Already Exits", vbInformation)
clearText()
comboUserType.Items.Clear()
ComboName.Items.Clear()
Exit Sub
End If
End While
If ConnectionState.Open Then
con.Close()
End If
con.Open()
cmd = New SqlCommand("insert into user_Info (user_Name,user_Password,user_Role) values('" & txtUserName.Text & "','" & txtPssword.Text & "','" & comboUserType.SelectedItem & "')", con)
cmd.ExecuteNonQuery()
MsgBox("User Created", MsgBoxStyle.Information)
con.Close()
End If
Catch ex As Exception
MsgBox("ERROR User Create" & ex.Message, vbCritical)
End Try
clearText()
ComboName.Items.Clear()
ComboName.Enabled = False
ComboName.Text = ""
comboUserType.Text = ""
End Sub
' Procedure For Clear All Text
Private Sub clearText()
txtUserName.Text = ""
txtPssword.Text = ""
comboUserType.Text = ""
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.Hide()
AdminView.Show()
End Sub
Private Sub comboUserType_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles comboUserType.SelectedIndexChanged
If comboUserType.SelectedItem = "STUDENT" Then
ComboName.Enabled = True
'txtRollno.ReadOnly = False
ElseIf comboUserType.SelectedItem = "ADMIN" Then
ComboName.Enabled = False
ElseIf comboUserType.SelectedItem = "TEACHER" Then
ComboName.Enabled = False
End If
ComboName.Items.Clear()
End Sub
Private Sub ComboName_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboName.TextChanged
con = getconnection()
Try
con.Open()
cmd = New SqlCommand("select first_Name from stud_Educational_Detail where first_Name like '" & ComboName.SelectedItem & "%" & "'", con)
dr = cmd.ExecuteReader
While dr.Read
ComboName.Items.Add(dr(0))
End While
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub ComboName_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboName.SelectedIndexChanged
con = getconnection()
Try
If ConnectionState.Open Then
con.Close()
End If
con.Open()
cmd = New SqlCommand("select student_ID from stud_Educational_Detail where first_Name='" & ComboName.SelectedItem & "'", con)
ID = cmd.ExecuteScalar
Catch ex As Exception
MsgBox(ex.Message)
Finally
con.Close()
End Try
ComboName.Items.Clear()
End Sub
Public Sub txtAlphaNumericValidation(ByVal e)
If (Asc(e.KeyChar) < 46) Or (Asc(e.KeyChar) = 47) Or (Microsoft.VisualBasic.Asc(e.KeyChar) > 57) And (Asc(e.KeyChar)) < 64 Or (Asc(e.KeyChar)) > 90 And (Asc(e.KeyChar)) < 97 Or (Asc(e.KeyChar)) > 122 Then
'MsgBox("Special Charecter Not Allowed", vbCritical)
e.Handled = True
End If
If (Asc(e.KeyChar) = 8) Then
e.Handled = False
End If
End Sub
Private Sub txtUserName_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtUserName.KeyPress
txtAlphaNumericValidation(e)
End Sub
Private Sub txtPssword_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtPssword.TextChanged
If txtPssword.TextLength > 8 Then
MsgBox("Password Length Is Not Greater Than 8", vbCritical)
txtPssword.Text = ""
txtPssword.Focus()
End If
End Sub
End Class
Imports System.Data.SqlClient
Imports System.ComponentModel
Public Class EditExistingDetail
Dim con As SqlConnection
Dim cmd, cmd1 As SqlCommand
Dim dr As SqlDataReader
Dim da As SqlDataAdapter
Dim ds As DataSet
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
DataGridView1.DataSource = Nothing
ClearTextBox()
Me.Hide()
AdminView.Show()
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Dim lnkcell As New DataGridViewLinkCell
Dim gridComboBox As New DataGridViewLinkColumn
Dim r As New DataGridView
Dim dst As New DataGridTableStyle
Dim btn As New DataGridViewButtonColumn()
If TextBox1.Text = "" Then
DataGridView1.DataSource = Nothing
Exit Sub
End If
con = getconnection()
Try
con.Open()
'cmd = New SqlCommand("select * from student_Info where first_Name like '" & TextBox1.Text & "%" & "'", con)
da = New SqlDataAdapter("select student_ID as ID,first_Name as FirstName,middele_Name as MiddleName,last_Name as LastName,addmission_Date AS AdmissionDate from student_Info where first_Name like '" & TextBox1.Text & "%" & "'", con)
ds = New DataSet
da.Fill(ds, "Table")
DataGridView1.DataSource = ds.Tables(0)
For i = 1 To DataGridView1.Columns.Count - 1
DataGridView1.Columns(i).ReadOnly = True
AutoNumberRowsForGridView(DataGridView1)
con.Close()
Catch ex As Exception
MsgBox("Error :--> " & ex.Message, MsgBoxStyle.Critical)
End Try
If TextBox1.Text = "" Then
DataGridView1.DataSource = Nothing
End If
End Sub
Public Sub AutoNumberRowsForGridView(ByVal dataGridView As DataGridView)
If DataGridView1 IsNot Nothing Then
Dim count As Integer = 0
While (count <= (dataGridView.Rows.Count - 1))
'DataGridView1.Rows(count).HeaderCell.Value = String.Format((count + 1).ToString(), "0")
DataGridView1.Rows(count).HeaderCell.Value = "EDIT"
count += 1
End While
DataGridView1.RowHeadersWidth = 90
'DataGridView1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.DisplayedHeaders
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Text = ""
txtAddress.Text = ""
ComboBox1.Text = ""
ClearTextBox()
ComboBox1.Items.Clear()
DataGridView1.DataSource = Nothing
End Sub
Public Sub ClearTextBox(Optional ByVal ctlcol As Control.ControlCollection = Nothing)
'Dim ctlcol As Control.ControlCollection = Nothing
If ctlcol Is Nothing Then ctlcol = Me.Controls
For Each ctrl As Control In ctlcol
If TypeOf ctrl Is TextBox Then
'CType(ctrl, TextBox).Text = ""
ctrl.Text = ""
Else
If Not ctrl.Controls Is Nothing OrElse ctrl.Controls.Count <> 0 Then
ClearTextBox(ctrl.Controls)
End If
End If
Next ctrl
End Sub
Private Sub ComboBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.TextChanged
' ComboBox1.Items.Clear()
con = getconnection()
Try
con.Open()
cmd = New SqlCommand("select student_ID from student_Info where student_ID like '" & ComboBox1.SelectedItem & "%" & "' ", con)
dr = cmd.ExecuteReader
While dr.Read
' ComboBox1.DroppedDown = True
ComboBox1.Items.Add(dr(0))
End While
con.Close()
Catch ex As Exception
MsgBox("Error :--> " & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub DataGridView1_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick
End Sub
Private Sub DataGridView1_RowHeaderMouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridView1.RowHeaderMouseClick
Dim dgvRow As DataGridViewRow
Dim a As String = ""
Try
For Each dgvRow In DataGridView1.SelectedRows
'a = cell.Value.ToString
'a = Convert.ToString(cell.Selected.ToString)
a = dgvRow.Cells(0).Value
Next
'getDateTextBox(a)
put_data_Totextbox(a)
Panel1.Visible = True
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Public studID As String = ""
Private Sub put_data_Totextbox(ByVal str As String)
con = getconnection()
Try
If con.State = ConnectionState.Open Then
con.Close()
End If
con.Open()
cmd = New SqlCommand("select * from student_Info where student_ID='" & str.ToString & "'", con)
dr = cmd.ExecuteReader
While dr.Read
txtstudentID.Text = dr(0)
txtFirstName.Text = dr(1)
txtSecondName.Text = dr(2)
txtLastName.Text = dr(3)
txtEmailID.Text = dr(4)
txtAddress.Text = dr(5)
txtCity.Text = dr(6)
txtZipCode.Text = dr(7)
txtState.Text = dr(8)
txtCountry.Text = dr(9)
txtMobileNo.Text = dr(10)
txtContactNo.Text = dr(11)
txtAddmissionDate.Text = dr(12)
End While
'fullName = txtFirstName.Text & " " & txtSecondName.Text & " " & txtLastName.Text
studID = txtstudentID.Text.ToString
'MsgBox(fullName)
con.Close()
Catch ex As Exception
MsgBox("Error :--> " & ex.Message, MsgBoxStyle.Critical)
Finally
con.Close()
End Try
End Sub
Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpdate.Click
Dim studentName As String = ""
studentName = txtFirstName.Text & " " & txtSecondName.Text & " " & txtLastName.Text
con = getconnection()
Try
If con.State = ConnectionState.Open Then
con.Close()
End If
con.Open()
cmd = New SqlCommand("update student_Info set student_ID='" & txtstudentID.Text & "',first_Name='" & txtFirstName.Text & "',middele_Name='" & txtSecondName.Text & "',last_Name='" & txtLastName.Text & "',email_ID='" & txtEmailID.Text & "',stud_Address='" & txtAddress.Text & "',stud_City='" & txtCity.Text & "',zip_Code=" & txtZipCode.Text & ",stud_State='" & txtState.Text & "',stud_Country='" & txtCountry.Text & "',mobile_No=" & txtMobileNo.Text & ",contact_No=" & txtContactNo.Text & ",addmission_Date='" & txtAddmissionDate.Text & "' where student_ID='" & txtstudentID.Text & "'", con)
cmd1 = New SqlCommand("update stud_Educational_Detail set first_Name='" & studentName.ToString & "' where student_ID='" & studID.ToString & "'", con)
cmd1.ExecuteNonQuery()
cmd.ExecuteNonQuery()
MsgBox("Record Updated", MsgBoxStyle.Information)
Catch ex As Exception
MsgBox("Error :--> " & ex.Message, MsgBoxStyle.Critical)
Finally
con.Close()
End Try
ClearTextBox()
ComboBox1.Text = ""
DataGridView1.DataSource = Nothing
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
Dim lnkcell As New DataGridViewLinkCell
Dim gridComboBox As New DataGridViewLinkColumn
con = getconnection()
Try
con.Open()
'cmd = New SqlCommand("select * from student_Info where first_Name like '" & TextBox1.Text & "%" & "'", con)
da = New SqlDataAdapter("select student_ID as ID,first_Name as FirstName,middele_Name as MiddleName ,last_Name as LastName ,addmission_Date AS AdmissionDate from student_Info where student_ID like '" & ComboBox1.SelectedItem & "'", con)
ds = New DataSet
da.Fill(ds, "Table")
DataGridView1.DataSource = ds.Tables(0)
AutoNumberRowsForGridView(DataGridView1)
con.Close()
Catch ex As Exception
MsgBox("Error :--> " & ex.Message, MsgBoxStyle.Critical)
End Try
ComboBox1.Items.Clear()
End Sub
Private Sub DataGridView1_ColumnHeaderMouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridView1.ColumnHeaderMouseClick
AutoNumberRowsForGridView(DataGridView1)
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 EditExistingDetail_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Panel1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Panel1.Paint
End Sub
End Class
Student View
Imports System.Data
Imports System.Data.SqlClient
Public Class Student_View
Dim con As SqlConnection
Dim cmd As SqlCommand
Dim dr As SqlDataReader
Dim da As SqlDataAdapter
Public idCode As String = ""
Dim ds As DataSet
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Me.Hide()
Studentview_Mark.Show()
End Sub
Private Sub Student_View_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
putYear()
End Sub
Private Sub putYear()
ComboBox1.Items.Clear()
con = getconnection()
Try
If con.State = ConnectionState.Open Then
con.Close()
End If
con.Open()
cmd = New SqlCommand("select subject_Year from subject_Table group by subject_Year", con)
dr = cmd.ExecuteReader
While dr.Read
ComboBox1.Items.Add(dr(0))
End While
con.Close()
Catch ex As Exception
MsgBox("Error:--> " & ex.Message)
End Try
End Sub
Private Sub ClearTextBox(Optional ByVal ctlcol As Control.ControlCollection = Nothing)
'Dim ctlcol As Control.ControlCollection = Nothing
If ctlcol Is Nothing Then ctlcol = Me.Controls
For Each ctrl As Control In ctlcol
If TypeOf ctrl Is TextBox Then
'CType(ctrl, TextBox).Text = ""
ctrl.Text = ""
Else
If Not ctrl.Controls Is Nothing OrElse ctrl.Controls.Count <> 0 Then
ClearTextBox(ctrl.Controls)
End If
End If
Next ctrl
End Sub
Private Sub ComboBox1_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedValueChanged
con = getconnection()
Try
con.Open()
da = New SqlDataAdapter("select subject_Name as SubjectName,max_Mark as MaximumMark,min_Mark as MinimumMark,obt_Mark as ObtainedMark from student_mark where student_ID='" & idCode.ToString & "' and stud_Class='" & ComboBox1.SelectedItem & "'", con)
ds = New DataSet
da.Fill(ds, "Student Mark")
DataGridView2.DataSource = ds.Tables(0)
If ds.Tables(0).Rows.Count = 0 Then
MsgBox("NO Record Found For This Year Try Again", vbCritical)
DataGridView2.DataSource = Nothing
ClearTextBox()
End If
cmd = New SqlCommand("select student_ID,student_Name,obt_total_Mark,percentage,result from stud_Result where student_ID='" & idCode.ToString & "' and stud_Class='" & ComboBox1.SelectedItem & "'", con)
dr = cmd.ExecuteReader
While dr.Read
txtID.Text = dr(0).ToString
txtname.Text = dr(1).ToString
txttotal.Text = dr(2).ToString
txtpercentage.Text = dr(3).ToString
txtresult.Text = dr(4).ToString
End While
con.Close()
Catch ex As Exception
MsgBox("ERROR" & ex.Message, vbCritical)
End Try
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
End
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
ClearTextBox()
DataGridView2.DataSource = Nothing
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Try
If txtname.Text <> "" And txtID.Text <> "" And txtpercentage.Text <> "" And txtresult.Text <> "" And txttotal.Text <> "" Then
Dim objstudentview As New Studentview_Mark
objstudentview.studID = txtID.Text.ToString
objstudentview.ShowDialog()
Else
MsgBox("Please Selece Year First")
Exit Sub
End If
Catch ex As Exception
MsgBox(ex.Message, vbInformation)
End Try
ClearTextBox()
ComboBox1.Text = ""
DataGridView2.DataSource = Nothing
End Sub
Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox1.Enter
End Sub
End Class
Student View Marks
Imports System.Data
Imports System.Data.SqlClient
Imports CrystalDecisions.CrystalReports.Engine
Public Class Studentview_Mark
Dim con As SqlConnection
Dim cmd As SqlCommand
Dim da As SqlDataAdapter
Dim ds As DataSet
Public studID As String = ""
Private Sub Studentview_Mark_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
con = getconnection()
Try
If ConnectionState.Open Then
con.Close()
End If
con.Open()
da = New SqlDataAdapter("select * from view_Marks where student_ID='" & studID.ToString & "'", con)
ds = New DataSet
da.Fill(ds, "Mark_Data")
If ds.Tables(0).Rows.Count > 0 Then
Dim objcrt As New CrystalReport1
objcrt.SetDataSource(ds.Tables(0))
CrystalReportViewer1.ReportSource = objcrt
CrystalReportViewer1.Refresh()
End If
con.Close()
Catch ex As Exception
MsgBox("ERROR" & ex.Message, vbCritical)
End Try
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Close()
Student_View.Show()
End Sub
Private Sub CrystalReportViewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load
End Sub
End Class
Teacher View
Imports System.Data
Imports System.Data.SqlClient
Public Class teacher_View
Dim con As SqlConnection
Dim cmd, cmd1 As SqlCommand
Dim dr As SqlDataReader
Dim da As SqlDataAdapter
Dim ds As DataSet
Dim fullName As String = ""
Dim studclass As String = ""
Dim suggestions As New List(Of String)
Dim MySource As New AutoCompleteStringCollection()
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
addStudentName(TextBox1.Text)
If TextBox1.Text = "" Then
ListBox1.Items.Clear()
End If
putYear()
End Sub
Private Sub addStudentName(ByVal str As String)
ListBox1.Items.Clear()
con = getconnection()
Try
con.Open()
cmd = New SqlCommand("select first_Name from stud_Educational_Detail where first_Name like '" & str & "%" & "'", con)
dr = cmd.ExecuteReader
While dr.Read
ListBox1.Items.Add(dr(0))
End While
Catch ex As Exception
MsgBox(" Error :--> " & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label3.Click
End Sub
Private Sub teacher_View_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
GroupBox2.Visible = False
GroupBox1.Visible = False
GroupBox3.Visible = False
putYear()
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
'Dim a As DataGridViewColumn
'con = getconnection()
'Try
' con.Open()
' da = New SqlDataAdapter("select subject_Code ,subject_Name ,max_Marks ,min_Marks from subject_Table where subject_Year ='" & ComboBox1.SelectedItem & "' order by subject_Code", con)
' ds = New DataSet
' da.Fill(ds, "Table")
' DataGridView1.DataSource = ds.Tables(0)
' If ds.Tables(0).Columns.Count = 4 Then
' ds.Tables(0).Columns.Add("Obtain Mark`")
' For Each r As DataGridViewRow In DataGridView1.Rows
' r.Cells(4).Value = 0
' Next
' End If
' AutoNumberRowsForGridView(DataGridView1)
' con.Close()
' Dim sumMaxMark, sumMinMark, sumobtMark As Integer
' For i = 0 To DataGridView1.RowCount - 1
' sumMaxMark += DataGridView1.Rows(i).Cells(2).Value
' sumMinMark += DataGridView1.Rows(i).Cells(3).Value
' sumobtMark += DataGridView1.Rows(i).Cells(4).Value
' TextBox4.Text = Convert.ToInt32(sumMaxMark)
' TextBox6.Text = Convert.ToInt32(sumMinMark)
' TextBox5.Text = Convert.ToInt32(sumobtMark)
' Next
'Catch ex As Exception
' MsgBox("Error :--> " & ex.Message, MsgBoxStyle.Critical)
'End Try
End Sub
Public Sub AutoNumberRowsForGridView(ByVal dataGridView As DataGridView)
If DataGridView1 IsNot Nothing Then
Dim count As Integer = 0
While (count <= (dataGridView.Rows.Count - 1))
DataGridView1.Rows(count).HeaderCell.Value = String.Format((count + 1).ToString(), "0")
count += 1
End While
DataGridView1.RowHeadersWidth = 50
'DataGridView1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.DisplayedHeaders
End If
End Sub
Private Sub GroupBox2_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox2.Enter
con = getconnection()
Try
con.Open()
cmd = New SqlCommand("select stud_Class from student_Educational_Detail where ")
Catch ex As Exception
End Try
End Sub
Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
'Dim fullname As String
'Dim indexspace As Integer
'Dim firstname As String
'Dim lastname As String
'Dim indexSecondSpace As Integer
'Dim middlename As String
'fullname = ListBox1.Text.Trim
''fullname = fullname.Replace(" ", "")
'indexspace = fullname.IndexOf(" ") ' Find Space In Sting
'firstname = fullname.Substring(0, indexspace) ' extract First Name From String
'lastname = fullname.Substring(indexspace + 1) 'Add Remaining String Into Last Name
'indexSecondSpace = lastname.IndexOf(" ") ' Find Second Space in Sting
'middlename = lastname.Substring(0, indexSecondSpace) ' Extract Middle Name From String
'lastname = lastname.Substring(indexSecondSpace + 1) ' Extract Last Name From String
'con = getconnection()
'Try
' con.Open()
' cmd = New SqlCommand("select student_ID,roll_No from student_Educational_Detail where first_Name='" & firstname.ToString & "' and middle_Name='" & middlename.ToString & "' and last_Name='" & lastname.ToString & "'", con)
' dr = cmd.ExecuteReader
' While dr.Read
' TextBox2.Text = dr(0)
' TextBox3.Text = dr(1)
' End While
' con.Close()
'Catch ex As Exception
' MsgBox("Error :--> " & ex.Message, MsgBoxStyle.Critical)
'End Try
'MsgBox(ListBox1.SelectedItem)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
AutoNumberRowsForGridView(DataGridView1)
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
If TextBox1.Text <> "" And TextBox2.Text <> "" And TextBox3.Text <> "" And TextBox4.Text <> "" And TextBox5.Text <> "" And TextBox6.Text <> "" And ComboBox1.Text <> "" Then
con = getconnection()
Try
For Each r As DataGridViewRow In DataGridView1.Rows
If con.State = ConnectionState.Open Then
con.Close()
End If
cmd = New SqlCommand("insert into student_mark values('" & TextBox2.Text.ToString & "','" & TextBox3.Text & "','" & ComboBox1.SelectedItem & "','" & r.Cells(0).Value & "','" & r.Cells(1).Value & "'," & r.Cells(2).Value & "," & r.Cells(3).Value & "," & r.Cells(4).Value & ")", con)
con.Open()
cmd.ExecuteNonQuery()
Next
con.Close()
Catch ex As Exception
MsgBox("Error :--> " & ex.Message, MsgBoxStyle.Critical)
End Try
Try
con = getconnection()
If con.State = ConnectionState.Open Then
con.Close()
End If
con.Open()
cmd = New SqlCommand("insert into stud_Result values('" & TextBox2.Text & "','" & ListBox1.SelectedItem & "','" & ComboBox1.SelectedItem & "','" & TextBox3.Text & "'," & TextBox4.Text & "," & TextBox6.Text & "," & TextBox5.Text & ",'" & TextBox7.Text & "','" & TextBox8.Text & "')", con)
cmd.ExecuteNonQuery()
con.Close()
MsgBox("Record Inserted", MsgBoxStyle.Information)
Catch ex As Exception
MsgBox("Error :--> " & ex.Message, MsgBoxStyle.Information)
End Try
Else
MsgBox("Enter ALl Detail First", MsgBoxStyle.Critical)
Exit Sub
End If
'clearAllText()
DataGridView1.DataSource = Nothing
ClearTextBox()
EnableControlFalse()
End Sub
Private Sub DataGridView1_CellEndEdit(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellEndEdit
Dim r As DataGridView = DirectCast(sender, DataGridView)
'Dim tot As Integer = 0
If IsDBNull(r(0, e.RowIndex).Value) Then Exit Sub
'r("Amount", e.RowIndex).Value = r("Qty", e.RowIndex).Value * r("SalesPrice", e.RowIndex).Value
If r.CurrentCell.Value > 100 Then
MsgBox("Enter Valid Mark", MsgBoxStyle.Information)
r.CurrentCell.Value = 0
End If
'tCell.Value)MsgBox(r.Curren
If e.ColumnIndex = 4 And r.Rows.Count > 0 Then
'Dim i As Integer = 0
'For i = 0 To DataGridView1.Rows.Count - 1
' tot = tot + Convert.ToInt32(DataGridView1.Rows(i).Cells(4).Value)
'Next i
TextBox5.Text = Total().ToString
End If
If r.CurrentCell.Value < 40 Then
TextBox8.Text = "Failed"
End If
End Sub
Private Function Total() As Integer
Dim tot As Integer = 0
Dim i As Integer = 0
For i = 0 To DataGridView1.Rows.Count - 1
tot = tot + Convert.ToInt32(DataGridView1.Rows(i).Cells(4).Value)
Next i
Return tot
End Function
Private Sub DataGridView1_RowHeaderMouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DataGridView1.RowHeaderMouseClick
AutoNumberRowsForGridView(DataGridView1)
End Sub
Private Sub TextBox5_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox5.TextChanged
If TextBox5.Text = "" Then
TextBox5.Text = 0
End If
Dim per As Double
per = Convert.ToDouble((TextBox5.Text / TextBox4.Text) * 100)
'TextBox7.Text = Math.Round(per, 2)
End Sub
Private Sub TextBox7_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox7.TextChanged
If TextBox7.Text = 0 Then
TextBox7.Text = 0.0
ElseIf TextBox7.Text < 40 Then
TextBox8.Text = "Failed"
ElseIf TextBox7.Text >= 40 And TextBox7.Text <= 60 Then
TextBox8.Text = "Second Class"
ElseIf TextBox7.Text > 60 And TextBox7.Text <= 70 Then
TextBox8.Text = "First Class"
ElseIf TextBox7.Text > 70 Then
TextBox8.Text = "Distinction"
End If
End Sub
Private Sub ListBox1_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedValueChanged
'Dim fullname As String
'Dim indexspace As Integer
'Dim firstname As String
'Dim lastname As String
'Dim indexSecondSpace As Integer
'Dim middlename As String
'fullname = ListBox1.Text.Trim
''fullname = fullname.Replace(" ", "")
'indexspace = fullname.IndexOf(" ") ' Find Space In Sting
'firstname = fullname.Substring(0, indexspace) ' extract First Name From String
'lastname = fullname.Substring(indexspace + 1) 'Add Remaining String Into Last Name
'indexSecondSpace = lastname.IndexOf(" ") ' Find Second Space in Sting
'middlename = lastname.Substring(0, indexSecondSpace) ' Extract Middle Name From String
'lastname = lastname.Substring(indexSecondSpace + 1) ' Extract Last Name From String
''MsgBox("First Name" & firstname)
''MsgBox("Second Name" & middlename)
''MsgBox("Last Name" & lastname)
con = getconnection()
Try
con.Open()
cmd = New SqlCommand("select student_ID,roll_No,stud_Class from stud_Educational_Detail where first_Name='" & ListBox1.SelectedItem & "'", con)
dr = cmd.ExecuteReader
While dr.Read
TextBox2.Text = dr(0)
TextBox3.Text = dr(1)
studclass = dr(2)
End While
con.Close()
Catch ex As Exception
MsgBox("Error :--> " & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub LinkLabel2_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel2.LinkClicked
GroupBox2.Visible = True
GroupBox1.Visible = False
GroupBox3.Visible = False
End Sub
Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
GroupBox1.Visible = True
GroupBox2.Visible = False
GroupBox3.Visible = False
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
DataGridView1.DataSource = Nothing
ClearTextBox()
ComboBox1.Items.Clear()
GroupBox2.Visible = False
End Sub
Private Sub EnableControlFalse()
TextBox1.Enabled = False
TextBox2.Enabled = False
TextBox3.Enabled = False
ComboBox1.Enabled = False
ListBox1.Enabled = False
DataGridView1.DataSource = Nothing
DataGridView1.Enabled = False
End Sub
Private Sub EnableControlTrue()
TextBox1.Enabled = True
'TextBox2.Enabled = True
'TextBox3.Enabled = True
ComboBox1.Enabled = True
ListBox1.Enabled = True
'DataGridView1.DataSource = Nothing
DataGridView1.Enabled = True
End Sub
'Clears all textboxes
Public Sub ClearTextBox(Optional ByVal ctlcol As Control.ControlCollection = Nothing)
'Dim ctlcol As Control.ControlCollection = Nothing
If ctlcol Is Nothing Then ctlcol = Me.Controls
For Each ctrl As Control In ctlcol
If TypeOf ctrl Is TextBox Then
'CType(ctrl, TextBox).Text = ""
ctrl.Text = ""
Else
If Not ctrl.Controls Is Nothing OrElse ctrl.Controls.Count <> 0 Then
ClearTextBox(ctrl.Controls)
End If
End If
Next ctrl
End Sub
'Public Sub ClearTextBoxes(Optional ByVal ctlcol As Control.ControlCollection = Nothing)
' If ctlcol Is Nothing Then ctlcol = Me.Controls
' For Each ctl As Control In ctlcol
' If TypeOf (ctl) Is TextBox Then
' DirectCast(ctl, TextBox).Clear()
' Else
' If Not ctl.Controls Is Nothing OrElse ctl.Controls.Count <> 0 Then
' ClearTextBoxes(ctl.Controls)
' End If
' End If
' Next
'End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
'clearAllText()
putYear()
EnableControlTrue()
ClearTextBox()
DataGridView1.DataSource = Nothing
End Sub
Private Sub putYear()
ComboBox1.Items.Clear()
con = getconnection()
Try
If con.State = ConnectionState.Open Then
con.Close()
End If
con.Open()
cmd = New SqlCommand("select subject_Year from subject_Table group by subject_Year", con)
dr = cmd.ExecuteReader
While dr.Read
ComboBox1.Items.Add(dr(0))
End While
con.Close()
Catch ex As Exception
MsgBox("Error:--> " & ex.Message)
End Try
End Sub
Private Sub ComboBox1_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedValueChanged
If studclass.ToString <> ComboBox1.SelectedItem Then
MsgBox("Student Are Not Present In This Class", vbCritical)
ComboBox1.Text = ""
ComboBox1.Focus()
Exit Sub
End If
con = getconnection()
Try
If con.State = ConnectionState.Open Then
con.Close()
End If
con.Open()
cmd = New SqlCommand("select student_ID,roll_No,stud_Class from student_mark where student_ID='" & TextBox2.Text & "' and roll_No ='" & TextBox3.Text & "' and stud_Class ='" & ComboBox1.SelectedItem & "' group by student_ID,roll_No,stud_Class ", con)
dr = cmd.ExecuteReader
While dr.Read
If TextBox2.Text = dr(0) And TextBox3.Text = dr(1) And ComboBox1.SelectedItem = dr(2) Then
MsgBox("Marks Of This Student Is Already Enter", MsgBoxStyle.Critical)
DataGridView1.DataSource = Nothing
ComboBox1.Items.Clear()
ClearTextBox()
Exit Sub
End If
End While
Catch ex As Exception
MsgBox("Error :--> " & ex.Message, MsgBoxStyle.Critical)
End Try
con = getconnection()
Try
con.Open()
da = New SqlDataAdapter("select subject_Code ,subject_Name ,max_Marks ,min_Marks from subject_Table where subject_Year ='" & ComboBox1.SelectedItem & "' order by subject_Code", con)
ds = New DataSet
da.Fill(ds, "Table")
DataGridView1.DataSource = ds.Tables(0)
If ds.Tables(0).Columns.Count = 4 Then
ds.Tables(0).Columns.Add("Obtain Mark`")
For Each r As DataGridViewRow In DataGridView1.Rows
r.Cells(4).Value = 0
Next
End If
AutoNumberRowsForGridView(DataGridView1)
con.Close()
Dim sumMaxMark, sumMinMark, sumobtMark As Integer
For i = 0 To DataGridView1.RowCount - 1
sumMaxMark += DataGridView1.Rows(i).Cells(2).Value
sumMinMark += DataGridView1.Rows(i).Cells(3).Value
sumobtMark += DataGridView1.Rows(i).Cells(4).Value
TextBox4.Text = Convert.ToInt32(sumMaxMark)
TextBox6.Text = Convert.ToInt32(sumMinMark)
TextBox5.Text = Convert.ToInt32(sumobtMark)
Next
Catch ex As Exception
MsgBox("Error :--> " & ex.Message, MsgBoxStyle.Critical)
End Try
For i = 0 To DataGridView1.Columns.Count - 2
DataGridView1.Columns(i).ReadOnly = True
Next
End Sub
Private Sub TextBox4_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox4.TextChanged
If TextBox4.Text = "" Then
TextBox4.Text = 0
End If
End Sub
Private Sub TextBox6_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox6.TextChanged
If TextBox6.Text = "" Then
TextBox5.Text = 0
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
txtname.Text = ""
ComboBox2.Text = ""
txtclass.Text = ""
txtpercentage.Text = ""
txtresult.Text = ""
txttotal.Text = ""
DataGridView2.DataSource = Nothing
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
GroupBox1.Visible = False
txtname.Text = ""
DataGridView2.DataSource = Nothing
End Sub
Public Sub AutoNumberRowsForGridView1(ByVal dataGridView As DataGridView)
If DataGridView2 IsNot Nothing Then
Dim count As Integer = 0
While (count <= (DataGridView2.Rows.Count - 1))
DataGridView2.Rows(count).HeaderCell.Value = String.Format((count + 1).ToString(), "0")
count += 1
End While
DataGridView2.RowHeadersWidth = 50
'DataGridView1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.DisplayedHeaders
End If
End Sub
Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectedIndexChanged
con = getconnection()
Try
If con.State = ConnectionState.Open Then
con.Close()
End If
con.Open()
da = New SqlDataAdapter("SELECT subject_Name As SubjestName,min_Mark AS MinimumMark,max_Mark AS MaximumMark,obt_Mark As ObtainedMarks FROM student_mark where student_ID='" & ComboBox2.SelectedItem & "'", con)
ds = New DataSet
da.Fill(ds, "Mark Table")
DataGridView2.DataSource = ds.Tables(0)
DataGridView2.ReadOnly = True
AutoNumberRowsForGridView1(DataGridView2)
con.Close()
con.Open()
cmd = New SqlCommand("select student_Name,stud_Class,obt_total_Mark,percentage,result from stud_Result where student_ID='" & ComboBox2.SelectedItem & "'", con)
dr = cmd.ExecuteReader
While dr.Read
txtname.Text = dr(0)
txtclass.Text = dr(1)
txttotal.Text = dr(2)
txtpercentage.Text = dr(3)
txtresult.Text = dr(4)
End While
con.Close()
Catch ex As Exception
MsgBox("Error :--> " & ex.Message, MsgBoxStyle.Critical)
End Try
ComboBox2.Items.Clear()
End Sub
Private Sub ComboBox2_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox2.TextChanged
con = getconnection()
Try
con.Open()
cmd = New SqlCommand("select student_ID from stud_Educational_Detail where student_ID like '" & ComboBox2.SelectedItem & "%" & "' ", con)
dr = cmd.ExecuteReader
While dr.Read
' ComboBox1.DroppedDown = True
ComboBox2.Items.Add(dr(0))
End While
con.Close()
Catch ex As Exception
MsgBox("Error :--> " & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Private Sub LinkLabel3_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel3.LinkClicked
GroupBox3.Visible = True
GroupBox1.Visible = False
GroupBox2.Visible = False
End Sub
Private Sub putStudentMarkDetail(ByVal str As String)
con = getconnection()
Try
con.Open()
cmd = New SqlCommand("select student_Name,stud_Class,max_total_Mark,obt_total_Mark,percentage,result from stud_Result where student_ID='" & str & "'", con)
dr = cmd.ExecuteReader
While dr.Read
txtEname.Text = dr(0)
txtEclass.Text = dr(1)
txtEmaxmark.Text = dr(2)
txtEtotal.Text = dr(3)
txtEpercentage.Text = dr(4)
txtEresult.Text = dr(5)
End While
con.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub ComboBox3_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox3.SelectedValueChanged
con = getconnection()
Try
con.Open()
da = New SqlDataAdapter("select subject_Code as subjestCode,subject_Name as subjectName,max_Mark as maximumMark,min_Mark as minimumMark,obt_Mark as obtainMark from student_mark where student_ID='" & ComboBox3.SelectedItem & "'", con)
ds = New DataSet
da.Fill(ds, "Student Mark")
DataGridView3.DataSource = ds.Tables(0)
For i = 0 To DataGridView3.Columns.Count - 2
DataGridView3.Columns(i).ReadOnly = True
Next
putStudentMarkDetail(ComboBox3.SelectedItem)
con.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
'ComboBox3.Items.Clear()
End Sub
Private Sub ComboBox3_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox3.TextChanged
con = getconnection()
Try
con.Open()
cmd = New SqlCommand("select student_ID from stud_Educational_Detail where roll_No like '" & ComboBox3.SelectedItem & "%" & "'", con)
dr = cmd.ExecuteReader
While dr.Read
ComboBox3.Items.Add(dr(0))
End While
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
If ComboBox3.SelectedItem <> "" And txtEname.Text <> "" And txtEclass.Text <> "" And txtEtotal.Text <> "" And txtEpercentage.Text <> "" And txtEresult.Text <> "" Then
con = getconnection()
Try
con.Open()
cmd = New SqlCommand("update stud_Result set student_Name='" & txtEname.Text & "',stud_Class='" & txtEclass.Text & "',max_total_Mark=" & txtEmaxmark.Text & ",obt_total_Mark=" & txtEtotal.Text & ",percentage='" & txtEpercentage.Text & "',result='" & txtEresult.Text & "' where student_ID='" & ComboBox3.SelectedItem & "'", con)
cmd.ExecuteNonQuery()
con.Close()
con.Open()
For Each r As DataGridViewRow In DataGridView3.Rows
cmd = New SqlCommand("update student_mark set subject_Code='" & r.Cells(0).Value & "',subject_Name='" & r.Cells(1).Value & "',max_Mark=" & r.Cells(2).Value & ",min_Mark=" & r.Cells(3).Value & ",obt_Mark=" & r.Cells(4).Value & " where student_ID ='" & ComboBox3.SelectedItem & "' and subject_Code='" & r.Cells(0).Value & "' and subject_Name='" & r.Cells(1).Value & "' and max_Mark=" & r.Cells(2).Value & " and min_Mark=" & r.Cells(3).Value & "", con)
cmd.ExecuteNonQuery()
Next
MsgBox("Record Updated")
Catch ex As Exception
MsgBox(ex.Message)
End Try
Else
MsgBox("Please Enter All Detail First", vbCritical)
ComboBox3.Focus()
Exit Sub
End If
ClearTextBox()
DataGridView3.DataSource = Nothing
ComboBox3.Items.Clear()
ComboBox3.Text = ""
End Sub
Private Sub DataGridView3_CellEndEdit(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView3.CellEndEdit
Dim r As DataGridView = DirectCast(sender, DataGridView)
'Dim tot As Integer = 0
If IsDBNull(r(0, e.RowIndex).Value) Then Exit Sub
If e.ColumnIndex = 4 And r.Rows.Count > 0 Then
'Dim i As Integer = 0
'For i = 0 To DataGridView1.Rows.Count - 1
' tot = tot + Convert.ToInt32(DataGridView1.Rows(i).Cells(4).Value)
'Next i
txtEtotal.Text = Total1().ToString
End If
End Sub
Private Function Total1() As Integer
Dim tot As Integer = 0
Dim i As Integer = 0
For i = 0 To DataGridView3.Rows.Count - 1
tot = tot + Convert.ToInt32(DataGridView3.Rows(i).Cells(4).Value)
Next i
Return tot
End Function
Private Sub txtEtotal_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtEtotal.TextChanged
If txtEtotal.Text = "" Then
txtEtotal.Text = 0
End If
Dim per As Double
per = Convert.ToDouble((txtEtotal.Text / txtEmaxmark.Text) * 100)
txtEpercentage.Text = Math.Round(per, 2)
End Sub
Private Sub txtEmaxmark_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtEmaxmark.TextChanged
If txtEmaxmark.Text = "" Then
txtEmaxmark.Text = 0
End If
End Sub
Private Sub txtEpercentage_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtEpercentage.TextChanged
If txtEpercentage.Text = "" Then
txtEpercentage.Text = 0
ElseIf txtEpercentage.Text = 0 Then
txtEresult.Text = "Failed"
End If
If txtEpercentage.Text < 40 Then
txtEresult.Text = "Failed"
ElseIf txtEpercentage.Text >= 40 And txtEpercentage.Text <= 60 Then
txtEresult.Text = "Second Class"
ElseIf txtEpercentage.Text > 60 And txtEpercentage.Text <= 70 Then
txtEresult.Text = "First Class"
ElseIf txtEpercentage.Text > 70 Then
txtEresult.Text = "Distinction"
End If
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
ClearTextBox()
DataGridView3.DataSource = Nothing
ComboBox3.Items.Clear()
ComboBox3.Text = ""
End Sub
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
ClearTextBox()
DataGridView3.DataSource = Nothing
GroupBox3.Visible = False
ComboBox3.Items.Clear()
End Sub
Private Sub GroupBox3_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox3.Enter
End Sub
End Class
SCREEN SHOTS
Loin View
Admin Services
Create User
Student Registration Form
Teacher Services
Enter Student Marks
View Student Marks
Student View
Student Report Card
CONCLUSION
When this system was implemented, it was very difficult to make
Them used to this totally computerized system as they were habitual to traditional system of manually doing everything.
When the system was implemented, the user’s satisfaction was the
first priority.
The system was fully successful when it started to generate accurate
reports.
This system has tried its best to reduce its physical efforts of the user
and satisfy them.
In generation facilities of the system, the chances for wrong data entry have been totally eliminated.
SYSTEM LIMITATIONS
The system required the user who has a very good knowledge of
Computer, so any common user cannot work this system.
The system requires minimum windows operating system
98/2000/XP, Minimum 128 MB RAM, visual basic 6.0 studio, p-4
processor.
This system should be provided with advanced booking & online booking.
ENHANCEMENT
1. Using this software we can manage the details of the user these details will be store in the database and we can retrieve it any time as per the requirements by using this we can save our time and we can manage bulk of data.
2. As the environment is turning over the computerized system so this is the best implementation for any multiplex.
3. Using this we can share the data with many employee on our multiplex. And we can make the soft copy as well a s hard copy to maintain the data.
ARCHITECTURE: