Sie sind auf Seite 1von 183

INTRODUCTION AND OBJECTIVES OF THE

PROJECT

BRIEF ABOUT THE ORGANISATION:

Unity Public School is situated in Ekta Vihar, MDA Colony, Near


Prem Wonder Land, Rampur Road, Moradabad. The school is recognized
by U.P. Govt. It is running since last three years from class Nursery to
VIIIth under administrative control of Smt. Khurshid Jafri.

At present the school management and its all procedures are totally
manual based. It creates a lot of problems due to wrong entries or mistakes
in totaling etc. This system avoided such mistakes through proper checks
and validation control methods in checking of student record, fee deposit
particulars, teachers schedule, examination report, issue of transfer
certificates etc. I met personally to the principal and manager and discuss
about the computerization of manual school management system. This
system registers a student and confirms its admission in school. When a
student registers in school a S.R. No (unique ID) is allotted to student.
Student record is based on his/ her S.R. No.

OBJECTIVE:
The objective of developing such a computerization system is to
reduce the paper work and safe of time in school management. There by
increasing the efficiency and decreasing the work load.

The project provides us the information about student record, school


faculty, school timetable, school fee, school examination result and library
management. The system must provide the flexibility of generating the
required documents on screen as well as on printer as and when required.
PROJECT DESCRIPTION:

The school management process can be described using different


modules. Each of the module performs a different function.

SCHOOL MANAGEMENT SYSTEM

Student School Faculty Time Examination Library


Record Fee Profile Table Result Management

(a) Student Record:

We can easily find out the details of student alongwith his


photograph by entering his/her S.R. No.

(b) School Fee:

We can find out the fee structure of every class and the fee for
student whether the student has paid fee or not. If he/ she has not paid
school fee within prescribed period, he / she should have to pay penalty.

(c) Faculty Profile:

We can easily find out the description about the teacher posted
in school .

(d) Time Table:


We can search out the name of teacher and subject in particular
class at a particular time .

(e) Examination Result:

We can check the performance of students during the particular


year . On passing the particular class , student record and student TC is
updated .

(f) Library Management:

Library management process updates the library database. It gives


information about a particular book when issued to the student and when it
is taken back.

SCOPE:

The scope of the school management system facilitate us in the


following jobs :-
Maintaining Student Records
Automatic Preparation of Marksheet
Automatic updation in student TC
Library Managenent
PROJECT CATEGORY:

The Project is functioning under the RDBMS (Relational


Database Management System) category of the software which
handles the database of all the students and staff. It uses object
oriented programming technology to develop the system .
ANALYSIS :

Necessary DFDs and ER Diagram are attached herewith.

(i) DFDs:

During analysis phase of SDLC (Software Development Life Cycle),


the system analyst or other members of the project team draw many
diagrams to show how data move within an organization. These diagrams,
popularly called as DFD (Data Flow Diagram), quickly convey to both the
software developers and users how the current system is working and how
the proposed system will work. The main advantage of DFD is that they are
easily understood by the users and hence users can suggest modifications in
the proposed system.

In Data Flow Diagram (DFD) we have used four types of symbols as


described below: -

DFD Symbol:

Stands For Symbols

Source or Destination of Data


Rectangle Square
Flow of Data

Process which transforms Rounded


Circle Oval Rectangle

Store of Data

We consider three levels of DFDs

Level 0 DFD

Level 1 DFD

Level 2 DFD

DFD Level 0

CFD (Context Flow Diagram)


or
CAD (Context Analysis Diagram)

Student or
Fee Applicant
Depos
it
Admi Book
ssion Fee Reque
Form Depos st
it Issue/
Retur
Valid/
n
Invali
Repor
d
t
School
Managemen
t System

Reports

ADMINISTRATOR
DFD level 0 (Context Level)

DFD Level 1
L i b r a r y I n f

. 0 2
L i b r a r y
S t u d e n t R e c oM r d a n a g e m e n t
P r o c e s s

1 . 0
S t u d e nS t t u d e n t M aF s e t ee r D F a i tl ae b
A d m i s s i o n a
P r o c e s s

F e e S t r u c t u r e

M a r k s D a t a b a s e

M o n t h l y F
4 . 0 R e c o r d
E x a m i n a t i o n

3 . 0
T C D a t a b a s e M o n t h l y F e e
5 . 0 C o l l e c t i o n
T C R e c o r d
U p d a t i o n

Data Flow Diagram Level 1


DFD LEVEL 2 School Management Process

S t u d e n t R e c o r d
S t u d e n t R e c o r d

S tu d e n t D e ta il
1 . 1
1 . 2
U p d a tio n R e q u e s t

C o n f i r m
R e g i s t r a t i o nA d m i s s i o n
M ark s

E n t r y R e j e c tC i o o n n f i r m
T C G iv e n b y S c h o o l

F e e D a t a b a s
A d m i s s i o n D e t a i l

F e e B i l l D e t a
F e e S t r u c t u r e
S tu d e n t D e ta il

M a r k s D a t a b a s e
1 . 3
F e e B i l l
G e n e r a t i

1 . 5

B ill D e ta ils
S t u d e n t D e t a i l
E x a m i n a t i o n S t u d e n t M a s t e r F i l e

M o n t h l y F e e
T C D a t a b a s e
F e e D e ta ils
T C D e ta il

1 . 6 1 . 4
T C R e c o r d M o n t h l y F e e
U p d a t i o n C o l l e c t i o n
Data Flow Diagram Level 2 for School Management Process
DFD LEVEL 2 Library Management Process
N e w B o o k E n t r y

B o o k D e ta ils
B o o k D a t a b a s e
C h a n g e S ta tu s In fo ra m tio n

C h a n g e S ta tu s In fo ra m tio n
F e e D a t a b a s e
B o o k D e ta ils

F in e D e ta ils
S t u d e n t D a t a b a s e

S t u d e nS t t u d e n t
. 1 2 2
D e t a i l D e t a i l
. 2
I s s u e R e t u r n

I s s u e B o Ro ke t u r n B o o k
D e t a i l D e t a i l

I s s u e D a t a b a s e

Data Flow Diagram Level 2 for Library Management Process

E-R Diagram:
B o o k _ I Sd R _ N o . B o o k _ T i t l e

B o o k _ I d A u t h o r

H a s S t u _ L i b _ R K e ec eo pr d s L i b _ I n f o

P u b l i c a t i o n

N a m e T u i t i o n T _ o F t ea e l _ F e e

S R _ N o . C l a s s C l a s s E x a m _ F e e

S t u d e n t _ R S e e c a o r cr dh F e e _ S t r u S c R t u_ Nr e o .

A p p e a r sF e e S R _ N o . D a t e
P a i d

S t u d e n t _ F e e
S R _ N o .

S u b j e c t B a l a n c e

E x a m

T C _ S t a t u s

Entity Relationship Diagram for School Management System

COMPLETE STRUCTURE OF THE PROGRAM:

No. of Modules used and their functions :


The school management system of Unity Public School is divided
into six parts: -
(a) Student Record

(b) School Fee

(i) Fee Structure


(ii) Student Fee

(c) Faculty Profile

(d) School Time Table

(e) Examination Result

(f) Library Management

(a) Student Record:


S. No. Field Data Type Size Constraint
1. Student_Name Varchar 16 Not Null
2. Student_Fathers_Name Varchar 16 Not Null
3. Student_Mothers_Name Varchar 16 Not Null
4. Fathers_Occupation Varchar 16 Null
5. Mothers_Occupation Varchar 16 Null
6. Student_S.R._Number (Primary) Varchar 05 Not Null
7. Student_DOB Numeric 08 Not Null
8. Student_Sex Text 02 Not Null
9. Student_Caste Text 08 Not Null
1 Student_Photo Blob 20 Not Null

0.
1 Student_Address Varchar 30 Not Null

1.
1 Student_Phone_No. Numeric 10 Null

2.
1 Date_of_Admission Numeric 08 Not Null

3.
1 Student_Class_No. (Ref. Key) Numeric 02 Not Null

4.
1 Student_Status Varchar 07 Not Null

5.

(b -i) Fee Structure:


S. No. Field Data Type Size Constraint
1. Class_No. Numeric 02 Not Null
2. Tution_Fee Numeric 03 Not Null
3. Annual_Fee_Amount Numeric 03 Null
4. Exam_Fee_Amount Numeric 03 Null
5. Conveyance_Fee_Amount Numeric 03 Null
6. Total_Fee_Amount Numeric 04 Not Null

(b ii) Student Fee:

S. No. Field Data Type Size Constraint


1. Student_S.R. No.(F.K.) Numeric 05 Not Null
2. AnnualFee_Dep_Date Numeric 08 Not Null
3. Fee_Amount_Paid Numeric 04 Not Null
4. Balance_Fee Numeric 04 Not Null
5. TutionFee_DepDate Numeric 08 Not Null
6. TutionFee_AmountPaid Numeric 04 Not Null
7. TutionFee_Balance Numeric 04 Not Null
8. ExamFee_DepositeDate Numeric 08 Not Null
9. ExamFee_AmountPaid Numeric 04 Not Null
1 ExamFee_Balance Numeric 04 Not Null

0.
1 ConveyanceFee_DepDate Numeric 08 Not Null

1.
1 ConveyanceFee_AmtPaid Numeric 04 Not Null

2.
1 ConveyanceFee_Balance Numeric 04 Not Null

3.
1 Total_Amount_Paid Numeric 04 Not Null
1 Total_Amount_Balance Numeric 04 Not Null

5.

(c) Faculty Profile:

S. No. Field Data Type Size Constraint


1. Teachers_Name Varchar 20 Not Null
2. Teachers_Qualification Varchar 20 Not Null
3. Teachers_DOB Numeric 08 Not Null
4. Teachers_Sex Varchar 02 Not Null
5. Teachers_Photo Blob 40 Null
6. Teachers_Address Varchar 30 Null
7. Teachers_Phone No. Numeric 10 Null
.
8. Teachers_Date of Joining Numeric 08 Null
9. Teachers_Salary Numeric 04 Null
1 Teachers_Subject1 Varchar 12 Null
0.
1 Teachers_Subject2 Varchar 12 Null
1.
1 Teachers_Subject3 Varchar 12 Null
2.
1 Teachers_Subject4 Varchar 12 Null
3.
1 Teachers_Subject5 Varchar 12 Null
4.
1 Teachers_Subject6 Varchar 12 Null
5.
1 Teachers_Subject7 Varchar 12 Null
6.
(d) School Time Table :

S. No. Field Data Type Size Constraint


1.Subject_Name Varchar 12 Not Null
2.Subject_Code Varchar 06 Null
3.Total No._of_Periods Numeric 02 Null
4.Time_ slots Numeric 04 Null
5.Class_No._Section Varchar 04 Null
6.Teachers _Name Varchar 12 Null

(e) Examination Result:


S. No. Field Data Type Size Constraint
1. Student_S.R.No. (Reference Key) Varchar 04 Not Null
2. Student_ClassNo. Varchar 05 Not Null
3. Student_Name Char 15 Not Null
4. Stud_Fathers_Name Char 15 Null
5. Result_Status Char 4 Not Null
6. Result_Year Numeric 4 Not Null
7. TC_Status Boollean 1 Not Null

(f) Library Management:

S. No. Field Data Type Size Constraint


1. Book_Id Vanchar 05 Not Null
2. Book_Title Char 15 Not Null
3. Book_Author Char 15 Not Null
4. Publication Char 15 Null
5. Book_Issue Numeric 08 Null
6. Book_Return Numeric 08 Null
7. Book_subject Vanchar 15 Not Null
8. Book_Cost Numeric 04 Null
9. Book_Status Char 10 Null

TOOLS:
FRONT END / GUI TOOLs : Visual Basic 6.0

Visual Basic 6.0 :

We have selected Visual Basic 6.0 as our Front end . Visual


Basic is programming language . It is the most powerful object
oriented based language on 32 bit operating system . We find VB6
quite useful developing 32 bit GUI based application . In Visual
programming , mouse is used extensively , coding in VB is same as
writing programming statements for other languages . We selected VB
because of its simplicity of creating of reusable code libraries . VB
lets us mark objects in a code component as global so that their
methods can be invoked without explicitly creating an instance of the
global objects. By adding support for class modules the creation of
Active X (Com), DLL , EXEs , VB provides infrastructure of using an
object oriented technique , which being used in this project .

RDBMS / BACK END: SQL Server

SQL Server 2000:

We have selected SQL - Server 2000, i.e. an RDBMS package


for back end tool for managing the database as this allows users to
manage the database very efficiently and controls data redundancy and
inconsistency . It allows enforcing various data integrity constraints on
the data being entered into the tables. Database can be accessed using
GUI provided by the system . It is very easy to maintain . It is also
cheaper than other package .
SQL server is an RDBMS package as backend tool for
managing database as this allows users to manage the data base very
efficiently and controls data redundancy and inconsistency . It allows
enforcing various data integrity constraints on the data being entered
into the tables . Data-base can be accesses using many front tools and
it can be installed on a simply configured system.

OPERATING SYSTEM : WINDOWS

Environment

(NT , 2000 , XP)

Hardware Requirement (Minimum):

Any Pentium Processor.

128 MB RAM with 2.00 GB Hard Disk Free Space

1.44 MB Floppy Disk Drive

Monitor

Mouse

CD-ROM Drive

Printer

SECURITY MECHANISMS:

Security is provided at administrative and user level by introducing


the concept of passwords for authentification purpose.
Password is categorized as :

Administrator - Complete

User - Student Record Display

- Faculty Display

- Time Table read only

- Results Read only

FUTURE SCOPE, FURTHER ENHANCEMENT AND

LIMITATIONS:

This project will be useful for any schools and colleges with slightly
modification. It may be used for English Medium School as well as Hindi
Medium Schools. Project is flexible i.e. any change / modification in data
base may be perform easily. Also this project could be made web enabled.

This project may be upgraded with some more modules such as


sports module, prize module, student attendance module, employee salary
module, annually receipt and expenditure reports generation etc. This
project can also be made for multi-user environment.
PROCESS LOGIC
The process logic for our project is depending on program structure.

School Management System

Student Database Faculty Database School Fee Structure

Faculty Time Table Library System

Student Fee Record Student Transfer Class & Subject


Certificate Database

Student Result Student Result


Each sub modules of school management system requires sub-sub
modules or different functions, such student database has new student
entry, edit student record, delete student record. Faculty database also has
add, delete and modification functions. Once we have entered school fee
structure, we have maintained student fee record effectively. Student Result
is also has various options, such as individual result, class result, fail and
pass student record in each subject as well as in class. Also transfer
certificate will be made computerized. Another important module Library
management has also various sub-sub modules, such as new book entry,
search book, issue and return book, fine charges etc.

This project carried out for a full computerized school management


system. Most of the school function was computerized. This project will be
useful for all schools and colleges with some modification. The
modification is customized so it is not necessary to change complete
project. Project is customised i.e. any change / modification in data base
may be perform easily. Also we are trying to make this project web
enabled.
PROJECT
REPORT
ON
SCHOOL
MANAGEMENT
SYSTEM

CONTENTS
S. NO. PARTICULARS

1. Approval of Synopsis
2. Certificate of Originality

3. Acknowledgement

4. Introduction

5. Objective

6. System Analysis

7. Identification of Need

8. Preliminary Investigation

9. Feasibility Study

10. Software Engineering Paradigm Applied

11. Software & Hardware Requirement Specification

12. System Design

13. Code Efficiency

14. Optimization of Code

15. Validation Checks

16. Maintenance

17. System Testing

18. System Security Measures

19. Cost Estimation of Project

20. PERT Chart

21. Gantt Chart

22. Database

23. Forms

24. Coding
25. Bibliography

CERTIFICATE OF ORIGINALITY

This is to certify that the project entitled School Managrment System

submitted to Indira Gandhi National Open University is partial fulfillment of the

requirement for the award of the degree of MASTER IN COMPUTER


APPLICATIONS (MCA), is an original work carried out by Mr. Qadir Ahmad

Jafri Enrolment No. 042944248 under my guidance.

The matter embodied in this project is a genuine work done by the student

and has not been submitted whether to this University or to any other

University/Institute for the fulfillment of the requirement of any course of study.

Signature of Student: Signature of the Guide:


(Qadir Ahmad Jafri) (Rahul Kumar Mishra)
Enrol no. 042944248 Lecturer, I.F.T.M.
Moradabad Moradabad

ACKNOWLEDGEMENT

First and foremost, I would like to thank Mr. Rahul Kumar Mishra (my

honorable guide), Lecturer, Department of Computer Applications, IFTM, Moradabad,


for his prodigious, persuasions, painstaking, and attitude, reformative and prudential

suggestions throughout my project.

I am also greatly thankful to Mr. Avdhesh Gupta, lecturer for installing in me

a sense of self confidence and helping me as when I needed him.

Also my thanks to IGNOU study centre In charge, Dr. V.K. Vatsa, who gave

me the idea for this project. I would also thank to Mr. Jitendra Kumar Jindal, Mr.

Deepak Kumar Sharma, lecturers in IFTM and Mr. Ashwani Kumar, Mr. Sunil

Arora, lecturers in study centre IGNOU, for helping me in this project. They helped me

in developing such kind of LIVE Software.

Q. A. Jafri
MCA VI SEM.
042944248
INTRODUCTION

INTRODUCTION

Unity Public School is situated in Ekta Vihar, MDA Colony, Near


Prem Wonder Land, Rampur Road, Moradabad. The school is recognized
by U.P. Govt. It is running since last three years from class Nursery to
VIIIth under administrative control of Smt. Khurshid Jafri.
At present the school management and its all procedures are totally
manual based. It creates a lot of problems due to wrong entries or mistakes
in totaling etc. This system avoided such mistakes through proper checks
and validation control methods in checking of student record, fee deposit
particulars, teachers schedule, examination report, issue of transfer
certificates etc. I met personally to the principal and manager and discuss
about the computerization of manual school management system. This
system registers a student and confirms its admission in school. When a
student registers in school a S.R. No (unique ID) is allotted to student.
Student record is based on his/ her S.R. No.
OBJECTIVES

OBJECTIVES
The objective of developing such a computerization system is to
reduce the paper work and safe of time in school management. There by
increasing the efficiency and decreasing the work load.

The project provides us the information about student record, school


faculty, school timetable, school fee, school examination result and library
management. The system must provide the flexibility of generating the
required documents on screen as well as on printer as and when required.
PROJECT DESCRIPTION:

The school management process can be described using different


modules. Each of the module performs a different function.

SCHOOL MANAGEMENT SYSTEM

Student School Faculty Time Examination Library


Record Fee Profile Table Result Management

(a) Student Record:

We can easily find out the details of student alongwith his


photograph by entering his/her S.R. No.

(b) School Fee:

We can find out the fee structure of every class and the fee for
student whether the student has paid fee or not. If he/ she has not paid
school fee within prescribed period, he / she should have to pay penalty.

(c) Faculty Profile:

We can easily find out the description about the teacher posted
in school .

(d) Time Table:


We can search out the name of teacher and subject in particular
class at a particular time .

(e) Examination Result:

We can check the performance of students during the particular


year . On passing the particular class , student record and student TC is
updated .

(f) Library Management:

Library management process updates the library database. It gives


information about a particular book when issued to the student and when it
is taken back.

SYSTEM

ANALYSIS
SYSTEM ANALYSIS

System Analysis refers to the process of examining a situation with the intent of

improving it through better procedures and methods. System design is the process of

planning a new system to either replace or complement an existing system. But before

any planning is done, the old system must be thoroughly understood and the

requirements determined. System Analysis is therefore, the process of gathering and

interpreting facts, diagnosis problems and using the information to re-comment

improvements in the system. Or in other words, System Analysis means a detailed

