Date post: | 26-Mar-2015 |
Category: |
Documents |
Upload: | sijo-thomas |
View: | 282 times |
Download: | 3 times |
CHAPTER NAME
CHAPTER 1: Introduction / Objectives
1.1 Introduction
1.2 Objective of system
1.3 Limitations
1.4 Need for the proposed system
1.5 Advantages of the Project
CHAPTER 2: System Analysis
2.1 Hardware requirements
2.2 Software requirements
2.3 Front-End used Visual Basic
2.4 Back-End used MS Access
2.4.1 About Ms Access
2.4.2 Components of Access
2.5 Feasibility study
2.5.1 Technical Feasibility
2.5.2 Operational Feasibility
2.5.3 Economic Feasibility
2.6 Software life cycle model used
2.7 Reasons for choosing Waterfall model?
CHAPTER 3: System Design
3.1 System Design
3.2 Design Objectives
3.3 Flow Chart
3.4 Data Flow Diagram
3.5 ER Diagram
CHAPTER 4: Implementation and Coding
4.1 Validation Checks
4.2 Implementation
4.3 Coding
4.3.1 Code Efficiency
4.3.1 Optimization of code
CHAPTER 5: System Testing
5.1 Software Testing
5.1.1 Testing Principles
5.2 Levels of Testing
5.2.1 Functional testing
5.2.2 Structural testing
5.2.3 Unit testing
5.2.4 System testing
5.2.5 Integration testing
CHAPTER 6: Reports
Conclusion
Future Scope of the Project
References & Bibliography
Chapter 1
INTRODUCTION
1.1 INTRODUCTION
This project with the title “COACHING CENTER MANAGEMENT” has
been designed with a view to computerize the various operations that are
expected to be performed in an educational center. The main objective of the
project is to make massive operations handled fast & efficiently. The stress
has been given both to the quality & quantity. Besides, it is capable of
overcoming the various limitations associated with the cost, timeliness,
incorrectness, ambiguities, in competency, etc. which otherwise is a
common part of a general purpose software.
The software deals with the following areas:
Admission – in this, the admission of the students is dealt with, by
allowing him/her the flexibility to choose amongst the wide variety
of the subjects & modules.
Recruitment – in this, the recruitment of the various staff
members is manipulated, by which a list of them can be generated
at will.
Batches – in this, the batches timings are handled according to
subjects.
Fees – it performs fee management of the entire center, including
the generation of the defaulters’ list at will.
Salary - it performs salary management for teachers.
Besides al these activities, a number of reporting & querying procedures
have been put, so that instant hard copy of details pertaining to any
particular department can be taken out.
1.2 Objective
The main objective of any computerized system is to minimize the manual
paper work load performed inside any company or organization. Objective
of this system is also to minimize and overcome the limitations of the
problems faced under manual system as there is lot of work processed from
both the customer and supplier side in order to make sale or purchase. So to
remove this manual workload and smooth running of business it is very
necessary to have a computerized system which is capable of processing the
business as well as capable to generate report and queries made by the
management.
This computerized system will have a good GUI which provides an ease of
support to the user to perform their work done in very less time and in an
effective manner. The application would take care of the data integrity and
validity, so that the unsuitable data would not be entered by
misapprehension. This system is also capable of generating the error free
report and fees for student and salary for management, which is very much
required while running an institute. Time to time database backup facility by
the administrator makes this system more stable while in case of Hardware
failure, natural disaster.
1.3 Limitations of the Existing System
The existing system has certain drawbacks for managing the records of the
coaching center due to which a new automated system is proposed and
hence computerization is done for the same. The following are the
drawbacks of the existing system:-
It is not user friendly.
Retrieval of data is not easy as well as there is no efficiency of data
which is maintained.
The cost of maintaining the data is more as compared to cost of
maintaining the data in an automated system.
Problem of data delicacy also arise in manually maintained data.
Modification of data is not easy in the existing system.
Also customers cannot register themselves in the existing system.
1.4 Need for the system
This project titled “COACHING CENTER MANAGEMENT” has been
designed to computerize all the data of the students, batches, teachers, staff,
and salary to teachers, salary of staff etc in the coaching center.
In today’s environment, the computers are being used in almost all trades
and fields. The computers are widely used to store and maintain the
databases for the people of different trades. With the help of computers, it
becomes very easy to create, maintain and update the data as well as
accessing the data becomes very easy. Also it saves lot of time of the people,
that time can be invested in other productive works to enhance one’s
business. Because of many advantages, everybody from every trade is keen
to use the computers to increase the efficiency of their work. There has been
a demand for a system that would help to maintain the database of the
coaching center also.
The proposed system was needed for computerization of various operations
to make the Coaching Center Management System for fast and easy
retrieval procedure. Thus, the proposed system includes advantages above
the existing system. The following are the merits:-
a) Computerization makes the retrieval of data easy.
b) Maintenance cost of data is less.
c) Speed of accessing data is fast.
d) It is user friendly.
Chapter 2
System Analysis
2.1 Hardware Requirements
Before running the project, please be sure that your system meets the
following requirements:
1. COMPAQ PC or 100% compatible
2. 80486 processor or higher
3. Your operating system must be one of the following:
Windows NT
Windows 2000
Windows XP or later
4. 16 MB of RAM or higher
5. 4GB of hard disk space
6. VGA monitor
7. Mouse or compatible pointing device
8. Floppy drive 3.5”
9. Pen Drive
2.2 Software Requirements
Platform - Windows XP
Database - Microsoft Access 2003
Language/Front end - Visual Basic 6.0
2.3 Front-End used: Visual Basic
Introduction about Visual Basic
2.3.1 What is Visual Basic?
A programming language and environment developed by Microsoft. Based
on the BASIC language, Visual Basic was one of the first products to
provide a graphical programming environment and a paint metaphor for
developing user interfaces. Instead of worrying about syntax details, the
Visual Basic programmer can add a substantial amount of code simply by
dragging and dropping controls, such as buttons and dialog boxes and then
defining their appearance and behavior.
Visual Basic nevertheless has an object-oriented philosophy. It is sometimes
called an event-driven language because each object can react to different
events such as a mouse click.
Visual Basic (VB) is a widely used programming language developed by
Microsoft and based on earlier BASIC implementations such as
QBasic/QuickBasic.
It exists in three distinct forms:-
Visual Basic stand-alones: This is the Visual Basic development
environment used by programmers to build DOS and Windows applications.
A number of different versions are in this product line, including separate
versions for DOS and Windows.
Visual Basic for Applications (VBA): Microsoft includes VBA with many
of its Windows and Mac OS applications, notably Microsoft Word and
Microsoft Excess. VBA is a shared library that VB-aware applications can
use to augment their capabilities. With it, you can script macros that
automate tasks and even combine the functions of the programs.
Visual Basic Scripting Edition (VB Script): VBScript is a subset of Visual
Basic designed for use on the World Wide Web, offered as an alternative to
JavaScript and as a means of accessing ActiveX controls and Java applets.
2.3.2 Why do we need it?
Visual Basic suit more for applications developing than for Games
developing. You can create sophisticated games using Visual Basic, But if
you want to make a really advanced professional game like Quake 2, you
may choose other language (like C++), that would be much harder to
program with. However, Visual Basic will be probably powerful enough to
suit all your application and games programming needs.
2.3.3 The features of Visual Basic
Many types of software like to add a word “Visual” in front of
their names, & Visual Basic is the pioneer among them. Why
do we say “Visual” to describe Basic? Because Visual Basic
provides programmers many visual tools to design windows.
These windows will be as same as the appearances when the
programs are executing.
Visual Basic has developed to 6.0 versions up to now, it not
only inherits the features of Basic which is easy to learn, easy to
use but adds Multi-media database, the article directional
program design, ActiveX, the web page manufacturers & so on.
Thus, Visual Basic6.0 will not be done to other the tools of
developing program languages. Visual Basic6.0 has had
Chinese version. It’s more convenient for us to learn.
2.3.4 Advantages of Visual Basic:
1. It’s simple language. Things may be difficult to program with
other language, can be done in Visual Basic very easily.
2. Because Visual Basic is so popular, there are many good resources
(Books, Web sites, News groups & more) that can help you learn
the language. You can find the answers to your programming
problems much more easily than other programming languages.
3. You can find many tools (Sharewares & Freeware) on the internet
that will spare you some programming time. For example, if you
want to ping a user over the Internet in your program, Instead of
writing the ping function itself yourself, you can download a
control that does it, and use it in your program. Compare to other
languages, Visual Basic have the widest variety of tools that you
can download on the Internet and use in your programs.
2.3.5 Disadvantages of Visual Basic:
1) Visual Basic is powerful language, but it’s not suit for
programming really sophisticated games.
2) It’s much slower than other languages.
2.4 Back-End used: MS Access
2.4.1 About Ms Access
Ms-Access is a RDBMS used to store and manipulate large collection of
information of any kind. Ms Access has tool which are easy to use and
provide powerful development environment. For example access can be
used to enter and maintain student awards, inventory record of a ware house
numbers. Once the records are stored any type of query can be asked, reports
can be created and data entry forms can be designed.
2.4.2 Components of Access:
1. Database window: here all object of a database are stored in a single file
having external mdb.
2. Database and tables: database is a collection of information retained in
the form of a table. Table consists of row and column. Each table stores
information about one entry such as student customer etc each row in a table
represents a single record of an entity. Each column contains a discrete
element of information called a field. A field might be a student name,
telephone number etc.
3. Forms: Forms display a data from a table or query in the format requested
by user. The records or fields in the table are placed in the forms and can be
edited according to the requirement.
4. Queries: A query is a question asked by the user to extract information
according to his or her requirement.
5. Reports: A report displays the information in a prescribed format. Access
produces reports by incorporating graphs, charts and different styles. It can
be used to group data and show sub totals and grand totals.
6. Macros: Macros are used to automate frequently used tasks. Access macros execute
number of options such as opening files, displaying message boxes, validation of data.
2.5 Feasibility study
Before developing some feasibility study is very necessary. Not everything
imaginable is feasible, not even in software, evanescent as it may appear to
outsider. Once scope is identified, it is reasonable to ask “Can we build
software to meet this scope? Is the project feasible?” Software engineers
rush path these questions, only to become mired in a project that in doomed
from the onset. In my project software has three dimensions: Technical,
Economical and operational. The scooping is not enough. Once scope is
understood, the software team and others must work to determine if it can be
done with in the dimensions just noted. Feasibility study is also depending
on time and resources. Will the project’s time to market beat the
competition? Does the organization have the resources needed to succeed?
2.5.1 Technical feasibility
Technical feasibility centers on the exiting computer system (hardware,
software etc.) and to what extent it can support the proposed addition. For
example if the current computer is operating at 80 percent capacity - an
arbitrary ceiling- then running another application could overload the system
or require additional hardware. This involves financial considerations to
accommodate technical enhancements. If the budget serious constraints, then
the project is judged not feasible. Is a project technical feasible? If it with in
the state of art? Can defects to reduce to level matching the application
need? All these questions are study in technical feasibility. Project on the
margins of yours experience are not so easy, a team have to spend several
month discovering what the central, difficult to implement requirement of a
new application actually are. Do some of these requirements pose risks that
would make the project infeasible? Can these risks be overcome? The
feasibility team ought to carry architecture and design of the high risk
requirement to the point at which it can answer these questions. In some
cases the team gets negative answer, a reduction is requirement may be
negotiated.
2.5.2 Economical Feasibility
Economical analysis is the mist frequently used method for evaluating the
effectiveness of a candidate system. More commonly known as cost/benefit
analysis, the procedure is to determine the benefits and savings that are
expected from a candidate system and compare them with codes. In
economical feasibility we can study that, is it my software is economically
feasible? Can development is completed at a cost the software organization,
its client, or the market can afford? This study is very necessary. We can
evaluate economical feasibility of this software system that means what is
the market value of this system? If your system is economically feasible then
he is use many people and stand in market in long time. Economically
feasible system increasing her clients and market can easily afford it. When
you development feasibility of the system if the system is feasible then the
system work properly. If benefits outweigh costs, then the decision is made
to design and implement the system. Otherwise, further justification or
alterations in the proposed system will have to be made if it is to give a
chance of being approved. This is an ongoing effort that improves in
accuracy at each face of the system life cycle.
2.5.3 Operational feasibility
The systems operational feasibility depends on the system technical
feasibility. Which methods we use for developing the system and what
technique we use for developing the system. Many of the project that appear
in the newspapers a few years later as whapping failures got started this way.
Because those projects is not using appropriate methods of software
engineering. If the system is operationally feasible then he is a reliable
system and giving the correct result. When client is working with this
software system then all forms and fields are described and its database is
connect in appropriate manner.
Software system spends some extra cost, and then it isn’t economically
feasible. The software organization cost is pre-defined cost of the system we
spend in developing time.
2.6 Software Life Cycle Models (SDLC)
Software engineering is a layered technology. To solve actual problem in
industry setting, a software engineer must incorporate a development
strategy that encompass the process, the method and tools layers. This
strategy is often referred to as a Process Model or a Software Engineering
Paradigm.
There are a series of steps through which the software project progresses
during its development process. These steps together constitute the Life
Cycle Model of that project. There are a number of life cycle models, each
having its own strengths and weaknesses:
The Waterfall Model
The Rapid Prototyping Model
The Incremental Model
The Iterative Enhancement Model
The life history of each project is different. Some projects spent much time
in conceptual stage but some are developed and implemented quickly then
spend years in maintenance. So a choice needs to be made depending upon
the advantages and disadvantages of the various models and the requirement
of our project.
2.6.1 SDLC Model Applied (Waterfall Model)
Waterfall model is the simplest model with each phase having a well defined
starting and ending point, with identifiable deliveries to the next phase.
The model consists of six distinct stages, namely:
1. Requirement Analysis Phase
The problem is specified along with the desired service objectives
(goals) also the constraints are identified.
2. Specification Phase
The system specification is produced from the detailed definition
requirement analysis phase. This document should clearly define the
product “to do’s”
3. System and Software Design Phase
The system specifications are translated into a software
representation. The software engineer at this stage is concerned with:
Data Structure
Software Architecture
Algorithmic detail, and
Interface representations
The hardware requirements are also determined at this stage along
with a picture of the overall system architecture. By the end of this
stage the software engineer should be able to identify the relationship
between the hardware, software and the associated interfaces. Any
faults in the specification should ideally not be passed ‘down stream’.
4. Implementation and Testing Phase
The designs are translated into the software domain also detailed
documentation from the design phase can significantly reduce the
coding effort. Testing at this stage focuses on making sure that any
errors are identified and that the software meets its required
specification.
5. Integration and System Testing Phase
All the program units are integrated and tested to ensure that the
complete system meets the software requirements. After this stage the
software is delivered to the customer. The software product is
delivered to the client for acceptance testing.
6. Maintenance Phase
This is usually the longest and the last stage of the software. In this
phase the software is updated to meet the changing customer needs,
ability to accommodate changes in the external environment, correct
errors and oversights previously undetected in the testing phases,
enhancing the efficiency of the software.
2.7 Reasons for choosing waterfall model
In this model, a detailed checking is done at each and every step by
software Quality Assurance (SQA) group and also by the clients. That
is why it involves less risk of rejection by clients.
It is very easy to understand and implement.
It is documentation driven, that is documentation is produced at every
stage.
Testing is inherent to every phase of the waterfall model. So there is
no need for a separate testing phase.
The feed back loops in this model allow for corrections to be
incorporated into the model. For example a problem in the design
phase requires a ‘revisit’ to the specifications phase. When changes
are made to any phase, the relevant documentation should be updated
to reflect that change.
Chapter 3
Design of the System
3.1 SYSTEM DESIGN
Design is a highly significant phase in software development where the
designer plans “how” a software system should be produced in order to male
it functional, reliable and reasonably easy to understand, modify and
maintain. Designing a software results in software design document (SDD).
Gather data or user requirement
Analyze the requirement data
Validate the design against the requirement
Refine and document the design
Conceive the high level design
Obtain answers to requirement questions
Design Framework
3.2 Design Objectives
Goals in mind while designing the system.
1. To reduce the manual work to be done
2. To avoid errors inherent making the output inconsistent and incorrect
3. To make the system completely menu driven and user friendly.
4. To design the system so that even non-programmers can use the system
effectively and system should act as a catalyst in achieving objectives.
5. To improve the management of permanent information of the company by
keeping it in properly structured tables.
6. To provide the facility to modify any records whenever required.
7. To query a particular record or all records is provided.
8. To design the system so that the reports for different forms can be
obtained.
Start
Menu
Input Choice
If choice=1 Student
If choice=2 Batches
Yes
Yes
No
3.4 Data Flow Diagram
If choice=3 Teacher
StaffIf choice=4
Transactions
Queries
If choice=5
If choice=7
If choice=6
Report
Yes
Yes
Yes
Yes
Yes
No
No
No
No
No
If choice=8 Password
DatabaseIf choice=9
Quit
Yes
Yes
No
No
No
AboutIf choice=10 Yes
No
HelpIf choice=11 Yes
No
View
Menu
Input Choice
If choice=1 New
Add
If choice=3 Delete
If choice=2
Form having Student
Yes
Yes
Yes
No
No
View
Menu
Input Choice
If choice=1 New
Add
If choice=3 Delete
If choice=2
Form having Batches
Yes
Yes
Yes
No
No
View
Menu
Input Choice
If choice=1 Add
Modify
If choice=3 Delete
If choice=2
Form having Teachers
Yes
Yes
Yes
No
No
View
Menu
Input Choice
If choice=1 Add
Modify
If choice=3 Delete
If choice=2
Form having Staff
Yes
Yes
Yes
No
No
View
Menu
Input Choice
If choice=1 Fee
SalaryIf choice=2
Quit
Form having Transaction
Yes
Yes
No
No
View
Menu
Input Choice
If choice=1 Student
Batch
If choice=3 Teacher
If choice=2
Form having Queries
Yes
Yes
Yes
No
No
StaffIf choice=4
Quit
Yes
No
No
View
Menu
Input Choice
If choice=1 Student
Batch
If choice=3 Teacher
If choice=2
Form having Reports
Yes
Yes
Yes
No
No
StaffIf choice=4
Quit
Yes
No
No
3.4 Data Flow Diagrams
C O AC H ING C E NT R E
MANAG E ME NT
BAT C H E S
S E AR C H
T R ANS AC T IO N
S T UD E NT
C O AC H ING C E NT R E
MANAG E ME NT
BAT C H E S
T R ANS AC T IO N
T E AC H E R S
L E VE L 0 S TUDE NTS DF D
L E VE L 0 TE AC HE R S DF D
T R ANS AC T IO N R E P O R T G E NE R AT IO N
L E VE L 1 DF DINF O
R E TR IVAL
P R OC E DUR E
S T UDE NT
INF O
MANAG E ME NT
TE AC HE R S
INF O
MANAG E ME NT
TR ANS AC TIO N
MANG E ME NT
B ATC HE S
INF O
MANAG E ME NT
L OG IN
R E P OR T G E NE R ATION
QUE R IE S R E P O R T G E NE R AT IO N
S TUDE NT_INF O AND TE AC HE R _INF O
S TUDE NT_INF O
T E AC H E R _INF O
T R ANS AC T IO N_INF O
BAT C H E S _T ABL E
BAT C H E S R E P O R T G E NE R AT IO N
QUE R IE S ME NU
S T UD E NT ME NU
T R ANS AC T IO N ME NU
T E AC H E R S ME NU
BAT C H E S ME NU
ADMIN
INF O
R E TR IVAL
P R OC E DUR E
TE AC HE R S INF O MANAG E ME NT
S T UDE NT INF O MANAG E ME NT
P AY ME NT MANAG E ME NT
F E E S MANAG E ME NT
S AL AR Y MANAG E ME NT
TR ANS AC TIO N
S E AR C H F O R
S T UD E NT
S E AR C H F O R T E AC H E R
B ATC HE S
INF O
MANAG E ME NT
ADD INF O
MODIF Y INF O
R E P OR T
G E NE R ATIONL OG IN
R E C E IVE D
P AY ME NTS AL AR Y
AD D
MO D IF Y
BAT C H E S _INF O
S E AR C H ME NU
BAT C H E S
T R ANS AC T IO
N ME NU
S T UD E NT _INF O
T E AC H E R _INF O
T R ANS AC T IO N_INFO
T R ANS AC T IO N R E P O R T S
L E VE L 2 DF D O F TR ANS AC TIO N
L OG IN
S T UDE NT
INF O
MANAG ME NT
TE AC HE R S
INF O
MANAG E ME NT
ADD INF O
MODIF Y INF O
DE L E TE INF O
S T UD E NT _INF O
T E AC H E R _INF O
S T UD E NT ME NU
T E AC H E R S ME NU
AD D
ADD
MODIF Y
MODIF Y
D E L E T E
DE LE TE
L E VE L 2 DF D O F S TUDE NT AND TE AC HE R S
ADMIN
3.5 ER Diagrams
StudentTeaches
stud_id
f_name
l_name
address
dob
gender
class
school
address
Salary
Studies in
Fee
Pay
Takes salary
serial_no
batch_id
total_amt
batch_id
subject
time
hours
join_date
valid_upto
amount
pay_id
batch_id
amount
type
cheque_no
Paymentsteach_id
gender
Teacher
dob
resi_pho
mob_pho
qualification
l_name
f_name
teach_id
pay_date
stud_id
teach_id
Batches
mob_pho
resi_pho
f_date
days
Chapter 4
Coding
LOGINPrivate Sub cmdok_Click()Dim variable1 As String, at As Stringat = Dir(App.Path & "\log.dat", vbNormal)If at = "" ThenOpen App.Path & "\log.dat" For Output As #1Print #1, "top"Print #1, "0" 'studentPrint #1, "0" 'batchPrint #1, "0" 'teacherPrint #1, "0" 'staffPrint #1, "0" 'feeClose #1End IfOpen App.Path & "\log.dat" For Input As #1Input #1, variable1Close #1
Static i As IntegerIf Text1.Text = variable1 ThenUnload Memain_m.ShowElseMsgBox "Wrong Password", vbOKOnly + vbCritical, "Coaching centre"Text1.Text = ""End IfIf i = 2 ThenUnload MeExit SubEnd Ifi = i + 1End Sub
Private Sub cmdcancel_Click()Unload MeEnd Sub
MAIN FORMPublic closechec As BooleanPrivate Sub about_Click()
abot.Show 1End Sub
Private Sub backup_Click()backp.Show 1End Sub
Public Sub Batch_Click()side.Showside.Left = 0side.Top = 0side.chec = 2side.l_1.Caption = "BATCH"side.s_1.Caption = "NEW"side.s_2.Caption = "ADD"side.s_3.Caption = "DELETE"side.s_1.Visible = Trueside.s_2.Visible = Trueside.s_3.Visible = Trueside.s_4.Visible = Falseside.f_1.Visible = FalseEnd Sub
Private Sub clo_Click()Unload MeEnd Sub
Private Sub exit_Click()Unload MeEnd Sub
Private Sub help_Click()CommonDialog1.HelpCommand = &H3&CommonDialog1.HelpFile = App.Path & "\HELP_CC.hlp"CommonDialog1.ShowHelpEnd Sub
Private Sub MDIForm_Activate()Dim checpath As StringDim datpath As Stringdatpath = App.Path + "/database/stud_data.mdb"checpath = Dir(datpath, vbNormal)If checpath = "" Then
MsgBox "Error, database file not found " & datpath, vbOKOnly + vbCritical, "coaching centre"Unload MeEnd IfEnd Sub
Private Sub MDIForm_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)If Button = vbRightButton ThenPopupMenu footEnd IfEnd Sub
Private Sub Mdiform_QueryUnload(Cancel As Integer, UnloadMode As Integer)Dim strmsg As Stringstrmsg = "Are you Sure, You want's to Close Coaching Centre"
If closechec = True ThenMsgBox "please close all forms", vbOKOnly + vbInformation, "coaching center"Cancel = TrueExit SubEnd If
If MsgBox(strmsg, vbQuestion + vbYesNo + vbDefaultButton2, "coaching center") = vbYes ThenCall MDIForm_Unload(1)Else: Cancel = TrueEnd IfEnd Sub
Private Sub MDIForm_Unload(Cancel As Integer)Unload MeEnd Sub
Private Sub pass_c_Click()pass.Show 1End Sub
Public Sub quries_Click()side.Showside.Left = 0side.Top = 0side.chec = 6
side.l_1.Caption = "QUERIES"side.s_1.Caption = "STUDENT"side.s_2.Caption = "BATCH"side.s_3.Caption = "TEACHER"side.s_4.Caption = "STAFF"side.s_1.Visible = Trueside.s_2.Visible = Trueside.s_3.Visible = Trueside.s_4.Visible = Trueside.f_1.Visible = FalseEnd Sub
Public Sub report_Click()side.Showside.Left = 0side.Top = 0side.chec = 7side.l_1.Caption = "REPORTS"side.s_1.Caption = "STUDENT"side.s_2.Caption = "BATCH"side.s_3.Caption = "TEACHER"side.s_4.Caption = "STAFF"side.s_1.Visible = Trueside.s_2.Visible = Trueside.s_3.Visible = Trueside.s_4.Visible = Trueside.f_1.Visible = FalseEnd Sub
Public Sub staff_Click()side.Showside.Left = 0side.Top = 0side.chec = 4side.l_1.Caption = "STAFF"side.s_1.Caption = "ADD"side.s_2.Caption = "MODIFY"side.s_3.Caption = "DELETE"side.s_1.Visible = Trueside.s_2.Visible = Trueside.s_3.Visible = Trueside.s_4.Visible = Falseside.f_1.Visible = FalseEnd Sub
Public Sub stu_Click()side.Showside.Left = 0side.Top = 0side.chec = 1side.l_1.Caption = "STUDENT"side.s_1.Caption = "ADD"side.s_2.Caption = "MODIFY"side.s_3.Caption = "DELETE"side.s_1.Visible = Trueside.s_2.Visible = Trueside.s_3.Visible = Trueside.s_4.Visible = Falseside.f_1.Visible = FalseEnd Sub
Public Sub Teach_Click()side.Showside.Left = 0side.Top = 0side.chec = 3side.l_1.Caption = "TEACHER"side.s_1.Caption = "ADD"side.s_2.Caption = "MODIFY"side.s_3.Caption = "DELETE"side.s_1.Visible = Trueside.s_2.Visible = Trueside.s_3.Visible = Trueside.s_4.Visible = Falseside.f_1.Visible = FalseEnd Sub
Public Sub trans_Click()side.Showside.Left = 0side.Top = 0side.chec = 5side.l_1.Caption = "TRANSACTION"side.s_1.Caption = "FEE"side.s_2.Caption = "SALARY"side.s_1.Visible = Trueside.s_2.Visible = Trueside.s_3.Visible = False
side.s_4.Visible = Falseside.f_1.Visible = FalseEnd Sub
SIDEBARPublic chec As Integer, ta As Integer
Private Function da(a As Integer) As StringSelect Case aCase 1: da = "Sunday"Case 2: da = "Monday"Case 3: da = "Tuesday"Case 4: da = "Wednesday"Case 5: da = "Thusday"Case 6: da = "Friday"Case 7: da = "Saturday"End SelectEnd Function
Private Sub toolb()main_m.stu.Enabled = Falsemain_m.batch.Enabled = Falsemain_m.Teach.Enabled = Falsemain_m.staff.Enabled = Falsemain_m.trans.Enabled = Falsemain_m.quries.Enabled = Falsemain_m.report.Enabled = Falsemain_m.pass_c.Enabled = Falsemain_m.backup.Enabled = Falsemain_m.about.Enabled = Falsemain_m.exit.Enabled = FalseEnd Sub
Private Sub toole()main_m.stu.Enabled = Truemain_m.batch.Enabled = Truemain_m.Teach.Enabled = Truemain_m.staff.Enabled = Truemain_m.trans.Enabled = Truemain_m.quries.Enabled = True
main_m.report.Enabled = Truemain_m.pass_c.Enabled = Truemain_m.backup.Enabled = Truemain_m.about.Enabled = Truemain_m.exit.Enabled = TrueLabel3.Visible = FalseEnd Sub
Private Sub oop()f_1.Visible = Trues_1.Visible = Falses_2.Visible = Falses_3.Visible = Falses_4.Visible = Falsemain_m.closechec = TrueEnd Sub
Public Sub f_1_Click()main_m.closechec = FalseCall toolef_1.Visible = FalseIf ta = 11 ThenUnload a_StudentElseIf ta = 21 ThenUnload n_batchElseIf ta = 31 ThenUnload a_teachElseIf ta = 41 ThenUnload a_staffElseIf ta = 51 ThenUnload feeElseIf ta = 61 ThenUnload q_stuElseIf ta = 71 ThenUnload r_stuElseIf ta = 81 ThenUnload passElseIf ta = 12 ThenUnload e_stuElseIf ta = 22 ThenUnload e_batchElseIf ta = 32 ThenUnload e_teachElseIf ta = 42 Then
Unload e_staffElseIf ta = 52 ThenUnload salaryElseIf ta = 62 ThenUnload q_batchElseIf ta = 72 ThenUnload r_batchElseIf ta = 13 ThenUnload d_stuElseIf ta = 23 ThenUnload d_batchElseIf ta = 33 ThenUnload d_teachElseIf ta = 43 ThenUnload d_staffElseIf ta = 53 ThenUnload q_teachElseIf ta = 14 ThenUnload q_staffElseIf ta = 24 ThenUnload r_staffElseIf ta = 63 ThenUnload r_teachEnd IfIf chec = 1 Thenmain_m.stu_ClickElseIf chec = 2 Thenmain_m.Batch_ClickElseIf chec = 3 Thenmain_m.Teach_ClickElseIf chec = 4 Thenmain_m.staff_ClickElseIf chec = 5 Thenmain_m.trans_ClickElseIf chec = 6 Thenmain_m.quries_ClickElseIf chec = 7 Thenmain_m.report_ClickEnd IfEnd Sub
Private Sub Form_Load()Dim a As Datea = DateAdd("n", 5, Now)
Label1.Caption = DateTime.Date$Label2.Caption = da(DateTime.Weekday(a, vbUseSystemDayOfWeek = vbSunday))Timer1.Enabled = TrueEnd Sub
Private Sub Label1_Click()Timer1.Enabled = TrueEnd Sub
Private Sub s_1_Click()Label3.Visible = TrueIf chec = 1 Thena_Student.Showa_Student.Top = 0a_Student.Left = 1900a_Student.Height = 10450a_Student.Width = 13390Label3.Caption = "A D D S T U D E N T"Call oopta = 11ElseIf chec = 2 Thenn_batch.Shown_batch.Top = 0n_batch.Left = 1900n_batch.Height = 10450n_batch.Width = 13390Label3.Caption = "N E W B A T C H"Call oopta = 21ElseIf chec = 3 Thena_teach.Showa_teach.Top = 0a_teach.Left = 1900a_teach.Height = 10450a_teach.Width = 13390Label3.Caption = "A D D T E A C H E R"Call oopta = 31ElseIf chec = 4 Thena_staff.Showa_staff.Top = 0a_staff.Left = 1900a_staff.Height = 10450a_staff.Width = 13390
Label3.Caption = "A D D S T A F F"Call oopta = 41ElseIf chec = 5 Thenfee.Showfee.Top = 0fee.Left = 1900fee.Height = 10450fee.Width = 13390Label3.Caption = "F E E"Call oopta = 51ElseIf chec = 6 Thenq_stu.Showq_stu.Top = 0q_stu.Left = 1900q_stu.Height = 10450q_stu.Width = 13390Label3.Caption = "Q U E R Y S T U D E N T"Call oopta = 61ElseIf chec = 7 Thenr_stu.Showr_stu.Top = 0r_stu.Left = 1900r_stu.Height = 10450r_stu.Width = 13390Label3.Caption = "R E P O R T S T U D E N T"Call oopta = 71End IfCall toolbEnd Sub
Private Sub s_2_Click()Label3.Visible = TrueIf chec = 1 Thene_stu.Showe_stu.Top = 0e_stu.Left = 1900e_stu.Height = 10450e_stu.Width = 13390Call oopLabel3.Caption = "E D I T S T U D E N T"
ta = 12ElseIf chec = 2 Thene_batch.Showe_batch.Top = 0e_batch.Left = 1900e_batch.Height = 10450e_batch.Width = 13390Call oopLabel3.Caption = "E D I T B A T C H"ta = 22ElseIf chec = 3 Thene_teach.Showe_teach.Top = 0e_teach.Left = 1900e_teach.Height = 10450e_teach.Width = 13390Label3.Caption = "E D I T T E A C H E R"Call oopta = 32ElseIf chec = 4 Thene_staff.Showe_staff.Top = 0e_staff.Left = 1900e_staff.Height = 10450e_staff.Width = 13390Label3.Caption = "E D I T S T A F F"Call oopta = 42ElseIf chec = 5 Thensalary.Showsalary.Top = 0salary.Left = 1900salary.Height = 10450salary.Width = 13390Label3.Caption = "S A L A R Y"Call oopta = 52ElseIf chec = 6 Thenq_batch.Showq_batch.Top = 0q_batch.Left = 1900q_batch.Height = 10450q_batch.Width = 13390Label3.Caption = "Q U E R Y B A T C H"
Call oopta = 62ElseIf chec = 7 Thenr_batch.Showr_batch.Top = 0r_batch.Left = 1900r_batch.Height = 10450r_batch.Width = 13390Label3.Caption = "R E P O R T B A T C H"Call oopta = 72End IfCall toolbEnd Sub
Private Sub s_3_Click()Label3.Visible = TrueIf chec = 1 Thend_stu.Showd_stu.Top = 0d_stu.Left = 1900d_stu.Height = 10450d_stu.Width = 13390Call oopLabel3.Caption = "D E L E T E S T U D E N T"ta = 13ElseIf chec = 2 Thend_batch.Showd_batch.Top = 0d_batch.Left = 1900d_batch.Height = 10450d_batch.Width = 13390Label3.Caption = "D E L E T E B A T C H"Call oopta = 23ElseIf chec = 3 Thend_teach.Showd_teach.Top = 0d_teach.Left = 1900d_teach.Height = 10450d_teach.Width = 13390Label3.Caption = "D E L E T E T E A C H E R"Call oopta = 33
ElseIf chec = 4 Thend_staff.Showd_staff.Top = 0d_staff.Left = 1900d_staff.Height = 10450d_staff.Width = 13390Label3.Caption = "D E L E T E S T A F F"Call oopta = 43ElseIf chec = 6 Thenq_teach.Showq_teach.Top = 0q_teach.Left = 1900q_teach.Height = 10450q_teach.Width = 13390Label3.Caption = "Q U E R Y T E A C H E R"Call oopta = 53ElseIf chec = 7 Thenr_teach.Showr_teach.Top = 0r_teach.Left = 1900r_teach.Height = 10450r_teach.Width = 13390Label3.Caption = "R E P O R T T E A C H E R"Call oopta = 63End IfCall toolbEnd Sub
Private Sub s_4_Click()Label3.Visible = TrueIf chec = 6 Thenq_staff.Showq_staff.Top = 0q_staff.Left = 1900q_staff.Height = 10450q_staff.Width = 13390Label3.Caption = "Q U E R Y S T A F F"Call oopta = 14ElseIf chec = 7 Thenr_staff.Show
r_staff.Top = 0r_staff.Left = 1900r_staff.Height = 10450r_staff.Width = 13390Label3.Caption = "R E P O R T S T A F F"Call oopta = 24End IfCall toolbEnd Sub
Private Sub Timer1_Timer()Label4.Caption = Time$End Sub
ADD STUDENTDim WithEvents ad As Recordset, db As Connection, a As Integer, i As Integer
Private Sub st_1_Click()st_3.Visible = Truest_2.Visible = Truest_1.Visible = FalseEnd Sub
Private Sub st_2_Click()st_3.Visible = Falsest_2.Visible = Falsest_1.Visible = TrueEnd Sub
Private Sub st_3_Click()st_3.Visible = Falsest_2.Visible = Falsest_1.Visible = TrueEnd Sub
Private Sub Combo1_Click()Text1(9).Text = Combo1.TextEnd Sub
Private Sub Combo2_Click()
Text1(10).Text = Combo2.Text + "/" + Combo3.Text + "/" + Combo4.TextEnd Sub
Private Sub Combo3_Click()Text1(10).Text = Combo2.Text + "/" + Combo3.Text + "/" + Combo4.TextEnd Sub
Private Sub Combo4_Click()Text1(10).Text = Combo2.Text + "/" + Combo3.Text + "/" + Combo4.TextEnd Sub
Private Sub cmdnew_Click()Adodc1.Recordset.AddNewOpen App.Path & "\log.dat" For Input As #1For i = 1 To 2Input #1, aNext iClose #1Text1(0).Text = "S" & a + 1cmdnew.Visible = Falsecmdsave.Visible = Truecmdcancel.Visible = TrueEnd Sub
Private Sub cmdsave_Click()For i = 0 To 10If Text1(i).Text = "" ThenMsgBox "Empty", vbOKOnly + vbCritical, "coaching centre"Exit SubEnd IfNext iSet ad = New Recordsetad.Open "select stud_id from q_chec_stud where f_name='" & Text1(1).Text & "' and l_name='" & Text1(2).Text & "'", db, adOpenStatic, adLockOptimisticIf Not ad.RecordCount = 0 ThenMsgBox "Already exists", vbOKOnly + vbInformation, "coaching center"Exit SubEnd IfAdodc1.Recordset.UpdateOpen App.Path & "\log.dat" For Output As #1For i = 1 To 2Print #1, a + 1NextClose #1
cmdnew.Visible = Truecmdsave.Visible = Falsecmdcancel.Visible = FalseEnd Sub
Private Sub cmdcancel_Click()Adodc1.Recordset.CancelUpdatecmdnew.Visible = Truecmdsave.Visible = Falsecmdcancel.Visible = FalseEnd Sub
Private Sub Form_Load()Adodc1.Recordset.AddNewOpen App.Path & "\log.dat" For Input As #1For i = 1 To 2Input #1, aNext iClose #1Text1(0).Text = "S" & a + 1Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_d
End Sub
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)If Index = 7 Or Index = 8 ThenIf KeyAscii < 48 Or KeyAscii > 57 ThenIf Not KeyAscii = 8 Then KeyAscii = 0End IfEnd IfEnd Sub
EDIT STUDENTDim WithEvents ad As Recordset, db As Connection, i As Integer
Private Sub cmdmov_Click(Index As Integer)If Index = 1 Then
If Not ad.EOF Then ad.MoveNextIf ad.EOF And ad.RecordCount > 0 Then ad.MoveLastElseIf Not ad.BOF Then ad.MovePreviousIf ad.BOF And ad.RecordCount > 0 Then ad.MoveFirstEnd IfEnd Sub
Private Sub cmdcancel_Click()ad.CancelUpdatecmdsave.Enabled = Falsecmdcancel.Enabled = FalseEnd Sub
Private Sub cmdsearch_Click()If Text1.Text = "" ThenMsgBox "Empty", vbOKOnly + vbCritical, "coaching centre"Text1.SetFocusExit SubEnd IfSet ad = New RecordsetSelect Case Combo1.TextCase "ID"ad.Open "Select * from student where stud_id='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticCase "Name"ad.Open "Select * from student where f_name='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticCase "School"ad.Open "Select * from student where school='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticCase "Class"ad.Open "Select * from student where class='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticEnd SelectIf ad.RecordCount = 0 ThenMsgBox "Not Found", vbOKOnly + vbInformation, "coaching centre"Text1.SetFocusExit SubElseIf ad.RecordCount > 1 Thencmdmov(0).Visible = Truecmdmov(1).Visible = TrueElsecmdmov(0).Visible = False
cmdmov(1).Visible = FalseEnd IfDim ta As TextBoxFor Each ta In Me.texSet ta.DataSource = adNextcmdsave.Enabled = Truecmdcancel.Enabled = TrueEnd Sub
Public Sub cmdsave_Click()For i = 0 To 10If tex(i).Text = "" ThenMsgBox "Empty", vbOKOnly + vbCritical, "coaching centre"Exit SubEnd IfNext iad.Updatecmdsave.Enabled = Falsecmdcancel.Enabled = FalseEnd Sub
Private Sub Form_Load()Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_dEnd Sub
Private Sub Text1_Change()If Text1.Text = "" Thencmdsearch.Enabled = FalseElsecmdsearch.Enabled = TrueEnd IfEnd Sub
DELETE STUDENTDim WithEvents ad As Recordset, db As Connection, i As Integer
Private Sub cmdmov_Click(Index As Integer)If Index = 0 ThenIf Not ad.BOF Then ad.MovePreviousIf ad.BOF And ad.RecordCount > 0 Then ad.MoveFirstElseIf Not ad.EOF Then ad.MoveNextIf ad.EOF And ad.RecordCount > 0 Then ad.MoveLastEnd IfEnd Sub
Private Sub cmddelete_Click()Dim a As Integera = MsgBox("DELETE ?", vbYesNo + vbQuestion, "coaching center")If a = 6 Thenad.DeleteFor i = 0 To 10tex(i).Text = ""Next ia = CInt(Mid(tex(0).Text, 2, Len(tex(0).Text)))Open App.Path & "\log.dat" For Output As #1For i = 1 To 2Print #1, a - 1NextClose #1cmddelete.Enabled = Falsecmdcancel.Enabled = FalseEnd IfEnd Sub
Private Sub cmdcancel_Click()cmddelete.Enabled = Falsecmdcancel.Enabled = FalseEnd Sub
Private Sub Form_Load()Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_dEnd Sub
Private Sub cmdsearch_Click()If Text1.Text = "" Then Exit Sub
Set ad = New RecordsetSelect Case Combo1.TextCase "ID"ad.Open "Select * from student where stud_id='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticCase "Name"ad.Open "Select * from student where f_name='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticCase "School"ad.Open "Select * from student where school='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticCase "Class"ad.Open "Select * from student where class='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticEnd SelectIf ad.RecordCount = 0 ThenExit SubElseIf ad.RecordCount > 1 Thencmdmov(0).Visible = Truecmdmov(1).Visible = TrueElsecmdmov(0).Visible = Falsecmdmov(1).Visible = FalseEnd IfDim ta As TextBoxFor Each ta In Me.texSet ta.DataSource = adNextcmddelete.Enabled = Truecmdcancel.Enabled = TrueEnd Sub
Private Sub Text1_Change()If Text1.Text = "" Thencmdsearch.Enabled = FalseElsecmdsearch.Enabled = TrueEnd IfEnd Sub
NEW BATCH
Dim db As Connection, WithEvents ad As Recordset, a As Integer, i As Integer
Private Sub Calendar1_Click()Text1(7).Text = Format$(Calendar1.Value, "dd/mm/yyyy")Calendar1.Visible = FalseEnd Sub
Private Sub Combo1_Click()Text1(3).Text = Combo1.TextEnd Sub
Private Sub Combo2_Click()Text1(5).Text = Combo2.TextEnd Sub
Private Sub Combo3_Click()Text1(4).Text = Combo3.TextEnd Sub
Private Sub Combo4_Click()Text1(1).Text = Combo4.TextEnd Sub
Private Sub Combo5_Click()Text1(9).Text = Combo5.TextEnd Sub
Private Sub cmdnew_Click()Adodc1.Recordset.AddNewOpen App.Path & "\log.dat" For Input As #1For i = 1 To 3Input #1, aNext iClose #1Text1(0).Text = "B" & a + 1cmdnew.Visible = Falsecmdsave.Visible = Truecmdcancel.Visible = TrueEnd Sub
Private Sub cmdsave_Click()For i = 0 To 8If Text1(i).Text = "" ThenMsgBox "Empty", vbOKOnly + vbCritical, "coaching center"
Exit SubEnd IfNextAdodc1.Recordset.UpdateOpen App.Path & "\log.dat" For Output As #1For i = 1 To 3Print #1, a + 1NextClose #1cmdnew.Visible = Truecmdsave.Visible = Falsecmdcancel.Visible = FalseEnd Sub
Private Sub cmdcancel_Click()Adodc1.Recordset.CancelUpdatecmdnew.Visible = Truecmdsave.Visible = Falsecmdcancel.Visible = FalseEnd Sub
Private Sub cmdsearch_Click()Dim lit As ListItemListView1.ListItems.ClearSet ad = New Recordsetad.Open "select teach_id,f_name,l_name,qualification from q_teacher", db, adOpenStatic, adLockOptimisticIf ad.RecordCount = 0 Then Exit SubFor i = 1 To ad.RecordCountSet lit = ListView1.ListItems.AddListView1.ListItems(i).Text = ad.Fields(0).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).Valuead.MoveNextNextListView1.Visible = TrueEnd Sub
Private Sub Form_Load()Adodc1.Recordset.AddNewOpen App.Path & "\log.dat" For Input As #1For i = 1 To 3Input #1, a
Next iClose #1Text1(0).Text = "B" & a + 1Text1(10).Text = 0Text1(6).Text = Format$(Date$, "dd/mm/yyyy")Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_dListView1.View = lvwReportListView1.ColumnHeaders.Add 1, "ID", "ID"ListView1.ColumnHeaders(1).Width = 500ListView1.ColumnHeaders.Add 2, "f_name", "F_Name"ListView1.ColumnHeaders.Add 3, "l_name", "L_Name"ListView1.ColumnHeaders.Add 4, "qualification", "Qualification"End Sub
Private Sub ListView1_Click()Text1(2).Text = ListView1.SelectedItemListView1.Visible = FalseEnd Sub
Private Sub Text1_Click(Index As Integer)If Index = 7 ThenCalendar1.Visible = TrueEnd IfIf Index = 8 ThenIf KeyAscii < 48 Or KeyAscii > 57 ThenIf Not KeyAscii = 8 Then KeyAscii = 0End IfEnd IfEnd Sub
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)If Index = 9 Or Index = 8 ThenIf KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0End IfEnd Sub
EDIT BATCH
Dim WithEvents ad As Recordset, ad1 As Recordset, ad2 As Recordset, total_stu As Integer, db As Connection
Private Sub cmdid_Click()Dim i As IntegerList1.ClearSet ad = New Recordsetad.Open "select stud_id from q_stud", db, adOpenStatic, adLockOptimisticIf ad.RecordCount = 0 Then Exit SubFor i = 1 To ad.RecordCountList1.AddItem ad.Fields(0).Valuead.MoveNextNextList1.Visible = TrueEnd Sub
Private Sub cmdsearch1_Click()If Text1.Text = "" Then Exit SubSet ad = New Recordsetad.Open "select f_name,l_name,address,father,class,school from q_stud where stud_id='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticDim te As TextBoxFor Each te In Me.Text2Set te.DataSource = adNextText4(0).Text = Text1.TextEnd Sub
Private Sub cmdsearch2_Click()ListView1.ListItems.ClearDim lv As ListItem, cl As ColumnHeader, i As IntegerIf Text3.Text = "" Then Exit SubSet ad2 = New Recordsetad2.Open "select * from batch where subject='" & Text3.Text & "'", db, adOpenStatic, adLockOptimisticIf Not ad2.RecordCount = 0 ThenFor i = 1 To ad2.RecordCountSet lv = ListView1.ListItems.AddListView1.ListItems(i).Text = ad2.Fields(0).ValueListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(1).ValueListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(2).ValueListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(3).ValueListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(4).ValueListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(5).Value
ListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(6).ValueListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(7).ValueListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(8).ValueListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(9).ValueListView1.ListItems(i).ListSubItems.Add , , ad2.Fields(10).Valuead2.MoveNextNextEnd IfEnd Sub
Private Sub cmdadd_Click()ad2.Fields(10).Value = total_stu + 1ad2.UpdateAdodc1.Recordset.Updatecmdadd.Enabled = Falsecmdcancel.Enabled = FalseEnd Sub
Private Sub cmdcancel_Click()Adodc1.Recordset.CancelUpdatecmdadd.Enabled = Falsecmdcancel.Enabled = FalseEnd Sub
Private Sub Form_Load()Adodc1.Recordset.AddNewDim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_dListView1.View = lvwReportListView1.ColumnHeaders.Add 1, "Batch_ID", "ID"ListView1.ColumnHeaders(1).Width = 500ListView1.ColumnHeaders.Add 2, "subject", "Subject"ListView1.ColumnHeaders.Add 3, "teach_id", "Teacher ID"ListView1.ColumnHeaders.Add 4, "days", "Days"ListView1.ColumnHeaders(4).Width = 700ListView1.ColumnHeaders.Add 5, "time", "Time"ListView1.ColumnHeaders(5).Width = 700ListView1.ColumnHeaders.Add 6, "hour", "Hours"ListView1.ColumnHeaders(6).Width = 700ListView1.ColumnHeaders.Add 7, "join_date", "Create On"ListView1.ColumnHeaders.Add 8, "valid_upto", "Valid Upto"
ListView1.ColumnHeaders.Add 9, "amount", "Amount"ListView1.ColumnHeaders.Add 10, "max_limit", "Max"ListView1.ColumnHeaders(10).Width = 700ListView1.ColumnHeaders.Add 11, "no_stud", "No. of Stud"ListView1.ColumnHeaders(11).Width = 1000End Sub
Private Sub List1_Click()Text1.Text = List1.TextList1.Visible = FalseEnd Sub
Private Sub List1_LostFocus()Text1.Text = List1.TextList1.Visible = FalseEnd Sub
Private Sub ListView1_dblClick()Set ad1 = New Recordsetad1.Open "select * from q_add_s_b where stud_id='" & Text1.Text & "' and batch_id='" & ListView1.SelectedItem & "'", db, adOpenStatic, adLockOptimisticIf Not ad1.RecordCount = 0 ThenMsgBox "Already Add", vbOKOnly + vbInformation, "coaching center"Exit SubEnd IfSet ad2 = New Recordsetad2.Open "select * from batch where batch_id='" & ListView1.SelectedItem & "'", db, adOpenStatic, adLockOptimisticIf ad2.Fields(9).Value = ad2.Fields(10).Value ThenMsgBox "Batch is full", vbOKOnly + vbInformation, "coaching center"Exit SubEnd Iftotal_stu = ad2.Fields(10).ValueText4(1).Text = ListView1.SelectedItemcmdadd.Enabled = Truecmdcancel.Enabled = TrueEnd Sub
DELETE BATCHDim WithEvents ad As Recordset, ad1 As Recordset, db As Connection
Private Sub cmddelete_Click()Dim a As Integer, i As Integerad.Deletead1.Deletea = CInt(Mid(Text1(0).Text, 2, Len(Text1(0).Text)))Open App.Path & "\log.dat" For Output As #1For i = 1 To 3Print #1, a - 1NextClose #1cmddelete.Enabled = Falsecmdcancel.Enabled = FalseEnd Sub
Private Sub cmdcancel_Click()cmddelete.Enabled = Falsecmdcancel.Enabled = FalseEnd Sub
Private Sub cmdsearch_Click()Dim lit As ListItem, i As IntegerListView1.ListItems.ClearIf Text2.Text = "" Then Exit SubSet ad = New RecordsetSelect Case Combo1.TextCase "ID"ad.Open "select * from batch where batch_id='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticEnd SelectDim te As TextBoxFor Each te In Me.Text1Set te.DataSource = adNextSet ad1 = New Recordsetad1.Open "select stud_id,f_name,l_name,address,father,class,school from q_d_batch where batch_id='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticIf ad1.RecordCount = 0 Then Exit SubFor i = 1 To ad1.RecordCountSet lit = ListView1.ListItems.AddListView1.ListItems(i).Text = ad1.Fields(0).ValueListView1.ListItems(i).ListSubItems.Add , , ad1.Fields(1).ValueListView1.ListItems(i).ListSubItems.Add , , ad1.Fields(2).ValueListView1.ListItems(i).ListSubItems.Add , , ad1.Fields(3).ValueListView1.ListItems(i).ListSubItems.Add , , ad1.Fields(4).Value
ListView1.ListItems(i).ListSubItems.Add , , ad1.Fields(5).ValueListView1.ListItems(i).ListSubItems.Add , , ad1.Fields(6).Valuead1.MoveNextNextSet ad1 = New Recordsetad1.Open "select * from stud_batch where batch_id='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticcmddelete.Enabled = Truecmdcancel.Enabled = TrueEnd Sub
Private Sub Form_Load()Dim path_d As StringSet db = New Connectionpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"db.Open path_dListView1.View = lvwReportListView1.ColumnHeaders.Add 1, "ID", "ID"ListView1.ColumnHeaders(1).Width = 500ListView1.ColumnHeaders.Add 2, "f_name", "F_Name"ListView1.ColumnHeaders.Add 3, "l_name", "L_Name"ListView1.ColumnHeaders.Add 4, "address", "Address"ListView1.ColumnHeaders.Add 5, "father", "Father's Name"ListView1.ColumnHeaders.Add 6, "class", "Class"ListView1.ColumnHeaders.Add 7, "school", "School"End Sub
Private Sub Text2_Change()If Text2.Text = "" Thencmdsearch.Enabled = FalseElsecmdsearch.Enabled = TrueEnd IfEnd Sub
ADD TEACHERDim WithEvents ad As Recordset, db As Connection, a As Integer, i As Integer
Private Sub Combo1_Click()Text1(4).Text = Combo1.Text
End Sub
Private Sub Combo2_Click()Text1(4).Text = Combo2.Text + "/" + Combo3.Text + "/" + Combo4.TextEnd Sub
Private Sub Combo3_Click()Text1(4).Text = Combo2.Text + "/" + Combo3.Text + "/" + Combo4.TextEnd Sub
Private Sub Combo4_Click()Text1(4).Text = Combo2.Text + "/" + Combo3.Text + "/" + Combo4.TextEnd Sub
Private Sub cmdnew_Click()Adodc1.Recordset.AddNewOpen App.Path & "\log.dat" For Input As #1For i = 1 To 4 Input #1, aNext iClose #1Text1(0).Text = "T" & a + 1cmdnew.Visible = Falsecmdsave.Visible = Truecmdcancel.Visible = TrueEnd Sub
Private Sub cmdsave_Click()Dim i As IntegerFor i = 0 To 9If Text1(i).Text = "" ThenMsgBox "empty", vbOKOnly + vbCritical, "coaching center"Exit SubEnd IfNext iSet ad = New Recordsetad.Open "select teach_id from q_chec_teach where f_name='" & Text1(1).Text & "' and l_name='" & Text1(2).Text & "'", db, adOpenStatic, adLockOptimisticIf Not ad.RecordCount = 0 ThenMsgBox "Already exists", vbOKOnly + vbInformation, "coaching center"Exit SubEnd IfAdodc1.Recordset.UpdateOpen App.Path & "\log.dat" For Output As #1
For i = 1 To 4Print #1, a + 1NextClose #1cmdnew.Visible = Truecmdsave.Visible = Falsecmdcancel.Visible = FalseEnd Sub
Private Sub cmdcancel_Click()Adodc1.Recordset.CancelUpdatecmdnew.Visible = Truecmdsave.Visible = Falsecmdcancel.Visible = FalseEnd Sub
Private Sub Form_Load()Adodc1.Recordset.AddNewOpen App.Path & "\log.dat" For Input As #1For i = 1 To 4Input #1, aNext iClose #1Text1(0).Text = "T" & a + 1Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_dEnd Sub
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)If Index = 6 Or Index = 7 ThenIf KeyAscii < 48 Or KeyAscii > 57 ThenIf Not KeyAscii = 8 Then KeyAscii = 0End IfEnd IfEnd Sub
EDIT TEACHERDim WithEvents ad As Recordset, db As Connection, i As Integer
Private Sub cmdupdate_Click()Dim i As IntegerFor i = 0 To 10If Text1(i).Text = "" ThenMsgBox "Empty", vbOKOnly + vbCritical, "coaching centre"Exit SubEnd IfNext iad.UpdateBatch adAffectAllcmdupdate.Enabled = Falsecmdcancel.Enabled = FalseEnd Sub
Private Sub cmdcancel_Click()ad.CancelUpdatecmdupdate.Enabled = Falsecmdcancel.Enabled = FalseEnd Sub
Private Sub cmdsearch_Click()Set ad = New RecordsetIf Text2.Text = "" Then Exit SubSelect Case Combo1.TextCase "ID":ad.Open "Select * from teacher where teach_id='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticCase "NAME":ad.Open "Select * from teacher where f_name='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticEnd SelectIf ad.RecordCount = 0 ThenMsgBox "Not Found", vbOKOnly + vbInformation, "coaching centre"Text1(1).SetFocusExit SubElseIf ad.RecordCount > 1 Thencmdmov(0).Visible = Truecmdmov(1).Visible = TrueElsecmdmov(0).Visible = Falsecmdmov(1).Visible = FalseEnd IfDim te As TextBoxFor Each te In Me.Text1
Set te.DataSource = adNextcmdupdate.Enabled = Truecmdcancel.Enabled = TrueEnd Sub
Private Sub cmdmov_Click(Index As Integer)If Index = 0 ThenIf Not ad.BOF Then ad.MovePreviousIf ad.BOF And ad.RecordCount > 0 Then ad.MoveFirstElseIf Not ad.EOF Then ad.MoveNextIf ad.EOF And ad.RecordCount > 0 Then ad.MoveLastEnd IfEnd Sub
Private Sub Form_Load()Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_dEnd Sub
Private Sub Text2_Change()If Text2.Text = "" Thencmdsearch.Enabled = FalseElsecmdsearch.Enabled = TrueEnd IfEnd Sub
DELETE TEACHERDim WithEvents ad As Recordset, db As Connection, i As Integer
Private Sub cmddelete_Click()Dim a As Integera = MsgBox("DELETE ?", vbYesNo + vbQuestion, "coaching center")If a = 6 Thenad.Deletea = CInt(Mid(Text1(0).Text, 2, Len(Text1(0).Text)))
Open App.Path & "\log.dat" For Output As #1For i = 1 To 4Print #1, a - 1NextClose #1cmddelete.Enabled = Falsecmdcancel.Enabled = FalseEnd IfEnd Sub
Private Sub cmdcancel_Click()cmddelete.Enabled = Falsecmdcancel.Enabled = FalseEnd Sub
Private Sub cmdsearch_Click()If Text2.Text = "" Then Exit SubSet ad = New RecordsetSelect Case Combo1.TextCase "ID":ad.Open "select * from teacher where teach_id='" + Text2.Text + "'", db, adOpenStatic, adLockOptimisticCase "NAME":ad.Open "select * from teacher where f_name='" + Text2.Text + "'", db, adOpenStatic, adLockOptimisticEnd SelectIf ad.RecordCount = 0 ThenMsgBox "Not Found", vbOKOnly + vbInformation, "coaching centre"Text1(1).SetFocusExit SubElseIf ad.RecordCount > 1 Thencmdmov(0).Visible = Truecmdmov(1).Visible = TrueElsecmdmov(0).Visible = Falsecmdmov(1).Visible = FalseEnd IfDim te As TextBoxFor Each te In Me.Text1Set te.DataSource = adNextcmddelete.Enabled = Truecmdcancel.Enabled = TrueEnd Sub
Private Sub cmdmov_Click(Index As Integer)If Index = 0 ThenIf Not ad.BOF Then ad.MovePreviousIf ad.BOF And ad.RecordCount > 0 Then ad.MoveFirstElseIf Not ad.EOF Then ad.MoveNextIf ad.EOF And ad.RecordCount > 0 Then ad.MoveLastEnd IfEnd Sub
Private Sub Form_Load()Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_dEnd Sub
Private Sub Text2_Change()If Text2.Text = "" Thencmdsearch.Enabled = FalseElsecmdsearch.Enabled = TrueEnd IfEnd Sub
ADD STAFFDim db As Connection, WithEvents ad As Recordset, a As Integer, i As Integer
Private Sub Combo2_Click()Text1(4).Text = Combo2.Text + "/" + Combo3.Text + "/" + Combo4.TextEnd Sub
Private Sub Combo3_Click()Text1(4).Text = Combo2.Text + "/" + Combo3.Text + "/" + Combo4.TextEnd Sub
Private Sub Combo4_Click()Text1(4).Text = Combo2.Text + "/" + Combo3.Text + "/" + Combo4.TextEnd Sub
Private Sub Combo5_Click()Text1(9).Text = Combo5.TextEnd Sub
Private Sub cmdnew_Click()Adodc1.Recordset.AddNewOpen App.Path & "\log.dat" For Input As #1For i = 1 To 5 Input #1, aNext iClose #1Text1(0).Text = "St" & a + 1cmdnew.Visible = Falsecmdsave.Visible = Truecmdcancel.Visible = TrueEnd Sub
Private Sub cmdsave_Click()For i = 0 To 8If Text1(i).Text = "" ThenMsgBox "empty", vbOKOnly + vbCritical, "coaching center"Exit SubEnd IfNextSet ad = New Recordsetad.Open "select staff_id from q_chec_staff where f_name='" & Text1(1).Text & "' and l_name='" & Text1(2).Text & "'", db, adOpenStatic, adLockOptimisticIf Not ad.RecordCount = 0 ThenMsgBox "Already exists", vbOKOnly + vbInformation, "coaching center"Exit SubEnd IfAdodc1.Recordset.UpdateOpen App.Path & "\log.dat" For Output As #1For i = 1 To 5Print #1, a + 1NextClose #1cmdnew.Visible = Truecmdsave.Visible = Falsecmdcancel.Visible = FalseEnd Sub
Private Sub cmdcancel_Click()
Adodc1.Recordset.CancelUpdatecmdnew.Visible = Truecmdsave.Visible = Falsecmdcancel.Visible = FalseEnd Sub
Private Sub Form_Load()Adodc1.Recordset.AddNewOpen App.Path & "\log.dat" For Input As #1For i = 1 To 5Input #1, aNext iClose #1Text1(0).Text = "St" & a + 1Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_dEnd Sub
Private Sub Text1_KeyPress(Index As Integer, KeyAscii As Integer)If Index = 6 Or Index = 7 Or Index = 8 ThenIf KeyAscii < 48 Or KeyAscii > 57 ThenIf Not KeyAscii = 8 Then KeyAscii = 0End IfEnd IfEnd Sub
EDIT STAFFDim WithEvents ad As Recordset, db As Connection, i As Integer
Private Sub cmdupdate_Click()Dim i As IntegerFor i = 0 To 8If Text1(i).Text = "" ThenMsgBox "empty", vbOKOnly + vbCritical, "coaching center"Exit SubEnd IfNextad.UpdateBatch
cmdupdate.Enabled = Falsecmdcancel.Enabled = FalseEnd Sub
Private Sub cmdcancel_Click()ad.CancelUpdatecmdupdate.Enabled = Falsecmdcancel.Enabled = FalseEnd Sub
Private Sub cmdsearch_Click()Set ad = New RecordsetIf Text2.Text = "" Then Exit SubSelect Case Combo1.TextCase "ID":ad.Open "Select * from staff where staff_id='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticCase "NAME":ad.Open "Select * from staff where f_name='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticEnd SelectIf ad.RecordCount = 0 ThenMsgBox "Not Found", vbOKOnly + vbInformation, "coaching centre"Text1(1).SetFocusExit SubElseIf ad.RecordCount > 1 Thencmdmov(0).Visible = Truecmdmov(1).Visible = TrueElsecmdmov(0).Visible = Falsecmdmov(1).Visible = FalseEnd IfDim te As TextBoxFor Each te In Me.Text1Set te.DataSource = adNextcmdupdate.Enabled = Truecmdcancel.Enabled = TrueEnd Sub
Private Sub cmdmov_Click(Index As Integer)If Index = 0 ThenIf Not ad.BOF Then ad.MovePreviousIf ad.BOF And ad.RecordCount > 0 Then ad.MoveFirst
ElseIf Not ad.EOF Then ad.MoveNextIf ad.EOF And ad.RecordCount > 0 Then ad.MoveLastEnd IfEnd Sub
Private Sub Form_Load()Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_dEnd Sub
Private Sub Text2_Change()If Text2.Text = "" Thencmdsearch.Enabled = FalseElsecmdsearch.Enabled = TrueEnd IfEnd Sub
DELETE STAFFDim WithEvents ad As Recordset, db As Connection, i As Integer
Private Sub cmdsearch_Click()If Text2.Text = "" Then Exit SubSet ad = New RecordsetSelect Case Combo1.TextCase "ID":ad.Open "select * from staff where staff_id='" + Text2.Text + "'", db, adOpenStatic, adLockOptimisticCase "NAME":ad.Open "select * from staff where f_name='" + Text2.Text + "'", db, adOpenStatic, adLockOptimisticEnd SelectIf ad.RecordCount = 0 ThenMsgBox "Not Found", vbOKOnly + vbInformation, "coaching centre"Text1(1).SetFocusExit SubElseIf ad.RecordCount > 1 Then
cmdmov(0).Visible = Truecmdmov(1).Visible = TrueElsecmdmov(0).Visible = Falsecmdmov(1).Visible = FalseEnd IfDim te As TextBoxFor Each te In Me.Text1Set te.DataSource = adNextcmddelete.Enabled = Truecmdcancel.Enabled = TrueEnd Sub
Private Sub cmddelete_Click()Dim a As Integera = MsgBox("DELETE ?", vbYesNo + vbQuestion, "coaching center")If a = 6 Thenad.Deletea = CInt(Mid(Text1(0).Text, 2, Len(Text1(0).Text)))Open App.Path & "\log.dat" For Output As #1For i = 1 To 5Print #1, a - 1NextClose #1cmddelete.Enabled = Falsecmdcancel.Enabled = FalseEnd IfEnd Sub
Private Sub cmdcancel_Click()cmddelete.Enabled = Falsecmdcancel.Enabled = FalseEnd Sub
Private Sub cmdmov_Click(Index As Integer)If Index = 0 ThenIf Not ad.BOF Then ad.MovePreviousIf ad.BOF And ad.RecordCount > 0 Then ad.MoveFirstElseIf Not ad.EOF Then ad.MoveNextIf ad.EOF And ad.RecordCount > 0 Then ad.MoveLastEnd IfEnd Sub
Private Sub Form_Load()Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_dEnd Sub
Private Sub Text2_Change()If Text2.Text = "" Thencmdsearch.Enabled = FalseElsecmdsearch.Enabled = TrueEnd IfEnd Sub
FEEDim WithEvents ad As Recordset, ad1 As Recordset, a As Integer, db As Connection, i As Integer
Private Sub Combo1_Click()Set ad = New Recordsetad.Open "select batch_id,amount from q_s_bat where subject='" & Combo1.Text & "'", db, adOpenStatic, adLockOptimisticDim tt As TextBoxFor Each tt In Me.Text2Set tt.DataSource = adNextEnd Sub
Private Sub Combo2_Click()Text3(5).Text = Combo2.TextIf Combo2.Text = "CHEQUE" ThenText3(6).Visible = TrueLabel4.Visible = TrueElseText3(6).Visible = FalseLabel4.Visible = FalseEnd IfEnd Sub
Private Sub cmdsearch_Click()Combo1.ClearSet ad = New RecordsetIf Text4.Text = "" Then Exit Subad.Open "select stud_id,f_name,l_name,address,class,school from q_stud where stud_id='" & Text4.Text & "'", db, adOpenStatic, adLockOptimisticDim te As TextBoxFor Each te In Me.Text1Set te.DataSource = adNextSet ad = New Recordsetad.Open "select subject from q_s_bat where stud_id='" & Text4.Text & "'", db, adOpenStatic, adLockOptimisticIf Not ad.RecordCount = 0 ThenFor i = 1 To ad.RecordCountCombo1.AddItem ad.Fields(0).Valuead.MoveNextNextEnd IfEnd Sub
Private Sub cmdfee_Click()If Combo1.Text = "" Then Exit SubSet ad = New RecordsetSet ad1 = New Recordsetad.Open "select total_amt from q_fee_check where stud_id='" & Text4.Text & "' and batch_id ='" & Text2(0).Text & "'", db, adOpenStatic, adLockOptimisticIf ad.RecordCount = 0 ThenAdodc1.Recordset.AddNewOpen App.Path & "\log.dat" For Input As #1For i = 1 To 6Input #1, aNext iClose #1Text3(0).Text = "F" & a + 1Text3(1).Text = Text1(0).TextText3(2).Text = Text2(0).TextText3(3).Text = Format$(Date$, "mm/dd/yyyy")Text3(4).Text = Text2(1).TextText3(5).Text = Combo2.TextCombo1.Locked = Truecmdfee.Enabled = Falsecmdsave.Visible = True
cmdcancel.Visible = TrueText3(3).Enabled = TrueCombo2.Enabled = TrueExit SubElseMsgBox "Paid", vbOKOnly + vbInformation, "coaching center"Text3(3).Enabled = FalseCombo2.Enabled = FalseExit SubEnd IfEnd Sub
Private Sub cmdsave_Click()Adodc1.Recordset.UpdateOpen App.Path & "\log.dat" For Output As #1For i = 1 To 6Print #1, a + 1NextClose #1Combo1.Locked = Falsecmdfee.Enabled = Truecmdsave.Visible = Falsecmdcancel.Visible = FalseEnd Sub
Private Sub cmdcancel_Click()Combo1.Locked = Falsecmdfee.Enabled = Truecmdsave.Visible = Falsecmdcancel.Visible = FalseAdodc1.Recordset.CancelUpdateEnd Sub
Private Sub cmdall_Click()Dim liv As ListItemListView1.ListItems.ClearSet ad = New Recordsetad.Open "select stud_id,f_name,l_name,class from q_stud", db, adOpenStatic, adLockOptimisticIf ad.RecordCount = 0 Then Exit SubFor i = 1 To ad.RecordCountSet lit = ListView1.ListItems.AddListView1.ListItems(i).Text = ad.Fields(0).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).Valuead.MoveNextNextListView1.Visible = TrueEnd Sub
Private Sub Form_Load()Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_dListView1.View = lvwReportListView1.ColumnHeaders.Add 1, "ID", "ID"ListView1.ColumnHeaders(1).Width = 500ListView1.ColumnHeaders.Add 2, "f_name", "F_Name"ListView1.ColumnHeaders.Add 3, "l_name", "L_Name"ListView1.ColumnHeaders.Add 4, "class", "Class"End Sub
Private Sub ListView1_Click()Text4.Text = ListView1.SelectedItemListView1.Visible = FalseEnd Sub
SALARYDim WithEvents ad As Recordset, db As Connection, a As Integer, i As tnteger
Private Sub Combo1_Click()Dim amt As Integer, stu As Integer, sal As Integer, tot As IntegerSet ad = New Recordsetad.Open "select batch_id,valid_upto,amount,no_stud from q_batch where subject='" & Combo1.Text & "'", db, adOpenStatic, adLockOptimisticIf Not ad.RecordCount = 0 ThenDim te As TextBoxFor Each te In Me.Text2Set te.DataSource = adNextEnd IfText5(1).Text = Text3.Text
Text5(2).Text = Text2(0).Textamt = Int(Text2(2).Text)stu = Int(Text2(3).Text)sal = amt * stutot = sal * (60 / 100)Text5(4).Text = totEnd Sub
Private Sub Combo2_Click()If Combo2.Text = "TEACHERS" ThenFor i = 0 To 3Text1(i).Visible = TrueText2(i).Visible = TrueNextText5(0).Visible = TrueText5(3).Visible = TrueText5(4).Visible = TrueCombo1.Visible = TrueLabel5.Caption = "Teacher Details"Label6.Visible = TrueLabel6.Caption = "Batch Details"For i = 0 To 4Text6(i).Visible = FalseNextText4(0).Visible = FalseText4(2).Visible = FalseText4(3).Visible = FalseFor i = 0 To 11Label1(i).Visible = TrueNextFor i = 0 To 7Label2(i).Visible = FalseNextElseIf Combo2.Text = "STAFF" ThenFor i = 0 To 3Text1(i).Visible = FalseText2(i).Visible = FalseNextText5(0).Visible = FalseText5(3).Visible = FalseText5(4).Visible = FalseCombo1.Visible = FalseLabel5.Caption = "Staff Details"Label6.Visible = False
For i = 0 To 4Text6(i).Visible = TrueNextText4(0).Visible = TrueText4(2).Visible = TrueText4(3).Visible = TrueFor i = 0 To 11Label1(i).Visible = FalseNextFor i = 0 To 7Label2(i).Visible = TrueNextEnd IfEnd Sub
Private Sub cmdsearch_Click()If Combo2.Text = "TEACHERS" ThenCombo1.ClearIf Text3.Text = "" Then Exit SubSet ad = New Recordsetad.Open "select f_name,l_name,address,qualification from q_teacher where teach_id='" & Text3.Text & "'", db, adOpenStatic, adLockOptimisticDim te As TextBoxFor Each te In Me.Text1Set te.DataSource = adNextad.CloseSet ad = New Recordsetad.Open "select subject from q_bat_teach where teach_id='" & Text3.Text & "'", db, adOpenStatic, adLockOptimisticIf ad.RecordCount = 0 Then Exit SubFor i = 1 To ad.RecordCountCombo1.AddItem ad.Fields(0).Valuead.MoveNextNextElseSet ad = New Recordsetad.Open "select f_name,l_name,address,salary,designation from q_staff where staff_id='" & Text3.Text & "'", db, adOpenStatic, adLockOptimisticIf ad.RecordCount = 0 Then Exit SubFor Each te In Me.Text6Set te.DataSource = adNextText4(1).Text = Text3.Text
Text4(2).Text = Format$(Date$, "dd/mm/yyyy")Text4(3).Text = Format$(Date$, "mm")End Ifcmdsave.Enabled = Truecmdcancel.Enabled = TrueEnd Sub
Private Sub cmdsave_Click()If Combo2.Text = "TEACHERS" ThenAdodc1.Recordset.UpdateElseIf Combo2.Text = "STAFF" ThenAdodc2.Recordset.UpdateEnd IfOpen App.Path & "\log.dat" For Output As #1For i = 1 To 7Print #1, a + 1NextClose #1cmdsave.Enabled = Falsecmdcancel.Enabled = FalseEnd Sub
Private Sub cmdcancel_Click()Adodc1.Recordset.CancelUpdateAdodc2.Recordset.CancelUpdatecmdsave.Enabled = Falsecmdcancel.Enabled = FalseEnd Sub
Private Sub Form_Load()Adodc1.Recordset.AddNewAdodc2.Recordset.AddNewOpen App.Path & "\log.dat" For Input As #1For i = 1 To 7Input #1, aNext iClose #1Text5(0).Text = "P" & a + 1Text4(0).Text = "P" & a + 1Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_d
Text5(3).Text = Format$(Date$, "dd/mm/yyyy")End Sub
QUERY STUDENTDim WithEvents ad As Recordset, WithEvents ad1 As Recordset, db As Connection, i As Integer
Private Sub list_fun(st As String)Dim lit As ListItemListView1.ListItems.ClearSet ad = New RecordsetSelect Case stCase "all":ad.Open "select stud_id,f_name,l_name,class,school from q_stud", db, adOpenStatic, adLockOptimisticCase "all_b":ad.Open "select stud_id,f_name,l_name,class,school,batch_id from q_s_b", db, adOpenStatic, adLockOptimisticCase "NAME"ad.Open "select stud_id,f_name,l_name,class,school,batch_id from q_s_b where f_name='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticCase "BATCH ID"ad.Open "select stud_id,f_name,l_name,class,school,batch_id from q_s_b where batch_id='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticEnd SelectIf ad.RecordCount = 0 Then Exit SubFor i = 1 To ad.RecordCountSet lit = ListView1.ListItems.AddListView1.ListItems(i).Text = ad.Fields(0).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(4).ValueIf st = "all_b" ThenListView1.ListItems(i).ListSubItems.Add , , ad.Fields(5).ValueEnd Ifad.MoveNextNextListView1.Visible = TrueExit SubEnd Sub
Private Sub Combo1_Click()If Not Combo1.Text = "ID" ThenListView1.Visible = TrueElseListView1.Visible = FalseEnd IfEnd Sub
Private Sub cmdall_Click()List1.ClearListView1.ListItems.ClearCombo2.ClearDim lit As ListItemDim i As IntegerSet ad = New RecordsetIf Combo1.Text = "ID" Thenad.Open "select stud_id from q_stud", db, adOpenStatic, adLockOptimisticIf ad.RecordCount = 0 Then Exit SubFor i = 1 To ad.RecordCountList1.AddItem ad.Fields(0).Valuead.MoveNextNextcmdall.Visible = Falsecmdsearch.Visible = FalseList1.Visible = TrueEnd IfIf Combo1.Text = "NAME" Or Combo1.Text = "CLASS" Or Combo1.Text = "SCHOOL" ThenCall list_fun("all")ElseIf Combo1.Text = "BATCH" ThenCall list_fun("all_b")End IfEnd Sub
Private Sub cmdsearch_Click()ListView1.ListItems.ClearDim lit As ListItemSet ad = New RecordsetSet ad1 = New RecordsetIf Text2.Text = "" Then Exit SubSelect Case Combo1.TextCase "ID":ad.Open "select * from q_stud where stud_id='" + Text2.Text + "'", db, adOpenStatic, adLockOptimistic
Case "NAME"ad.Open "select * from q_stud where f_name='" + Text2.Text + "'", db, adOpenStatic, adLockOptimisticCase "BATCH ID"ad.Open "select * from q_batch_stud where batch_id='" + Text2.Text + "'", db, adOpenStatic, adLockOptimisticEnd SelectIf ad.RecordCount = 0 ThenMsgBox "not found", vbOKOnly + vbInformation, "coaching center"Exit SubElseIf ad.RecordCount > 1 ThenCall list_fun(Combo1.Text)Exit SubEnd IfDim te As TextBoxFor Each te In Me.Text1Set te.DataSource = adNext
End Sub
Private Sub Form_Load()Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_dListView1.View = lvwReportListView1.ColumnHeaders.Add 1, "ID", "ID"ListView1.ColumnHeaders(1).Width = 500ListView1.ColumnHeaders.Add 2, "f_name", "F_Name"ListView1.ColumnHeaders.Add 3, "l_name", "L_Name"ListView1.ColumnHeaders.Add 4, "class", "Class"ListView1.ColumnHeaders.Add 5, "School", "School"ListView1.ColumnHeaders.Add 6, "Batch_id", "Batch ID"End Sub
Private Sub List1_Click()Text2.Text = List1.TextList1.Visible = Falsecmdall.Visible = Truecmdsearch.Visible = TrueEnd Sub
Private Sub ListView1_dblClick()Set ad = New Recordsetad.Open "select * from q_stud where stud_id='" + ListView1.SelectedItem.Text + "'", db, adOpenStatic, adLockOptimisticIf ad.RecordCount = 0 Then Exit SubDim te As TextBoxFor Each te In Me.Text1Set te.DataSource = adNextCombo2.ClearSet ad1 = New Recordsetad1.Open "select subject from q_s_bat where stud_id='" + ListView1.SelectedItem + "'", db, adOpenStatic, adLockOptimisticFor i = 1 To ad1.RecordCountCombo2.AddItem ad1.Fields(0).Valuead1.MoveNextNextEnd Sub
QUERY BATCHDim WithEvents ad As Recordset, db As Connection, i As Integer
Private Sub list_fun(st As String)Dim lit As ListItemListView1.ListItems.ClearSet ad = New RecordsetSelect Case stCase "all":ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud from q_batch", db, adOpenStatic, adLockOptimisticCase "SUBJECT"ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud from q_batch where subject='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticCase "TEACHER":ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud from q_batch where teach_id='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticCase "DAYS"ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud from q_batch where days='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticCase "TIMING"
ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud from q_batch where time='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticCase "HOURS":ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud from q_batch where hours='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticCase "EXPIRED ON"ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud from q_batch where valid_upto='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticEnd SelectIf ad.RecordCount = 0 Then Exit SubFor i = 1 To ad.RecordCountSet lit = ListView1.ListItems.AddListView1.ListItems(i).Text = ad.Fields(0).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(4).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(5).Valuead.MoveNextNextEnd Sub
Private Sub cmdsearch_Click()If Text2.Text = "" Then Exit SubListView1.ListItems.ClearSet ad = New RecordsetSelect Case Combo1.TextCase "ID":ad.Open "select * from q_batch where batch_id='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticCase "SUBJECT"ad.Open "select * from q_batch where subject='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticCase "TEACHER":ad.Open "select * from q_batch where teach_id='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticCase "DAYS"ad.Open "select * from q_batch where subject='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticCase "TIMING"ad.Open "select * from q_batch where time='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticCase "HOURS":
ad.Open "select * from q_batch where hours='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticCase "EXPIRED ON"ad.Open "select * from q_batch where valid_upto='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticEnd SelectIf ad.RecordCount = 0 Then Exit SubIf ad.RecordCount > 1 Thenlist_fun (Combo1.Text)Exit SubEnd IfDim te As TextBoxFor Each te In Me.Text1Set te.DataSource = adNextEnd Sub
Private Sub cmdall_Click()ListView1.ListItems.ClearCall list_fun("all")End Sub
Private Sub Form_Load()Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_dListView1.View = lvwReportListView1.ColumnHeaders.Add 1, "ID", "ID"ListView1.ColumnHeaders(1).Width = 500ListView1.ColumnHeaders.Add 2, "subject", "Subject"ListView1.ColumnHeaders.Add 3, "teach_id", "Teach Id"ListView1.ColumnHeaders.Add 4, "valid_upto", "Expired On"ListView1.ColumnHeaders.Add 5, "max", "Max Size"ListView1.ColumnHeaders.Add 6, "no_stu", "No of Student"End Sub
Private Sub ListView1_dblClick()Set ad = New Recordsetad.Open "select * from q_batch where batch_id='" & ListView1.SelectedItem & "'", db, adOpenStatic, adLockOptimisticIf ad.RecordCount = 0 Then Exit SubDim te As TextBox
For Each te In Me.Text1Set te.DataSource = adNextEnd Sub
QUERY TEACHERDim db As Connection, WithEvents ad As Recordset, i As Integer
Private Sub list_fun(st As String)Dim lit As ListItemListView1.ListItems.ClearSet ad = New RecordsetIf st = "all" Thenad.Open "select teach_id,f_name,l_name,qualification from q_teacher", db, adOpenStatic, adLockOptimisticElsead.Open "select teach_id,f_name,l_name,qualification from q_teacher where " & st & " ='" + Text2.Text + "'", db, adOpenStatic, adLockOptimisticEnd IfFor i = 1 To ad.RecordCountSet lit = ListView1.ListItems.AddListView1.ListItems(i).Text = ad.Fields(0).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).Valuead.MoveNextNextEnd Sub
Private Sub combo_fun()Set ad = New Recordsetad.Open "select batch_id,subject from q_bat_teach where teach_id='" & Text1(0).Text & "'", db, adOpenStatic, adLockOptimisticIf ad.RecordCount = 0 ThenCommand3.Visible = FalseCombo2.Visible = FalseCombo3.Visible = FalseLabel11.Visible = FalseLabel12.Visible = FalseExit SubElse
Command3.Visible = TrueCombo2.Visible = TrueCombo3.Visible = TrueLabel11.Visible = TrueLabel12.Visible = TrueEnd IfCombo2.ClearCombo3.ClearFor i = 1 To ad.RecordCountCombo2.AddItem ad.Fields(1).ValueCombo3.AddItem ad.Fields(0).Valuead.MoveNextNextEnd Sub
Private Sub Combo1_Click()If Combo1.Text = "ID" Or Combo1.Text = "BATCH" ThenListView1.Visible = FalseElseListView1.Visible = TrueEnd IfEnd Sub
Private Sub cmdall_Click()List1.ClearSet ad = New RecordsetIf Combo1.Text = "ID" Thenad.Open "select teach_id from q_teacher", db, adOpenStatic, adLockOptimisticFor i = 1 To ad.RecordCountList1.AddItem ad.Fields(0).Valuead.MoveNextNextcmdall.Visible = FalseList1.Visible = TrueElseIf Combo1.Text = "NAME" ThenCall list_fun("all")End IfEnd Sub
Private Sub cmdsearch_Click()Dim st As StringSet ad = New RecordsetIf Text2.Text = "" Then Exit SubIf Combo1.Text = "ID" Then
ad.Open "select * from q_teacher where teach_id='" + Text2.Text + "'", db, adOpenStatic, adLockOptimisticElseIf Combo1.Text = "NAME" Thenad.Open "select * from q_teacher where f_name='" + Text2.Text + "'", db, adOpenStatic, adLockOptimisticElseIf Combo1.Text = "QUALIFICATION" Thenad.Open "select * from q_teacher where qualification='" + Text2.Text + "'", db, adOpenStatic, adLockOptimisticElseIf Combo1.Text = "BATCH" Thenad.Open "select * from q_teach_batch where batch_id='" + Text2.Text + "'", db, adOpenStatic, adLockOptimisticEnd IfIf Combo1.Text = "NAME" Thenst = "f_name"ElseIf Combo1.Text = "QUALIFICATION" Thenst = "qualification"End IfIf ad.RecordCount = 0 ThenExit SubElseIf ad.RecordCount > 1 ThenCall list_fun(st)Exit SubEnd IfDim te As TextBoxFor Each te In Me.Text1Set te.DataSource = adNextCall combo_funEnd Sub
Private Sub Command3_Click()Set ad = New Recordsetad.Open "select pay_id,pay_date,salary_amt from q_sal_teach where teach_id='" & Text1(0).Text & "' and batch_id='" & Combo3.Text & "'", db, adOpenStatic, adLockOptimisticIf ad.RecordCount = 0 ThenMsgBox "PAID", vbOKOnly + vbInformation, "coaching center"For i = 0 To 2Text3(i).Visible = FalseNextLabel13.Visible = FalseLabel14.Visible = FalseLabel15.Visible = FalseExit Sub
ElseDim te As TextBoxFor Each te In Me.Text3Set te.DataSource = adNextFor i = 0 To 2Text3(i).Visible = TrueNextLabel13.Visible = TrueLabel14.Visible = TrueLabel15.Visible = TrueEnd IfEnd Sub
Private Sub Form_Load()Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_dListView1.View = lvwReportListView1.ColumnHeaders.Add 1, "ID", "ID"ListView1.ColumnHeaders(1).Width = 500ListView1.ColumnHeaders.Add 2, "f_name", "F_Name"ListView1.ColumnHeaders.Add 3, "l_name", "L_Name"ListView1.ColumnHeaders.Add 4, "qualification", "Qualification"End Sub
Private Sub List1_Click()Text2.Text = List1.TextList1.Visible = Falsecmdall.Visible = TrueEnd Sub
Private Sub ListView1_dblClick()Set ad = New Recordsetad.Open "select * from q_teacher where teach_id='" + ListView1.SelectedItem + "'", db, adOpenStatic, adLockOptimisticIf ad.RecordCount = 0 Then Exit SubDim te As TextBoxFor Each te In Me.Text1Set te.DataSource = adNextCall combo_fun
End Sub
QUERY STAFFDim db As Connection, WithEvents ad As Recordset, i As Integer
Private Sub list_fun(st As String)Dim lit As ListItemListView1.ListItems.ClearSet ad = New RecordsetSelect Case stCase "all":ad.Open "select staff_id,f_name,l_name,address,designation from q_staff", db, adOpenStatic, adLockOptimisticCase "NAME":ad.Open "select staff_id,f_name,l_name,address,designation from q_staff where f_name='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticCase "DESIGNATION":ad.Open "select staff_id,f_name,l_name,address,designation from q_staff where designation='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticEnd SelectFor i = 1 To ad.RecordCountSet lit = ListView1.ListItems.AddListView1.ListItems(i).Text = ad.Fields(0).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(4).Valuead.MoveNextNextEnd Sub
Private Sub cmdall_Click()Call list_fun("all")End Sub
Private Sub cmdsearch_Click()Dim i As Integer, lit As ListItem, st As StringListView1.ListItems.ClearIf Text2.Text = "" Then Exit SubSet ad = New RecordsetIf Combo1.Text = "ID" Then
ad.Open "select * from q_staff where staff_id='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticElseIf Combo1.Text = "NAME" Thenad.Open "select * from q_staff where f_name='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticst = "NAME"ElseIf Combo1.Text = "DESIGNATION" Thenad.Open "select * from q_staff where designation='" & Text2.Text & "'", db, adOpenStatic, adLockOptimisticst = "DESIGNATION"End IfIf ad.RecordCount = 0 ThenExit SubElseIf ad.RecordCount > 1 ThenCall list_fun(st)Exit SubEnd IfDim te As TextBoxFor Each te In Me.Text1Set te.DataSource = adNextEnd Sub
Private Sub Form_Load()Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_dListView1.View = lvwReportListView1.ColumnHeaders.Add 1, "ID", "ID"ListView1.ColumnHeaders(1).Width = 500ListView1.ColumnHeaders.Add 2, "f_name", "F_Name"ListView1.ColumnHeaders.Add 3, "l_name", "L_Name"ListView1.ColumnHeaders.Add 4, "address", "Address"ListView1.ColumnHeaders.Add 5, "designation", "Designation"End Sub
Private Sub ListView1_dblClick()Set ad = New Recordsetad.Open "select * from q_staff where staff_id='" & ListView1.SelectedItem & "'", db, adOpenStatic, adLockOptimisticIf ad.RecordCount = 0 Then Exit SubDim te As TextBox
For Each te In Me.Text1Set te.DataSource = adNextEnd Sub
STUDENT REPORTSDim WithEvents ad As Recordset, db As Connection, i As Integer
Private Sub Combo1_Click()If Combo1.Text = "ID" Thencmdall.Visible = Falsecmdgenerate.Visible = TrueElsecmdall.Visible = Truecmdgenerate.Visible = FalseEnd IfEnd Sub
Private Sub cmdgenerate_Click()If Text1.Text = "" Then Exit SubIf Combo1.Text = "ID" Thendatae.stu_pro (Text1.Text)stud_profile.ShowEnd IfEnd Sub
Private Sub cmdall_Click()Dim i As IntegerDim lv As ListItemSet ad = New Recordsetad.Open "select stud_id,f_name,l_name,class,school from student", db, adOpenStatic, adLockOptimisticIf ad.RecordCount = 0 Then Exit SubFor i = 1 To ad.RecordCountSet lv = ListView1.ListItems.AddListView1.ListItems(i).Text = ad.Fields(0).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(4).Valuead.MoveNext
NextListView1.Enabled = TrueEnd Sub
Private Sub cmdsearch_Click()Dim i As IntegerDim lv As ListItemSet ad = New RecordsetSelect Case Combo1.TextCase "NAME":ad.Open "select stud_id,f_name,l_name,class,school from student where f_name='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticCase "CLASS"ad.Open "select stud_id,f_name,l_name,class,school from student where class='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticCase "SCHOOL"ad.Open "select stud_id,f_name,l_name,class,school from student where school='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticEnd SelectIf ad.RecordCount = 0 Then Exit SubFor i = 1 To ad.RecordCountSet lv = ListView1.ListItems.AddListView1.ListItems(i).Text = ad.Fields(0).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(4).Valuead.MoveNextNextListView1.Enabled = TrueEnd Sub
Private Sub cmdclass_Click()If Text2.Text = "" Then Exit Subdatae.Class (Text2.Text)class_stud.ShowEnd Sub
Private Sub cmdallstud_Click()all_stu.ShowEnd Sub
Private Sub cmdschoolstud_Click()If Text3.Text = "" Then Exit Sub
datae.school (Text3.Text)school_stu.ShowEnd Sub
Private Sub Form_Load()Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_dListView1.View = lvwReportListView1.ColumnHeaders.Add 1, "ID", "ID"ListView1.ColumnHeaders(1).Width = 500ListView1.ColumnHeaders.Add 2, "f_name", "F_Name"ListView1.ColumnHeaders.Add 3, "l_name", "L_Name"ListView1.ColumnHeaders.Add 4, "class", "Class"ListView1.ColumnHeaders.Add 5, "School", "School"End Sub
Private Sub ListView1_dblClick()datae.stu_pro (ListView1.SelectedItem.Text)stud_profile.ShowEnd Sub
BATCH REPORTSDim db As Connection, WithEvents ad As Recordset
Private Sub Combo1_Click()If Combo1.Text = "ID" Thencmdsearch.Visible = Falsecmdgenerate.Visible = TrueElsecmdgenerate.Visible = Falsecmdsearch.Visible = TrueEnd IfEnd Sub
Private Sub cmdgenerate_Click()If Text1.Text = "" Then Exit SubIf Combo1.Text = "ID" Thendatae.batch_detail (Text1.Text)
batch_d.ShowEnd IfEnd Sub
Private Sub cmdsearch_Click()Dim i As Integer, lit As ListItemListView1.ListItems.ClearIf Text1.Text = "" Then Exit SubSet ad = New RecordsetSelect Case Combo1.TextCase "SUBJECT"ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud from q_batch where subject='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticCase "TEACHER":ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud from q_batch where teach_id='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticCase "DAYS"ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud from q_batch where days='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticCase "TIMING"ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud from q_batch where time='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticCase "HOURS":ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud from q_batch where hours='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticCase "EXPIRED ON"ad.Open "select batch_id,subject,teach_id,valid_upto,max_limit,no_stud from q_batch where valid_upto='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticEnd SelectIf ad.RecordCount = 0 Then Exit SubFor i = 1 To ad.RecordCountSet lit = ListView1.ListItems.AddListView1.ListItems(i).Text = ad.Fields(0).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(4).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(5).Valuead.MoveNextNextListView1.Enabled = TrueEnd Sub
Private Sub cmdallbatch_Click()
all_batch.ShowEnd Sub
Private Sub cmdsubbatch_Click()If Text2.Text = "" Then Exit Subdatae.subject (Text2.Text)batch_sub.ShowEnd Sub
Private Sub cmdteachbatch_Click()If Text3.Text = "" Then Exit Subdatae.teach_id (Text3.Text)batch_teach.ShowEnd Sub
Private Sub Form_Load()Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_dListView1.View = lvwReportListView1.ColumnHeaders.Add 1, "ID", "ID"ListView1.ColumnHeaders(1).Width = 500ListView1.ColumnHeaders.Add 2, "subject", "Subject"ListView1.ColumnHeaders.Add 3, "teach_id", "Teach Id"ListView1.ColumnHeaders.Add 4, "valid_upto", "Expired On"ListView1.ColumnHeaders.Add 5, "max", "Max Size"ListView1.ColumnHeaders.Add 6, "no_stu", "No of Student"End Sub
Private Sub ListView1_dblClick()datae.batch_detail (ListView1.SelectedItem)batch_d.ShowEnd Sub
TEACHER REPORTSDim WithEvents ad As Recordset, db As Connection
Private Sub Combo1_Click()If Combo1.Text = "ID" Then
cmdsearch.Visible = Falsecmdgenerate.Visible = TrueElsecmdsearch.Visible = Truecmdgenerate.Visible = FalseEnd IfEnd Sub
Private Sub cmdgenerate_Click()If Text1.Text = "" Then Exit SubIf Combo1.Text = "ID" Thendatae.teacher_pro (Text1.Text)teach_pro.ShowEnd IfEnd Sub
Private Sub cmdsearch_Click()Dim lit As ListItem, i As IntegerListView1.ListItems.ClearSet ad = New RecordsetIf Combo1.Text = "NAME" Thenad.Open "select * from q_teacher where f_name='" + Text1.Text + "'", db, adOpenStatic, adLockOptimisticElseIf Combo1.Text = "QUALIFICATION" Thenad.Open "select * from q_teacher where qualification='" + Text1.Text + "'", db, adOpenStatic, adLockOptimisticElseIf Combo1.Text = "BATCH" Thenad.Open "select * from q_teach_batch where batch_id='" + Text1.Text + "'", db, adOpenStatic, adLockOptimisticElseIf Combo1.Text = "SUBJECT" Thenad.Open "select * from q_teach_batch where subject='" + Text1.Text + "'", db, adOpenStatic, adLockOptimisticEnd IfIf ad.RecordCount = 0 Then Exit SubFor i = 1 To ad.RecordCountSet lit = ListView1.ListItems.AddListView1.ListItems(i).Text = ad.Fields(0).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(4).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(5).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(6).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(7).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(8).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(9).Valuead.MoveNextNextListView1.Enabled = TrueEnd Sub
Private Sub cmdallteach_Click()all_teach.ShowEnd Sub
Private Sub cmdqualif_Click()If Text2.Text = "" Then Exit Subdatae.teach_qual (Text2.Text)teach_qual.ShowEnd Sub
Private Sub cmdsubjteach_Click()If Text3.Text = "" Then Exit Subdatae.teach_subj (Text3.Text)teach_sub.ShowEnd Sub
Private Sub Form_Load()Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_dListView1.View = lvwReportListView1.ColumnHeaders.Add 1, "ID", "ID"ListView1.ColumnHeaders(1).Width = 500ListView1.ColumnHeaders.Add 2, "f_name", "F_Name"ListView1.ColumnHeaders.Add 3, "l_name", "L_Name"ListView1.ColumnHeaders.Add 4, "address", "Address"ListView1.ColumnHeaders.Add 2, "gender", "Gender"ListView1.ColumnHeaders.Add 3, "dob", "DOB"ListView1.ColumnHeaders.Add 4, "father", "Father's Name"ListView1.ColumnHeaders.Add 2, "resi_pho", "Resi Pho"ListView1.ColumnHeaders.Add 3, "mibile", "Mobile"ListView1.ColumnHeaders.Add 4, "qualification", "Qualification"End Sub
Private Sub ListView1_dblClick()
datae.teacher_pro (ListView1.SelectedItem)teach_pro.ShowEnd Sub
STAFF REPORTSDim WithEvents ad As Recordset, db As Connection
Private Sub Combo1_Click()If Combo1.Text = "ID" Thencmdsearch.Visible = Falsecmdgenerate.Visible = TrueElsecmdsearch.Visible = Truecmdgenerate.Visible = FalseEnd IfEnd Sub
Private Sub cmdgenerate_Click()If Text1.Text = "" Then Exit SubIf Combo1.Text = "ID" Thendatae.staff_profile (Text1.Text)staff_pro.ShowEnd IfEnd Sub
Private Sub cmdsearch_Click()Dim lit As ListItem, i As IntegerListView1.ListItems.ClearSet ad = New RecordsetIf Combo1.Text = "NAME" Thenad.Open "select * from q_staff where f_name='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticElseIf Combo1.Text = "DESIGNATION" Thenad.Open "select * from q_staff where designation='" & Text1.Text & "'", db, adOpenStatic, adLockOptimisticEnd IfIf ad.RecordCount = 0 Then Exit SubFor i = 1 To ad.RecordCountSet lit = ListView1.ListItems.AddListView1.ListItems(i).Text = ad.Fields(0).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(1).Value
ListView1.ListItems(i).ListSubItems.Add , , ad.Fields(2).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(3).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(4).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(5).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(6).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(7).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(8).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(9).ValueListView1.ListItems(i).ListSubItems.Add , , ad.Fields(10).Valuead.MoveNextNextListView1.Enabled = TrueEnd Sub
Private Sub cmdallstaff_Click()If Text2.Text = "" Then Exit Subdatae.st_designation (Text2.Text)staf_desig.ShowEnd Sub
Private Sub cmddesig_Click()all_staff.ShowEnd Sub
Private Sub Form_Load()Dim path_d As Stringpath_d = "PROVIDER=Microsoft.jet.oledb.4.0; data source=" & App.Path & "\database\stud_data.mdb;"Set db = New Connectiondb.Open path_dListView1.View = lvwReportListView1.ColumnHeaders.Add 1, "ID", "ID"ListView1.ColumnHeaders(1).Width = 500ListView1.ColumnHeaders.Add 2, "f_name", "F_Name"ListView1.ColumnHeaders.Add 3, "l_name", "L_Name"ListView1.ColumnHeaders.Add 4, "address", "Address"ListView1.ColumnHeaders.Add 5, "gender", "Gender"ListView1.ColumnHeaders.Add 6, "dob", "DOB"ListView1.ColumnHeaders.Add 7, "father", "Father's Name"ListView1.ColumnHeaders.Add 8, "resi", "Resi Phone"ListView1.ColumnHeaders.Add 9, "mob", "Mobile"ListView1.ColumnHeaders.Add 10, "salary", "Salary"ListView1.ColumnHeaders.Add 11, "designation", "Designation"End Sub
Private Sub ListView1_dblClick()datae.staff_profile (ListView1.SelectedItem)staff_pro.ShowEnd Sub
Snapshots
LOGIN SCREEN
MAIN MENU
STUDENT SIDEBAR
BATCH SIDEBAR
TEACHER SIDEBAR
STAFF SIDEBAR
TRANSACTION SIDEBAR
QUERIES SIDEBAR
REPORTS SIDEBAR
PASSWORD SCREEN
DATABASE SCREEN
ADD STUDENT
EDIT STUDENT
DELETE STUDENT
NEW BATCH
EDIT BATCH
DELETE BATCH
ADD TEACHER
EDIT TEACHER
DELETE TEACHER
ADD STAFF
EDIT STAFF
DELETE STAFF
FEE
SALARY
QUERY STUDENT
QUERY BATCH
QUERY TEACHER
QUERY STAFF
STUDENT REPORTS
BATCH REPORTS
TEACHER REPORTS
STAFF REPORTS
Chapter 5
Testing & Test Result
5.1 Software Testing
Software testing is a critical element of software quality assurance and
represents the ultimate review of specification, design and code generation.
It is the process of executing program with the intention of finding errors.
However, testing cannot show the absence of errors, it can only show that
errors are present. According to this definition, there is a fundamental entity
‘errors are present within the software under test’. Software testing is
becoming so increasingly important in the earlier part of software life cycle,
aiming to discover errors before they are deeply embedded within the
systems.
5.1.1 Why should we test?
Although software testing is itself an expensive activity, yet launching of
software without testing may lead to cost potentially much higher than that
of testing, specially in systems where human safety is involved.
In most systems, however, it is the cost factor which plays a major role. It is
both that driving force and limiting factor as well. In the software life cycle
the earlier the errors are discovered and removed, the lower is the cost of
their removal. The most damaging errors are those, which are not discovered
during the testing process and therefore remain when the system ‘goes live’.
5.1.2 What should we test?
The essence of software testing is to determine a set of test cases for the item
being tested. A test case has an identity, and is associated with program
behavior. A good test case is one that has a high probability of finding an as
yet discovered error. A successful test case unearths an undiscovered error.
A test case has a set of inputs, a list of expected outputs. Inputs are of two
types- pre conditions and the actual inputs that are identified by some testing
methods. Expected outputs are also of two types- post conditions and actual
outputs.
5.1.3 Testing Principles
1) All tests should be traceable to customer requirements.
2) Test should be planned long before testing begins.
3) Testing should begin “in the small” and progress toward testing “in
the large”.
4) Exhaustive testing is not possible.
5) To be most effective, testing should be conducted by an independent
third party.
5.2 Testing criteria
5.2.1 Functional testing
Testing based on the functionality of the program is known as functional
testing. Thus, functional testing refers to testing, which involves only
observing the output for certain input values. There is no need to analyze the
code, which produces the output. Therefore, functional testing is also
referred to black box testing, which contents of the black box are not
known. Functionality of the black box is understood completely in terms of
its inputs & outputs as shown in fig below. Here we are interested in
functionality rather than internal structure of the code.
Functional testing can be done in the following ways:-
1. Boundary value analysis.
2. Equivalence class testing.
3. Decision table testing.
4. Cause effect graphing technique.
5.2.2 Structural testing
System under test
Output test data
Input test data
Structural testing permits us to examine the internal structure of the
program. Here, we do not pay attention to specifications. Therefore, it is also
known as white box testing. The knowledge to the internal structure of the
code can be used to find the number of test cases required to guarantee a
given level of test coverage.
Structural testing can be performed in following ways:-
1. Path testing.
2. Graph testing.
3. Data flow testing.
4. Mutation testing.
5.2.3 Unit testing
Testing in general cannot be expected to catch every error in the program.
The same is true for unit testing. By definition, it only tests the functionality
of the units themselves. Therefore, it may not catch integration errors,
performance problems or other system-wide issues. In addition, for any non-
trivial system, it is not feasible to anticipate and test all possible inputs to the
program unit under study. Unit testing is more effective if it is used in
conjunction with other software testing activities.
It is unrealistic to test all possible input combinations for any non-trivial
piece of software. Like all forms of software testing, unit tests can only show
the presence of errors; it cannot show the absence of errors.
To obtain the intended benefits from unit testing, a rigorous sense of
discipline is needed throughout the software development process. It is
essential to keep careful records, not only of the tests that have been
performed, but also of all changes that have been made to the source code of
this or any other unit in the software. Use of a version control system is
essential. If a later version of the unit fails a particular test that it had
previously passed, the version-control software can provide a list of the
source code changes (if any) that have been applied to the unit since that
time.
5.2.4 System testing
System testing of software is testing conducted on a complete, integrated
system to evaluate the system's compliance with its specified requirements.
System testing falls within the scope of black box testing, and as such,
should require no knowledge of the inner design of the code or logic.
As a rule, system testing takes, as its input, all of the "integrated" software
components that have successfully passed integration testing and also the
software system itself integrated with any applicable hardware system(s).
The purpose of integration testing is to detect any inconsistencies between
the software units that are integrated together (called assemblages) or
between any of the assemblages and the hardware. System testing is a more
limiting type of testing; it seeks to detect defects both within the "inter-
assemblages" and also within the system as a whole.
5.2.5 Integration testing
Integration testing (sometimes called Integration and Testing, abbreviated
I&T) is the phase of software testing in which individual software modules
are combined and tested as a group. It follows unit testing and precedes
system testing.
Integration testing takes as its input modules that have been unit tested,
groups them in larger aggregates, applies tests defined in an integration test
plan to those aggregates, and delivers as its output the integrated system
ready for system testing.
The purpose of integration testing is to verify functional, performance and
reliability requirements placed on major design items. These "design items",
i.e. assemblages (or groups of units), are exercised through their interfaces
using black box testing, success and error cases being simulated via
appropriate parameter and data inputs. Simulated usage of shared data areas
and inter-process communication is tested and individual subsystems are
exercised through their input interface. Test cases are constructed to test that
all components within assemblages interact correctly, for example across
procedure calls or process activations, and this is done after testing
individual modules, i.e. unit testing.
Chapter 6
REPORTS
Student Report
List of Students
Conclusion
This project is use to meet the requirement of the institute. It has been
developed using Microsoft visual basic 6.0 and Microsoft Access keeping in
mind the specification of the system. All the expectation of institution is
met.
All the problem that were listed in the problem definition have been
corrected and certain extra features have been added to make sure changes
can be incorporated to the system at latter stages.
Overall the project teaches us the essential skills like:
1. Using system analysis and design techniques like data flow diagram in
designing the system.
2. Understanding Microsoft visual basic 6.0 and Microsoft Access.
Future Scope of the Project
The future scope of the application is very vast, the project may include the
graphical tools, charts graph etc. which can give a visual effect & one can
easily find out one of the things at just one view only.
This application is very useful for any organization, which can be access on
the intranet. All the project details are stored in the database & displays to
the manager very easily, by which he or she can manage his task & team
members very easily.
This project maintains huge database; the user has to take the large database
like SQL server or Oracle.
BIBLOGRAPHY
Names of some of the books / publications referred to are mentioned:
Name of the Author: K.K. AGGARWAL
Name of the Book: SOFTWARE ENGINEERING
Publisher: NEW AGE INTERNATIONAL PUBLISHERS
Name of the Author: PRESSMAN
Name of the Book: SOFTWARE ENGINEERING
Publisher: WILSON PUBLICATIONS
Name of the Author: EVANGELOS PETRONTSOS
Name of the Book: MASTERING VB 6
Publisher: BPB PUBLICATIONS
Name of the Author: SUSAN SALES HARKINS
Name of the Book: USING MS ACCESS 2000
Publisher: PRENTICE HALL INDIA
Name of the Author: STEVEN HOLZNER
Name of the Book: VISUAL BASIC 6 PROGRAMMING
Publisher: DREAMTECH PRESS