Sei sulla pagina 1di 40

PROJECT REPORT ON COLLEGE MANAGEMENT SYSTEM

Submitted To: Er. Bimal Paul Lecturer CSE/IT Deptt. Submitted By: Rohit Bhardwaj CSE 6th Sem. Reg. No: 009876218240

Project Report

Page 1

ACKNOWLEDGEMENT

Before we get into thick of the thing, We would like to add a few heartfelt words for the people who have been behind this project. We know this project is important for us and this is our final year project so the topic selection of college management system is taken by us after very long discussion with our friends. And now we think to complete this project in visual basic language because this is our current semester subject. First of all, few words for the Almighty God for showering his choicest blessings on us and enabling us to starting this Project report we hope it will be well in time and with desired quality. We would like to voice my sincere thanks giving to Er.Bimal Paul our class lecturer of Project CSE Department, for providing us with such a high potential opportunity. We hope we have utilized it to the best of your expectation.

Rohit Bhardwaj Thanking You All.

Project Report

Page 2

COLLEGE MANAGEMENT SYSTEM

The system COLLEGE MANAGEMENT SYSTEM can be used to manage the data of all type of educational institutes. It will support both stand alone and also networking environment. The system uses VB. Net Technology. The main modules involved in this system are: 1. Login 2. Forms Module wise description Login Login module is used to check whether the user is an authorized person to use the system or not. For this the user should give the correct user name and password. The different types of users are 1. Admin 2. Student 3. Employee Forms This module consists of the following sub modules 1. 2. 3.
4. 5. 6.

SplashScreen Login Form Main Form Student Registration Form Fee Form Employee Form
Page 3

Project Report

7. 8. 9.
10.

Student Records form Employee Records Form Fee Records Form Calculator Form

The Student Registration Form is designed for registering the new students details and course details. The Fee Form is used to enter the students fee details. The Employee Form used to Register Employees Information. The Student Records Form is Used to View the Student Records. The Employee Records form is designed for Viewing the Employee Information . The Calculator is provided to do minor calculations.

Project Report

Page 4

Objective Of The Project


Main aim in developing campus management system is to provide an easy way not only to automate all functionalities of a college, but also to provide full functional reports to top management of college with the finest of details about any aspect of college. We are committed to bring the best way of management in the various forms of college management system. We understand that college management system in not a product to be sold, it is a bridge between the College and Students. So we can say the Core purpose of designing College Management System is to manage the task related to the college students/employees and to reduce time to searching of appropriate candidates in college view.

Scope Of The System


This system provides the detail structure of the college campus and its departments. CMS synchronizes the working of all the departments. It looks on all aspects of a college, its students, faculties, Departments, marks and other co curricular activities. CMS is the easiest way to manage all functionalities of a college, which facilitates colleges to maintain the functionality related to college employees and their students.

Project Report

Page 5

Benefits
Following are the benefits for using College Management System :

For Employees: Easy to create any kind of certificate. Easy to query all related details of student and employee. Easy to generate payroll of individual employee.

For College: Collective records of students of all the branches. Collective records of employees of all departments. Easy approach to find the detail information for any student/employee. Easy to handle all functionality of college. Easy to manage all actions (generating attendance report, fee report etc). All information can be synchronized in one place. And distribute to a particular department to manage properly. CMS is beneficial for both students/employees only in the way that they Can get all previous or current information's when they need. It is helpful to maintain the students record (admission record, fees record, Marks records etc). Teacher does not maintain the file, documentation, reports (class Wise, section wise)

Project Report

Page 6

Advantages
By using this s/w, you can learn how you prepare your records in standard manner Also you can find the previous session papers and current news related to any student or employees. By using this s/w, administrator can manage all records in standard manner. Also it can help to get all or a particular student attendance information by attendance master Also it can help to maintain the fees and accounting reports of college in proper way. It helps to generate mark sheets of current year or previous year's students.

SYSTEM STUDY A detailed study of the existing system is necessary. The functions of the system, requirements for the users, structure of the current system is made through the system study. The problems faced in the current system are found and solution pertaining to it is done in the system study. EXISTING SYSTEM In the existing system, the manual process, receiving datas from students and staff details are done through manual records. These records are entered in manual process. in this process will take long time,separet workers need to maintaining the databases. All the college details are stored via separate databases. It will take long time due to this process time waste, money waste etc... In this process very difficult to maintain the fees and accounting reports of college in proper way. Teacher does not maintain the file, documentation, reports (class Wise, section wise) etc
Project Report Page 7