explanation or description. Before computerizing a system under consideration, it has to

be analyzed. We need to study how it functions currently, what are the problems, and

what are the requirements that the proposed system should meet.

The main components of making software are:

System and software requirements analysis

Design and implementation of software

Ensuring, verifying and maintaining software integrity

System analysis is an activity that encompasses most of the tasks that are

collectively called Computer System Engineering. Confusion sometimes occurs because

the term is often used in context that all dues it only to software requirement analysis

activities, but system analysis focuses on all the system elements- not just software.

System analysis is conducted with the following objectives in mind:

Identify the customers need


Evaluate the system concept for feasibility

Perform economic and technical analysis

Allocate functions to hardware, software, people, database and other

system elements

Establish cost and schedule constraints

Create a system definition that forms the foundation for all the

subsequent engineering work.

System Analysis is consisting of two main works i.e. Identify the need and

Preliminary Investigation.

PHASE DEVELOPMENT PROCESS

A development process consists of various phases, each phase ending with a

defined output. The phases are performed in an order specified by the process model

being followed. The main reason for having a phased process is that it breaks the

problem of developing software into successfully performing a set of phases, each

handling a different concern of software development. It allows proper checking for

quality and progress for given software during development (end of phases). One phase

would have to wait until the end what software has been produced. This will not work

for large system. Hence for managing the complexity, project tracking, and quality, all

the development process consists of set of phases. Various process models have been

proposed for developing software. Each organization that follows a process has its own

version. The different process can have different activities.


In general, we can say that any problem solving in software must consist of these

activities:

Requirement specification for understanding and clearly stating the problem.

Design for deciding a plan for a solution.

Coding for implementing the planned solution

Testing for verifying the programs

For small problem these activities may not be clearly defined, and no written

record of the activities may be kept. But for the complex and large system where the

problem solving activity may last couple of years and where many persons are involved

in development, and each of these four problem solving activities has to be done

formally. Each of these activities is a major task for large software projects.
IDENTIFICATION

OF NEED
IDENTIFICATION OF THE NEED

REQUIREMENT ANALYSIS

Refines project goals into defined functions and operation of the intended

application. Analyzes end-user information needs. Analysis is a detail study of the

various operations performed by a system and their relationships within and outside the

system. The problem could be automating an existing manual process, developing a new

automated system, or a combination of the two. A key question is: what is needed for

the system, not how the system will achieve its goal. During analysis, data are collected

on the available files, decision points, and transactions handled by the present system.

For large systems that have many features, and that need to perform many different

tasks, understanding the requirements of the system is a major task. Data flow diagrams,

interviews, on-site observations, and questionnaires are the examples of requirement

analysis. Training, experience, and common sense are required for collection of the

information needed to do the analyst.

Once the analysis is completed, the analyst has a firm understanding of what is

to done. This task is complicated by the fact that there are often at least two parties

involved in software development-a client and a developer. The developer usually does

not understand the clients problem domain, and the client often does not understand the

issues in the software systems. This causes a communication gap between client and

developer. The goal of the requirement specification phase is to produce the software

requirements specification document (also called the requirement document). The

person responsible for the requirement analysis is often called the analyst.
There are two major activities in this phase: Problem understanding or analysis

and requirement specification. In problem analysis, the analyst has top understand the

problem and its context. Analysis requires a thorough understanding of the system, parts

of which have to be automated. The goal of this activity is to understand the requirement

of the new system that is to be developed. The client may not really know the need s of

the system. The analyst has to make the client aware of the new possibilities, helping

both client and the analyst the requirements for the new system.

Once the problem is analyzed and the essentials understood, the requirement is

specified in the requirement document. For requirement specification in the form of

document, some specification language has to be selected (e.g. English, regulates

expressions, tables, or combination of these). A preliminary user manual that describes

all the major uses interfaces frequently form a part of the requirement document.

The first step of system analysis process involves the identification of need. The

analyst (system engineer) meets with the customer & the end user (if different from

customer). Identification of need is the starting point in the evolution of a computer

based system. The analyst assists the customer on defining the goals of the system:

What information will be produced?

What information is to be provided?

What functions and performance are required?

The analyst makes sure to distinguish between customer needs and customer

wants. That is what the main aim behind the system is. Defining aim is very vital in

system work. If we do not know where we want to go, we will not know when we have

reached their. Once we know our aim, we can try to achieve it in the best possible way.
The user department has to define these objectives in terms of their needs. These

become the outputs which the system analyst keeps in to mind.

Once we know the output, we can easily determine what the input should be.

The essential elements of inputs are timeliness, accuracy, proper format and economy.

Information gathered during the need identification step is specified in a System

Concept Document. The customer before meetings sometimes prepares the original

concept document with the analyst. Invariably, customer-analyst communication results

in the modifications to the documents.


PRELIMINARY

INVESTIGATION
PRELIMINARY INVESTIGATION

Limitations or failure of existing systems, or the awareness of technological

advances relating to the particular are involved in particular systems which competitors

are developing.

Information systems projects originate from many reasons: to achieve greater

speed in processing data, better accuracy and improved consistency, faster information

retrieval, integration of business areas, reduced cost and better security. The sources

also vary project proposals originate with department managers, senior executives and

systems analysis. Sometimes the real origin is an outside source, such as a government

agency, which stipulates systems requirements the organization must meet. When the

request is made, the first systems activity, the preliminary investigation, begins. The

activity has three parts: request clarification, feasibility study and request approval.

Request Clarification

Many requests from employees and users in organizations are not clearly stated.

Therefore, before any systems investigation can be considered, the project request must

be examined to determine precisely what the originator wants. A simple telephone call

may suffice if the requester has a clear idea but does not know how to state it. On the

other hand, the requester may merely be asking for help without knowing what is wrong

or why there is a problem. Problem clarification in this case is much more difficult. In

either case, before any further steps can be taken, the project requests must be clearly

states.
This phase (initial study) involves estimating whether or not a development

project is worthwhile. Problems with the current automated or manual system are

identified, as well as the benefits and costs of an alternative system. If the benefits seem

to outweigh the costs (especially when compared with competing projects), a green

signal may be given to continue the project, and detailed plans and schedules are drafted

for making the system a reality.

The proposed solution to the users problem may involve something between

dramatic change (completely new system) and slight change to the present system. If the

present system is manual and a computer system is proposed, the development project

will probably be very large. At the other extreme are small development project that

represent slight changes to existing systems, such as sorting information in a different

way or inserting subtotals or adding new columns to a report. The objectives of this

phase are:

1 To determine the feasibility of computerization of a particular system or area

of operation.

2. To define clearly the objectives, scope and limitations of the project.

3. To establish a good working relationship between the user department and the

data processing (DP) department.

4. To acquaint user management with the approach and method of work in

systems development.

5. To estimate the resources required for system development, live running and

maintenance.
6. To identify the likely benefits, which should accrue from the introduction

of the system.
FEASIBILITY

STUDY
FEASIBILITY STUDY

The data collection that occurs during preliminary investigations examines

system feasibility, the likelihood that the system will be beneficial to the organization.

Four tests of feasibility are studies: technical, economical and operational. All are

equally important.

1. Technical Feasibility: It involves determining whether or not a

system can actually be constructed to solve the problem at hand. Some users expect too

much of computers, assuming that computers can accurately predict the future,

immediately reflect all information in an organization, easily understand speech, or

figure out how to handle difficult problems. Such systems, even if they exist, are not

yet available for widespread use.

The technical issues raised during the feasibility stage of the investigation are:

1. Does the necessary technology exist (can it be acquired) to do what is

suggested?

2. Does the proposed equipment have the technical capacity to hold the data

required to use the new system?

3. Will the proposed system and components provide adequate responses to

inquires, regardless of the number or location of users?

4. Can the system be expanded, if developed?


5. Are there technical guarantees of accuracy, reliability, ease of access and data

security?

For example, if the proposal includes a printer that prints at the rate of 2,000

lines per minute, a brief search shows that this is technically feasible. Whether it should

be included in the configuration because of its cost is an economic decision. On the

other hand, if a user is requesting audio input to write, read, and change stored data, the

proposal may not be technically feasible.

2. Economical Feasibility: It involves estimating benefits and costs.

These benefits and costs may be tangible or intangible. Because of confusion between

the types of costs, it is sometimes very difficult to decide if the benefits outweigh the

costs.

Tangible benefits may include decreasing salary costs (by automating manual

procedures), preventing costly but frequent errors, sending bills earlier in the month, and

increasing control over inventory levels. Such benefits may be directly estimated in

rupees without much trouble. Intangible benefits may include increasing quality of

goods produced, upgrading or creating new customer services, reducing repetitive or

monotonous work for employees, and developing a better understanding of the market.

Such benefits may be much more important than tangible benefits, but they may be

ignored because estimating their rupee values involves pure guesswork.

Tangible costs are easily estimated. They include the one-time cost of

developing the system and the continuous costs of operating the system. Examples of

development costs are the salaries of programmers and` analysts, the prices of the

computer equipment, and the expenses connected with user training. Operating costs
include the salaries of computer operators and the costs of computer time and computer

supplies. Intangible costs are usually not discussed because they are rarely large.

Examples of such costs include those associated with early user dissatisfaction and with

the problems of converting to the new system.

A system that can be developed technically and will be used if installed must

still be a good investment. That is, financial benefits must equal or exceed the financial

costs. The economic and financial questions raised by analysts during the preliminary

investigation seek estimates of:

1. The cost to conduct a full systems investigation.

2. The cost of hardware and software for the class of application being

considered.

3. The benefits in the form of reduced costs or fewer costly errors.

4. The cost if nothing changes (the system is not developed).

Cost and benefit estimates on each project provide a basis for determining which

projects are most worthy of consideration. Each estimate can be analyzed to determine

how rapidly costs are recovered by benefits, to calculate both the absolute and interest-

adjusted amounts of excess benefits, and to establish the ratio of benefits to costs. All of

these factors are considered when developing an overall sense of the project's economic

feasibility.

To be judged feasible, a project proposal must pass all these tests. Otherwise, it

is not a feasible project. For example, a personnel record system that is financially

feasible and operational attractive, is not feasible if the necessary technology does not
exist. Or a medical system which can be developed at reasonable cost but which nurses

will avoid using cannot be judged operationally feasible.

3. Operational Feasibility: Proposed projects are of course beneficial

only if they can be turned into information systems that will meet the organization's

operation requirements. Simply stated, this test of feasibility asks if the system will

work when developed and installed. Are there major barriers to implementation? Here

are questions that will help test the operational feasibility of a project:

1. Is there sufficient support for the project from the management and from

users? If the current system is well liked and used to the extent that persons will not see

reasons for a change, there may be resistance.

2. Are current business methods acceptable to the user? If they are not, user may

welcome a change that will bring about a more operational and useful system.

3. Have the users been involved in the planning and development of the project?

Early involvement reduces the chances of resistance to the system and change in

general, and increases the likelihood of successful projects.

4. Will the proposed system cause harm? The following questions are related to

this issue:

Will the system produce result in any respect or area?

Will loss of control result in any area?

Will accessibility of information be lost?


Will individual performance be poorer after implementation than before?

Will customers be affected in an undesirable way?

Will it slow performance in any areas?

Operational feasibility is a measure of how people are able to work with the

system. For example, a system may require managers to write BASIC, COBOL, or

FORTRAN programs to access data. However, managers probably receive the greatest

help from a system when they can concentrate on the problems to solve rather than on

how programs should be constructed to solve them.


SOFTWARE

ENGINEERING

PARADIGM

APPLIED
SOFTWARE AND
HARDWARE
REQUIREMENT
SPECIFICATIONS
FRONT END / GUI TOOLs : Visual Basic 6.0 :

RDBMS / BACK END: SQL Server 2000:

OPERATING SYSTEM : WINDOWS

Environment

(NT , 2000 , XP)

Hardware Requirement (Minimum):

Any Pentium Processor.

128 MB RAM with 2.00 GB Hard Disk Free Space

1.44 MB Floppy Disk Drive

Monitor

Mouse

CD-ROM Drive

Printer
SYSTEM DESIGN

SYSTEM DESIGN
It describes desired features and operations in detail, including screen layouts,

business rules, process diagrams, pseudocode and other documentation. The most

creative and challenges phase of the software development life cycle is software design.

The term design describes final software and the process by which it is developed. The

purpose of the design phase is to plan a solution of the problem specified by the

requirements document. It also includes the construction of programs and program

testing. Design takes us toward how to satisfy the needs. The design of a system is

perhaps the most critical factor affecting the quality of the software; it has a major

impact on the later phase, particularly testing and maintenance. The output of this phase

is the design document.

The first step is to determine how the output is to be produced and in what

format. Samples of the output and input are to present Second, input data and master

files (database) have to be designed to meet the requirement of the purposed output. The

operational (processing) phases are handled through program construction and testing,

including a list of the programs needed to meet the software objectives and complete

documentation.

The design activity is often dived into two phases-system design and detailed

design. System design, which is sometimes also called top-level design, all the major

data structures, file formats, output formats, and the major modules in the system and

their specification are decided.

During detailed design, the internal logic of each of the modules specified in

system design is decided. During this phase further details of the data structure and

algorithmic design of each of the modules is specified.


In system design focus is on identifying the modules, whereas during detailed

design focus is on designing the logic for each of the modules. In other words, in system

design the attention is on what components are needed, while in detailed design how the

component can be implemented in software is the issue.

The design of an information system produces the details that state how a system

will meet the requirements identified during systems analysis. Often systems specialists

refer to this stage as logical design, in contrast to developing program software, which is

referred to as physical design.

As soon as the user accepts the system proposal, work can start on preparing the

system specification. This phase takes the requirements as agreed and the work, which

has led up to producing the proposal and develops the system to the level of details

necessary to prepare the way for programming. At this point the analysts is concerned

with the detail of input and output, the processing required, and the way in which the

system will operate on a day-to-day basis. Depending on the level of complexity of the

system and the amount and quality of work done at the earlier stages, this phase can take

many months of hard work. It is concerned with the computer-oriented design of the

system--the detail of the input transactions, the details of the printed reports, screens and

other outputs, the file or database structure, the contents of records, the processing

required and the efficiency of the system from a computer processing point of view.

Systems analysts start by identifying reports and other outputs the system will

produce. Then the specific data on each is pinpointed, including its exact location on the

paper, display screen, or other medium. Usually designers sketch the form or display as

they expect it to appear when the system is completed.


The system design also describes the data to be input, calculated or stored.

Individual data items and calculation procedures are written in detail. Designers select

file structures and storage devices, such as magnetic disk, magnetic tape, or even paper

files. The procedures they write tell how to process the data and produce the output.

The documents containing the design specifications use different ways to portray

the design-- charts, tables, and special symbols--some of which you may have used and

others that may be totally new to you. The detailed design information is passed onto the

programming staff so that software development can begin.

Designers are responsible for providing programmer with complete and clearly

outlines specifications that state what the software should do. As programming starts,

designers are available to answer questions, clarify fuzzy areas, and handle problems

that can front the programmers when using the design specifications.

A typical system specification will contain:

1. An introduction converting the relevance of the document and how it has

evolved from the previous phases.

2. A description of the system. This is usually an outline in a narrative from with

accompanying flow charts, procedure charts, and data flow diagrams or data models.

3. Detailed description of inputs, outputs and files, for example document

layouts (input), screen layouts, report layouts, file/record layouts, and database schemes.

4. A description of the control, which operate within the system. This includes

control over input and processing, restriction on access (e.g., passwords and control over
input and processing, restrictions on access (e.g., passwords and control on output (e.g.

numbering of checks)

5. Processing required. This may in fact be handled by specifying generally what

watch program in the system is expected to do and by backing this up with individual

program specifications issued separately. Arrangements for testing may also be

described in this section.

6. Implementation consideration -- arrangements for converting existing files

checking parallel runs, production of user procedures and production of computer

-related procedures.

7. A detailed development and implementation time-table. This section should

list all of the tasks to be done, including individual programs, showing the

interrelationship between each task and the planned start and completion date for each

task.

8. A back -up plan. This should describe be procedures to be developed for

taking security dumps of files, for ensuring system resilience (e.g., duplexing) and for

running the system at an alternative site in the event of the computer not being available.

It is at this stage that the first reliable estimate of the amount of computer

programming effort required can be produced. Up to this point the estimates are to a

large extent informed guesses and what comes out at the end of this exercise may be

quite frightening compared with the previously available estimates. This is a valid

reason for ensuring that senior management continues to have an approval role at the

conclusion of this stage.


CODE
EFFICIENCY
CODE EFFICIENCY

The degree to which the software makes optimal use of system resources as

indicated by the following sub attributes: time behavior, resource behavior. The

efficiency is the amount of computing resources and code required by a program to

perform its functions.

A design should clearly be very verifiable, complete (implements all the

specification), and traceable (all design elements can be traced to some requirements).

However, the two most important properties that concerned designers are efficiency and

simplicity. Efficiency of any system is concerned with the proper use of scarce

resources by the system. The need for efficiency arises due to cost considerations. If

some resources are scarce and expansive, it is desirable that those resources be used

efficiently. In computer systems, the resources that are most often considered for

efficiency are processors time and memory. An efficient system is one that consumes

less processors time and require less memory. In earlier days, the efficient use of CPU

and memory was important due to the high cost of hardware. Now that the hardware

cost are small compared to the software costs, for many software systems traditional

efficiency concerns now take a back seat compared to other consideration. One of the

exceptions is real-time system, where there are strict execution time constraints. For

example, often the tricks used to increase the efficiency of a system result in making

the system more complex. Therefore, design decisions frequently involve trade-offs. It

is the designers job to recognized the tradeoffs and achieve the best balance. For our

purposes, simplicity is the primary property of interest, and therefore the objective of

the design process is to produce designs that are simple to understand.


OPTIMIZATION

OF CODE
OPTIMIZATION OF CODE

The Term Code Optimization refers to techniques a compiler can employ in

an attempt to produce a better object language program than the most obvious for a

given source program.

The primary questions are how beneficial a given optimization is and how much

its costs to implement. In some situations it is unnecessary to consider any

optimization; a quick and straightforward translation of the source program is sufficient.

Typical of this situation is a student job which will be run a few times and than

discarded. Exactly the opposite is true of a program, which is to be run an indefinitely

large number of times. Virtually any amount of time spent improving the running time

of the program will be paid back by even a small percentage speedup each time the

program is run.

In most cases, however, a program will not run indefinitely without being

change and recompile. It is economic therefore to have available an optimizing

compiler which make well judged attempts to improve the code it produces. It is

important that the optimizing compiler attempt transformations that are likely to

improve the code with out costing too much time at compilation. The equation to bear

in mind is that the running time we expect to save over the expected numbers of run of

the optimized object program must exceed the time spent by the compiler doing the

optimization. The trend is to make available for each programming language several

compilers, or options within one compiler, that spend varying amounts of time
improving the code they generate and produce code of increasing quality. In this way

the user can decide how much time he wishes to spend optimizing his program.

Code optimization techniques are generally applied after syntax analysis, usually

both before and during code generation.

Code optimization depends on the type of application what is writing. In most

cases, you will be optimizing small, tight sections of code that are executed frequently

(such as loops or frequently called procedures). Code optimization requires a

combination of experience, and eye for detail, and a basic understanding of the

architecture of the language and how processors work.


VALIDATION

CHECKS
VALIDATION CHECKS

Verification and validation (V & V) is the generic name given to the checking

processes which ensure that software conforms to its specification and meets the need of

the software customer. The system should be verified and validated at each stage of the

software process using documents produced during the previous stage. Verification and

validation i.e. starts with requirements reviews and continues through design and code

reviews to product testing.

Verification involves checking that the program conforms to its specification.

Validation involves checking that the program implemented meets the expectations of

the software customer. Requirements validation techniques, such as prototyping, help in

this respect. However, flaws and deficiency in the requirements can sometimes only be

discovered when the system implementation is complete.

To satisfy the objectives of the V & V process, both static and dynamic

techniques of system checking and analysis should be used. Static techniques are

concerned with the analysis and checking of system representations such as the

requirements document. Design diagram and the program source code. They may be

applied at all stages of the process through structured reviews. Dynamic techniques or

test involve exercising and implementation. Static techniques include program

inspections, analysis and formal verification. Some purists have suggested that these

techniques should completely replace dynamic techniques in the verification and

validation process and that testing is unnecessary. This is nonsense. Static techniques
can only check the correspondence between a program and its specification; they cannot

demonstrate that the software is operationally useful.

Although static verification techniques are becoming more widely used, program

testing is still the predominant verification and validation technique. Testing involves

exercising the program using data like the real data processed by the program. The

existence of program defects or inadequacies is inferred from unexpected system output.

Testing may be carried out during the implementation phase to verify that the software

behaves as intended by its designer and after the implementation is complete. This later

testing phase checks conformance with requirements and assesses the reliability of the

system.
IMPLEMENTATION
AND
MAINTENANCE
SOFTWARE MAINTENANCE

What happens during the rest of the software's life: changes, correction,

additions, moves to a different computing platform and more. This, the least glamorous

and perhaps most important step of all, goes on seemingly forever. After installation

phase is completed and the user staff is adjusted to the changes created by the candidate

system, evaluation and maintenance begin. The importance of maintenance is to

continue to bring the new system to standards. Software maintenance is a task that every

development group has to face when the software is delivered to the customers site,

installed and is operational. The time spent and effort required keeping software

operational after release is very significant and consumes about 40-70% of the cost of

the entire life cycle.

The term Maintenance is a little strange when applied to software. In common

speech, it means fixing things that break or wear out. In software nothing wears out; it is

either wring from beginning, or we decode later that we want to do something different.

It is a very broad activity that includes error corrections, enhancements of capabilities,

deletion of obsolete capabilities, and optimization.

There are three major categories of software maintenance:

Corrective Maintenance: This refers to modifications initiated by defects in the

software. It means repairing processing or performances failures or making changes

because of the previously uncorrected problems. A defect can result from design errors,

logic errors and coding errors. Design errors occur when, changes made to the software

are incorrect, incomplete, wrongly communicated or the change request is


misunderstand. Logic errors result from invalid tests and conclusions, incorrect

implementation of design specification, faulty logic flow or incomplete test data.

Coding errors are caused by data processing errors and system performances errors.

Adaptive Maintenance: It includes modifying the software to match changes in the

ever-changing environment. The term environment in this context refers to the totally of

all conditions and influences which act from outside upon the software, for example,

business rules, government policies, work patterns, software and hardware operating

platforms. This type of maintenance includes any work initiated as a consequence of

moving the software to a different hardware or software platform-compiler, operating

system or new processor. It means changing the program function.

Perfective Maintenance: It means improving processing efficiency or performance, or

restructuring the software to improve changeability. When the software becomes useful,

the user trend to experiment with the new cases beyond the scope for which it was

initially developed. It means enhancing the performance or modifying the programs to

respond to users additional or changing needs.

In comparison with all the three maintenance, perfective takes more time and

spent more money.

Maintenance covers a wide range of activities, including correcting coding and design

errors, updating documentation and test data and upgrading user support. Maintenance

means restoring something to its original condition unlike hardware, however, software

does not wear out, it is corrected. A major problem with software maintenance is its

labor-intensive nature.
SYSTEM

TESTING

SYSTEM TESTING
It brings all the pieces together into a special testing environment, then checks

for errors, bugs and interoperability. Software testing is the process of testing the

software product. Effective software testing will contribute to the delivery of higher

quality software products, more satisfied users, lower maintenance costs, more accurate,

and reliable results. However, ineffective testing will lead to the opposite results; low

quality products, unhappy users, increased maintenance costs, unreliable and inaccurate

results.

Testing is the major quality control measure used during software development.

Its basic function is to detect errors in the software. It is a very expensive process and

consumes one-third to one-half of the cost of a typical development project. It is the

process of executing program (or a part of a program) with the intention of finding the

errors, however, testing cannot show the absence of errors it can show that errors are

present.

Errors are present within the software under test. This cannot be the aim of

software designers they must have designed the software with the aim of producing it

with zero errors. Software testing is becoming increasingly important in the earlier part

of the software development life cycle, aiming to discover errors before they are deeply

embedded within systems. In the software development 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.

The testing requires the developers to find errors from their software. It is very

difficult for software developer to point out errors from own creations. A good test is

one that has a high probability of finding an as yet undiscovered error. A successful test
case unearths an undiscovered error. This implies that testing not only has to uncover

errors introduced during coding, but also errors introduced during the previous phases.

The goal of testing is to uncover requirement, design, and coding errors in the programs.

Different levels of testing are used:

Unit testing: A module is tested separately and is often performed by the coder himself

simultaneously along with the coding of the module. The purpose is to exercise the

different parts of the modules code to detect coding errors.

Integration Testing: The modules are gradually integrated into subsystems, which are

then integrated to eventually from the entire system. Integration testing is performed to

detect design errors by focusing on testing the interconnection between modules.

System Testing: After the system is put together, it is performed. The system is tested

against the system requirement to see if the entire requirement are met and if the system

performs as specified by the requirement.

Acceptance Testing: The final stage of initial development, where the software is put

into production and runs actual business. It is performed to demonstrate to the client, on

the real life data of the client, the operation of the system.

Testing is an extremely critical and time-consuming activity. It requires proper

planning of the overall testing process. The test plan specifies conditions that should be

tested, different units to be tested, and the manner in which the modules will be

integrated together. The final output of the testing phase is the test report and the error

report, or a set of such reports (one for each unit tested).


The importance of software testing and its implications with respect to S/W

Quality cannot be overemphasized. Because of this importance & the large amount of

project effort associated with the system development, it becomes quite necessary to

become well planned and through testing. Inadequate testing & no-adequate testing

lead's to errors that may be costly when they appear months later. Effective testing

translates into cost savings from reduced errors & saves a lot of project efforts. It

follows major factors that decide the occurrences of errors in a new design from the

very early stage of the development.

1. Communication between the user & the designer

This factor is handled by frequently communicating with the finance department

and the gate entry.

2. The Time factor for the design

This factor is handled by giving comparatively more time to the designing of the

system.

Objectives of System Testing

Once a system has been designed, it is necessary to undergo an exhaustive

testing before installing the system. This is important because in some cases a small

error, not detected and corrected early before installation, may explode into a much

large problem later on. Testing is being performed when users are asked to assist in

identifying all possible situations. That might arise as regards the factor that efforts were

put to tackle the problem under consideration. A plan was decided to be followed for
testing the system. The complete testing procedure was divided into several steps, to be

performed at different stages. Tests were to be done as follows: -

Testing Criteria

A. White Box Testing

(i) Transaction path Testing

In this phase each and every condition within a unit program were tested. As and

when a loop or condition statement was incorporated into a unit the loops were tested

for correctness, for foundry conditions and for not getting into infinite execution cycle.

The data used was whatever necessary at that instance. The path of each transaction

from origin to destination was tested for reliable results.

(ii) Module Testing

This was carried out during the programming stage itself. Individual programs

were tested at the time of coding and necessary changes are made there on to make sure

that the modules in the form program, is working satisfactory as regards the expected

output from the module. All aspects of the program viz. All choices available were

properly tested.

(iii) String Testing

After loading all individual program string was performed for each one of

programs where the output generated by one program is used as input by another

program. This step was completed after making necessary changes wherever required.
B. Black Box Testing

(i) System Testing

After module and string testing, the systems were tested as a whole system Tests

were undertaken to check bundled modules for errors. The errors found in the couple

system as a whole was corrected. A testing on the Actual data of the company followed

this. During this phase the existing System and this package was running in parallel to

enable us to verify and compare the result sets. The following criteria were used while

testing the system.

(ii) Output Testing

No systems could be useful if it does not produced the required operation for that
matter operation in the required format the outputs generated or displayed by the system
under consider was tested by asking the format required by them.

(iii) User Acceptance Testing

User acceptance of a system is a key factor for the success of any system. The

system under consideration was tested for user acceptance by constantly keeping in

touch with the prospected system users at the time of developing and making changes.

Wherever required this was done in regard to the user satisfaction.

Testing Procedure

Different type of checks like duplicate checks, completeness check, validity,

checks etc. are incorporated in this system, as the data has to be entered in different

forms.
The user is not familiar with new system the data entry screens are designed in

such a way that they are

Consistent

Compatible

Easy to use

Had quick response

The following conventions are used while designing of the various screens to

make the system user friendly

All the items that are logically related are together.

Error and validation messages are provided wherever required.

System testing is against its initial objectives, it is done in a simulated

environment.

Test Review

Test review is the process, which ensures that testing is carried out, as planned

test review decides whether or not the program is ready to ship out for the

implementation.

For each data entry screen, we prepared test data with extreme values and under

all relevant data- entry screen against real this process helped in rectifying the modules

time.
SYSTEM
SECURITY
MEASURES
SYSTEM SECURITY MEASURES

Security involves both policies and mechanism to protect data and ensure that it

is not accessed, altered or deleted without proper authorization. Integrity implies that

any properly authorized access, alteration or deletion of the data in the database does not

change the validity of the data. Security and integrity though distinct, are related.

Implementation of both security and integrity requires that certain controls in the form

of constraints must be built in to the system. The DBA, in consultation with the security

administration specify these controls. The system enforces the controls by monitoring

the actions of the users and limiting their actions with in the constraints for them.

To prevent the dissemination of sensitive information from the data base to

unauthorized users and thence to outside competitive or hostile agents, an organization

must established effective security policies. Database security policies are guidelines

for present and future designers regarding the maintenance of the data base security.

Database security mechanisms are the function used to enforced database security

policies. These functions could be implemented by a combination of one or more of the

following: administrative control procedures, hardware functions, software function,

firmware functions.

The administrative controls procedures are the implementations of security

policies to provide protection, external to the database, operating systems, and computer

hardware. An example of such type is that a password to provide for a program be a

random string of alphanumeric characters, at least eight in length, and be changed

regularly.
The operating system must ensure that files belonging to the database are not

used directly without proper authorization.

This authorization can consist of the user providing the proper passwords for the

file. The operating system must also ensure that illegal users using public

communication facilities are not allowed access to the system. Users must be required to

use adequate identification and passwords.

The authorization mechanism prepares the user profile for a user and indicates

the portion of the database accessible to that user and the mode of access allowed. The

enforcement the security policies in the database system require that the system knows

the identity of the user making the requests. This in turn requires that before making

any request, the user has to identify him / her to the system and authenticate the

identification to confirm that the user is in fact the correct person. The simplest and

most common authentication scheme used is a password to authenticate the user. The

user enters the user name or number and than authenticate himself/herself by the

password. Typically, these identification/authentication steps are used once for the

initial sign-on to the system. However, for sensitive data, this step could be repeated for

each operation.
COST

ESTIMATION OF

THE PROJECT
COST ESTIMATION OF THE PROJECT

Project estimation and project scheduling are carried out together. However,

some cost estimation may be required at an early stage of the project before detailed

schedules are drawn up. These estimates may be needed to establish a budget for the

project or to set a price for the software for a customer.

Once a project is underway, estimates should be updated regularly. This assist

with the planning process and allows the effective use of resources. If actual expenditure

is significantly greater than the estimates than the project manager must take some

action. This may involve applying for additional resources for the project or modifying

the work to be done.

There are three parameters involved in computing the total cost of a software

development project:

Hardware & Software Costs including maintenance

Travel and training costs

Effort cost (The costs of paying software engineers).

For most projects, the dominant cost is the effort cost. Computers that are

powerful enough for software developments are relatively cheep. Although travel costs

can be significant where a project is developed at different sites, they are relatively low

for most projects. Further more, the use of e-mail; fax and teleconferencing can reduce

the travel required.


Effort costs are not simply the cost of the salaries of the software engineers

involved in the project. Organization compute effort costs in terms of overhead costs

where they take the total cost of running the organization and divide this by the number

of productive staff. Therefore, the following cost are all part of the total effort cost:

Costs of providing, cooling and lighting office space;

Costs of support staff such as Accountant, Secretaries, peon and so on;

Costs of networking and communication;

Costs of central facilities such as library, recreational facilities and so on;

Costs of health insurance and so on.

Typically this overhead factor is somewhere around twice the software

engineers salary. Therefore, if a software engineers are paid Rs. 2.5 Lakhs per year, the

total cost to the organization is Rs 10 Lakhs per year or Rs 83 thousands per month.

If the project has been computed as part of the project bid to a customer, a

decision then has to be made about the price quoted to the customer. Classically, price

is simply cost plus profit. However, the relationship between the project cost and the

price to the customer is not usually so simple.

Software should be carried out objectively with the aim of accurately predicting

the cost to the contractor of developing the software. Software pricing must take into

account broader organizational, economic, political and business consideration.

A software designer can develop architecture for a new application, system, or

product by defining domain architecture and than populating it with structure point.
These structure points are either individual reusable components or packages of reusable

components.

Even though structure point is reusable, their qualification, adaptation,

integration, and maintenance cost are nontrivial. Before proceeding with reuse, the

project manager must understand the costs associated with the use of structure points.

Since all structure points have a past history, cost data can be collected for each.

In an ideal setting, the qualification, adaptation, integration, and maintenance cost

associated with each component in a reuse library is maintained for each instance of

usage. These data can then be analyzed to develop projected costs for the next instance

of reuse.
PERT CHART

PROGRAM EVALUATION REVIEW

TECHNIQUE (PERT) CHART


The chart shows clearly that the project consists of the activities of Analysis,

design, front-end coding, back-end coding and report generation. Recall that the

previous estimates for these six tasks were, respectively, 20, 20, 45, 45, 30 and 25 days.

The figure shows that the project will start on April 01, 2006. The analysis work

will start on April 03, 2006. Since the analysis is estimated to take 20 days, any activity

that follows the design may start on April 20, 2006 at the earliest. The dependency

arrows help us compute these earliest start dates based on our estimates of the duration

of each activity. These dates are shown in the figure. We could also compute the

earliest finish dates or latest start dates or latest finish dates, depending on the kind of

analysis we want to perform.

The chart shows that the path through the project that consists of the design

activity is the critical path for the project. Any delay in any activity in this path will

cause a delay in the entire project. We will clearly want to monitor the activities on the

critical path much more closely than the other activities.

Front end coding

Start Analysis Design Testing Report Generation

Back end coding


Finish
GANTT CHART

GANTT CHARTS
A bar chart is perhaps the simplest form of formal project management. The bar

chart (also known as Gantt chart) is used almost exclusively for scheduling purposes

and therefore controls only the time dimension of projects.

Gantt chart (developed by Henry L. Gantt) are a project control technique that

can be for several purposes, including, budgeting and resource planning. A Gantt chart

is a bar chart, with each bar representing an activity. The bars are drawn against a time

line. The length of each bar is proportional to the length of time planned for activity.

To prepare the Gantt chart for our project we estimate the number of days

required for each of the six task as follows: Analysis, 20; design, 20; Front end coding,

45; Back end coding, 45; testing, 30; and Report generation, 25. Using these estimates,

we can draw the Gantt chart.

A Gantt chart helps in scheduling the activities of a project, but it does not help

in identifying them. One can begin with activities identified in the work breakdown

structure, as we did for the complier example. During the scheduling activity, and also

during implementation of the project, new activities may be identified that were not

envisioned during the initial planning. The manager must then go back and revise the

breakdown structure and the schedules to deal with these new activities.

The Gantt chart in the figure is actually an enhanced version of standard

Gantt chart. The write part of the bar shows the length of time each task is estimated to

take. They gray shows the slack time, that is, the latest time by which a task must be

finished. One way to view the slack time is that, if necessary, we can slide the white

area over the gray area without forcing the start of the next activity to be delayed. A bar

that is all while, such as that representing the code generator task, has no slack and must
be started and completed in the scheduled dates if the schedule is to be maintained. For

the figure, we can see that the one task design has no slack. It is this task then

determines the total length of time the project is expected to take.


DATABASE
(a) Student Record:
S. No. Field Data Type Size Constraint
1 Student_Name Varchar 16 Not Null

6.
1 Student_Fathers_Name Varchar 16 Not Null

7.
1 Student_Mothers_Name Varchar 16 Not Null

8.
1 Fathers_Occupation Varchar 16 Null

9.
2 Mothers_Occupation Varchar 16 Null

0.
2 Student_S.R._Number (Primary) Varchar 05 Not Null

1.
2 Student_DOB Numeric 08 Not Null

2.
2 Student_Sex Text 02 Not Null

3.
2 Student_Caste Text 08 Not Null

4.
2 Student_Photo Blob 20 Not Null

5.
2 Student_Address Varchar 30 Not Null

6.
2 Student_Phone_No. Numeric 10 Null

7.
2 Date_of_Admission Numeric 08 Not Null

8.
2 Student_Class_No. (Ref. Key) Numeric 02 Not Null

9.
3 Student_Status Varchar 07 Not Null

0.

(b -i) Fee Structure:


S. No. Field Data Type Size Constraint
7. Class_No. Numeric 02 Not Null
8. Tution_Fee Numeric 03 Not Null
9. Annual_Fee_Amount Numeric 03 Null
1 Exam_Fee_Amount Numeric 03 Null

0.
1 Conveyance_Fee_Amount Numeric 03 Null

1.
1 Total_Fee_Amount Numeric 04 Not Null

2.

(b ii) Student Fee:

S. No. Field Data Type Size Constraint


1 Student_S.R. No.(F.K.) Numeric 05 Not Null

6.
1 AnnualFee_Dep_Date Numeric 08 Not Null

7.
1 Fee_Amount_Paid Numeric 04 Not Null

8.
1 Balance_Fee Numeric 04 Not Null

9.
2 TutionFee_DepDate Numeric 08 Not Null

0.
2 TutionFee_AmountPaid Numeric 04 Not Null

1.
2 TutionFee_Balance Numeric 04 Not Null

2.
2 ExamFee_DepositeDate Numeric 08 Not Null

3.
2 ExamFee_AmountPaid Numeric 04 Not Null

4.
2 ExamFee_Balance Numeric 04 Not Null

5.
2 ConveyanceFee_DepDate Numeric 08 Not Null
2 ConveyanceFee_AmtPaid Numeric 04 Not Null

7.
2 ConveyanceFee_Balance Numeric 04 Not Null

8.
2 Total_Amount_Paid Numeric 04 Not Null

9.
3 Total_Amount_Balance Numeric 04 Not Null

0.

(c) Faculty Profile:

S. No. Field Data Type Size Constraint


1 Teachers_Name Varchar 20 Not Null
7.
1 Teachers_Qualification Varchar 20 Not Null
8.
1 Teachers_DOB Numeric 08 Not Null
9.
2 Teachers_Sex Varchar 02 Not Null
0.
2 Teachers_Photo Blob 40 Null
1.
2 Teachers_Address Varchar 30 Null
2.
2 Teachers_Phone No. Numeric 10 Null
3.
.
2 Teachers_Date of Joining Numeric 08 Null
4.
2 Teachers_Salary Numeric 04 Null
5.
2 Teachers_Subject1 Varchar 12 Null
6.
2 Teachers_Subject2 Varchar 12 Null
7.
2 Teachers_Subject3 Varchar 12 Null
8.
2 Teachers_Subject4 Varchar 12 Null
9.
3 Teachers_Subject5 Varchar 12 Null
0.
3 Teachers_Subject6 Varchar 12 Null
1.
3 Teachers_Subject7 Varchar 12 Null
2.

(d) School Time Table :

S. No. Field Data Type Size Constraint


7.Subject_Name Varchar 12 Not Null
8.Subject_Code Varchar 06 Null
9.Total No._of_Periods Numeric 02 Null
10
Time_ slots Numeric 04 Null
.
11Class_No._Section Varchar 04 Null
.
12Teachers _Name Varchar 12 Null
.

(e) Examination Result:

S. No. Field Data Type Size Constraint


8. Student_S.R.No. (Reference Key) Varchar 04 Not Null
9. Student_ClassNo. Varchar 05 Not Null
1 Student_Name Char 15 Not Null

0.
1 Stud_Fathers_Name Char 15 Null

1.
1 Result_Status Char 4 Not Null

2.
1 Result_Year Numeric 4 Not Null

3.
1 TC_Status Boollean 1 Not Null

4.

(f) Library Management:

S. No. Field Data Type Size Constraint


1 Book_Id Vanchar 05 Not Null

0.
1 Book_Title Char 15 Not Null

1.
1 Book_Author Char 15 Not Null

2.
1 Publication Char 15 Null

3.
1 Book_Issue Numeric 08 Null

4.
1 Book_Return Numeric 08 Null

5.
1 Book_subject Vanchar 15 Not Null

6.
1 Book_Cost Numeric 04 Null
1 Book_Status Char 10 Null

8.

FORMS
mdiform

frmresult
frmfaculty
frmfee
frmfacultysearch
frmstudent
frmstudentsearch
SUBJECT
TITLES
BOOKS
MEMBERS
EMPLOYEES
OPTIONS
ISSUE
RETURN
RESERVE BOOK
MISSING BOOK
REPORT FOR PAY FINE
FINE BALANCE REPORT
MISSING BOOK REPORT
CODING
CODING FOR SCHOOL MANAGEMENT MODULES

frmExamResultAdd - 1
Dim r1 As New ADODB.Recordset
Private Sub cmdAdd_Click()
'''''''''''CODE TO INSERT RECORD IN TO DATABASE
Dim rs As New ADODB.Recordset
rs.Open "ExamResult", con, adOpenDynamic, adLockOptimistic
With rs
.AddNew
.Fields("SRNo") = Trim(ComSSRNo.Text)
.Fields("StudNAME") = Trim(txtName.Text)
.Fields("FatherNAME") = Trim(txtFName)
.Fields("CLASSno") = Trim(txtClassNo)
.Fields("ResultStatus") = Trim(txtResultStatus)
.Fields("ResultYear") = Trim(txtResultYear)
.Fields("TCStatus") = Trim(txtTcStatus)
.Update
.Close
End With
MsgBox "SUCESSFULLY ADDED"
''''''''''''''''''''''''''''''''END OF CODE TO INSERT'''''''''''''''''''''''''
Call clearTxtBox(frmExamResultAdd)
Call LCV(ComSSRNo)
End Sub
Private Sub ComSSRNo_Click()
Set r1 = con.Execute("select * from StudentRecord where SSR_Number = '" +
Trim(ComSSRNo.Text) + "'")
txtName.Text = r1.Fields("S_NAME")
txtFName = r1.Fields("F_NAME")
txtClassNo = r1.Fields("CLASS")
Image1.Picture = LoadPicture(r1.Fields("PHOTO"))
r1.Close
End Sub
Private Sub Form_Load()
Call connect
Call LCV(ComSSRNo)
txtResultYear.Text = Format(Date, "yyyy")
End Sub
Private Sub LCV(Combo1 As ComboBox)
Combo1.Clear
Set r1 = con.Execute("select * from StudentRecord order by SSR_Number")
If r1.EOF = True Then
MsgBox "Student List Empty "
Exit Sub
End If
r1.MoveFirst
While Not r1.EOF
Combo1.AddItem r1.Fields("SSR_Number")
r1.MoveNext
Wend
r1.Close
End Sub
frmExamResultDelete - 1
Dim r1 As New ADODB.Recordset
Private Sub cmdAdd_Click()
'''''''''''CODE TO INSERT RECORD IN TO DATABASE
con.Execute ("delete from ExamResult where SRNO = '" +
Trim(ComSSRNo.Text) + "'")
MsgBox "SUCESSFULLY DELETED"
''''''''''''''''''''''''''''''''END OF CODE TO INSERT'''''''''''''''''''''''''
Call clearTxtBox(frmExamResultDelete)
Call LCV(ComSSRNo)
End Sub
Private Sub ComSSRNo_Click()
Set r1 = con.Execute("select * from ExamResult where SRNO = '" +
Trim(ComSSRNo.Text) + "'")
txtName.Text = r1.Fields("StudNAME")
txtFName = r1.Fields("FatherNAME")
txtClassNo = r1.Fields("CLASSno")
txtResultStatus = r1.Fields("ResultStatus")
txtResultYear = r1.Fields("ResultYear")
txtTcStatus = r1.Fields("tcstatus")
r1.Close
End Sub
Private Sub Form_Load()
Call connect
Call LCV(ComSSRNo)
End Sub
Private Sub LCV(Combo1 As ComboBox)
Combo1.Clear
Set r1 = con.Execute("select * from EXAMRESULT order by SRNO")
If r1.EOF = True Then
MsgBox "Student List Empty "
Exit Sub
End If
r1.MoveFirst
While Not r1.EOF
Combo1.AddItem r1.Fields("SRNO")
r1.MoveNext
Wend
r1.Close
End Sub
frmExamResultUpdate - 1
Dim r1 As New ADODB.Recordset
Private Sub cmdAdd_Click()
'''''''''''CODE TO INSERT RECORD IN TO DATABASE
Dim rs As New ADODB.Recordset
rs.Open "select * from ExamResult where SRNO = '" + Trim(ComSSRNo.Text)
+ "'", con, adOpenDynamic, adL
ockOptimistic
With rs
.Update
.Fields("SRNo") = Trim(ComSSRNo.Text)
.Fields("StudNAME") = Trim(txtName.Text)
.Fields("FatherNAME") = Trim(txtFName)
.Fields("CLASSno") = Trim(txtClassNo)
.Fields("ResultStatus") = Trim(txtResultStatus)
.Fields("ResultYear") = Trim(txtResultYear)
.Fields("TCStatus") = Trim(txtTcStatus)
.Update
.Close
End With
MsgBox "SUCESSFULLY UPDATED"
''''''''''''''''''''''''''''''''END OF CODE TO INSERT'''''''''''''''''''''''''
Call clearTxtBox(frmExamResultUpdate)
Call LCV(ComSSRNo)
End Sub
Private Sub ComSSRNo_Click()
Set r1 = con.Execute("select * from ExamResult where SRNO = '" +
Trim(ComSSRNo.Text) + "'")
txtName.Text = r1.Fields("StudNAME")
txtFName = r1.Fields("FatherNAME")
txtClassNo = r1.Fields("CLASSno")
txtResultStatus = r1.Fields("ResultStatus")
txtResultYear = r1.Fields("ResultYear")
txtTcStatus = r1.Fields("tcstatus")
r1.Close
End Sub
Private Sub Form_Load()
Call connect
Call LCV(ComSSRNo)
End Sub
Private Sub LCV(Combo1 As ComboBox)
Combo1.Clear
Set r1 = con.Execute("select * from EXAMRESULT order by SRNO")
If r1.EOF = True Then
MsgBox "Student List Empty "
Exit Sub
End If
r1.MoveFirst
While Not r1.EOF
Combo1.AddItem r1.Fields("SRNO")
r1.MoveNext
Wend
r1.Close
End Sub
frmFacInfoEntry - 1
Option Explicit
Dim photoStr As String
'''''''''''''''''''''''''''''CODE TO INSERT RECORD ''''''''''''''''''''''''
Private Sub cmdAdd_Click()
Dim rs As New ADODB.Recordset
rs.Open "FacultyProfile", con, adOpenDynamic, adLockOptimistic
With rs
.AddNew
.Fields("id") = Trim(txtFacId.Text)
.Fields("TNAME") = Trim(txtName.Text)
.Fields("tqualification") = Trim(txtQualification)
.Fields("TADDRESS") = Trim(txtAddress)
.Fields("TDOB") = Trim(txtDOB)
.Fields("TSEX") = Trim(txtGender)
.Fields("PHOTO") = Trim(txtPhoto.Text)
.Fields("PHONE") = Trim(txtPhone)
.Fields("DATEOFjoin") = Trim(txtAdmission)
.Fields("Salary") = Trim(txtSalary)
.Fields("Sub1") = Trim(txtSub1)
.Fields("Sub2") = Trim(txtSub2)
.Fields("Sub3") = Trim(txtSub3)
.Fields("Sub4") = Trim(txtSub4)
.Fields("Sub5") = Trim(txtSub5)
.Fields("Sub6") = Trim(txtSub6)
.Fields("Sub7") = Trim(txtSub7)
.Update
.Close
End With
MsgBox "SUCESSFULLY ADDED"
''''''''''''''''''''''''''''''''END OF CODE TO INSERT'''''''''''''''''''''''''
Call clearTxtBox(frmFacInfoEntry)
End Sub
Private Sub Command2_Click()
CommonDialog1.InitDir = "c:\photo\faculty"
CommonDialog1.Filter = "Picture Files(*.jpg; *.bmp; *.gif;*.jpeg)|
*.jpg;*.bmp;*.gif;*.jpeg"
CommonDialog1.ShowOpen
txtPhoto.Text = CommonDialog1.FileName
Image1.Picture = LoadPicture(CommonDialog1.FileName)
End Sub
Private Sub Form_Load()
Call connect
txtAdmission.Text = Format(Date, "dd-mm-yy")
End Sub
frmFacInfoUpdate - 1
Dim r1 As New ADODB.Recordset
Private Sub cmdAdd_Click()
Dim rs As New ADODB.Recordset
rs.Open "SELECT * from facultyprofile where id = '" + Trim(ComSSRNo.Text) +
"'", con, adOpenDynamic,
adLockOptimistic
With rs
.Update
.Fields("TNAME") = Trim(txtName.Text)
.Fields("tqualification") = Trim(txtQualification)
.Fields("TADDRESS") = Trim(txtAddress)
.Fields("TDOB") = Trim(txtDOB)
.Fields("TSEX") = Trim(txtGender)
.Fields("PHOTO") = Trim(txtPhoto.Text)
.Fields("PHONE") = Trim(txtPhone)
.Fields("DATEOFjoin") = Trim(txtAdmission)
.Fields("Salary") = Trim(txtSalary)
.Fields("Sub1") = Trim(txtSub1)
.Fields("Sub2") = Trim(txtSub2)
.Fields("Sub3") = Trim(txtSub3)
.Fields("Sub4") = Trim(txtSub4)
.Fields("Sub5") = Trim(txtSub5)
.Fields("Sub6") = Trim(txtSub6)
.Fields("Sub7") = Trim(txtSub7)
.Update
.Close
End With
MsgBox "SUCESSFULLY UPDATED"
''''''''''''''''''''''''''''''''END OF CODE TO UPDATE'''''''''''''''''''''''''
Call clearTxtBox(frmFacInfoUpdate)
Call LCV(ComSSRNo)
End Sub
Private Sub Command2_Click()
CommonDialog1.InitDir = "c:\photo\faculty"
CommonDialog1.Filter = "Picture Files(*.jpg; *.bmp; *.gif;*.jpeg)|
*.jpg;*.bmp;*.gif;*.jpeg"
CommonDialog1.ShowOpen
txtPhoto.Text = CommonDialog1.FileName
Image1.Picture = LoadPicture(CommonDialog1.FileName)
End Sub
Private Sub ComSSRNo_Click()
Set r1 = con.Execute("select * from FacultyProfile where id = '" +
Trim(ComSSRNo.Text) + "'")
txtName.Text = r1.Fields("tNAME")
txtDOB = r1.Fields("tDOB")
txtGender = r1.Fields("tsex")
Image1.Picture = LoadPicture(r1.Fields("PHOTO"))
txtPhoto.Text = r1.Fields("photo")
txtAddress = r1.Fields("tADDRESS")
txtPhone = r1.Fields("PHONE")
txtAdmission = r1.Fields("DATEOFjoin")
txtSalary = r1.Fields("Salary")
txtQualification.Text = r1.Fields("TQUALIFICATION")
txtSub1 = r1.Fields("sub1")
txtSub2 = r1.Fields("sub2")
txtSub3 = r1.Fields("sub3")
txtSub4 = r1.Fields("sub4")
txtSub5 = r1.Fields("sub5")
txtSub6 = r1.Fields("sub6")
txtSub7 = r1.Fields("sub7")
r1.Close
End Sub
Private Sub Form_Load()
Call connect
Call LCV(ComSSRNo)
End Sub
Private Sub LCV(Combo1 As ComboBox)
Combo1.Clear
Set r1 = con.Execute("select * from FacultyProfile order by id")
If r1.EOF = True Then
MsgBox "Faculty List Empty "
frmFacInfoUpdate - 2
Exit Sub
End If
r1.MoveFirst
While Not r1.EOF
Combo1.AddItem r1.Fields("id")
r1.MoveNext
Wend
r1.Close
End Sub
frmFacultyDelete - 1
Dim r1 As New ADODB.Recordset
Private Sub cmdAdd_Click()
con.Execute ("delete from facultyprofile where id = '" + Trim(ComSSRNo.Text) +
"'")
MsgBox "Record Deleted"
Call clearTxtBox(frmFacultyDelete)
Call LCV(ComSSRNo)
End Sub
Private Sub ComSSRNo_Click()
Set r1 = con.Execute("select * from FacultyProfile where id = '" +
Trim(ComSSRNo.Text) + "'")
txtName.Text = r1.Fields("tNAME")
txtDOB = r1.Fields("tDOB")
txtGender = r1.Fields("tsex")
Image1.Picture = LoadPicture(r1.Fields("PHOTO"))
txtAddress = r1.Fields("tADDRESS")
txtPhone = r1.Fields("PHONE")
txtAdmission = r1.Fields("DATEOFjoin")
txtSalary = r1.Fields("Salary")
txtQualification.Text = r1.Fields("TQUALIFICATION")
txtSub1 = r1.Fields("sub1")
txtSub2 = r1.Fields("sub2")
txtSub3 = r1.Fields("sub3")
txtSub4 = r1.Fields("sub4")
txtSub5 = r1.Fields("sub5")
txtSub6 = r1.Fields("sub6")
txtSub7 = r1.Fields("sub7")
r1.Close
End Sub
Private Sub Form_Load()
Call connect
Call LCV(ComSSRNo)
End Sub
Private Sub LCV(Combo1 As ComboBox)
Combo1.Clear
Set r1 = con.Execute("select * from FacultyProfile order by id")
If r1.EOF = True Then
MsgBox "Faculty List Empty "
Exit Sub
End If
r1.MoveFirst
While Not r1.EOF
Combo1.AddItem r1.Fields("id")
r1.MoveNext
Wend
r1.Close
End Sub
frmFeeAdd - 1
Dim r1 As New ADODB.Recordset
Private Sub cmdAdd_Click()
Dim rs As New ADODB.Recordset
Dim id, temp As Integer
Set r1 = con.Execute("select Max(TrId) from FeePaymentDetail")
temp = CInt(r1.GetString)
If temp < 1 Then
id = 1
Else
id = CInt(temp) + 1
End If
rs.Open "FeePaymentDetail", con, adOpenDynamic, adLockOptimistic
rs.AddNew
rs.Fields("StudNo") = ComSSRNo.Text
rs.Fields("AnnualFeeDate") = txtAnnualDate
rs.Fields("AnnualFeepaid") = txtAnnualPaid
rs.Fields("TutFeeDate") = txtTutionDate
rs.Fields("TutFeepaid") = txtTutionPaid
rs.Fields("ExamFeeDate") = txtExamDate
rs.Fields("ExamFeepaid") = txtExamPaid
rs.Fields("ConFeeDate") = txtConDate
rs.Fields("ConFeepaid") = txtConPaid
rs.Fields("TrId") = id
rs.Update
rs.Close
MsgBox "Updated"
Call clearTxtBox(frmFeeAdd)
Call LCV(ComSSRNo)
End Sub
Private Sub ComSSRNo_Click()
Set r1 = con.Execute("select * from StudentRecord where SSR_Number = '" +
Trim(ComSSRNo.Text) + "'")
txtName.Text = r1.Fields("S_NAME")
txtFName = r1.Fields("F_NAME")
txtClassNo = r1.Fields("CLASS")
Image1.Picture = LoadPicture(r1.Fields("PHOTO"))
r1.Close
End Sub
Private Sub Form_Load()
Call connect
Call LCV(ComSSRNo)
txtAnnualDate = Format(Date, "dd-mm-yy")
txtTutionDate = Format(Date, "dd-mm-yy")
txtExamDate = Format(Date, "dd-mm-yy")
txtConDate = Format(Date, "dd-mm-yy")
End Sub
Private Sub LCV(Combo1 As ComboBox)
Combo1.Clear
Set r1 = con.Execute("select * from StudentRecord order by SSR_Number")
If r1.EOF = True Then
MsgBox "Student List Empty "
Exit Sub
End If
r1.MoveFirst
While Not r1.EOF
Combo1.AddItem r1.Fields("SSR_Number")
r1.MoveNext
Wend
r1.Close
End Sub
FrmFeeDelete - 1
Dim r1 As New ADODB.Recordset
Private Sub cmdAdd_Click()
Dim rs As New ADODB.Recordset
con.Execute ("DELETE from FeepaymentDetail where TrId = '" +
Trim(List1.Text) + "'")
MsgBox "DELETED"
Call clearTxtBox(FrmFeeDelete)
Call LCV(ComSSRNo)
List1.Clear
End Sub
Private Sub ComSSRNo_Click()
Set r1 = con.Execute("select * from StudentRecord where SSR_Number = '" +
Trim(ComSSRNo.Text) + "'")
txtName.Text = r1.Fields("S_NAME")
txtFName = r1.Fields("F_NAME")
txtClassNo = r1.Fields("CLASS")
Image1.Picture = LoadPicture(r1.Fields("PHOTO"))
r1.Close
'''''''''''''''''''''''''''''LOADING VALUES TO LIST BOX ''''''''''''''''''''''''''''''
Set r1 = con.Execute("select Trid from FeePaymentDetail where StudNo = '" +
Trim(ComSSRNo.Text) + "'")
List1.Clear
If r1.EOF = True Then
MsgBox "No Transation List Empty "
Exit Sub
End If
r1.MoveFirst
While Not r1.EOF
List1.AddItem r1.Fields("TrId")
r1.MoveNext
Wend
r1.Close
End Sub
Private Sub Form_Load()
Call connect
Call LCV(ComSSRNo)
End Sub
Private Sub LCV(Combo1 As ComboBox)
Combo1.Clear
Set r1 = con.Execute("select * from StudentRecord order by SSR_Number")
If r1.EOF = True Then
MsgBox "Student List Empty "
Exit Sub
End If
r1.MoveFirst
While Not r1.EOF
Combo1.AddItem r1.Fields("SSR_Number")
r1.MoveNext
Wend
r1.Close
End Sub
Private Sub List1_Click()
Set r1 = con.Execute("select * from FeepaymentDetail where TrId = '" +
Trim(List1.Text) + "'")
txtAnnualDate = r1.Fields("AnnualFeeDate")
txtAnnualPaid = r1.Fields("AnnualFeePaid")
txtTutionDate = r1.Fields("TutFeeDate")
txtTutionPaid = r1.Fields("TutFeePaid")
txtExamDate = r1.Fields("ExamFeeDate")
txtExamPaid = r1.Fields("ExamFeePaid")
txtConDate = r1.Fields("ConFeeDate")
txtConPaid = r1.Fields("ConFeePaid")
r1.Close
End Sub
frmFeeUpdate - 1
Dim r1 As New ADODB.Recordset
Private Sub cmdAdd_Click()
Dim rs As New ADODB.Recordset
rs.Open "select * from FeepaymentDetail where TrId = '" + Trim(List1.Text) + "'",
con, adOpenDynamic,
adLockOptimistic
rs.Update
rs.Fields("AnnualFeeDate") = txtAnnualDate
rs.Fields("AnnualFeepaid") = txtAnnualPaid
rs.Fields("TutFeeDate") = txtTutionDate
rs.Fields("TutFeepaid") = txtTutionPaid
rs.Fields("ExamFeeDate") = txtExamDate
rs.Fields("ExamFeepaid") = txtExamPaid
rs.Fields("ConFeeDate") = txtConDate
rs.Fields("ConFeepaid") = txtConPaid
rs.Update
rs.Close
MsgBox "Updated"
Call clearTxtBox(frmFeeUpdate)
Call LCV(ComSSRNo)
List1.Clear
End Sub
Private Sub ComSSRNo_Click()
Set r1 = con.Execute("select * from StudentRecord where SSR_Number = '" +
Trim(ComSSRNo.Text) + "'")
txtName.Text = r1.Fields("S_NAME")
txtFName = r1.Fields("F_NAME")
txtClassNo = r1.Fields("CLASS")
Image1.Picture = LoadPicture(r1.Fields("PHOTO"))
r1.Close
'''''''''''''''''''''''''''''LOADING VALUES TO LIST BOX ''''''''''''''''''''''''''''''
Set r1 = con.Execute("select Trid from FeePaymentDetail where StudNo = '" +
Trim(ComSSRNo.Text) + "'")
List1.Clear
If r1.EOF = True Then
MsgBox "No Transation List Empty "
Exit Sub
End If
r1.MoveFirst
While Not r1.EOF
List1.AddItem r1.Fields("TrId")
r1.MoveNext
Wend
r1.Close
End Sub
Private Sub Form_Load()
Call connect
Call LCV(ComSSRNo)
End Sub
Private Sub LCV(Combo1 As ComboBox)
Combo1.Clear
Set r1 = con.Execute("select * from StudentRecord order by SSR_Number")
If r1.EOF = True Then
MsgBox "Student List Empty "
Exit Sub
End If
r1.MoveFirst
While Not r1.EOF
Combo1.AddItem r1.Fields("SSR_Number")
r1.MoveNext
Wend
r1.Close
End Sub
Private Sub List1_Click()
Set r1 = con.Execute("select * from FeepaymentDetail where TrId = '" +
Trim(List1.Text) + "'")
txtAnnualDate = r1.Fields("AnnualFeeDate")
txtAnnualPaid = r1.Fields("AnnualFeePaid")
txtTutionDate = r1.Fields("TutFeeDate")
txtTutionPaid = r1.Fields("TutFeePaid")
txtExamDate = r1.Fields("ExamFeeDate")
frmFeeUpdate - 2
txtExamPaid = r1.Fields("ExamFeePaid")
txtConDate = r1.Fields("ConFeeDate")
txtConPaid = r1.Fields("ConFeePaid")
r1.Close
End Sub
Frmlibrary - 1
Private Sub Command1_Click()
Me.Hide
OLE1.DoVerb
End Sub
frmsearchFaculty - 1
Private Sub ComSSRNo_Click()
Adodc1.ConnectionString = "DSN=SmsDsn"
Adodc1.RecordSource = "SELECT * from facultyprofile where id = '" +
Trim(ComSSRNo.Text) + "'"
Adodc1.Refresh
DataGrid1.ReBind
DataGrid1.Refresh
DataGrid1.Visible = True
End Sub
Private Sub Form_Load()
Call connect
Call LCV(ComSSRNo)
End Sub
Private Sub LCV(Combo1 As ComboBox)
Combo1.Clear
Set r1 = con.Execute("select * from FacultyProfile order by id")
If r1.EOF = True Then
MsgBox "Faculty List Empty "
Exit Sub
End If
r1.MoveFirst
While Not r1.EOF
Combo1.AddItem r1.Fields("id")
r1.MoveNext
Wend
r1.Close
End Sub
frmStudentDelete - 1
Dim r1 As New ADODB.Recordset
Private Sub cmdAdd_Click()
con.Execute ("delete from StudentRecord where SSR_Number = '" +
Trim(ComSSRNo.Text) + "'")
MsgBox "Record Deleted"
Call clearTxtBox(frmStudentDelete)
Call LCV(ComSSRNo)
End Sub
Private Sub ComSSRNo_Click()
Set r1 = con.Execute("select * from StudentRecord where SSR_Number = '" +
Trim(ComSSRNo.Text) + "'")
txtName.Text = r1.Fields("S_NAME")
txtFName = r1.Fields("F_NAME")
txtName = r1.Fields("M_NAME")
txtFOccup = r1.Fields("F_OCCUPATION")
txtMoccup = r1.Fields("M_OCCUPATION")
txtDOB = r1.Fields("S_DOB")
txtGender = r1.Fields("S_GENDER")
txtClassNo = r1.Fields("CLASS")
txtCaste = r1.Fields("CASTE")
Image1.Picture = LoadPicture(r1.Fields("PHOTO"))
'txtPhoto.Text = r1.Fields("PHOTO")
txtAddress = r1.Fields("ADDRESS")
txtPhone = r1.Fields("PHONE")
txtAdmission = r1.Fields("DATEOFADMISION")
txtStatus = r1.Fields("STATUS")
r1.Close
End Sub
Private Sub Form_Load()
Call connect
Call LCV(ComSSRNo)
End Sub
Private Sub LCV(Combo1 As ComboBox)
Combo1.Clear
Set r1 = con.Execute("select * from StudentRecord order by SSR_Number")
If r1.EOF = True Then
MsgBox "Student List Empty "
Exit Sub
End If
r1.MoveFirst
While Not r1.EOF
Combo1.AddItem r1.Fields("SSR_Number")
r1.MoveNext
Wend
r1.Close
End Sub
frmStudentSerach - 1
Private Sub Combo1_Click()
Adodc1.ConnectionString = "DSN=SmsDsn"
Adodc1.RecordSource = "select * from StudentRecord where S_Name = '" &
Trim(Combo1.Text) & "'"
Adodc1.Refresh
DataGrid1.ReBind
DataGrid1.Refresh
'Adodc2.ConnectionString = "DSN=SmsDsn"
'Adodc2.RecordSource = "select * from FeePaymentDetail where StudNo = '" +
Trim(ComSSRNo.Text) + "'"
'Adodc2.Refresh
'DataGrid2.ReBind
'DataGrid2.Refresh
'Adodc3.ConnectionString = "DSN=SmsDsn"
'Adodc3.RecordSource = "select * from ExamResult where SRNO = '" +
Trim(ComSSRNo.Text) + "'"
'Adodc3.Refresh
'DataGrid3.ReBind
'DataGrid3.Refresh
DataGrid1.Visible = True
'DataGrid2.Visible = True
'DataGrid3.Visible = True
End Sub
Private Sub ComSSRNo_Click()
Adodc1.ConnectionString = "DSN=SmsDsn"
Adodc1.RecordSource = "select * from StudentRecord where SSR_Number = '"
& Trim(ComSSRNo.Text) & "'"
Adodc1.Refresh
DataGrid1.ReBind
DataGrid1.Refresh
Adodc2.ConnectionString = "DSN=SmsDsn"
Adodc2.RecordSource = "select * from FeePaymentDetail where StudNo = '" +
Trim(ComSSRNo.Text) + "'"
Adodc2.Refresh
DataGrid2.ReBind
DataGrid2.Refresh
Adodc3.ConnectionString = "DSN=SmsDsn"
Adodc3.RecordSource = "select * from ExamResult where SRNO = '" +
Trim(ComSSRNo.Text) + "'"
Adodc3.Refresh
DataGrid3.ReBind
DataGrid3.Refresh
DataGrid1.Visible = True
DataGrid2.Visible = True
DataGrid3.Visible = True
End Sub
Private Sub Form_Load()
Call connect
Call LCV(ComSSRNo)
Call LCVName(Combo1)
End Sub
Private Sub LCV(Combo1 As ComboBox)
Combo1.Clear
Set r1 = con.Execute("select * from StudentRecord order by SSR_Number")
If r1.EOF = True Then
MsgBox "Student List Empty "
Exit Sub
End If
r1.MoveFirst
While Not r1.EOF
Combo1.AddItem r1.Fields("SSR_Number")
r1.MoveNext
Wend
r1.Close
End Sub
Private Sub LCVName(Combo1 As ComboBox)
Combo1.Clear
Set r1 = con.Execute("select * from StudentRecord order by S_Name")
If r1.EOF = True Then
MsgBox "Student List Empty "
Exit Sub
End If
r1.MoveFirst
frmStudentSerach - 2
While Not r1.EOF
Combo1.AddItem r1.Fields("S_Name")
r1.MoveNext
Wend
r1.Close
End Sub
frmStudentUpdate - 1
Dim r1 As New ADODB.Recordset
Private Sub cmdAdd_Click()
Dim rs As New ADODB.Recordset
rs.Open "SELECT * FROM StudentRecord where SSR_Number = '" +
Trim(ComSSRNo.Text) + "'", con, adOpenDyn
amic, adLockOptimistic
With rs
.Update
.Fields("S_NAME") = Trim(txtName.Text)
.Fields("F_NAME") = Trim(txtFName)
.Fields("M_NAME") = Trim(txtName)
.Fields("F_OCCUPATION") = Trim(txtFOccup)
.Fields("M_OCCUPATION") = Trim(txtMoccup)
.Fields("S_DOB") = Trim(txtDOB)
.Fields("S_GENDER") = Trim(txtGender)
.Fields("CLASS") = Trim(txtClassNo)
.Fields("CASTE") = Trim(txtCaste)
.Fields("PHOTO") = Trim(txtPhoto.Text)
.Fields("ADDRESS") = Trim(txtAddress)
.Fields("PHONE") = Trim(txtPhone)
.Fields("DATEOFADMISION") = Trim(txtAdmission)
.Fields("STATUS") = Trim(txtStatus)
.Update
.Close
End With
MsgBox "SUCESSFULLY UPDATED"
''''''''''''''''''''''''''''''''END OF CODE TO INSERT'''''''''''''''''''''''''
Call clearTxtBox(frmStudentUpdate)
Call LCV(ComSSRNo)
End Sub
Private Sub Command2_Click()
CommonDialog1.InitDir = "c:\photo"
CommonDialog1.Filter = "Picture Files(*.jpg; *.bmp; *.gif;*.jpeg)|
*.jpg;*.bmp;*.gif;*.jpeg"
CommonDialog1.ShowOpen
txtPhoto.Text = CommonDialog1.FileName
Image1.Picture = LoadPicture(CommonDialog1.FileName)
End Sub
Private Sub ComSSRNo_Click()
Set r1 = con.Execute("select * from StudentRecord where SSR_Number = '" +
Trim(ComSSRNo.Text) + "'")
txtName.Text = r1.Fields("S_NAME")
txtFName = r1.Fields("F_NAME")
txtName = r1.Fields("M_NAME")
txtFOccup = r1.Fields("F_OCCUPATION")
txtMoccup = r1.Fields("M_OCCUPATION")
txtDOB = r1.Fields("S_DOB")
txtGender = r1.Fields("S_GENDER")
txtClassNo = r1.Fields("CLASS")
txtCaste = r1.Fields("CASTE")
Image1.Picture = LoadPicture(r1.Fields("PHOTO"))
'txtPhoto.Text = r1.Fields("PHOTO")
txtAddress = r1.Fields("ADDRESS")
txtPhone = r1.Fields("PHONE")
txtAdmission = r1.Fields("DATEOFADMISION")
txtStatus = r1.Fields("STATUS")
r1.Close
End Sub
Private Sub Form_Load()
Call connect
Call LCV(ComSSRNo)
End Sub
Private Sub LCV(Combo1 As ComboBox)
Combo1.Clear
Set r1 = con.Execute("select * from StudentRecord order by SSR_Number")
If r1.EOF = True Then
MsgBox "Student List Empty "
Exit Sub
End If
r1.MoveFirst
While Not r1.EOF
frmStudentUpdate - 2
Combo1.AddItem r1.Fields("SSR_Number")
r1.MoveNext
Wend
r1.Close
End Sub
frmStudInfo - 1
Option Explicit
Dim photoStr As String
'''''''''''''''''''''''''''''CODE TO INSERT RECORD ''''''''''''''''''''''''
Private Sub cmdAdd_Click()
Dim rs As New ADODB.Recordset
rs.Open "StudentRecord", con, adOpenDynamic, adLockOptimistic
With rs
.AddNew
.Fields("SSR_Number") = Trim(txtSrNo.Text)
.Fields("S_NAME") = Trim(txtName.Text)
.Fields("F_NAME") = Trim(txtFName)
.Fields("M_NAME") = Trim(txtName)
.Fields("F_OCCUPATION") = Trim(txtFOccup)
.Fields("M_OCCUPATION") = Trim(txtMoccup)
.Fields("S_DOB") = Trim(txtDOB)
.Fields("S_GENDER") = Trim(txtGender)
.Fields("CLASS") = Trim(txtClassNo)
.Fields("CASTE") = Trim(txtCaste)
.Fields("PHOTO") = Trim(txtPhoto.Text)
.Fields("ADDRESS") = Trim(txtAddress)
.Fields("PHONE") = Trim(txtPhone)
.Fields("DATEOFADMISION") = Trim(txtAdmission)
.Fields("STATUS") = Trim(txtStatus)
.Update
.Close
End With
MsgBox "SUCESSFULLY ADDED"
''''''''''''''''''''''''''''''''END OF CODE TO INSERT'''''''''''''''''''''''''
Call clearTxtBox(frmStudInfo)
End Sub
Private Sub Command2_Click()
CommonDialog1.InitDir = "c:\photo"
CommonDialog1.Filter = "Picture Files(*.jpg; *.bmp; *.gif;*.jpeg)|
*.jpg;*.bmp;*.gif;*.jpeg"
CommonDialog1.ShowOpen
txtPhoto.Text = CommonDialog1.FileName
Image1.Picture = LoadPicture(CommonDialog1.FileName)
End Sub
Private Sub Form_Load()
Call connect
txtAdmission.Text = Format(Date, "dd-mm-yy")
End Sub
frmWelcome - 1
Private Sub Command1_Click()
Unload Me
MDIForm1.Show
End Sub
Private Sub Timer1_Timer()
Label3.Left = Label3.Left + 100
If Label3.Left > Me.ScaleWidth Then
Timer1.Enabled = False
Timer2.Enabled = True
Call Timer2_Timer
End If
End Sub
Private Sub Timer2_Timer()
Label3.Left = 0
Timer2.Enabled = False
Timer1.Enabled = True
Call Timer1_Timer
End Sub
Private Sub Timer3_Timer()
Label4.Visible = False
Label6.Visible = True
End Sub
Private Sub Timer4_Timer()
Label4.Visible = True
Label6.Visible = False
End Sub
MDIForm1 - 1
Private Sub MenAdd_Click()
frmFeeAdd.Show
End Sub
Private Sub MenDelete_Click()
FrmFeeDelete.Show
End Sub
Private Sub MenExamAdd_Click()
frmExamResultAdd.Show
End Sub
Private Sub MEnExamDel_Click()
frmExamResultDelete.Show
End Sub
Private Sub MenExamUp_Click()
frmExamResultUpdate.Show
End Sub
Private Sub MenExit_Click()
End
End Sub
Private Sub MenFAcAdd_Click()
frmFacInfoEntry.Show
End Sub
Private Sub MenFacDel_Click()
frmFacultyDelete.Show
End Sub
Private Sub MENFACInFO_Click()
frmsearchFaculty.Show
End Sub
Private Sub MenFacUpd_Click()
frmFacInfoUpdate.Show
End Sub
Private Sub MENLOGIN_Click()
FRMLIBRARY.Show
End Sub
Private Sub MenStudADD_Click()
frmStudInfo.Show
End Sub
Private Sub MenStudDel_Click()
frmStudentDelete.Show
End Sub
Private Sub MENSTUDINFOSERACH_Click()
frmStudentSerach.Show
End Sub
Private Sub MenStudUpdate_Click()
frmStudentUpdate.Show
End Sub
Private Sub MENTTADD_Click()
FrmTimeTable.Show
End Sub
Private Sub MENTTDELETE_Click()
FRMTIMETABLEDELETE.Show
End Sub
Private Sub MENTTUP_Click()
frmTimetableUpdate.Show
End Sub
MDIForm1 - 2
Private Sub MenUpdate_Click()
frmFeeUpdate.Show
End Sub
Module1 - 1
Global con As ADODB.Connection
Global flag As Boolean
Public Sub main()
frmWelcome.Show
End Sub
Public Sub connect()
Set con = New ADODB.Connection
If con.State = 0 Then
con.Open ("dsn=smsDsn")
Else
End If
End Sub
Public Sub clearTxtBox(frmvar As Form)
Dim Control As Control
For Each Control In frmvar
If TypeOf Control Is TextBox Then Control.Text = ""
Next Control
End Sub
CODING FOR LIBRARY MODULE:

frmAbout - 1
Private Sub cmdOK_Click()
Unload Me
End Sub
Private Sub Form_Load()
'Shape1.BorderColor = vbBlack
End Sub
Private Sub Label2_Click()
End Sub
Private Sub Timer1_Timer()
'If Shape1.BorderColor = vbBlack Then
'Shape1.BorderColor = vbRed
'Else
'Shape1.BorderColor = vbBlack
'End If
End Sub
frmBooks - 1
Dim WithEvents adoPrimaryRS As Recordset
Dim WithEvents adoprimaryrs2 As Recordset
Dim mbChangedByCode As Boolean
Dim mvBookMark As Variant
Dim mbEditFlag As Boolean
Dim mbAddNewFlag As Boolean
Dim mbDataChanged As Boolean
Private Sub DComTitleId_Change()
Dim qunt As Integer
'Set adoPrimaryRS2 = New Recordset
adoprimaryrs2.MoveFirst
adoprimaryrs2.Find ("TitleId" & "='" & DComTitleId & "'")
qunt = adoprimaryrs2.Fields(1)
Combo2.Clear
For i = 1 To qunt
Combo2.AddItem (DComTitleId & "/" & i)
Next i
Combo2.ListIndex = 0
txtFields(1).Text = Combo2.Text
End Sub
Private Sub Form_Load()
Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & M.FileName
& ";"
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select
TitleId,BookId,Condition,IsIn,MemberId,ReturnDate,IssueCounter,ReserveI
d,TypeIssue from Books", db, adOpenStatic, adLockOptimistic
Set adoprimaryrs2 = New Recordset
adoprimaryrs2.Open "select TitleId,Quantity from Titles", db, adOpenStatic,
adLockOptimistic
Dim oText As TextBox
'Bind the text boxes to the data provider
For Each oText In Me.txtFields
Set oText.DataSource = adoPrimaryRS
Next
Dim oCheck As CheckBox
'Bind the check boxes to the data provider
For Each oCheck In Me.chkFields
Set oCheck.DataSource = adoPrimaryRS
Next
mbDataChanged = False
'Combo1.AddItem ("EXCELLENT")
Combo1.AddItem ("GOOD")
Combo1.AddItem ("POOR")
Combo1.AddItem ("WORST")
Combo1.AddItem ("MISSING")
Combo1.ListIndex = 0
comSearch.AddItem ("BookId")
comSearch.AddItem ("TitleId")
comSearch.AddItem ("MemberId")
comSearch.AddItem ("ReserveId")
comSearch.ListIndex = 0
txtFields(0).Locked = True
txtFields(1).Locked = True
Set DComTitleId.DataSource = adoprimaryrs2
Set DComTitleId.RowSource = adoprimaryrs2
DComTitleId.ListField = "TitleId"
If M.BooksCallByTitle Then
cmdAdd_Click
End If
End Sub
frmBooks - 2
Private Sub Form_Unload(Cancel As Integer)
Screen.MousePointer = vbDefault
End Sub
Private Sub adoPrimaryRS_MoveComplete(ByVal adReason As
ADODB.EventReasonEnum, ByVal pError As ADOD
B.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As
ADODB.Recordset)
'This will display the current record position for this recordset
lblStatus.Caption = "Record: " & CStr(adoPrimaryRS.AbsolutePosition)
End Sub
Private Sub adoPrimaryRS_WillChangeRecord(ByVal adReason As
ADODB.EventReasonEnum, ByVal cRecords A
s Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As
ADODB.Recordset)
'This is where you put validation code
'This event gets called when the following actions occur
Dim bCancel As Boolean
Select Case adReason
Case adRsnAddNew
Case adRsnClose
Case adRsnDelete
Case adRsnFirstChange
Case adRsnMove
Case adRsnRequery
Case adRsnResynch
Case adRsnUndoAddNew
Case adRsnUndoDelete
Case adRsnUndoUpdate
Case adRsnUpdate
End Select
If bCancel Then adStatus = adStatusCancel
End Sub
Private Sub cmdAdd_Click()
On Error GoTo AddErr
DComTitleId.Refresh
With adoPrimaryRS
If Not (.BOF And .EOF) Then
mvBookMark = .Bookmark
End If
.AddNew
lblStatus.Caption = "Add record"
mbAddNewFlag = True
SetButtons False
End With
txtFields(6).Text = "0"
txtFields(4) = "0"
txtFields(7) = "0"
Exit Sub
AddErr:
MsgBox Err.Description
End Sub
Private Sub cmdDelete_Click()
Dim q As Integer
On Error GoTo DeleteErr
With adoPrimaryRS
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
'update the title table
adoprimaryrs2.MoveFirst
adoprimaryrs2.Find ("TitleId" & "='" & txtFields(0).Text & "'")
q = adoprimaryrs2.Fields(1)
q=q-1
adoprimaryrs2.Fields(1) = q
adoprimaryrs2.Update
Exit Sub
DeleteErr:
MsgBox Err.Description
End Sub
frmBooks - 3
Private Sub cmdRefresh_Click()
'This is only needed for multi user apps
On Error GoTo RefreshErr
adoPrimaryRS.Requery
Exit Sub
RefreshErr:
MsgBox Err.Description
End Sub
Private Sub cmdEdit_Click()
On Error GoTo EditErr
lblStatus.Caption = "Edit record"
mbEditFlag = True
SetButtons False
'hide the combos cause no edit allowed to title id and bookid
Combo2.Visible = False
DComTitleId.Visible = False
Exit Sub
EditErr:
MsgBox Err.Description
End Sub
Private Sub cmdCancel_Click()
On Error Resume Next
SetButtons True
mbEditFlag = False
mbAddNewFlag = False
adoPrimaryRS.CancelUpdate
If mvBookMark > 0 Then
adoPrimaryRS.Bookmark = mvBookMark
Else
adoPrimaryRS.MoveFirst
End If
mbDataChanged = False
End Sub
Private Sub cmdUpdate_Click()
On Error GoTo UpdateErr
txtFields(2).Text = Combo1.Text
txtFields(0).Text = DComTitleId.Text
txtFields(1).Text = Combo2.Text
adoPrimaryRS.UpdateBatch adAffectAll
If mbAddNewFlag Then
adoPrimaryRS.MoveLast 'move to the new record
End If
mbEditFlag = False
mbAddNewFlag = False
SetButtons True
mbDataChanged = False
Exit Sub
UpdateErr:
MsgBox Err.Description
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdFirst_Click()
On Error GoTo GoFirstError
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
adoPrimaryRS.MoveFirst
frmBooks - 4
mbDataChanged = False
Exit Sub
GoFirstError:
MsgBox Err.Description
End Sub
Private Sub cmdLast_Click()
On Error GoTo GoLastError
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
adoPrimaryRS.MoveLast
mbDataChanged = False
Exit Sub
GoLastError:
MsgBox Err.Description
End Sub
Private Sub cmdNext_Click()
On Error GoTo GoNextError
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
If Not adoPrimaryRS.EOF Then adoPrimaryRS.MoveNext
If adoPrimaryRS.EOF And adoPrimaryRS.RecordCount > 0 Then
Beep
'moved off the end so go back
adoPrimaryRS.MoveLast
End If
'show the current record
mbDataChanged = False
Exit Sub
GoNextError:
MsgBox Err.Description
End Sub
Private Sub cmdPrevious_Click()
On Error GoTo GoPrevError
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
If Not adoPrimaryRS.BOF Then adoPrimaryRS.MovePrevious
If adoPrimaryRS.BOF And adoPrimaryRS.RecordCount > 0 Then
Beep
'moved off the end so go back
adoPrimaryRS.MoveFirst
End If
'show the current record
mbDataChanged = False
Exit Sub
GoPrevError:
MsgBox Err.Description
End Sub
Private Sub SetButtons(bVal As Boolean)
cmdAdd.Visible = bVal
cmdEdit.Visible = bVal
cmdUpdate.Visible = Not bVal
cmdCancel.Visible = Not bVal
cmdDelete.Visible = bVal
cmdClose.Visible = bVal
cmdRefresh.Visible = bVal
cmdNext.Enabled = bVal
cmdFirst.Enabled = bVal
cmdLast.Enabled = bVal
cmdPrevious.Enabled = bVal
frmBooks - 5
''extra code for our frame
Frame1.Enabled = bVal
Combo1.Visible = Not bVal
DComTitleId.Visible = Not bVal
Combo2.Visible = Not bVal
End Sub
Private Sub txtFields_Change(Index As Integer)
txtFields(Index).Text = UCase(Trim(txtFields(Index).Text))
End Sub
frmEmployees - 1
Dim WithEvents adoPrimaryRS As Recordset
Dim mbChangedByCode As Boolean
Dim mvBookMark As Variant
Dim mbEditFlag As Boolean
Dim mbAddNewFlag As Boolean
Dim mbDataChanged As Boolean
Private Sub cmdSearch_Click()
txtSearch = Trim(txtSearch)
adoPrimaryRS.MoveFirst
adoPrimaryRS.Find (comSearch.Text & "='" & txtSearch & "'")
If adoPrimaryRS.AbsolutePosition < 0 Then
MsgBox comSearch & " Not Found!!!"
adoPrimaryRS.MoveFirst
End If
End Sub
Private Sub Form_Load()
Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & M.FileName
& ";"
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select
EmployeeId,FirstName,LastName,Address,Email,Tel,Password from
Employees
", db, adOpenStatic, adLockOptimistic
Dim oText As TextBox
'Bind the text boxes to the data provider
For Each oText In Me.txtFields
Set oText.DataSource = adoPrimaryRS
Next
mbDataChanged = False
comSearch.AddItem ("EmployeeId")
comSearch.AddItem ("FirstName")
comSearch.AddItem ("LastName")
comSearch.AddItem ("Tel")
comSearch.ListIndex = 0
End Sub
Private Sub Form_Unload(Cancel As Integer)
Screen.MousePointer = vbDefault
End Sub
Private Sub adoPrimaryRS_MoveComplete(ByVal adReason As
ADODB.EventReasonEnum, ByVal pError As ADOD
B.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As
ADODB.Recordset)
'This will display the current record position for this recordset
lblStatus.Caption = "Record: " & CStr(adoPrimaryRS.AbsolutePosition)
End Sub
Private Sub adoPrimaryRS_WillChangeRecord(ByVal adReason As
ADODB.EventReasonEnum, ByVal cRecords A
s Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As
ADODB.Recordset)
'This is where you put validation code
'This event gets called when the following actions occur
Dim bCancel As Boolean
Select Case adReason
Case adRsnAddNew
Case adRsnClose
Case adRsnDelete
Case adRsnFirstChange
Case adRsnMove
Case adRsnRequery
Case adRsnResynch
Case adRsnUndoAddNew
Case adRsnUndoDelete
Case adRsnUndoUpdate
Case adRsnUpdate
answer = MsgBox("Are you sure of the changes made!!", vbYesNo)
If answer = vbNo Then
frmEmployees - 2
adoPrimaryRS.CancelUpdate
End If
End Select
If bCancel Then adStatus = adStatusCancel
End Sub
Private Sub cmdAdd_Click()
On Error GoTo AddErr
With adoPrimaryRS
If Not (.BOF And .EOF) Then
mvBookMark = .Bookmark
End If
.AddNew
lblStatus.Caption = "Add record"
mbAddNewFlag = True
SetButtons False
End With
Exit Sub
AddErr:
MsgBox Err.Description & "[cmdAdd_Click]"
End Sub
Private Sub cmdDelete_Click()
On Error GoTo DeleteErr
With adoPrimaryRS
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
Exit Sub
DeleteErr:
MsgBox Err.Description & "[cmdDelete_Click]"
End Sub
Private Sub cmdRefresh_Click()
'This is only needed for multi user apps
On Error GoTo RefreshErr
adoPrimaryRS.Requery
Exit Sub
RefreshErr:
MsgBox Err.Description & "[cmdRefresh_Click]"
End Sub
Private Sub cmdEdit_Click()
On Error GoTo EditErr
lblStatus.Caption = "Edit record"
mbEditFlag = True
SetButtons False
Exit Sub
EditErr:
MsgBox Err.Description & "[cmdEdit_Click]"
End Sub
Private Sub cmdCancel_Click()
On Error Resume Next
SetButtons True
mbEditFlag = False
mbAddNewFlag = False
adoPrimaryRS.CancelUpdate
If mvBookMark > 0 Then
adoPrimaryRS.Bookmark = mvBookMark
Else
adoPrimaryRS.MoveFirst
End If
mbDataChanged = False
End Sub
Private Sub cmdUpdate_Click()
On Error GoTo UpdateErr
frmEmployees - 3
adoPrimaryRS.UpdateBatch adAffectAll
If mbAddNewFlag Then
adoPrimaryRS.MoveLast 'move to the new record
End If
mbEditFlag = False
mbAddNewFlag = False
SetButtons True
mbDataChanged = False
Exit Sub
UpdateErr:
MsgBox Err.Description & "[cmdUpdate_Click]"
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdFirst_Click()
On Error GoTo GoFirstError
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
adoPrimaryRS.MoveFirst
mbDataChanged = False
Exit Sub
GoFirstError:
MsgBox Err.Description & "[cmdFirst_Click]"
End Sub
Private Sub cmdLast_Click()
On Error GoTo GoLastError
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
adoPrimaryRS.MoveLast
mbDataChanged = False
Exit Sub
GoLastError:
MsgBox Err.Description & "[cmdLast_Click]"
End Sub
Private Sub cmdNext_Click()
On Error GoTo GoNextError
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
If Not adoPrimaryRS.EOF Then adoPrimaryRS.MoveNext
If adoPrimaryRS.EOF And adoPrimaryRS.RecordCount > 0 Then
Beep
'moved off the end so go back
adoPrimaryRS.MoveLast
End If
'show the current record
mbDataChanged = False
Exit Sub
GoNextError:
MsgBox Err.Description & "[cmdNext_Click]"
End Sub
Private Sub cmdPrevious_Click()
On Error GoTo GoPrevError
frmEmployees - 4
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
If Not adoPrimaryRS.BOF Then adoPrimaryRS.MovePrevious
If adoPrimaryRS.BOF And adoPrimaryRS.RecordCount > 0 Then
Beep
'moved off the end so go back
adoPrimaryRS.MoveFirst
End If
'show the current record
mbDataChanged = False
Exit Sub
GoPrevError:
MsgBox Err.Description & "[cmdPrevious_Click]"
End Sub
Private Sub SetButtons(bVal As Boolean)
cmdAdd.Visible = bVal
cmdEdit.Visible = bVal
cmdUpdate.Visible = Not bVal
cmdCancel.Visible = Not bVal
cmdDelete.Visible = bVal
cmdClose.Visible = bVal
cmdRefresh.Visible = bVal
cmdNext.Enabled = bVal
cmdFirst.Enabled = bVal
cmdLast.Enabled = bVal
cmdPrevious.Enabled = bVal
''extra code for our frame
Frame1.Enabled = bVal
End Sub
Private Sub txtFields_LostFocus(Index As Integer)
'remove the extra spaces
txtFields(Index).Text = Trim(txtFields(Index).Text)
'MsgBox Index
'check for tel number
If Index = 5 Then
If Not IsNumeric(txtFields(Index).Text) Then
MsgBox "Enter a Telephone number!!!"
txtFields(Index).Text = ""
txtFields(Index).SetFocus
End If
End If
End Sub
frmIssue - 1
Dim db As Connection
Private Sub cmdcharge_Click()
If Trim(txtMemId) = "" Or Trim(txtBookId) = "" Then
MsgBox "Please enter the fields.."
Else
On Error GoTo aderr
Dim adoprimaryrs0 As Recordset
Set adoprimaryrs0 = New Recordset
adoprimaryrs0.Open "select price,titleid from Titles where titleId = '" &
lbltitle.Caption & "'", d
b, adOpenStatic, adLockOptimistic
Charge = adoprimaryrs0.Fields(0)
On Error GoTo aderr
Dim adoprimaryrs10 As Recordset
Set adoprimaryrs10 = New Recordset
adoprimaryrs10.Open "select memberid,finebal from members where memberId
= '" & Trim(txtMemId.Text)
& "'", db, adOpenStatic, adLockOptimistic
Charge = Charge + adoprimaryrs10.Fields(1)
adoprimaryrs10.Fields(1) = Charge
adoprimaryrs10.Update
Txtmemid_LostFocus
Exit Sub
aderr:
MsgBox Err.Description
End If
End Sub
Private Sub cmdIssue_Click()
If Trim(txtMemId) = "" Or Trim(txtBookId) = "" Then
MsgBox "Please enter the fields.."
Else
'make a module variable of max fine allowed to check here
If Val(lblfinebal.Caption) > M.MaxFineBal Then
MsgBox "Member should clear the Fines before issue"
txtBookId.Text = ""
txtMemId.SetFocus
Exit Sub
End If
'make a module variable of max books allowed to check here
If Val(lblbooks.Caption) >= M.TotalIssueBook Then
MsgBox " Memeber already has the maximum number of books"
txtBookId.Text = ""
txtMemId.SetFocus
Exit Sub
End If
If UCase(lblisin.Caption) = "FALSE" Then
MsgBox "Book is not in the library"
txtBookId.Text = ""
txtMemId.SetFocus
Exit Sub
End If
If UCase(lblcondt.Caption) = "MISSING" Then
MsgBox "Book is Missing"
txtBookId.Text = ""
txtMemId.SetFocus
Exit Sub
End If
If Not lblres.Caption = "0" And Trim(lblres.Caption) <> Trim(txtMemId.Text)
Then
MsgBox "This books is reserved by " & lblres.Caption
txtBookId.Text = ""
txtMemId.SetFocus
Exit Sub
End If
Dim adoprimaryrs1 As Recordset
Set adoprimaryrs1 = New Recordset
adoprimaryrs1.Open "select Subject from Titles where titleid ='" & lbltitle.Caption
& "'", db, adOpenStatic, adLockOptimistic
subj = adoprimaryrs1.Fields(0)
Dim adoprimaryrs2 As Recordset
frmIssue - 2
Set adoprimaryrs2 = New Recordset
adoprimaryrs2.Open "select
IssueDays,Noofbooks,FineCharge,ReserveCharge,Issuedays from Subjects
where Subject='" & subj & "'", db, adOpenStatic, adLockOptimistic
noofdaysx = adoprimaryrs2.Fields(4)
'MsgBox adoprimaryrs2.Fields(0) & adoprimaryrs2.Fields(1) &
adoprimaryrs2.Fields(2) & adoprimaryrs2.Fields(3)
Dim adoprimaryrs3 As Recordset
Set adoprimaryrs3 = New Recordset
adoprimaryrs3.Open "select titleid from books where memberid='" &
Trim(txtMemId.Text) & "'", db, ad
OpenStatic, adLockOptimistic
Dim adoprimaryrs4 As Recordset
Set adoprimaryrs4 = New Recordset
While Not adoprimaryrs3.EOF
adoprimaryrs4.Open "select Subject from Titles where titleid ='" &
adoprimaryrs3.Fields(0) & "'", db, adOpenStatic, adLockOptimistic
'MsgBox adoprimaryrs3.Fields(0) & adoprimaryrs4.Fields(0)
If subj = adoprimaryrs4.Fields(0) Then
Counter = Counter + 1
End If
adoprimaryrs3.MoveNext
adoprimaryrs4.Close
Wend
If Counter >= adoprimaryrs2.Fields(1) Then
MsgBox "Member has taken maximum number of books in the Subject: " & subj
txtBookId.Text = ""
txtMemId.SetFocus
Exit Sub
End If
Dim adoprimaryrs5 As Recordset
Set adoprimaryrs5 = New Recordset
adoprimaryrs5.Open "select memberid,BOOKID,ISIN,returndate from books ",
db, adOpenStatic, adLockOptimistic
adoprimaryrs5.Find ("BookId='" & txtBookId.Text & "'")
adoprimaryrs5.Fields(0) = Trim(txtMemId)
adoprimaryrs5.Fields(2) = False
adoprimaryrs5.Fields(3) = DateAdd("d", noofdaysx, Date)
adoprimaryrs5.Update
lblreturn.Caption = DateAdd("d", noofdaysx, Date)
Dim adoprimaryrs6 As Recordset
Set adoprimaryrs6 = New Recordset
adoprimaryrs6.Open "select MemberId,BooksInHand,FineBal from members
where memberid= '" & Trim(txtMemId.Text) & "'", db, adOpenStatic,
adLockOptimistic
'specal code for check ing the reserve charge '''
If lblres.Caption = Trim(txtMemId.Text) Then
adoprimaryrs6.Fields(2) = adoprimaryrs6.Fields(1) + adoprimaryrs2.Fields(4)
End If
adoprimaryrs6.Fields(1) = adoprimaryrs6.Fields(1) + 1
adoprimaryrs6.Update
txtBookId_LostFocus
Txtmemid_LostFocus
txtMemId.SetFocus
End If
Private Sub cmdrenewal_Click()
Dim adoprimaryrs1 As Recordset
Set adoprimaryrs1 = New Recordset
adoprimaryrs1.Open "select memberid,BOOKID,ISIN,returndate,issuecounter
from books where memberid='
" & Trim(txtMemId.Text) & "' and bookid='" & Trim(txtBookId.Text) & "'", db,
adOpenStatic, adLockOptimistic
If adoprimaryrs1.RecordCount = 0 Then
MsgBox "Member:" & txtMemId & " Doesn't have the Book:" & txtBookId
Exit Sub
End If
returndate = adoprimaryrs1.Fields(3)
If returndate < Date Then
MsgBox "You can't renewal this Book:" & txtBookId + vbCrLf + vbCrLf + "Please
Return the Book and p
ay the Fine"
frmIssue - 3
Exit Sub
End If
'''change the number to global issue counter variable'''''''''''
IssueCounter = adoprimaryrs1.Fields(4)
If IssueCounter > M.RenewalCounter Then
MsgBox "You can't renewal this Book:" + txtBookId + vbCrLf + " Member:" &
txtMemId & " have crossed
the Renewal Limit"
Exit Sub
End If
Dim adoprimaryrs11 As Recordset
Set adoprimaryrs11 = New Recordset
adoprimaryrs11.Open "select Subject from Titles where titleid ='" &
lbltitle.Caption & "'", db, adO
penStatic, adLockOptimistic
subj = adoprimaryrs11.Fields(0)
'MsgBox subj
Dim adoprimaryrs12 As Recordset
Set adoprimaryrs12 = New Recordset
adoprimaryrs12.Open "select issuedays,subject from Subjects where Subject='"
& subj & "'", db, adOpenStatic, adLockOptimistic
SubjectReturnDate = adoprimaryrs12.Fields(0)
adoprimaryrs1.Fields(3) = DateAdd("d", SubjectReturnDate, returndate)
adoprimaryrs1.Fields(4) = adoprimaryrs1.Fields(4) + 1
'MsgBox SubjectReturnDate
adoprimaryrs1.Update
lblreturn.Caption = adoprimaryrs1(3)
End Sub
Private Sub cmdReserve_Click()
If UCase(lblisin.Caption) = "TRUE" Then
MsgBox "Book is in the library"
txtBookId.Text = ""
txtMemId.SetFocus
Exit Sub
End If
If Not lblres.Caption = "0" And Trim(lblres.Caption) <> Trim(txtMemId.Text)
Then
MsgBox "This books is reserved by " & lblres.Caption
txtBookId.Text = ""
txtMemId.SetFocus
Exit Sub
End If
Dim adoPrimaryRS As Recordset
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select memberid,reserveid,bookid from books ", db,
adOpenStatic, adLockOptimistic
adoPrimaryRS.Find ("BookId='" & txtBookId.Text & "'")
adoPrimaryRS.Fields(1) = Trim(txtMemId)
adoPrimaryRS.Update
Txtmemid_LostFocus
txtBookId_LostFocus
End Sub
Private Sub cmdreturn_Click()
Dim adoprimaryrs1 As Recordset
Set adoprimaryrs1 = New Recordset
adoprimaryrs1.Open "select MemberId,BookId,IsIn,ReturnDate,IssueCounter
from Books where MemberId='
" & Trim(txtMemId.Text) & "' and bookid='" & Trim(txtBookId.Text) & "'", db,
adOpenStatic, adLockOptimistic
If adoprimaryrs1.RecordCount = 0 Then
MsgBox "Member:" & txtMemId & " Doesn't have the Book:" & txtBookId
Exit Sub
End If
If adoprimaryrs1.Fields(2) = True Then
MsgBox "The book:" & txtBookId & " is already in the Library"
Exit Sub
End If
returndate = adoprimaryrs1.Fields(3)
If returndate < Date Then
frmIssue - 4
FineDays = DateDiff("d", returndate, Date)
Dim adoprimaryrs11 As Recordset
Set adoprimaryrs11 = New Recordset
adoprimaryrs11.Open "select Subject from Titles where titleid ='" &
lbltitle.Caption & "'", db,
adOpenStatic, adLockOptimistic
subj = adoprimaryrs11.Fields(0)
Dim adoprimaryrs12 As Recordset
Set adoprimaryrs12 = New Recordset
adoprimaryrs12.Open "select issuedays,subject,finecharge from Subjects where
Subject='" & subj
& "'", db, adOpenStatic, adLockOptimistic
FineCharge = adoprimaryrs12.Fields(2)
MsgBox "The Member has Kept the Book:" & txtBookId & " For " & FineDays & "
days extra," & " and Mu
st pay Rs." & FineDays * FineCharge & "/-", vbInformation, "Fine Charged.."
Dim adoprimaryrs13 As Recordset
Set adoprimaryrs13 = New Recordset
adoprimaryrs13.Open "select MemberID,BooksInHand,FineBal from Members
where MemberId = '" & Trim(txtMemId) & "'", db, adOpenStatic,
adLockOptimistic
adoprimaryrs13.Fields(1) = adoprimaryrs13.Fields(1) - 1
adoprimaryrs13.Fields(2) = adoprimaryrs13.Fields(2) + (FineDays *
FineCharge)
adoprimaryrs1.Fields(2) = "True"
adoprimaryrs1.Fields(0) = "0"
adoprimaryrs13.Update
adoprimaryrs1.Update
End If
End Sub
Private Sub cmdMiss_Click()
Dim adoprimaryrs1 As Recordset
Set adoprimaryrs1 = New Recordset
adoprimaryrs1.Open "select
MemberId,BOOKID,ISIN,returndate,issuecounter,condition from books where
memberid='" & Trim(txtMemId.Text) & "' and bookid='" & Trim(txtBookId.Text) &
"'", db, adOpenStatic, adLockOptimistic
If adoprimaryrs1.RecordCount = 0 Then
MsgBox "Member:" & txtMemId & " Doesn't have the Book:" & txtBookId
Exit Sub
Else
Dim adoprimaryrs2 As Recordset
Set adoprimaryrs2 = New Recordset
adoprimaryrs2.Open "select price from titles,books where titles.titleid =
books.titleid and books.b
ookid='" & Trim(txtBookId.Text) & "'", db, adOpenStatic, adLockOptimistic
'MsgBox adoprimaryrs2.Fields(0)
Dim adoprimaryrs3 As Recordset
Set adoprimaryrs3 = New Recordset
adoprimaryrs3.Open "select FineBal,memberid from Members where MemberId
= '" & Trim(txtMemId) & "'"
, db, adOpenStatic, adLockOptimistic
adoprimaryrs3.Fields(0) = adoprimaryrs3.Fields(0) + adoprimaryrs2.Fields(0)
adoprimaryrs1.Fields(5) = "MISSING"
adoprimaryrs1.Update
adoprimaryrs3.Update
MsgBox "This is now marked as MISSING and its cost is added to Members
Fine Balance"
End If
End Sub
Private Sub Form_Load()
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & M.FileName
& ";"
End Sub
Private Sub Form_Unload(Cancel As Integer)
MDImain.munIssue.Enabled = True
MDImain.munRenewal.Enabled = True
MDImain.munReturn.Enabled = True
End Sub
Private Sub txtBookId_LostFocus()
Dim adoPrimaryRS As Recordset
If Trim(txtBookId) = "" Then
MsgBox "Please Enter the Book ID"
Else
txtBookId.Text = UCase(txtBookId)
Set adoPrimaryRS = New Recordset
frmIssue - 5
adoPrimaryRS.Open "select titleid,reserveid,condition,isin from Books where
BookId = '" & Trim(tx
tBookId) & "'", db, adOpenStatic, adLockOptimistic
On Error GoTo oerr1:
lbltitle.Caption = adoPrimaryRS.Fields(0)
lblres.Caption = adoPrimaryRS.Fields(1)
lblcondt.Caption = adoPrimaryRS.Fields(2)
lblisin.Caption = adoPrimaryRS.Fields(3)
End If
Exit Sub
oerr1:
MsgBox "Book ID Not found ..Try again", vbInformation + vbOKOnly, "No
Member ID"
txtBookId.Text = ""
txtBookId.SetFocus
End Sub
Private Sub Txtmemid_LostFocus()
Dim adoPrimaryRS As Recordset
If Trim(txtMemId) = "" Then
MsgBox "Please Enter the member ID"
Else
txtMemId.Text = UCase(txtMemId)
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select FirstName,LastName,BooksInHand,FineBal from
Members where MemberId = '" &
Trim(txtMemId) & "'", db, adOpenStatic, adLockOptimistic
On Error GoTo oerr
lblmemname.Caption = adoPrimaryRS.Fields(0) & " " & adoPrimaryRS.Fields(1)
lblfinebal.Caption = adoPrimaryRS.Fields(3)
lblbooks.Caption = adoPrimaryRS.Fields(2)
End If
Exit Sub
oerr:
MsgBox "Member ID Not found ..Try again", vbInformation + vbOKOnly, "No
Member ID"
txtMemId.Text = ""
txtMemId.SetFocus
End Sub
frmMembers - 1
Dim WithEvents adoPrimaryRS As Recordset
Dim mbChangedByCode As Boolean
Dim mvBookMark As Variant
Dim mbEditFlag As Boolean
Dim mbAddNewFlag As Boolean
Dim mbDataChanged As Boolean
Private Sub cmdSearch_Click()
txtSearch = Trim(txtSearch)
adoPrimaryRS.MoveFirst
adoPrimaryRS.Find (comSearch.Text & "='" & txtSearch & "'")
If adoPrimaryRS.AbsolutePosition < 0 Then
MsgBox comSearch & " Not Found!!!"
adoPrimaryRS.MoveFirst
End If
End Sub
Private Sub Form_Load()
Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & M.FileName
& ";"
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select
MemberId,FirstName,LastName,DateOfJoining,DateOfExpire,BooksInHand,Fin
e
Bal,Address,Tel,Email from Members", db, adOpenStatic, adLockOptimistic
Dim oText As TextBox
'Bind the text boxes to the data provider
For Each oText In Me.txtFields
Set oText.DataSource = adoPrimaryRS
Next
mbDataChanged = False
comSearch.AddItem ("MemberId")
comSearch.AddItem ("FirstName")
comSearch.AddItem ("LastName")
comSearch.ListIndex = 0
End Sub
Private Sub Form_Resize()
On Error Resume Next
lblStatus.Width = Me.Width - 1500
cmdNext.Left = lblStatus.Width + 700
cmdLast.Left = cmdNext.Left + 340
End Sub
Private Sub Form_Unload(Cancel As Integer)
Screen.MousePointer = vbDefault
End Sub
Private Sub adoPrimaryRS_MoveComplete(ByVal adReason As
ADODB.EventReasonEnum, ByVal pError As ADOD
B.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As
ADODB.Recordset)
'This will display the current record position for this recordset
lblStatus.Caption = "Record: " & CStr(adoPrimaryRS.AbsolutePosition)
End Sub
Private Sub adoPrimaryRS_WillChangeRecord(ByVal adReason As
ADODB.EventReasonEnum, ByVal cRecords A
s Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As
ADODB.Recordset)
'This is where you put validation code
'This event gets called when the following actions occur
Dim bCancel As Boolean
Select Case adReason
Case adRsnAddNew
Case adRsnClose
Case adRsnDelete
Case adRsnFirstChange
Case adRsnMove
Case adRsnRequery
Case adRsnResynch
Case adRsnUndoAddNew
frmMembers - 2
Case adRsnUndoDelete
Case adRsnUndoUpdate
Case adRsnUpdate
End Select
If bCancel Then adStatus = adStatusCancel
End Sub
Private Sub cmdAdd_Click()
On Error GoTo AddErr
With adoPrimaryRS
If Not (.BOF And .EOF) Then
mvBookMark = .Bookmark
End If
.AddNew
lblStatus.Caption = "Add record"
mbAddNewFlag = True
SetButtons False
End With
txtFields(3).Text = Date
txtFields(4).Text = DateAdd("m", M.MembershipDuration, Date)
txtFields(5).Text = "0" 'books in hand
txtFields(6).Text = M.MembershipFee
Exit Sub
AddErr:
MsgBox Err.Description
End Sub
Private Sub cmdDelete_Click()
On Error GoTo DeleteErr
If adoPrimaryRS.Fields(5) > 0 Then
MsgBox "The Member should return all the books before his record is Deleted"
Exit Sub
End If
If adoPrimaryRS.Fields(6) > 0 Then
MsgBox "The Member should clear all the Fines before his record is Deleted"
Exit Sub
End If
With adoPrimaryRS
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
Exit Sub
DeleteErr:
MsgBox Err.Description
End Sub
Private Sub cmdRefresh_Click()
'This is only needed for multi user apps
On Error GoTo RefreshErr
adoPrimaryRS.Requery
Exit Sub
RefreshErr:
MsgBox Err.Description
End Sub
Private Sub cmdEdit_Click()
On Error GoTo EditErr
lblStatus.Caption = "Edit record"
mbEditFlag = True
SetButtons False
Exit Sub
EditErr:
MsgBox Err.Description
End Sub
frmMembers - 3
Private Sub cmdCancel_Click()
On Error Resume Next
SetButtons True
mbEditFlag = False
mbAddNewFlag = False
adoPrimaryRS.CancelUpdate
If mvBookMark > 0 Then
adoPrimaryRS.Bookmark = mvBookMark
Else
adoPrimaryRS.MoveFirst
End If
mbDataChanged = False
End Sub
Private Sub cmdUpdate_Click()
On Error GoTo UpdateErr
adoPrimaryRS.UpdateBatch adAffectAll
If mbAddNewFlag Then
adoPrimaryRS.MoveLast 'move to the new record
End If
mbEditFlag = False
mbAddNewFlag = False
SetButtons True
mbDataChanged = False
Exit Sub
UpdateErr:
MsgBox Err.Description
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdFirst_Click()
On Error GoTo GoFirstError
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
adoPrimaryRS.MoveFirst
mbDataChanged = False
Exit Sub
GoFirstError:
MsgBox Err.Description
End Sub
Private Sub cmdLast_Click()
On Error GoTo GoLastError
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
adoPrimaryRS.MoveLast
mbDataChanged = False
Exit Sub
GoLastError:
MsgBox Err.Description
End Sub
Private Sub cmdNext_Click()
On Error GoTo GoNextError
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
If Not adoPrimaryRS.EOF Then adoPrimaryRS.MoveNext
frmMembers - 4
If adoPrimaryRS.EOF And adoPrimaryRS.RecordCount > 0 Then
Beep
'moved off the end so go back
adoPrimaryRS.MoveLast
End If
'show the current record
mbDataChanged = False
Exit Sub
GoNextError:
MsgBox Err.Description
End Sub
Private Sub cmdPrevious_Click()
On Error GoTo GoPrevError
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
If Not adoPrimaryRS.BOF Then adoPrimaryRS.MovePrevious
If adoPrimaryRS.BOF And adoPrimaryRS.RecordCount > 0 Then
Beep
'moved off the end so go back
adoPrimaryRS.MoveFirst
End If
'show the current record
mbDataChanged = False
Exit Sub
GoPrevError:
MsgBox Err.Description
End Sub
Private Sub SetButtons(bVal As Boolean)
cmdAdd.Visible = bVal
cmdEdit.Visible = bVal
cmdUpdate.Visible = Not bVal
cmdCancel.Visible = Not bVal
cmdDelete.Visible = bVal
cmdClose.Visible = bVal
cmdRefresh.Visible = bVal
cmdNext.Enabled = bVal
cmdFirst.Enabled = bVal
cmdLast.Enabled = bVal
cmdPrevious.Enabled = bVal
''extra code for our frame
Frame1.Enabled = bVal
txtFields(0).Enabled = Not bVal 'member ID
End Sub
Private Sub txtFields_LostFocus(Index As Integer)
If Index = 8 And Not IsNumeric(txtFields(Index).Text) Then
MsgBox "Enter a Telephone number!!!"
txtFields(Index).Text = ""
txtFields(Index).SetFocus
End If
End Sub
frmOptions - 1
Private Sub cmdCancel_Click()
MDImain.munOptions.Enabled = True
Unload Me
End Sub
Private Sub cmdOK_Click()
M.TotalIssueBook = txtTotalIssue.Text
M.MaxFineBal = txtMaxFine.Text
M.RenewalCounter = txtRenualCounter
M.MembershipDuration = txtDuration
M.MembershipFee = txtFees
M.RenewalFees = txtRenewal
Dim db As Connection, adoPrimaryRS As Recordset
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & M.FileName
& ";"
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select
TotalIssueBooks,RenewalCounter,MaxFineBal,MembershipDuration,
MembershipFee, RenewalFees from GlobalVariables", db, adOpenStatic,
adLockOptimistic
adoPrimaryRS.Fields(0) = txtTotalIssue.Text
adoPrimaryRS.Fields(1) = txtRenualCounter
adoPrimaryRS.Fields(2) = txtMaxFine.Text
adoPrimaryRS.Fields(3) = txtDuration
adoPrimaryRS.Fields(4) = txtFees
adoPrimaryRS.Fields(5) = txtRenewal
adoPrimaryRS.Update
db.Close
MDImain.munOptions.Enabled = True
Unload Me
End Sub
Private Sub Form_Load()
txtTotalIssue.Text = M.TotalIssueBook
txtMaxFine.Text = M.MaxFineBal
txtRenualCounter = M.RenewalCounter
txtDuration = M.MembershipDuration
txtFees = M.MembershipFee
txtRenewal = M.RenewalFees
End Sub
Private Sub txtDuration_LostFocus()
With txtDuration
If Not IsNumeric(.Text) Then
MsgBox "Enter a Number!!!"
.Text = ""
.SetFocus
End If
End With
End Sub
Private Sub txtFees_LostFocus()
With txtFees
If Not IsNumeric(.Text) Then
MsgBox "Enter a Number!!!"
.Text = ""
.SetFocus
End If
End With
End Sub
frmOptions - 2
Private Sub txtMaxFine_LostFocus()
With txtMaxFine
If Not IsNumeric(.Text) Then
MsgBox "Enter a Number!!!"
.Text = ""
.SetFocus
End If
End With
End Sub
Private Sub txtRenewal_LostFocus()
With txtRenewal
If Not IsNumeric(.Text) Then
MsgBox "Enter a Number!!!"
.Text = ""
.SetFocus
End If
End With
End Sub
Private Sub txtRenualCounter_LostFocus()
With txtRenualCounter
If Not IsNumeric(.Text) Then
MsgBox "Enter a Number!!!"
.Text = ""
.SetFocus
End If
End With
End Sub
Private Sub txtTotalIssue_LostFocus()
With txtTotalIssue
If Not IsNumeric(.Text) Then
MsgBox "Enter a Number!!!"
.Text = ""
.SetFocus
End If
End With
End Sub
frmpayfine - 1
Dim db As Connection
Private Sub cmdpay_Click()
Dim adoprimaryrs1 As Recordset
Set adoprimaryrs1 = New Recordset
If Val(lblfinebal.Caption) = 0 Then
MsgBox "The Member has no fine balance"
txtMemId.Text = ""
txtMemId.SetFocus
lblbooks.Caption = ""
lblfinebal.Caption = ""
lblmemname.Caption = ""
Exit Sub
Else
On Error GoTo oerr:
adoprimaryrs1.Open "select FirstName,LastName,BooksInHand,FineBal from
Members where MemberId = '"
& Trim(txtMemId) & "'", db, adOpenStatic, adLockOptimistic
adoprimaryrs1.Fields(3) = 0
adoprimaryrs1.Update
Dim adoprimaryrs2 As Recordset
Set adoprimaryrs2 = New Recordset
On Error GoTo oerr:
adoprimaryrs2.Open "select Memberid,fineamount,paydate from fine where
MemberId = '" & Trim(txtMemI
d) & "'", db, adOpenStatic, adLockOptimistic
adoprimaryrs2.AddNew
adoprimaryrs2.Fields(0) = Trim(txtMemId)
adoprimaryrs2.Fields(1) = Val(lblfinebal.Caption)
adoprimaryrs2.Fields(2) = Date
adoprimaryrs2.Update
txtMemId.Text = ""
txtMemId.SetFocus
lblbooks.Caption = ""
lblfinebal.Caption = ""
lblmemname.Caption = ""
End If
Exit Sub
oerr:
MsgBox Err.Description
End Sub
Private Sub Form_Load()
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & M.FileName
& ";"
End Sub
Private Sub Txtmemid_LostFocus()
Dim adoPrimaryRS As Recordset
If Trim(txtMemId) = "" Then
MsgBox "Please Enter the member ID"
Else
txtMemId.Text = UCase(txtMemId)
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select FirstName,LastName,BooksInHand,FineBal from
Members where MemberId = '"
& Trim(txtMemId) & "'", db, adOpenStatic, adLockOptimistic
On Error GoTo oerr
lblmemname.Caption = adoPrimaryRS.Fields(0) & " " & adoPrimaryRS.Fields(1)
lblfinebal.Caption = adoPrimaryRS.Fields(3)
lblbooks.Caption = adoPrimaryRS.Fields(2)
End If
Exit Sub
oerr:
MsgBox "Member ID Not found ..Try again", vbInformation + vbOKOnly, "No
Member ID"
txtMemId.Text = ""
txtMemId.SetFocus
End Sub
frmSubjects - 1
Dim WithEvents adoPrimaryRS As Recordset
Dim mbChangedByCode As Boolean
Dim mvBookMark As Variant
Dim mbEditFlag As Boolean
Dim mbAddNewFlag As Boolean
Dim mbDataChanged As Boolean
Private Sub cmdSearch_Click()
txtSearch = UCase(Trim(txtSearch))
adoPrimaryRS.MoveFirst
adoPrimaryRS.Find (comSearch.Text & "='" & txtSearch & "'")
If adoPrimaryRS.AbsolutePosition < 0 Then
MsgBox comSearch & " Not Found!!!"
adoPrimaryRS.MoveFirst
End If
End Sub
Private Sub Form_Load()
Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & M.FileName
& ";"
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select
Subject,NoOfBooks,IssueDays,FineCharge,ReserveCharge from Subjects", db
, adOpenStatic, adLockOptimistic
Dim oText As TextBox
'Bind the text boxes to the data provider
For Each oText In Me.txtFields
Set oText.DataSource = adoPrimaryRS
Next
mbDataChanged = False
comSearch.AddItem ("Subject")
comSearch.ListIndex = 0
End Sub
Private Sub Form_Unload(Cancel As Integer)
Screen.MousePointer = vbDefault
End Sub
Private Sub adoPrimaryRS_MoveComplete(ByVal adReason As
ADODB.EventReasonEnum, ByVal pError As ADOD
B.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As
ADODB.Recordset)
'This will display the current record position for this recordset
lblStatus.Caption = "Record: " & CStr(adoPrimaryRS.AbsolutePosition)
End Sub
Private Sub adoPrimaryRS_WillChangeRecord(ByVal adReason As
ADODB.EventReasonEnum, ByVal cRecords A
s Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As
ADODB.Recordset)
'This is where you put validation code
'This event gets called when the following actions occur
Dim bCancel As Boolean
Select Case adReason
Case adRsnAddNew
Case adRsnClose
Case adRsnDelete
Case adRsnFirstChange
Case adRsnMove
Case adRsnRequery
Case adRsnResynch
Case adRsnUndoAddNew
Case adRsnUndoDelete
Case adRsnUndoUpdate
Case adRsnUpdate
End Select
If bCancel Then adStatus = adStatusCancel
End Sub
Private Sub cmdAdd_Click()
On Error GoTo AddErr
With adoPrimaryRS
frmSubjects - 2
If Not (.BOF And .EOF) Then
mvBookMark = .Bookmark
End If
.AddNew
lblStatus.Caption = "Add record"
mbAddNewFlag = True
SetButtons False
End With
Exit Sub
AddErr:
MsgBox Err.Description
End Sub
Private Sub cmdDelete_Click()
On Error GoTo DeleteErr
With adoPrimaryRS
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
Exit Sub
DeleteErr:
MsgBox Err.Description
End Sub
Private Sub cmdRefresh_Click()
'This is only needed for multi user apps
On Error GoTo RefreshErr
adoPrimaryRS.Requery
Exit Sub
RefreshErr:
MsgBox Err.Description
End Sub
Private Sub cmdEdit_Click()
On Error GoTo EditErr
lblStatus.Caption = "Edit record"
mbEditFlag = True
SetButtons False
Exit Sub
EditErr:
MsgBox Err.Description
End Sub
Private Sub cmdCancel_Click()
On Error Resume Next
SetButtons True
mbEditFlag = False
mbAddNewFlag = False
adoPrimaryRS.CancelUpdate
If mvBookMark > 0 Then
adoPrimaryRS.Bookmark = mvBookMark
Else
adoPrimaryRS.MoveFirst
End If
mbDataChanged = False
End Sub
Private Sub cmdUpdate_Click()
On Error GoTo UpdateErr
adoPrimaryRS.UpdateBatch adAffectAll
If mbAddNewFlag Then
adoPrimaryRS.MoveLast 'move to the new record
End If
mbEditFlag = False
mbAddNewFlag = False
SetButtons True
mbDataChanged = False
frmSubjects - 3
Exit Sub
UpdateErr:
MsgBox Err.Description
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdFirst_Click()
On Error GoTo GoFirstError
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
adoPrimaryRS.MoveFirst
mbDataChanged = False
Exit Sub
GoFirstError:
MsgBox Err.Description
End Sub
Private Sub cmdLast_Click()
On Error GoTo GoLastError
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
adoPrimaryRS.MoveLast
mbDataChanged = False
Exit Sub
GoLastError:
MsgBox Err.Description
End Sub
Private Sub cmdNext_Click()
On Error GoTo GoNextError
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
If Not adoPrimaryRS.EOF Then adoPrimaryRS.MoveNext
If adoPrimaryRS.EOF And adoPrimaryRS.RecordCount > 0 Then
Beep
'moved off the end so go back
adoPrimaryRS.MoveLast
End If
'show the current record
mbDataChanged = False
Exit Sub
GoNextError:
MsgBox Err.Description
End Sub
Private Sub cmdPrevious_Click()
On Error GoTo GoPrevError
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
If Not adoPrimaryRS.BOF Then adoPrimaryRS.MovePrevious
If adoPrimaryRS.BOF And adoPrimaryRS.RecordCount > 0 Then
Beep
'moved off the end so go back
adoPrimaryRS.MoveFirst
End If
'show the current record
mbDataChanged = False
Exit Sub
frmSubjects - 4
GoPrevError:
MsgBox Err.Description
End Sub
Private Sub SetButtons(bVal As Boolean)
cmdAdd.Visible = bVal
cmdEdit.Visible = bVal
cmdUpdate.Visible = Not bVal
cmdCancel.Visible = Not bVal
cmdDelete.Visible = bVal
cmdClose.Visible = bVal
cmdRefresh.Visible = bVal
cmdNext.Enabled = bVal
cmdFirst.Enabled = bVal
cmdLast.Enabled = bVal
cmdPrevious.Enabled = bVal
''extra code for our frame
Frame1.Enabled = bVal
End Sub
Private Sub txtFields_LostFocus(Index As Integer)
'remove the extra spaces
txtFields(Index).Text = Trim(txtFields(Index).Text)
If Index = 0 Then
txtFields(Index).Text = UCase(txtFields(Index).Text)
Else
If Not IsNumeric(txtFields(Index).Text) Then
MsgBox "Enter a Number!!!"
txtFields(Index).Text = ""
txtFields(Index).SetFocus
End If
End If
End Sub
frmTitles - 1
Dim WithEvents adoPrimaryRS As Recordset
Dim mbChangedByCode As Boolean
Dim mvBookMark As Variant
Dim mbEditFlag As Boolean
Dim mbAddNewFlag As Boolean
Dim mbDataChanged As Boolean
Private Sub DCombo_Click(Area As Integer)
txtFields(3).Text = DCombo.Text
End Sub
Private Sub Form_Load()
Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=MSDataShape;Data
PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & M.FileName &
";"
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "SHAPE {select
TitleId,Title,Author,Subject,Quantity,AddOn,Price from Titles} A
S ParentCMD APPEND ({select titleId, BookId, MemberId, ReserveId,
ReturnDate, Condition, TypeIssue,I sIn, IssueCounter from Books } AS
ChildCMD RELATE TitleId TO TitleId) AS ChildCMD", db, adOpenStatic,
adLockOptimistic
Dim oText As TextBox
'Bind the text boxes to the data provider
For Each oText In Me.txtFields
Set oText.DataSource = adoPrimaryRS
Next
Set grdDataGrid.DataSource = adoPrimaryRS("ChildCMD").UnderlyingValue
mbDataChanged = False
Set adoprimaryrs2 = New Recordset
adoprimaryrs2.Open "select Subject from Subjects ", db, adOpenStatic,
adLockOptimistic
Set DCombo.DataSource = adoprimaryrs2
Set DCombo.RowSource = adoprimaryrs2
DCombo.ListField = "Subject"
End Sub
Private Sub Form_Resize()
On Error Resume Next
'This will resize the grid when the form is resized
grdDataGrid.Width = Me.ScaleWidth
grdDataGrid.Height = Me.ScaleHeight - grdDataGrid.Top - 30 -
picButtons.Height - picStatBox.Heigh
t
lblStatus.Width = Me.Width - 1500
cmdNext.Left = lblStatus.Width + 700
cmdLast.Left = cmdNext.Left + 340
End Sub
Private Sub Form_Unload(Cancel As Integer)
Screen.MousePointer = vbDefault
End Sub
Private Sub adoPrimaryRS_MoveComplete(ByVal adReason As
ADODB.EventReasonEnum, ByVal pError As ADOD
B.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As
ADODB.Recordset)
'This will display the current record position for this recordset
lblStatus.Caption = "Record: " & CStr(adoPrimaryRS.AbsolutePosition)
End Sub
Private Sub adoPrimaryRS_WillChangeRecord(ByVal adReason As
ADODB.EventReasonEnum, ByVal cRecords A
s Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As
ADODB.Recordset)
'This is where you put validation code
'This event gets called when the following actions occur
Dim bCancel As Boolean
Select Case adReason
Case adRsnAddNew
frmTitles - 2
Case adRsnClose
Case adRsnDelete
Case adRsnFirstChange
Case adRsnMove
Case adRsnRequery
Case adRsnResynch
Case adRsnUndoAddNew
Case adRsnUndoDelete
Case adRsnUndoUpdate
Case adRsnUpdate
End Select
If bCancel Then adStatus = adStatusCancel
End Sub
Private Sub cmdAdd_Click()
On Error GoTo AddErr
With adoPrimaryRS
If Not (.BOF And .EOF) Then
mvBookMark = .Bookmark
End If
.AddNew
lblStatus.Caption = "Add record"
mbAddNewFlag = True
SetButtons False
End With
Exit Sub
AddErr:
MsgBox Err.Description
End Sub
Private Sub cmdDelete_Click()
On Error GoTo DeleteErr
With adoPrimaryRS
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
Exit Sub
DeleteErr:
MsgBox Err.Description
End Sub
Private Sub cmdRefresh_Click()
'This is only needed for multi user apps
On Error GoTo RefreshErr
Set grdDataGrid.DataSource = Nothing
adoPrimaryRS.Requery
Set grdDataGrid.DataSource = adoPrimaryRS("ChildCMD").UnderlyingValue
Exit Sub
RefreshErr:
MsgBox Err.Description
End Sub
Private Sub cmdEdit_Click()
On Error GoTo EditErr
lblStatus.Caption = "Edit record"
mbEditFlag = True
SetButtons False
Exit Sub
EditErr:
MsgBox Err.Description
End Sub
Private Sub cmdCancel_Click()
On Error Resume Next
SetButtons True
mbEditFlag = False
mbAddNewFlag = False
adoPrimaryRS.CancelUpdate
If mvBookMark > 0 Then
adoPrimaryRS.Bookmark = mvBookMark
Else
frmTitles - 3
adoPrimaryRS.MoveFirst
End If
mbDataChanged = False
End Sub
Private Sub cmdUpdate_Click()
On Error GoTo UpdateErr
adoPrimaryRS.UpdateBatch adAffectAll
If mbAddNewFlag Then
adoPrimaryRS.MoveLast 'move to the new record
MsgBox "You have " & txtFields(4) & " Books under this Title, Please enter the
Books Data."
M.BooksCallByTitle = True
mbEditFlag = False
mbAddNewFlag = False
SetButtons True
mbDataChanged = False
frmBooks.Show
Exit Sub
End If
mbEditFlag = False
mbAddNewFlag = False
SetButtons True
mbDataChanged = False
Exit Sub
UpdateErr:
MsgBox Err.Description
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdFirst_Click()
On Error GoTo GoFirstError
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
adoPrimaryRS.MoveFirst
mbDataChanged = False
Exit Sub
GoFirstError:
MsgBox Err.Description
End Sub
Private Sub cmdLast_Click()
On Error GoTo GoLastError
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
adoPrimaryRS.MoveLast
mbDataChanged = False
Exit Sub
GoLastError:
MsgBox Err.Description
End Sub
Private Sub cmdNext_Click()
On Error GoTo GoNextError
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
If Not adoPrimaryRS.EOF Then adoPrimaryRS.MoveNext
If adoPrimaryRS.EOF And adoPrimaryRS.RecordCount > 0 Then
frmTitles - 4
Beep
'moved off the end so go back
adoPrimaryRS.MoveLast
End If
'show the current record
mbDataChanged = False
Exit Sub
GoNextError:
MsgBox Err.Description
End Sub
Private Sub cmdPrevious_Click()
On Error GoTo GoPrevError
'i dont want to make canges while moving << or >>
'just use the add update buttons
adoPrimaryRS.CancelUpdate
If Not adoPrimaryRS.BOF Then adoPrimaryRS.MovePrevious
If adoPrimaryRS.BOF And adoPrimaryRS.RecordCount > 0 Then
Beep
'moved off the end so go back
adoPrimaryRS.MoveFirst
End If
'show the current record
mbDataChanged = False
Exit Sub
GoPrevError:
MsgBox Err.Description
End Sub
Private Sub SetButtons(bVal As Boolean)
cmdAdd.Visible = bVal
cmdEdit.Visible = bVal
cmdUpdate.Visible = Not bVal
cmdCancel.Visible = Not bVal
cmdDelete.Visible = bVal
cmdClose.Visible = bVal
cmdRefresh.Visible = bVal
cmdNext.Enabled = bVal
cmdFirst.Enabled = bVal
cmdLast.Enabled = bVal
cmdPrevious.Enabled = bVal
'extra code
DCombo.Visible = Not bVal
txtFields(3).Visible = bVal
'cmdBooks.Enabled = bVal
'grdDataGrid.AllowUpdate = Not bVal
End Sub
Private Sub grdDataGrid_ButtonClick(ByVal ColIndex As Integer)
'MsgBox ColIndex & "=="
End Sub
Private Sub txtFields_LostFocus(Index As Integer)
txtFields(Index).Text = UCase(Trim(txtFields(Index).Text))
If Index = 4 Or Index = 6 Then
If Not IsNumeric(txtFields(Index).Text) Then
MsgBox "Enter a Number!!!"
txtFields(Index).Text = ""
frmTitles - 5
txtFields(Index).SetFocus
End If
End If
End Sub
MDImain - 1
Private Sub MDIForm_Load()
M.FileName = App.Path & "\library.mdb"
M.LoadGlobalVariables
'MsgBox M.TotalIssueBook & M.RenewalCounter & M.MaxFineBal
End Sub
Private Sub munAbout_Click()
frmAbout.Show
End Sub
Private Sub munBooks_Click()
frmBooks.Show
End Sub
Private Sub munEmployees_Click()
frmEmployees.Show
End Sub
Private Sub munFineBal_Click()
Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & M.FileName
& ";"
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select MemberId, BooksInHand, FineBal, Tel, Email,
Address from Members where FineBal>0", db, adOpenStatic, adLockOptimistic
Set FineBalReport.DataSource = adoPrimaryRS
FineBalReport.Show
End Sub
Private Sub munFineReport_Click()
Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & M.FileName
& ";"
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select MemberId,FineAmount,PayDate from Fine", db,
adOpenStatic, adLockOptimis
tic
Set FineReport.DataSource = adoPrimaryRS
FineReport.Show
End Sub
Private Sub munIssue_Click()
frmIssue.cmdIssue.Visible = True
frmIssue.cmdcharge.Visible = False
frmIssue.cmdrenewal.Visible = False
frmIssue.cmdreturn.Visible = False
frmIssue.Caption = "Issue Book"
munIssue.Enabled = False
munRenewal.Enabled = True
munReturn.Enabled = True
frmIssue.Show
End Sub
Private Sub munMembers_Click()
frmMembers.Show
End Sub
Private Sub munMiss_Click()
frmIssue.cmdIssue.Visible = False
frmIssue.cmdcharge.Visible = False
frmIssue.cmdrenewal.Visible = False
frmIssue.cmdreturn.Visible = False
frmIssue.cmdMiss.Visible = True
frmIssue.Caption = "Missing Book"
MDImain - 2
frmIssue.Show
End Sub
Private Sub munMissBook_Click()
Dim db As Connection
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & M.FileName
& ";"
Set adoPrimaryRS = New Recordset
SQL = "select Titles.TitleId,Titles.Subject,Titles.Title,Titles.Author,Books.BookId
from Books, titles where Titles.TitleId=Books.TitleID and books.condition =
'MISSING'"
adoPrimaryRS.Open sSQL, db, adOpenStatic, adLockOptimistic
Set MissReport.DataSource = adoPrimaryRS
MissReport.Show
End Sub
Private Sub munOptions_Click()
frmOptions.Show
munOptions.Enabled = False
End Sub
Private Sub munPayfine_Click()
frmpayfine.Show
End Sub
Private Sub munRenewal_Click()
frmIssue.cmdrenewal.Visible = True
frmIssue.cmdcharge.Visible = False
frmIssue.cmdIssue.Visible = False
frmIssue.cmdreturn.Visible = False
frmIssue.Show
frmIssue.Caption = "Book Renewal"
munRenewal.Enabled = False
munIssue.Enabled = True
munReturn.Enabled = True
End Sub
Private Sub munRes_Click()
frmIssue.cmdIssue.Visible = False
frmIssue.cmdcharge.Visible = False
frmIssue.cmdrenewal.Visible = False
frmIssue.cmdreturn.Visible = False
frmIssue.cmdReserve.Visible = True
frmIssue.Caption = "Reserve Book"
frmIssue.Show
End Sub
Private Sub munReturn_Click()
frmIssue.cmdreturn.Visible = True
frmIssue.cmdcharge.Visible = False
frmIssue.cmdIssue.Visible = False
frmIssue.cmdrenewal.Visible = False
frmIssue.Show
frmIssue.Caption = "Book Return"
munReturn.Enabled = False
munIssue.Enabled = True
munRenewal.Enabled = True
End Sub
Private Sub munSubjects_Click()
frmSubjects.Show
End Sub
Private Sub munTitles_Click()
frmTitles.Show
End Sub
M-1
Public FileName As String
Public BooksCallByTitle As Boolean
Public TotalIssueBook, RenewalCounter, MaxFineBal, MembershipDuration,
MembershipFee, RenewalFees As Integer
Public Sub LoadGlobalVariables()
Dim db As Connection
Dim adoPrimaryRS As Recordset
Set db = New Connection
db.CursorLocation = adUseClient
db.Open "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & M.FileName
& ";"
Set adoPrimaryRS = New Recordset
adoPrimaryRS.Open "select TotalIssueBooks,RenewalCounter,MaxFineBal,
MembershipDuration, MembershipFee, RenewalFees from GlobalVariables ",
db, adOpenStatic, adLockOptimistic
TotalIssueBook = adoPrimaryRS.Fields(0)
RenewalCounter = adoPrimaryRS.Fields(1)
MaxFineBal = adoPrimaryRS.Fields(2)
MembershipDuration = adoPrimaryRS.Fields(3)
MembershipFee = adoPrimaryRS.Fields(4)
RenewalFees = adoPrimaryRS.Fields(5)
db.Close
End Sub
BIBLIOGRAPHY

BIBLIOGRAPHY
1. An Introduction to Databse Management System by Bipin C Desai.

2. Software Engineering by Roger S. Pressman..

3. Software Engineering by Jalote.

4. PL/SQL by Evan Barros.

5. An Introduction to Databse Management System by C. J. Date.

6. Databse Concepts by Korth, Silbertz

7. Guide to Visual Basic 6.0 by Nortan & Groh

Das könnte Ihnen auch gefallen