NEED FOR PROPOSED SYSTEM The main objective of the existing system is to provide a user-friendly interface. The system, which is proposed, now computerizes all the details that are maintained manually. Once the details are fed into the computer there is no need for various persons to deal with separate sections. Only a single person is enough to maintain all the reports. The security can also be given as per the requirement of the user Large volumes of data can be stored with case. Maintenance of file is flexible. Records stored are updated now and then. Stored data and procedures can be easily edited. Reports can be generated with case. Accurate calculations are made. Less manpower required.

Project Report

Page 8

HARDWARE CONFIGURATION The hardware used for the development of the project is: PROCESSOR RAM MONITOR HARD DISK CDDRIVE KEYBOARD MOUSE : : : : : : PENTIUM IV 1.8 GHz 1 GB DDR2 Ram 15 COLOR : 20 GB LG 52X STANDARD 102 KEYS 3 BUTTONS

SOFTWARE CONFIGURATION The software used for the development of the project is: OPERATING SYSTEM ENVIRONMENT .NET FRAMEWORK LANGUAGE BACKEND : : : : : Windows XP Professional Visual Studio .NET 2008 Version 3.0 & 3.5 Visual Basic.NET MicroSoft SQL Server 2005

Project Report

Page 9

VISUAL STUDIO 2008


Visual Studio 2008 is a complete set of development tools for building ASP Web applications, XML Web services, desktop applications, and mobile applications In addition to building high-performing desktop applications, you can use Visual Studio's powerful component-based development tools and other technologies to simplify team-based design, development, and deployment of Enterprise solutions. Visual Basic .NET, Visual C++ .NET, and Visual C# .NET all use the same integrated development environment (IDE), which allows them to share tools and facilitates in the creation of mixed-language solutions. In addition, these languages leverage the functionality of the .NET Framework and simplify the development of ASP Web applications and XML Web services. Visual Studio supports the .NET Framework, which provides a common language runtime and unified programming classes; ASP.NET uses these components to create ASP Web applications and XML Web services. Also it includes MSDN Library, which contains all the documentation for these development tools.

Project Report

Page 10

FEATURES OF VISUAL BASIC. NET


Visual Basic. NET, the latest version of visual basic, includes many new features. The Visual Basic supports interfaces but not implementation inheritance. Visual basic.net supports implementation inheritance, interfaces and overloading. In addition, Visual Basic .NET supports multithreading concept. COMMON LANGUAGE SPECIFICATION (CLS) Visual Basic.NET is also compliant with CLS (Common Language Specification) and supports structured exception handling. CLS is set of rules and constructs that are supported by the CLR (Common Language Runtime). CLR is the runtime environment provided by the .NET Framework; it manages the execution of the code and also makes the development process easier by providing services. Visual Basic.NET is a CLS-compliant language. Any objects, classes, or components that created in Visual Basic.NET can be used in any other CLScompliant language. In addition, we can use objects, classes, and components created in other CLS-compliant languages in Visual Basic.NET .The use of CLS ensures complete interoperability among applications, regardless of the languages used to create the application.

IMPLEMENTATION INHERITANCE Visual Basic.NET supports implementation inheritance. This means that, while creating applications in Visual Basic.NET, we can drive from another class, which is know as the base class that derived class inherits all the methods and properties of the base class. In the derived class, we can either use the existing code of the base class or override the existing code. Therefore, with help of the implementation inheritance, code can be reused.

Project Report

Page 11

CONSTRUCTORS AND DESTRUCTORS Constructors are used to initialize objects, whereas destructors are used to destroy them. In other words, destructors are used to release the resources allocated to the object. In Visual Basic.NET the sub finalize procedure is available. The sub finalize procedure is used to complete the tasks that must be performed when an object is destroyed. The sub finalize procedure is called automatically when an object is destroyed. In addition, the sub finalize procedure can be called only from the class it belongs to or from derived classes. GARBAGE COLLECTION Garbage Collection is another new feature in Visual Basic.NET. The .NET Framework monitors allocated resources, such as objects and variables. In addition, the .NET Framework automatically releases memory for reuse by destroying objects that are no longer in use. In Visual Basic.NET, the garbage collector checks for the objects that are not currently in use by applications. When the garbage collector comes across an object that is marked for garbage collection, it releases the memory occupied by the object. OVERLOADING: Overloading is another feature in Visual Basic.NET. Overloading enables us to define multiple procedures with the same name, where each procedure has a different set of arguments. Besides using overloading for procedures, we can use it for constructors and properties in a class. MULTITHREADING: Visual Basic.NET also supports multithreading. An application that supports multithreading can handle multiple tasks simultaneously, we can use multithreading to decrease the time taken by an application to respond to user interaction. To decrease the time taken by an application to respond to user interaction, we must ensure that a separate thread in the application handles user interaction.
Project Report Page 12

STRUCTURED EXCEPTION HANDLING: Visual Basic.NET supports structured handling, which enables us to detect and remove errors at runtime. In Visual Basic.NET, we need to use TryCatch Finally statements to create exception handlers. Using TryCatchFinally statements, we can create robust and effective exception handlers to improve the performance of our application.

THE .NET FRAMEWORK The .NET Framework is a new computing platform that simplifies application development in the highly distributed environment of the Internet.

OBJECTIVES OF. NET FRAMEWORK:


1.To provide a consistent object-oriented programming environment whether object codes is stored and executed locally on Internet-distributed, or executed remotely. 2.To provide a code-execution environment to minimizes software deployment and guarantees safe execution of code. 3. Eliminates the performance problems. There are different types of application, such as Windows-based applications and Web-based applications. To make communication on distributed environment to ensure that code be accessed by the .NET Framework can integrate with any other code.

Project Report

Page 13

DATABASE The conventional data processing approach is to develop a program (or many programs) for each application. This result in one or more data files for each application. Some of the data may be common between files. However one application may require the file to be organized on a particular field, while other application may require the file to be organized on another field. A major drawback of the conventional method is that the storage access methods are built in to the program. Therefore, though the same data may be required by two applications, the data will have to be sorted in two different places because each application depends on the way that the data stored. There are various drawbacks of conventional data file processing environment. Some of them are listed below: Data Redundancy Some data elements like name, address, identification code, are used in various applications. Since data is required by multiple applications, it is stored in multiple data files. In most cases, there is a repetition of data. This is referred to as data redundancy, and leads to various other problems. Data Integrity Problems Data redundancy is one reason for the problem of data integrity. Since the same data is stored in different places, it is inevitable that some inconsistency will creep in.

Data Availability Constraints When data is scattered in different files, the availability of information from a combination of files is constrained to some extent.

Project Report

Page 14

Database Management System


A database management system (DBMS) consists of a collection of interrelated data and a set of programs to access the data. The collection of data is usually referred to as the database. A Database system is designed to maintain large volumes of data. Management of data involves:

Defining the structures for the storage of data Providing the mechanisms for the manipulation of the data Providing for the security of the data against unauthorized access

ADVANTAGES OF A DBMS
The major advantage that the database approach has over the conventional approach is that a database system provides centralized control of data. Most benefits accrue from this notion of centralized control. REDUNDANCY CAN BE CONTROLLED Unlike the conventional approach, each application does not have to maintain its own data files. Centralized control of data by the DBA avoids unnecessary duplication of data and effectively reduces the total amount of data storage required. It also eliminates the extra processing necessary to trace the required data in a large mass of data present. Any redundancies that exist in the DBMS are controlled and the system ensures that these multiple copies are consistent. INCONSISTENCY CAN BE AVOIDED Since redundancy is reduced, inconsistency can also be avoided to some extent. The DBMS guarantee and that the database is never inconsistent, by ensuring that a change made to any entry automatically applies to the other entries as well. The process is known as propagating update. THE DATA CAN BE SHARED A database allows the sharing of data under its control by any number of application program or users. Sharing of data does not merely imply that existing applications can share the data in the database, it also means that new applications can be developed to operate using the same database.
Project Report Page 15

STANDARDS CAN BE ENFORCED Since there is centralized control of data, the database administrator can ensure that standards are maintained in the representation of the stored data formats. This is particularly useful for data interchange, or migration of data between two systems. SECURITY RESTRICTIONS CAN BE APPLIED The DBMS guarantees that only authorized persons can access the database. The DBA defines the security checks to be carried out. Different checks can be applied to different operations on the same data. For instance, a person may have the access rights to query on a file, but may not have the right to delete or update that file. The DBMS allows such security checks to be established for each piece of data in the database. DATA INDEPENDENCE In non-database systems, the requirement of the application dictates the way in which the data is stored and the access techniques. Besides, the knowledge of the organization of the data, the access techniques are built into the logic and code of the application. These systems are data dependent. Consider this example, suppose the university has an application that processes the student file. For performance reason, the file is indexed on the roll number. The application would be aware of the existing index, and the internal structure of the application would be built around this knowledge. Now consider that the some reason, the file is to index on the registration data. In this case it is impossible to change the structure of the stored data without affecting the application too. Such an application is a data dependent one. It is desirable to have data independent applications. Suppose two applications X and Y need to access the same file. However both the applications require a particular field to be stored in different formats. Application X requires the field customer balance to be stored in decimal format, while the application Y requires it to be stored in binary format. This would pose a problem in an old system. In a DBMS differences may exist in the way that data is actually stored, and the way that it is seen and used by a given application.

Project Report

Page 16

INTRODUCTION TO SQL SERVER


Sql Server is comprehensive operating environment that packs h power of mainframe relation database management system into users microcomputer. It provides a set of functional program that user can use as tools to build structures and perform tasks. Because applications are developed on Sql Server are completely portable to the other versions of the programmer can create a complex application in a single user, environment and then move it to a multi-user platform. Users do not have to be an expert to appreciate Sql Server but the better user understands the program, the more productively and creatively he can use the tools it provides.

Relational Database Management System


Sql Server the right tool Sql Server gives you High Capacity Database management tools Structure of Sql Server Database

Sql Server database can be describe at two different levels


Physical Structure Logical Structure Physical Structure: a) One or more data files b) Two or more log files c) One control file Logical Structure a) Table spaces b) Segments c) Extents d) Data Blocks

Project Report

Page 17

The data files contain all user data in terms of tables, index and views. The log files contain the information to open and be recovered, of undone after a transaction (Rollback). The control file physical data, media information to open and manage data files. If the control file is damaged the server will not be able to open or use the database even if the database is undamaged.

Project Overview
SplashScreen

Login Form

Main Form

Student Setup

Employee Setup

Extras

Fee Information Student Information

Employee Information

Calculator

Project Report

Page 18

DATA FLOW DIAGRAM


STUDENT INFORMATION EMPLOYEE INFORMATION

ADMINISTRATOR (GUI FRONT-END)

DATA

COLLEGE MANAGEMENT SYSTEM

DATABASE (BACK-END)

INDEXES

RECORDS

Project Report

Page 19

FORMS
Splashscreen

Coding
Public NotInheritable Class SplashScreen Private Sub SplashScreen_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Timer1.Interval = 50 Timer1.Enabled = True End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick ProgressBar1.Increment(1) If ProgressBar1.Value = ProgressBar1.Maximum Then LoginForm.Show() Me.Hide() Timer1.Stop() End If End Sub End Class

Project Report

Page 20

Login Form

Coding
Public Class LoginForm Private Sub UsersBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.Validate() Me.UsersBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.UsersDataSet) End Sub Private Sub LoginForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'UsersDataSet.Users' table. You can move, or remove it, as needed. Me.UsersTableAdapter.Fill(Me.UsersDataSet.Users) End Sub Private Sub Login_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Login.Click Dim obj As New DBClass Dim sql As String Dim tbl As New DataTable sql = "Select*from users where UserName='" & UsernameTextBox.Text & "'And Password='" & PasswordMaskedTextBox.Text & "'" tbl = obj.GetRecords(sql)

Project Report

Page 21

Else

If tbl.Rows.Count > 0 Then Me.Hide() MainForm.Show

MsgBox("Invalid UserName/Password", MsgBoxStyle.Critical) End If End Sub Private Sub Cancel5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel5.Click UsernameTextBox.Clear() PasswordMaskedTextBox.Clear() End Sub Private Sub Register_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Register.Click If UsernameTextBox1.Text = "" Then MsgBox("Missing User Name", MsgBoxStyle.Critical) ElseIf PasswordMaskedTextBox1.Text = "" Then MsgBox("Missing Password", MsgBoxStyle.Critical) Else Dim obj As New DBClass Dim sql As String sql = "Insert into Users(UserName,Password) values('" & UsernameTextBox1.Text & "','" & PasswordMaskedTextBox1.Text & "')" obj.RunInsertDeleteUpdateQry(sql) RefreshGrid() UsernameTextBox1.Clear() PasswordMaskedTextBox1.Clear() MsgBox("Registration Successful") End If End Sub Private Sub Cancel6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel6.Click UsernameTextBox1.Clear() PasswordMaskedTextBox1.Clear() End Sub Private Sub RefreshGrid() Dim sql As String Dim tbl As New DataTable Dim obj As New DBClass Dim DataGridView1 As New DataGridView sql = "Select * from Users" tbl = obj.GetRecords(sql) DataGridView1.DataSource = tbl End Sub End Class

Project Report

Page 22

Main Form

Coding
Public Class MainForm Private Sub StudentSetup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentSetup.Click StudentSetup.Show() End Sub Private Sub EmployeeSetup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EmployeeSetup.Click EmployeeSetup.Show() End Sub Private Sub FeeSetup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FeeSetup.Click FeeSetup.Show() End Sub Private Sub Cancel1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel1.Click

Project Report

Page 23

End End Sub Private Sub StudentRecords_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentRecords.Click StudentRecords.Show() End Sub Private Sub EmployeeRecords_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EmployeeRecords.Click End Sub Private Sub FeeRecords_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FeeRecords.Click FeeRecords.Show() End Sub Private Sub Cancel2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel2.Click End End Sub Private Sub Calculator_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Calculator.Click CalC.Show() End Sub Private Sub Cancel3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel3.Click End End Sub End Class

Project Report

Page 24

Student Setup

Coding
Imports System.Data Public Class StudentSetup Private Sub StudentBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.Validate() Me.StudentBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.StudentDataSet) End Sub Private Sub StudentBindingNavigatorSaveItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentBindingNavigatorSaveItem.Click

Project Report

Page 25

Me.Validate() Me.StudentBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.StudentDataSet) If Registration_No_TextBox.Text = "" Then MsgBox("Please Enter Registration No.") ElseIf Student_NameTextBox.Text = "" Then MsgBox("Please Enter Student Name", MsgBoxStyle.MsgBoxHelp) Else Dim obj As New DBClass Dim sql As String sql = "update Student set Registration No.='" & Registration_No_TextBox.Text & "',Student Name= '" & Student_NameTextBox.Text & "',Admission Year='" & Admission_YearTextBox.Text & "',Father's Name='" & Father_s_NameTextBox.Text & "',Contact No.='" & Contact_No_TextBox.Text & "',Category='" & CategoryComboBox.Text & "',City='" & CityTextBox.Text & "', Age='" & AgeTextBox.Text & "',Gender(M or F)='" & Gender_M_or_F_ComboBox.Text & "',Address='" & AddressRichTextBox.Text & "') " obj.RunInsertDeleteUpdateQry(sql) RefreshGrid() Clear() MsgBox("Data Update Successfuly") End If End Sub Private Sub StudentSetup_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'StudentDataSet.Student' table. You can move, or remove it, as needed. Me.StudentTableAdapter.Fill(Me.StudentDataSet.Student) Dim tbl As New DataTable Dim sql As String Dim dbobj As New DBClass sql = "Select distinct Registration No. from Student" tbl = dbobj.GetRecords(sql) For i As Integer = 0 To tbl.Rows.Count - 1 Next End Sub Private Sub BindingNavigatorAddNewItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorAddNewItem.Click If Registration_No_TextBox.Text = "" And Student_NameTextBox.Text = "" Then MsgBox("Please Fill Full Information", MsgBoxStyle.Information) Else Dim obj As New DBClass Dim sql As String sql = "Insert into Student(Registration No.,StudentName,Admission Year,Father's Name,Contact No.,Category,City,Age,Gender,Address) values('" & Registration_No_TextBox.Text & "','" & Student_NameTextBox.Text & "','" & Admission_YearTextBox.Text & "','" & Father_s_NameTextBox.Text & "','" & Contact_No_TextBox.Text & "','" & CategoryComboBox.Text & "','" &

Project Report

Page 26

CityTextBox.Text & "','" & AgeTextBox.Text & "','" & Gender_M_or_F_ComboBox.Text & "','" & AddressRichTextBox.Text & "')" obj.RunInsertDeleteUpdateQry(sql) RefreshGrid() Clear() End If End Sub Private Sub RefreshGrid() Dim sql As String Dim tbl As New DataTable Dim obj As New DBClass sql = "Select * from Student" tbl = obj.GetRecords(sql) StudentDataGridView.DataSource = tbl End Sub Private Sub Clear() Registration_No_TextBox.Clear() Student_NameTextBox.Clear() Admission_YearTextBox.Clear() Father_s_NameTextBox.Clear() Contact_No_TextBox.Clear() CategoryComboBox.Refresh() CityTextBox.Clear() AgeTextBox.Clear() Gender_M_or_F_ComboBox.Refresh() AddressRichTextBox.Clear() End Sub Private Sub BindingNavigatorDeleteItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorDeleteItem.Click If MsgBox("Are you sure to delete record!", vbYesNo) = MsgBoxResult.Yes Then Dim obj As New DBClass Dim sql As String sql = "Delete from Student Where Registration No.=" & Registration_No_TextBox.Text obj.RunInsertDeleteUpdateQry(sql) RefreshGrid() Clear() End If End Sub Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click StudentRecords.Show() End Sub Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click Me.Clear() End Sub Private Sub ToolStripButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton3.Click End End Sub

Project Report

Page 27

End Class

Employee Setup

Coding
Imports System.Data Public Class EmployeeSetup Private Sub EmployeeBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.Validate() Me.EmployeeBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.EmployeeDataSet) End Sub

Project Report

Page 28

Private Sub EmployeeBindingNavigatorSaveItem_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EmployeeBindingNavigatorSaveItem.Click Me.Validate() Me.EmployeeBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.EmployeeDataSet) If IDNumericUpDown.Text = "" Then MsgBox("Please Select ID ") ElseIf Employee_NameTextBox.Text = "" Then MsgBox("Please Enter Employee Name ") Else Dim obj As New DBClass Dim sql As String sql = "update Employee set ID='" & IDNumericUpDown.Text & "',Employee Name= '" & Employee_NameTextBox.Text & "',Qualification ='" & QualificationTextBox.Text & "',Age='" & AgeTextBox.Text & "',Gender='" & GenderComboBox.Text & "',Contact No.='" & Contact_No_TextBox.Text & "',City='" & CityTextBox.Text & "',Salary='" & SalaryTextBox.Text & "',Hire Date='" & Hire_DateDateTimePicker.Value & "',Leaving Date='" & Leaving_DateDateTimePicker.Value & "',Address='" & AddressRichTextBox.Text & "' where ID=" & IDNumericUpDown.Text obj.RunInsertDeleteUpdateQry(sql) RefreshGrid() Clear() MsgBox("Data Update Successfuly") End If End Sub

Private Sub EmployeeSetup_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'EmployeeDataSet.Employee' table. You can move, or remove it, as needed. Me.EmployeeTableAdapter.Fill(Me.EmployeeDataSet.Employee) Dim tbl As New DataTable Dim sql As String Dim dbobj As New DBClass sql = "Select distinct ID from Employee" tbl = dbobj.GetRecords(sql) For i As Integer = 0 To tbl.Rows.Count - 1 Next End Sub

Project Report

Page 29

Private Sub BindingNavigatorAddNewItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorAddNewItem.Click If IDNumericUpDown.Text = "" And Employee_NameTextBox.Text = "" Then MsgBox("Please Fill Full Information")

Else Dim obj As New DBClass Dim sql As String sql = "Insert into Employee(ID,Employee Name,Oualification,Age,Gender,Contact No.,City,Salary,Hire Date,Leaving Date,Address) values('" & IDNumericUpDown.Text & "','" & Employee_NameTextBox.Text & "','" & QualificationTextBox.Text & "','" & AgeTextBox.Text & "','" & Contact_No_TextBox.Text & "','" & CityTextBox.Text & "','" & SalaryTextBox.Text & "','" & Hire_DateDateTimePicker.Text & "','" & Leaving_DateDateTimePicker.Text & "','" & AddressRichTextBox.Text & "')" obj.RunInsertDeleteUpdateQry(sql) RefreshGrid() Clear() End If End Sub Private Sub RefreshGrid() Dim sql As String Dim tbl As New DataTable Dim obj As New DBClass sql = "Select * from Employee" tbl = obj.GetRecords(sql) EmployeeDataGridView.DataSource = tbl End Sub Private Sub Clear() IDNumericUpDown.Refresh() Employee_NameTextBox.Clear() QualificationTextBox.Clear() AgeTextBox.Clear() GenderComboBox.Refresh() Contact_No_TextBox.Clear() CityTextBox.Clear() SalaryTextBox.Clear() Hire_DateDateTimePicker.Refresh() Leaving_DateDateTimePicker.Refresh() AddressRichTextBox.Clear() End Sub

Project Report

Page 30

Private Sub BindingNavigatorDeleteItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BindingNavigatorDeleteItem.Click If MsgBox("Are you sure to delete record!", vbYesNo) = MsgBoxResult.Yes Then Dim obj As New DBClass Dim sql As String sql = "Delete from Employee Where ID=" & IDNumericUpDown.Text obj.RunInsertDeleteUpdateQry(sql) RefreshGrid() Clear() End If End Sub Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click EmployeeRecords.Show() End Sub Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click Me.Clear() End Sub Private Sub ToolStripButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton3.Click End End Sub End Class

Project Report

Page 31

Student Records

Coding
Imports System.Data Public Class StudentRecords Private Sub StudentBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentBindingNavigatorSaveItem.Click Me.Validate() Me.StudentBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.StudentDataSet) End Sub

Project Report

Page 32

Private Sub StudentRecords_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'StudentDataSet.Student' table. You can move, or remove it, as needed. Me.StudentTableAdapter.Fill(Me.StudentDataSet.Student) End Sub Private Sub Search_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Search.Click Dim obj As New DBClass Dim sql As String Dim tbl As New DataTable If RegistrationNo.Text = "" Then MsgBox("Please enter the Registration No.", MsgBoxStyle.Critical) Else sql = "Select * from Student where Registration_No_ = Registrationo.text" tbl = obj.GetRecords(sql) StudentDataGridView.DataSource = tbl End If End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click End End Sub End Class

Project Report

Page 33

Employee Records

Coding
Imports System.Data Public Class EmployeeRecords Private Sub EmployeeBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EmployeeBindingNavigatorSaveItem.Click Me.Validate() Me.EmployeeBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.EmployeeDataSet) End Sub

Project Report

Page 34

Private Sub EmployeeRecords_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'EmployeeDataSet.Employee' table. You can move, or remove it, as needed. Me.EmployeeTableAdapter.Fill(Me.EmployeeDataSet.Employee) End Sub

Private Sub Search2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Search2.Click Dim obj As New DBClass Dim sql As String Dim tbl As New DataTable If IDTextBox.Text = "" Then MsgBox("Please enter the Employee ID", MsgBoxStyle.Critical) Else sql = "Select * from Employee where ID = IDTextBox.text" tbl = obj.GetRecords(sql) EmployeeDataGridView.DataSource = tbl End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click End End Sub End Class

Project Report

Page 35

FeeSetup

Coding
Imports System.Data Public Class FeeSetup Private Sub FeeRecordsBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FeeRecordsBindingNavigatorSaveItem.Click Me.Validate() Me.FeeRecordsBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.FeesDataSet) End Sub

Project Report

Page 36

Private Sub FeeSetup_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'FeesDataSet.FeeRecords' table. You can move, or remove it, as needed. Me.FeeRecordsTableAdapter.Fill(Me.FeesDataSet.FeeRecords) Dim tbl As New DataTable Dim sql As String Dim dbobj As New DBClass sql = "Select distinct Registration No. from FeeRecords" tbl = dbobj.GetRecords(sql) For i As Integer = 0 To tbl.Rows.Count - 1 Next End Sub End Class

Project Report

Page 37

Fee Records

Coding
Imports System.Data Public Class FeeRecords Private Sub FeeRecordsBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FeeRecordsBindingNavigatorSaveItem.Click Me.Validate() Me.FeeRecordsBindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.FeesDataSet) End Sub Private Sub FeeRecords_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'TODO: This line of code loads data into the 'FeesDataSet.FeeRecords' table. You can move, or remove it, as needed. Me.FeeRecordsTableAdapter.Fill(Me.FeesDataSet.FeeRecords) End Sub

Project Report

Page 38

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim obj As New DBClass Dim sql As String Dim tbl As New DataTable If regtextbox.Text = "" Then MsgBox("Please enter the Registration No.", MsgBoxStyle.Critical) Else sql = "Select * from Student where Registration No_ = regtextbox.text" tbl = obj.GetRecords(sql) FeeRecordsDataGridView.DataSource = tbl End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click End End Sub End Class

Project Report

Page 39

Project Report

Page 40

Potrebbero piacerti anche