Post on 29-Nov-2015
description
CHAPTER 1
INTRODUCTION
1.1 Background and Rationale
Legislative Tracking System is an internally – developed, web-based
application used to document the sanggunian documents and records and monitor
the status of state legislation applicable to the Sangguniang Bayan. Nowadays,
more institutions, be it public or private, are becoming very keen on
computerization. Through the advent of computers and application systems, the
time it takes to accomplish tasks is reduced making the office more efficient
further resulting in increased production or output. This is what the Sangguniang
Bayan of Jasaan Municipality hopes to achieve with the assistance of
Sangguniang Bayan Secretary and the proponents through the Legislative
Tracking System (LTS).
The Legislative Tracking System (LTS) is a way to monitor the process of
proposed ordinance and resolution. The LTS is a Computerized System that keeps
track, monitors the implementation, and stores proposed and approved ordinances
and resolutions. It provides easy retrieval of ordinances and resolutions either by
1
date, codification, author, or committee referral and is capable of tracking its
status and the committee it was referred to, therefore avoiding duplication in
passing ordinances with the same subject matter (Achie Migriño, 2011).
In the case of the manual tracking system of legislative of Sangguning
Bayan in Jasaan Municipality, Jasaan, Misamis Oriental, the proposed resolution
requested and submitted by the committee’s concerned with the same subject
matter can be a source of redundant data and the duration of time to find data
request such as municipal ordinance or resolution into a record book could be
inconvenient and time consuming to the legislative assistant. Aside from that, the
manual entering of data records may result work delay. The existing manual
tracking of ordinances and resolutions’ status was difficult to track due to
misplace of materials such as record book were the data recorded.
This project, Computerized Legislative Tracking System in Jasaan
Municipality will be conducted to enhance the existing manual tracking system in
retrieving ordinances and resolutions. The proposed LTS will provide solutions of
the said problems encountered in the Sangguniang Bayan. It is capable of
maintaining the data records secure and at the same time, only authorized
personnel can access the system. The ordinance code is part of the system that
will serve as the basis to identify the redundant data and easy retrieval of the
2
approved ordinances and resolutions. Finally, the data will be automatically stored
in the database and production will be increased.
1.2 Objectives
The study aims to develop a computerized legislative tracking system, to
aide the legislative assistant in performing his task. Specifically, this study aims to
achieve the following:
1. To design the Legislative Tracking System.
2. To develop the system using Visual Basic as the front end and MySQL as
the back end.
3. To evaluate the reliability and functionality of the system.
1.3 Significance of the Study
The findings of the study will be beneficial to the following:
1. The Sangguniang Bayan Secretary
The system will help to reduce the tasks taken by the Sanguniang Bayan
Secretary in terms of tracking, retrieving, recording and updating records of
ordinances and resolutions.
3
2. The Local Chief Executive
The system will provide information in which the Mayor of
Jasaan Municipality is the final decision maker in connected to the
ordinances and resolutions that are submitted by the Sangguniang Bayan
Secretary.
3. The Sanggunian Members
The system will give information to the Sangguniang Bayan members to
know what is the status of ordinances and resolutions, after submitted by the
Sangguniang Bayan Secretary to the Local Chief Executive.
1.4 Scope and Limitation
This study is an attempt to track the municipal ordinances and resolutions
that are submitted by a committee referral in the Sangguniang Bayan.
Furthermore, it will provide easy retrieval of ordinances and resolutions through
the date, codification, and author or committee referral.
1.5 Conceptual Framework
4
Figure 1.1 shows the schematic presentation of the legislative process
from proposal to approval of ordinances and resolutions. (See Figure)
The Local Government in Jasaan Municipality is divided into two
divisions which are the Legislative Division and Executive Division. In
Legislative, the municipal vice mayor that serves as the presiding officer of the
Sangguniang Bayan, which has no cases to break a deadlock and incase of
absence of the vice mayor, a temporary presiding officer is elected by the
Sangguniang Bayan members of councilors present at the session. On the other
hand, in Executive, the Local Chief Executive (Mayor) vetoes an ordinance, it is
sent back to the Sangguaning Bayan to reconsider the objections; however the
Sangguniang Bayan may oerride such veto by a two-thirds vote of all its members
which renders the measure’s approval. With regard to ordinances pertaining to
appropriations; or resolutions for payments of money, the adoption of local
development plans or public investment plans or public investment programs, or
the creation of liabilities, the mayor may just veto particular items in it. Any veto
action must be communicated with the Sangguniang Bayan within ten days
otherwise the ordinance is considered approved. Furthermore, the Lesilative
Division and Executive Division has equal power but has different functions
within a Municipality.
5
The Sangguniang Bayan members introduce an ordinance or resolution
and records in a logbook. In this process, there are three readings involved to
approved ordinance and resolutions. In first reading, the Secretary reads the draft
ordinance, and then the Presiding Officer (PO) assigns same to appropriate
committee(s) to study same, hold hearings and debates. In second reading, the
conditions of debate and amendments are take place. In final reading, after
amendments have been suitably incorporated; debate is often waived and
amendments need unanimous consent at this stage. The vote following the reading
is final. Otherwise, if defeated, the ordinance is shelved in the Sanggunian
archives. If passed by the Sanggunian the ordinance is sent for approval of the
Local Chief Executive either approve or veto.
6
Figure 1.1 Conceptual Framework
7
CHAPTER 2
REVIEW OF RELATED LITERATURE
2.1 Philippine Setting
This section reviews three major researches about information of
legislative tracking system conducted in the Philippines. Those of Isde (2010),
PIA Press Release (2011), and (Achie Migriño, 2011).
The Sanggunian Panlalawigan is hoping that the legislative agenda for the
present members of the provincial board would be implemented including one of
their projects particularly its computerization of all legislative documents or the
Legislative Tracking System is one the main project of the provincial government
under Governor Jericho “Icot” Petilla and the Sangguniang Panlalawigan which is
headed by Bagulaya to help the municipality in the province keep track through
the use of the Internet on the status of their submitted ordinances (Isde, 2010).
The procedure of this study is to implement the computerization at the
present most private and public institutions are keen to the computerization
scheme as it would make their job easier and efficient and help increase their
8
output and resolutions. In the participation of the Department of Interior and
Local Government is working with the provincial board on this undertaking. We
have provided the equipment for the Legislative Tracking system (LTS) and the
Department of Interior and Local Government (DILG) provided us technical
assistance by conducting training of how to use the system, Bagulaya explained.
This is one way of helping local government units far from Tacloban save money
when verifying the status of their local ordinances that is subject for review by the
members of the provincial board (Isde, 2010).
The research findings on legislative which revealed that once the
computerization project of the provincial board is complete, it would make their
job easier as it would provide easier access to the various local legislative bodies
in the province as well as that Legislative Tracking System (LTS) would also help
them keep track the approved ordinances by the provincial board, monitor their
implementation, and store proposed and approved ordinances and resolutions
(Isde, 2010).
The Sangguniang Panlalawigan (SP) have recently passed a resolution
authorizing Governor Hermogenes Ebdane to transact with a software solutions
company for the implementation of the second phase, and the suggested third
phase of digitalizing office task and procedures (Pia Press Release, 2011).
9
Pia Press Release (2011) added that the Project DTRAX of Document
Tracking System is a part of a three-series projects awarded to Geodata Solutions
Incorporation. The company is the sole distributor of such software. The three
million peso projects, with first phase Real Property Tax already being used by
the provincial government, was supposed to be a two-series project with
Document Tracking System (DTRAX) as phase 2. Aside from that, the
Legislative Management Information System (LEGMIS) was thus suggested to be
included in the resolution, giving Governor Ebdane a free hand to enter into
contracts with Geodata in all three phases (AMV/PIA Zambales/VGO). The
procedure of the project is programmed to help in the easy retrieval and
distribution of documents allowing a faster flow of information among office.
This system provides a document bar codification which would give identity to it,
rendering its easy retrieval. It also safe- keeps records and archives since the
software could produce soft copies of documents (Pia Press Release, 2011).
The findings of the project which the Vice-Governor Ramon Lacbain II
and the Sangguniang Panlalawigan (SP) members saw that the software would be
very beneficial and would considerably add to the effectiveness of the legislative
functions of the government based on the presentation of the solutions company
where it presented the Legislative Management System (Pia Press Release, 2011).
10
On the final related study conducted by the Provincial Government of
Bohol entitled Legislative Tracking System: Technology at your fingertips. The
Sangguniang Panlalawigan of Bohol hopes to achieve with the assistance of the
League of the Vice Governor of the Philippines through the Legislative Tracking
System (LTS) the accomplishments of task that is cut down in half making the
office more efficient further resulting in increased production or output. The said
system has already been installed in six provinces including Bohol, South
Cotabato, Saranggani, Isabela, Zambales and Aklan (Achie Migriño, 2011).
The procedure of the this study is to implement the Legislative Tracking
System (LTS) that keeps track, monitors the implementation, and stores proposed
and approved ordinances and resolutions which provides easy retrieval either by
date, codification, author, or committee referral and is capable of tracking its
status and the committee it was referred to, therefore avoiding duplication in
passing ordinances with the same subject affair (Achie Migriño, 2011).
The research findings that once the Legislative Tracking System is place,
the Computer operator (the staff) can exchange information within the
Sanggunian with regards to legislative initiatives and other related topics that
incorporate access security codes for every module. It also takes the Sanggunian a
step closer to its fullest capacity, and its future that of the most efficient, effective
and capable organization (Achie Migriño, 2011).
11
2.2 Foreign Setting
This section reviews three major researches about the information and
used of legislative tracking system conducted by foreign researchers. Those of
Bourguard (2011), Hoffman (1981), and Baker (2002).
The changes occur so frequently in the companies that monitor and analyze
legislative in the 50 states that you almost need a scorecard to track the legislative
trackers (Bourguard, 2011).
The LexisNexis recently announced the purchase of StateNet, a legislative
and regulatory tracking service headquartered in Sacramento, California. In
addition to StateNet, there are several other companies that offer online access to
the full text of legislation in the 50 states: such as Capitol Watch (formerly
NetScan) provides access to legislative in all 50 states and in the US Congress and
is one of many database available through a leading legal information services,
WestLaw. Another one, CQ StateTrack (formerly TrendTrack) is a 50-state
legislative tracking service that offers custom email alerts, tailored bill reports and
interactive map-based displays of states with legislation identified in searches.
Finally, StateScape also covers all 50 states, the federal government and hundreds
of localities through its web-based legislative and regulatory monitoring services.
Their legislative tracking system, LegisTrack, also offers the capability to identify,
categorized and monitor and create customized reports on bills of interest
12
(Bourguard, 2011).
The procedure of this study to tackle the online legislative tracking services
which the NCSL has partnered with StateNet, a member of the NCSL Foundation
for State Legislatures, to develop its 50-state Bill Information Service (BIS), which
provides the full text of state and federal legislation and related information to state
legislatures through the NCSL website (Bourguard, 2011).
The findings of the study that StateNet provides online access to the full
text of regulations and legislation along with related legislative documents such as
fiscal notes, committee reports and schedules and member biographies. StateNet’s
legislative and regulatory content complements the extensive online resources of
LexisNexis, which include the full text of state and federal statutes and case law,
and a variety of legal, business, government and academic publications
(Bourguard, 2011).
An American University Law Institute entitled A Legislative Tracking and
Monitoring System for the California Judges Association. The study focused on
the increased bill activity within the legislative itself, particularly in the criminal
justice area, requiring more California Judges Association examinations and
decisions. The study also was undertaken to realize the extent of the growth on the
California Judges Association (CJA) Legislative Program, nor the mounting
difficulty of carrying it out well (Beatrice Hoffman, 1981).
13
Since the amount of work involved in supporting or opposing a bill is
associated with its level of importance to CJA, priority designation should help the
Board recognize the work implications of each position it approves. It is hoped that
assigning priority classifications will help limit the total number of bills in each
category on which positions are taken. Also, if there is a conflict regarding
testimonials schedules or letter production, the priority number easily solves the
problems as to which bill take precedence (Beatrice Hoffman, 1981).
A CJA Legislative Tracking and Monitoring System have been designed
to fulfill its requirements. The model includes all duties linked to the priority
classification system previously described. The model also involves a substantial
increase in the amount of work produced by the CJA staff. This system requires
the creation of a California Judges Association Legislative File, which will permit
the recording of activity CJA take at important steps within the life of proposed
legislation. The Legislative File is in addition to the History of File (storing of one
copy of each Bill received) and the Current File (a File Folder containing on copy
of the Bill plus other important relevant documents; one File Folder per bill). It
also in addition to a weekly Calendar of Legislative Hearings and a Status Report
of legislation, prepared for the CJA Board Meeting. It replaces all other records or
notations that list CJA activity, e.g., a list of Bills sent to committee Chairmen.
The study concludes that CJA’s legislative monitoring system improved the
14
policy decisions as to the scope of its program (Beatrice Hoffman, 1981).
On the final related study conducted that entitled A solution to Prison
Overcrowding and Recidivism: Global Positioning System Location of Parolees
and Probationers focuses on location and data management technology for use in
the criminal justice system, with an emphasis on monitoring probationers and
parolees (Jordan Baker, 2002).
The study explores the philosophy of incarceration and parole, current
trends in correctional manpower and technology, offices burnout, case law, and
privacy concerns. Specific evaluation is made of existing and on-the-horizon
location technology for use in probation monitoring. In light of current problems
in the correction fields, the study proposes and evaluates the efficacy of a novel -
technology – the Sentinel Location System – for use in probations and parolees
monitoring programs (Jordan Baker, 2002).
The Innovative Tracking Systems team has engineered a novel two-part
location tracking and monitoring system as the founding technology of their start-
up business, TRX Systems. Use of TRX’s Sentinel Location and Location
Management Systems will provide parole and probation officers with highly
accurate data to assess the compliance of an individual with the terms of release.
The study conclude that supervision of no incarcerated offenders is a great need in
the modern United States and that SLS technology protects the safety of the
15
community better and is more sensitive to the rights of the offender than any other
currently available technique; thus it is that we believe that the Sentinel Location
System is a just and practical solution to the problems plaguing the United States
Criminal Justice System today (Jordan Baker, 2002).
16
CHAPTER 3
METHODOLOGY
3.1 Research Setting
The study will be conducted in the office of Sangguniang Bayan which is
the legislative division in Jasaan Municipality. The sanggunian bayan secretary
has tasks to participate transaction in order to disseminate proposed measures
submitted by the committee’s concerned to all committee members for the
approval of the said measures in the local government.
3.2 Design the Legislative Tracking System
3.2.1. Relational Schema
In figure 3.2.1. shows the relationships between the tables. Furthermore,
each table contains entities, attributes, cardinality, primary keys and foreign keys.
17
Figure 3.2.1 Relational Schema
18
3.2.2 Entity - Relationship Diagram
In figure 3.2.2 shows the relationship and connection among entities of the
system. The tbllocal_legislation contains tblcommittee_report, tbluser_account
that can access to tblset_of_sanggunian and it has tbllog_time. The
tblsanggunian_session records tblsanggunian_attendance, tblcommittee_member
that views tblset_of_sanggunian and it has tbllog_time that can access to
tbluser_account. The tblstanding_committee contains tblmember_profile that
connected to tblsanggunian_session and tblsession. Moreover, the tbllogin_time
has tblset_of_sanggunian that can access to tbluser_account which is connected to
tblset_of_sanggunian, tblsanggunian_session that contains tblsession,
tbllocal_legislation, tblsanggunian_member that has tbldesignation and records
tblsanggunian_member.
19
Figure 3.2.2 Entity – Relationship Diagram
20
3.2.3 Program Flowchart
Figure 3.2.3 shows the flow of data throughout the system. Furthermore,
the proposed ordinance and resolution that are submitted from standing committee
will be forwarded to the Secretary of Sanggunian for reviewing the draft of
ordinance then the Presiding Officer (PO) will assign the committee to hold a
hearing and debate as it is the process of the first reading. On second reading, it
will be referred to the committee concerned who is involved in committee
hearing, committee meeting, and the committee report, that includes findings and
recommendations; to file it away or to calendar it for second reading specifically
the period of debate, period of amendment and approval on second reading then
the Secretary will print a copy of the final version and furnishing a copy thereof
for all members. On final reading, it will be submitted to the Local Chief
Executive for approval otherwise as a veto.
21
Figure 3.2.3 Existing Program Flowchart
22
3.2.4 LTS Use Case Diagram
Figure 3.2.4 shows the Use Case diagram that describes the interaction
between the system and the users. Specifically, to determine the function of the
Sangguniang Bayan Secretary which will be tasks to login the system, add, edit,
view and print records. Moreover, the other user which are the local chief
executive and sangguniang bayan members as well will be task to login and view
the system.
Figure 3.2.4 LTS Use Case Diagram
23
3.2.5 Activity Diagram
Figure 3.2.5 shows the activity diagram that describes the interface of the
system. First, the user must log in according to their specific function. Afterwards,
the main form will display with different options. If the user selects the said
option then another form will be display that the user can either view records or
print.
View Records
Figure 3.2.5 Activity Diagram of View Records
24
Figure 3.2.6 shows the activity diagram for add/edit records interface the
main form will display with options. Same with on what stated above, but the
different is; this area will be covered on how to add/edit records with regard to the
approved ordinance and resolution.
Add / Edit Records
Figure 3.2.6 Activity Diagram of Add / Edit Records
25
3.2.7 Data Dictionary
Table 3.1 shows the table name, attribute name, description, type, format,
range, the primary key and the foreign key, and the foreign key referenced table
of the data dictionary for sbdata database. Furthermore, it describe the function of
every field including the relationship of each table.
Table 3.1 Data Dictionary (1 of 4)
26
Data Dictionary (2 of 4)
27
Data Dictioanry (3 of 4)
28
Data Dictioanry (4 of 4)
29
FK = Foreign Key
PK = Primary Key
CHAR = Fixed character length data, 1 to 255 characters.
VARCHAR = Variable character length data, 1 to 2,000 characters. May also be
labeled VARCHAR2 in Oracle.
INT = Integer values only.
DATE formats may vary. Commonly accepted are: ‘DD-MON-YYYY’,
‘MM/DD/YYYY’, or ‘MM/DD/YY’.
30
3.3 Develop the system using Visual Basic as the front end and MySQL and
Microsoft Office Access as the back end
The proposed Legislative Tracking System in Jasaan Municipality will
run using Visual Basic Studio 6.0 under the Microsoft Operating System. Visual
Basic will serves as the front-end which is accessible to the users. The proponents
applied WAMP Server 2.0 (MySQL) and Microsoft Office Access since the
system needed a complete database. The database should contain tables and fields
to meet the requirements of the system. The connection between the two
softwares requires MySQL ODBC 3.51 Driver nor MySQL ODBC 5.1 Driver. If
the installation of three softwares is taken place, the proposed Legislative
Tracking System will ready to function.
3.3.1 Requirements Specification
This part presents the requirements for the execution of the program.
Table 3.3.1.1 shows the software requirements for the system to run as
well as its specification and description.
31
Table 3.3.1.1 Software Specification
Classification Specification Description
Back-end MySQL
Serves as the database of the system
since the proposed Legislative
Tracking System needs a complete
database.
Front-end Visual Basic 6.0A part which is accessible by everyone
that displays Graphical User Interface.
Operating System Windows 7
Software consisting of programs and
data that runs on computers and
manages computer hardware resources.
Software for Data
Base DesignDbSchema
Use to produce a detailed data model of
a database.
Table 3.3.1.2 shows the hardware requirements as well as its specification
and description.
Table 3.3.1.2 Hardware Requirements
Hardware Specification Description
Monitor LCDAn electronic visual display for computer. The monitor
comprises the display device circuitry and enclosure.
Power
Supply22050-60 Hz 5A
Converts alternating current (AC) to direct current
(DC).
32
Hard disk
Drive
320 GB
SATA
The mechanism that controls the positioning, reading,
and writing of the hard disk, which furnishes the largest
amount of data storage for the PC.
AVR 220 V
A device that maintain the terminal voltage of a
generator within required limits variation in input
voltage or load
Central
Processing
Unit
Pentium® Dual-Core
Interprets and carries out basic instructions that operate
a computer.
Memory DDR3-1333U Electronic circuitry that holds binary data.
Keyboard Intex IT-2014B A primary text input device.
MouseIT-OP51 Mouse Opti
Flash (PS/2)
The standard mouse interface for the vast majority of
computers with ATX and similar motherboards.
Printer Epson Stylus T13 An output device that prints the results of data
processing.
3.4 Evaluate the reliability and functionality of the System
3.4.1 Interview Process
The information gathered through interviews and observations will be the
data being used with the system. In order to get more accurate data, the
researchers conducted a series of interview in order to identify the problems. The
proponents gathered data that are needed for the the improvement of the existing
33
system and produced a documentary about the manual process of tracking the
proposed ordinances and resolutions in Sangguniang Bayan in Jasaan
Municipality to establish evidence about the existing problem met in Sangguniang
Bayan Office.
3.4.2 Functionality of the System
The proponents utilized a modified performance evaluation of the system
as a tool in gathering pertinent data/information.
The rating scale is being used to have the exact limits with five levels
using the Likert scale, which is to determine the level of functionality. Each scale
has an assigned numeric value and adjective equivalent as follows:
Range of Means Verbal Description Descriptive Interpretation
5 Outstanding This indicates that the given criterion is implemented outstanding as the basis of functionality.
4 Very Satisfactory This indicates that the given criterion is implemented very satisfactory as the basis of functionality.
3 Satisfactory This indicates that the given criterion is implemented satisfactory as the basis of functionality.
2 Unsatisfactory This indicates that the given criterion is implemented unsatisfactory as the basis of functionality.
1 Poor This indicates that the given criterion is implemented poor as the basis of
34
functionality.
The statistical tool were used by the researchers in the data analysis.
Mean. This was used in determining the level of functionality of local
legislation.
CHAPTER 4
35
RESULTS AND DISCUSSION
4.1. Development of the System
This section, shows the user interface of the Legislative Tracking System
in Jasaan Municipality with its specific functions. Through the use of Visual
Basic components, tools such as buttons, textbox, picturebox, sstab, flash screen,
combo box, option buttons, list view, label, timer, common dialog, imagelist,
dtpicker, progress bar, frame, checkbox, shape, modules, user control such as
ctrlseparator, data report, data environment, forms, and adodc connector. The
system arrived to its specific functionality.
The proponents met several errors while developing the entire system but
it was solve through analyzing and finding ways to come up with the system.
36
In figure 4.1.1 shows the System Login form which allows only
authorize user to log on and manipulates the system; the Secretary is an example
of the authorize user for this system. This form uses codes that been encrypted in
the database in case of unauthorized user insist to use the system.
Figure 4.1.1 System Login
In figure 4.1.2, it shows if the password matched, the Secretary needed to
click the Flash Screen to enter the Main form for official operation of the system
and also it added uniqueness.
Figure 4.1.2 Flash Screen
37
In figure 4.1.3, it shows the Popup Message gives confirmation that the
Secretary has login successfully and the system is ready to use.
Figure 4.1.3 Login (Popup Message)
In figure 4.1.4, it shows the File Menu is set to give options to the
Secretary which contains user accounts, lock system, logout and exit. This is done
through the use of menu editor.
Figure 4.1.4 File Menu
38
In figure 4.1.5, it shows the Secretary will use the Lock System to disable
the system and it needed password to enable once again.
Figure 4.1.5 Lock System
In figure 4.1.6, it shows the Popup Message for Logout inquires if the Secretary
wants to logout the system. The results are done through codes.
Figure 4.1.6 Logout (Popup Message)
39
In figure 4.1.7, it shows if the Secretary decided to exit the system, the
time and date of logout is automatically saved in the database.
Figure 4.1.7 Logout
In figure 4.1.8, it shows the Tool Menu is set to give options to the Secretary
which contains windows explorer, notepad, paint, calculator, backup database and
restore database.
Figure 4.1.8 Tool Menu
40
In figure 4.1.9, it shows the Popup Message for Backup database inquires
if the Secretary wants to backup.
Figure 4.1.9 Backup Database
In figure 4.1.10, it shows the Secretary will choose the location of the
database for backup. The filename is based on time and setting of the computer.
Figure 4.1.10 Backup Location
41
In figure 4.1.11, it shows Popup Message gives confirmation that the
Secretary has been successfully backup the database.
Figure 4.1.11 Backup (Popup Message)
In figure 4.1.12, shows that the database is successfully saved.
Figure 4.1.12 Backup Successful
42
In figure 4.1.13, it shows the Reports Menu is set to give options to the
Secretary which contains attendances and local legislation reports. This menu has
print button that can produce hardcopies if the Secretary wants to print.
Figure 4.1.13 Reports Menu
In figure 4.1.14, it shows Report Process is another way to print the
specific data that is needed to be printout based on daily, monthly and yearly
records.
Figure 4.1.14 Report Process
43
In figure 4.1.15, it shows Local Legislation provides easy retrieval of
records and it contains add new button, edit, search, view, sort, print, refresh and
exit buttons. The said buttons is also available in other forms such as Member
Profile, Set of Sanggunian, Standing Committee, Sanggunian Session and
Hearings with same functionality.
Figure 4.1.15 Local Legislation
In figure 4.1.16, it shows Double Click Statement is serves as a shortcut for edit.
Figure 4.1.16 Local Legislation (Double Click Statement)
44
In figure 4.1.17, it shows Right Click Statement is also same with the command buttons but this is done through the use of menu editor.
Figure 4.1.17 Local Legislation (Right Click Statement)
In figure 4.1.17, it shows Add New Entry allows the Secretary to add new
records and every details enter in the system is automatically saved in the
database.
Figure 4.1.17 Local Legislation (Add New Entry)45
In figure 4.1.18, Popup Message gives confirmation that the Secretary has
been successfully saved the new record enter to the system.
Figure 4.1.18 Local Legislation (Popup Message)
In figure 4.1.18, it shows Edit Entry allows the Secretary to edit the
records in the system and automatically updated in the database.
Figure 4.1.18 Local Legislation (Edit Entry)
46
In figure 4.1.19, it shows Search Entry allows the Secretary, Mayor and
Sangguniang Bayan Members to search the specific records in the system through
codification.
Figure 4.1.19 Local Legislation (Search Entry)
In figure 4.1.20, this section shows the records that coincide to the
codification entered by the Secretary.
Figure 4.1.20 Local Legislation (Search Result)
47
In figure 4.1.21, it shows records stored in the Standing Committee form
are composed of fifth teen committees. For easy retrieval of the data, the option
button is take place to separate records which is applicable only to the specific
committee.
Figure 4.1.21 Standing Committee (Option Button)
In figure 4.1.22, it shows to be able to access the system, the user should have its own account and password and the Secretary is the example of authorize user for the system.
Figure 4.1.22 User Accounts48
In figure 4.1.23, in this section is the Add New Entry for user accounts.
Once it is completed, the user can automatically access the system.
Figure 4.1.23 User Accounts (Add New Entry)
In figure 4.1.24, it shows Popup Message gives confirmation that the first
enter password should match to the second enter password.
Figure 4.1.24 User Accounts (Popup Message)
49
In figure 4.1.25, it shows the Edit Entry allows changing the username,
password and privilege of the user.
Figure 4.1.25 User Accounts (Edit Entry)
50
Table 4.1 shows the level of functionality in terms of the effectiveness of
the existing manual tracking in Jasaan Municipality. Data show that the manual
tracking system of legislative proposal in the Sangguniang Bayan yield a score
mean of 3 or satisfactory. Whereas, the transmittal system of approved ordinances
and resolutions to the concerned personnel and agencies obtain a mean rating of 4
or very satisfactory.
It could also be observed that the filing system/records keeping of
ordinances and resolutions obtaining a mean score of 4 or very satisfactory.
Meanwhile, the retrieval system of records on file yield a mean score of 3 or
satisfactory.
Table 4.1 Functionality of Manual Tracking
Item Mean Descriptive Level
1. How would you rate the manual
tracking system of legislative proposal
in the Sangguniang Bayan?
3 Satisfactory
2. How would you rate the transmittal
system of approved ordinances and
resolutions to the concerned personnel
and agencies?
4 Very Satisfactory
51
3. How would you rate the filing
system/records keeping of ordinances
and resolutions?
4 Very Satisfactory
4. How would you rate the retrieval
system of records on file? 3 Satisfactory
Table 4.2 shows the level of functionality in terms of the effectiveness of
the proposed Legislative Tracking System in Jasaan Municipality. Data show that
the proposed Legislative Tracking System of legislative proposal in the
Sangguniang Bayan obtaining a mean score of 5 or outstanding and the filing
system/records keeping of ordinances and resolutions of the proposed Legislative
Tracking System in Jasaan Municipality yield a mean score of 4 or very
stisfactory. Meanwhile, the retrieval system of records of the proposed Legislative
Tracking System in Jasaan Municipality with a mean score of 4 or very
satisfactory.
Table 4.2 Functionality of Proposed Legislative Tracking System
52
Item Mean Descriptive Level
1. How would you rate the proposed
Legislative Tracking System of legislative
proposal in the Sangguniang Bayan?
5 Outstanding
2. How would you rate the filing
system/records keeping of ordinances and
resolutions of the proposed Legislative
Tracking System in Jasaan Municipality? 4 Very Satisfactory
3. How would you rate the retrieval system
of records of the proposed Legislative
Tracking System in Jasaan Municipality?
4 Very Satisfactory
Based on the evaluation results, it shows that the proposed Legislative
Tracking System in Jasaan Municipality is more advantageous than the existing
manual tracking of legislative proposal in the Sangguniang Bayan.
4.2 Forms and Codes
53
Figure 4.2.1 shows the interface of the Legislative Tracking System in
Jasaan Municipality with its corresponding codes. Furthermore, this figure shows
the information about the system.
Figure 4.2.1 About Program
Option Explicit
54
Figure 4.2.2 shows the Attendance Entry Form for the sangguniang
attendance in every session in the sanggunian bayan of Jasaan Municipality.
Figure 4.2.2 Attendance Entry Form
Option Explicit
Private Sub btnCancel_Click()Unload MeEnd Sub
Private Sub btnok_Click()Unload MeEnd Sub
Private Sub btnSave_Click()If is_Empty(Text3) = False Then: Exit Sub If AddState = True Then Call execSQL("select * from tblsanggunian_attendance") RS.AddNew RS.Fields!FK = Text1.Text ElseIf EditState = True Then Call execSQL("select * from tblsanggunian_attendance where FK='" & Text1.Text & "' and members='" & Text3.Text & "'") End If With RS .Fields!members = UCase(Text3.Text) .Fields!Status = UCase(Combo2.Text) .Fields!terms_of_sb = UCase(Combo1.Text) .Update .Requery End With Set RS = Nothing Set CN = Nothing If AddState = True Then MsgBox "New record has been successfully saved.", vbInformation frmAttendanceAE.Hide Text3.Text = "" Combo1.Text = ""
55
Combo2.Text = "" Else Unload Me End If If EditState = True Then MsgBox "Record changes has been successfully saved.", vbInformation Unload Me End If Call frmViewSanggunianSession.FillListView1End Sub
Private Sub Command3_Click()Selection = 8frmSelectMember.Show vbModalEnd Sub
Figure 4.2.3 shows the Committee Member Form in which every
committee member is identify where it belongs. Also, to know the position of the
Sanggunian Bayan members.
Figure 4.2.3 Committee Member Form
Option Explicit
Private Sub btnCancel_Click()Unload MeEnd Sub
Private Sub btnok_Click()Unload Me
56
End Sub
Private Sub btnSave_Click()If is_Empty(Text2) = False Then: Exit Sub If AddState = False And EditState = False Then: Exit Sub If AddState = True Then Call execSQL("select * from tblcommittee_member") RS.AddNew RS.Fields!FK = Text1.Text ElseIf EditState = True Then Call execSQL("select * from tblcommittee_member where FK='" & Text1.Text & "' and members='" & lblcaption.Caption & "'") End If With RS .Fields!members = UCase(Text2.Text) .Fields!Position = UCase(Text3.Text) .Fields!remarks = UCase(Text4.Text) .Update .Requery End With Set RS = Nothing Set CN = Nothing If AddState = True Then MsgBox "New record has been successfully saved.", vbInformation frmCommitteeMemberAE.Hide Text2.Text = "" Text3.Text = "" Text4.Text = "" Else Unload Me End If If EditState = True Then MsgBox "Record changes has been successfully saved.", vbInformation Unload Me End If frmViewStandingCommittee.FillListView1End Sub
Private Sub Command1_Click()Selection = 3frmSelectMember.Show vbModalEnd Sub
Private Sub Command2_Click()Selection = 3frmViewDesignation.Show vbModalEnd Sub
Figure 4.2.4 shows the Committee Report Data Entry that attach to the
local legislation which includes the committee report number, submitted by a
57
committee specification, date enacted, findings, comments, observations and
recommendation otherwise there is no committee report tackle during session.
Figure 4.2.4 Committee Report Data Entry
Option Explicit
Private Sub btnCancel_Click() Unload MeEnd Sub
Private Sub btnok_Click()Unload MeEnd Sub
Private Sub btnSave_Click()
If is_Empty(Text2) = False Then: Exit Sub If AddState = False And EditState = False Then: Exit Sub If AddState = True Then Call execSQL("select * from tblcommittee_report") RS.AddNew RS.Fields!FK = Text1.Text ElseIf EditState = True Then Call execSQL("select * from tblcommittee_report where committee_report_no='" & Text2 & "' and FK='" & Text1.Text & "'") End If With RS
58
.Fields!committee_report_no = UCase(Text2.Text) .Fields!submitted_by = UCase(Combo1.Text) .Fields!subjects = UCase(Text3.Text) .Fields!Date = UCase(Text4.Text) .Fields!For = UCase(Text5.Text) .Fields!findings_comments_observations = UCase(Text7.Text) .Fields!recommendation = UCase(Text8.Text) .Fields!mm = Format(Date, "mm") .Fields!dd = Format(Date, "dd") .Fields!yyyy = Format(Date, "yyyy") .Update .Requery End With Set RS = Nothing Set CN = Nothing If AddState = True Then MsgBox "New record has been successfully saved.", vbInformation frmCommitteeReportCR.Hide cb_additem Text2.Text = "" Combo1.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text7.Text = "" Text8.Text = "" Else Unload Me End If If EditState = True Then MsgBox "Record changes has been successfully saved.", vbInformation Unload Me End If frmViewLocalLegislation.FillListView1End SubPrivate Sub Command3_Click()Selection = 1frmSelectMember.Show vbModalEnd Sub
Private Sub DTPicker1_Change()Text4.Text = Format(DTPicker1.Value, "mmmm-dd-yyyy")End Sub
Private Sub Form_Load()txtdate = Format(Date, "mm/dd/yyyy")If AddState = True Then Call GeneratePK("select * from tblcommittee_report", Text1, "LOCAL") End If cb_additemEnd Sub
Private Sub cb_additem() With Combo1 .AddItem "" .AddItem "COMMITTEE ON RULES, LAWS, ORDINANCES, LEGAL MATTERS AND PRIVILEGES" .AddItem "COMMITTEE ON WAYS AND MEANS, FINANCE AND APPROPRIATIONS" .AddItem "COMMITTEE ON TRANSPORTATION AND COMMUNICATION"
59
.AddItem "COMMITTEE ON EDUCATION AND TOURISM" .AddItem "COMMITTEE ON WOMEN AND FAMILY WELFARE" .AddItem "COMMITTEE ON HEALTH, SANITATION AND NUTRITION" .AddItem "COMMITTEE ON SOCIAL WELFARE AND COMMUNITY DEVELOPMENT" .AddItem "COMMITTEE ON AGRICULTURE, ENVIRONMENT AND NATURAL RESOURCES" .AddItem "COMMITTEE ON LABOR AND EMPLOYMENT, COOPERATIVE, TRADE AND INDUSTRY" .AddItem "COMMITTEE ON POLICE MATTERS, FIRE AND PUBLIC SAFETY" .AddItem "COMMITTEE ON PUBLIC WORKS AND INFRASTRUCTURE" .AddItem "COMMITTEE ON GOOD GOVERNMENT AND HUMAN RIGHTS" .AddItem "COMMITTEE ON SPORTS AND YOUTH DEVELOPMENT" .AddItem "COMMITTEE ON BARANGAY AFFAIRS" .AddItem "COMMITTEE ON MARKET AND SLAUGHTERHOUSE" End WithEnd Sub
Figure 4.2.5 shows the Designation Data Entry of a Sanggunian Bayan
Members that identify their function in Sanggunian Bayan of Jasaan Municipality.
The syntax below show also that is used by the proponents to come up this
process.
Figure 4.2.5 Designation Data Entry
Option Explicit
Private Sub btnCancel_Click()Unload Me
End Sub
Private Sub btnSave_Click() If AddState = True Then Call execSQL("select * from tbldesignation") With RS .AddNew .Fields!assign = UCase(Text1.Text) .Update
60
.Requery End With MsgBox "New record has been successfully saved.", vbInformation ElseIf EditState = True Then Call execSQL("select * from tbldesignation where assign='" & lblcaption.Caption & "'") RS.Fields!assign = Text1.Text RS.Update RS.Requery MsgBox "Record changes has been successfully saved.", vbInformation End If Unload Me Set RS = Nothing Set CN = Nothing frmViewDesignation.FillListViewEnd Sub
Figure 4.2.6 shows the Flash Screen Form that disable the system before
entering the entire program unless click the the Flash Screen Form itself appear in
the window to continue the operation in the system.
Figure 4.2.6 Flash Screen Form
Option Explicit
Private Sub Form_Click()Unload MeEnd Sub
Private Sub Label1_Click()Unload MeEnd Sub
Figure 4.2.7 shows the Hearing Data Entry that describes the matters such
as the committee meeting, name of the committee, presiding officer, secretary,
61
date of hearing, summary and remarks which are involved in local legislation
tackling during session.
Figure 4.2.7 Hearing Data Entry
Option Explicit
Private Sub btnCancel_Click()Unload MeEnd Sub
Private Sub btnok_Click()Unload MeEnd Sub
Private Sub btnSave_Click() If AddState = False And EditState = False Then: Exit Sub If AddState = True Then Call execSQL("select * from tblhearing") RS.AddNew RS.Fields!PK = Text1.Text ElseIf EditState = True Then Call execSQL("select * from tblhearing where PK='" & Text1.Text & "'") End If With RS .Fields!terms_of_sb = UCase(Combo1.Text) .Fields!committees = UCase(Combo3.Text) .Fields!presiding_officer = UCase(Text4.Text) .Fields!hearing_date = UCase(Text5.Text) .Fields!hearing_type = UCase(Combo2.Text)
62
.Fields!secretary = UCase(Text2.Text) .Fields!summary = UCase(Text3.Text) .Fields!remarks = UCase(Text9.Text) .Update .Requery End With Set RS = Nothing Set CN = Nothing If AddState = True Then MsgBox "New record has been successfully saved.", vbInformation frmHearingAE.Hide ClearText Me Combo1.Text = "" Combo2.Text = "" Call GeneratePK("select * from tblhearing", Text1, "HER") Else Unload Me End If If EditState = True Then MsgBox "Record changes has been successfully saved.", vbInformation Unload Me End If Call frmViewHearings.FillListView("")End Sub
Private Sub Command1_Click()Selection = 6frmSelectMember.Show vbModal
End Sub
Private Sub Command2_Click()Selection = 7frmSelectMember.Show vbModalEnd Sub
Private Sub DTPicker1_Change() Text5.Text = Format(DTPicker1.Value, "mmmm dd, yyyy")End Sub
Private Sub Form_Load() If AddState = True Then Call GeneratePK("select * from tblhearing", Text1, "HER") End If cb_additemEnd SubPrivate Sub cb_additem() With Combo1 .AddItem "" .AddItem "1952-1955" .AddItem "1956-1959" .AddItem "1960-1963" .AddItem "1964-1967" .AddItem "1968-1971" .AddItem "1972-1976" .AddItem "1976-1980" .AddItem "1980-1986" .AddItem "November 3, 1986 - August 5, 1987" .AddItem "May 21, 1986 - November 2, 1986" .AddItem "August 6, 1986 - November 1987" .AddItem "November 1987 - January 1988"
63
.AddItem "1988 -1992" .AddItem "1992 -1995" .AddItem "1995 -1998" .AddItem "1998 - 2001" .AddItem "2001 - 2004" .AddItem "2004 - 2007" .AddItem "2007 - 2010" .AddItem "2010-2013" End WithEnd Sub
Figure 4.2.7 show the Local Legislation Data Entry in which the
information of local legislation both ordinances and resolution are entered base on
the process of legislative proposal in the Sangguniang Bayan.
Figure 4.2.7 Local Legislation Data Entry
Option Explicit
Private Sub btnCancel_Click()Unload MeEnd Sub
Private Sub btnok_Click()Unload MeEnd SubPrivate Sub btnSave_Click() If AddState = False And EditState = False Then: Exit Sub
64
If AddState = True Then Call execSQL("select * from tbllocal_legislation") RS.AddNew RS.Fields!PK = Text1.Text ElseIf EditState = True Then Call execSQL("select * from tbllocal_legislation where PK='" & Text1.Text & "'") End If With RS .Fields!terms_of_sb = UCase(Combo1.Text) .Fields!res_ordno = UCase(Text3.Text) .Fields!res_ord_ref_no = UCase(Combo3.Text) .Fields!full_title = UCase(Text2.Text) .Fields!short_title = UCase(Text6.Text) .Fields!By = UCase(Text9.Text) .Fields!date_filed = UCase(Text7.Text) .Fields!co_authors = UCase(Text5.Text) .Fields!date_read = UCase(Text10.Text) .Fields!referral_on = UCase(Text11.Text) .Fields!committee_name = UCase(Combo11.Text) .Fields!committee_report_no = UCase(Text12.Text) .Fields!submitted_on = UCase(Text13.Text) .Fields!submitted_by = UCase(Combo4.Text) .Fields!recommendations = UCase(Combo5.Text) .Fields!date_included = UCase(Text14.Text) .Fields!second_reading = UCase(Text15.Text) .Fields!date_distributed = UCase(Text16.Text) .Fields!remarks = UCase(Combo6.Text) .Fields!third_reading = UCase(Text8.Text) .Fields!in_favor = UCase(Combo7.Text) .Fields!against = UCase(Combo8.Text) .Fields!abstain = UCase(Combo9.Text) .Fields!date_transmitted_on_the_mayor = UCase(Text17.Text) .Fields!date_received_by_mayor = UCase(Text18.Text) .Fields!date_acted_by_mayor = UCase(Text19.Text) .Fields!mayor_action = UCase(Combo10.Text) .Fields!committee_name = UCase(Combo11.Text) .Fields!nature = UCase(Combo2.Text) .Fields!infra = Check1.Value .Fields!social = Check2.Value .Fields!political = Check3.Value .Fields!genadmin = Check4.Value .Fields!economic = Check5.Value .Fields!agriculture = Check6.Value .Fields!others = Check7.Value .Fields!mm = Format(Date, "mm") .Fields!dd = Format(Date, "dd") .Fields!yyyy = Format(Date, "yyyy") .Update .Requery End With Set RS = Nothing Set CN = Nothing If AddState = True Then MsgBox "New record has been successfully saved.", vbInformation frmLocalLegislationAE.Hide ClearText Me Combo1.Text = ""
65
Call GeneratePK("select * from tbllocal_legislation", Text1, "LOCAL") Else Unload Me End If If EditState = True Then MsgBox "Record changes has been successfully saved.", vbInformation Unload Me End If Call frmViewLocalLegislation.FillListView("")End Sub
Private Sub Command1_Click()
End Sub
Private Sub Combo1_GotFocus()HLText Combo1End Sub
Private Sub Command2_Click()Selection = 14frmSelectMember.Show vbModalEnd Sub
Private Sub DTPicker1_Change()Text7.Text = Format(DTPicker1.Value, "mmmm dd, yyyy")End Sub
Private Sub DTPicker10_Change()Text18.Text = Format(DTPicker10.Value, "mmmm dd, yyyy")End Sub
Private Sub DTPicker11_Change()Text19.Text = Format(DTPicker11.Value, "mmmm dd, yyyy")End Sub
Private Sub DTPicker2_Change()Text10.Text = Format(DTPicker2.Value, "mmmm dd, yyyy")End Sub
Private Sub DTPicker3_Change()Text11.Text = Format(DTPicker3.Value, "mmmm dd, yyyy")End Sub
Private Sub DTPicker4_Change()Text13.Text = Format(DTPicker4.Value, "mmmm dd, yyyy")End Sub
Private Sub DTPicker5_Change()Text14.Text = Format(DTPicker5.Value, "mmmm dd, yyyy")End Sub
Private Sub DTPicker6_Change()Text15.Text = Format(DTPicker6.Value, "mmmm dd, yyyy")End Sub
Private Sub DTPicker7_Change()Text16.Text = Format(DTPicker7.Value, "mmmm dd, yyyy")End Sub
66
Private Sub DTPicker8_Change()Text8.Text = Format(DTPicker8.Value, "mmmm dd, yyyy")End Sub
Private Sub DTPicker9_Change()Text17.Text = Format(DTPicker9.Value, "mmmm dd, yyyy")End Sub
Private Sub Form_Load() txtdate = Format(Date, "mm/dd/yyyy") If AddState = True Then Call GeneratePK("select * from tbllocal_legislation", Text1, "LOCAL") End If cb_additemEnd Sub
Private Sub cb_additem() With Combo1 .AddItem "" .AddItem "1952-1955" .AddItem "1956-1959" .AddItem "1960-1963" .AddItem "1964-1967" .AddItem "1968-1971" .AddItem "1972-1976" .AddItem "1976-1980" .AddItem "1980-1986" .AddItem "November 3, 1986 - August 5, 1987" .AddItem "May 21, 1986 - November 2, 1986" .AddItem "August 6, 1986 - November 1987" .AddItem "November 1987 - January 1988" .AddItem "1988 -1992" .AddItem "1992 -1995" .AddItem "1995 -1998" .AddItem "1998 - 2001" .AddItem "2001 - 2004" .AddItem "2004 - 2007" .AddItem "2007 - 2010" .AddItem "2010-2013" End With With Combo3 .AddItem "" .AddItem "FOR FISCAL YEAR 2007" .AddItem "FOR FISCAL YEAR 2008" .AddItem "FOR FISCAL YEAR 2009" .AddItem "FOR FISCAL YEAR 2010" .AddItem "FOR FISCAL YEAR 2011" .AddItem "FOR FISCAL YEAR 2012" End With With Combo4 .AddItem "" .AddItem "COMMITTEE ON RULES, LAWS, ORDINANCES, LEGAL MATTERS AND PRIVILEGES" .AddItem "COMMITTEE ON WAYS AND MEANS, FINANCE AND APPROPRIATIONS" .AddItem "COMMITTEE ON TRANSPORTATION AND COMMUNICATION" .AddItem "COMMITTEE ON EDUCATION AND TOURISM" .AddItem "COMMITTEE ON WOMEN AND FAMILY WELFARE" .AddItem "COMMITTEE ON HEALTH, SANITATION AND NUTRITION" .AddItem "COMMITTEE ON SOCIAL WELFARE AND COMMUNITY DEVELOPMENT" .AddItem "COMMITTEE ON AGRICULTURE, ENVIRONMENT AND NATURAL RESOURCES"
67
.AddItem "COMMITTEE ON LABOR AND EMPLOYMENT, COOPERATIVE, TRADE AND INDUSTRY" .AddItem "COMMITTEE ON POLICE MATTERS, FIRE AND PUBLIC SAFETY" .AddItem "COMMITTEE ON PUBLIC WORKS AND INFRASTRUCTURE" .AddItem "COMMITTEE ON GOOD GOVERNMENT AND HUMAN RIGHTS" .AddItem "COMMITTEE ON SPORTS AND YOUTH DEVELOPMENT" .AddItem "COMMITTEE ON BARANGAY AFFAIRS" .AddItem "COMMITTEE ON MARKET AND SLAUGHTERHOUSE" End With With Combo5 .AddItem "" .AddItem "APPROVED" .AddItem "DISAPPROVED" End With With Combo6 .AddItem "" .AddItem "APPROVED" .AddItem "DISAPPROVED" End With With Combo7 .AddItem "" .AddItem "1" .AddItem "2" .AddItem "3" .AddItem "4" .AddItem "5" .AddItem "6" .AddItem "7" .AddItem "8" .AddItem "9" .AddItem "10" End With With Combo8 .AddItem "" .AddItem "1" .AddItem "2" .AddItem "3" .AddItem "4" .AddItem "5" .AddItem "6" .AddItem "7" .AddItem "8" .AddItem "9" .AddItem "10" End With With Combo10 .AddItem "" .AddItem "APPROVED" .AddItem "VETOED" .AddItem "LAPSED" End With With Combo11 .AddItem "" .AddItem "COMMITTEE ON RULES, LAWS, ORDINANCES, LEGAL MATTERS AND PRIVILEGES" .AddItem "COMMITTEE ON WAYS AND MEANS, FINANCE AND APPROPRIATIONS"
68
.AddItem "COMMITTEE ON TRANSPORTATION AND COMMUNICATION" .AddItem "COMMITTEE ON EDUCATION AND TOURISM" .AddItem "COMMITTEE ON WOMEN AND FAMILY WELFARE" .AddItem "COMMITTEE ON HEALTH, SANITATION AND NUTRITION" .AddItem "COMMITTEE ON SOCIAL WELFARE AND COMMUNITY DEVELOPMENT" .AddItem "COMMITTEE ON AGRICULTURE, ENVIRONMENT AND NATURAL RESOURCES" .AddItem "COMMITTEE ON LABOR AND EMPLOYMENT, COOPERATIVE, TRADE AND INDUSTRY" .AddItem "COMMITTEE ON POLICE MATTERS, FIRE AND PUBLIC SAFETY" .AddItem "COMMITTEE ON PUBLIC WORKS AND INFRASTRUCTURE" .AddItem "COMMITTEE ON GOOD GOVERNMENT AND HUMAN RIGHTS" .AddItem "COMMITTEE ON SPORTS AND YOUTH DEVELOPMENT" .AddItem "COMMITTEE ON BARANGAY AFFAIRS" .AddItem "COMMITTEE ON MARKET AND SLAUGHTERHOUSE" End With End Sub
Private Sub Text1_GotFocus()HLText Text1End Sub
Private Sub Text12_GotFocus()HLText Text12End Sub
Private Sub Text2_GotFocus()HLText Text2End SubPrivate Sub Text3_GotFocus()HLText Text3End Sub
Private Sub Text5_GotFocus()HLText Text5End Sub
Private Sub Text6_GotFocus()HLText Text6End Sub
Figure 4.2.8 Lock Form
Option Explicit
Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Call execSQL("select * from tbluser_account where password='" & Encode(Text1.Text) & "'")
69
If RS.RecordCount = 0 Then MsgBox "Incorrect password!. Please type again.", vbExclamation Else MAIN.StatusBar1.Panels(2).Text = RS.Fields!UserName Unload Me End If
End If Set RS = Nothing Set CN = Nothing End Sub
Figure 4.2.10 Member Profile Form
Option ExplicitPrivate Sub btnCancel_Click()Unload MeEnd Sub
Private Sub btnok_Click()Unload MeEnd Sub
Private Sub btnSave_Click()
If is_Empty(txt2) = False Then: Exit Sub If AddState = False And EditState = False Then: Exit Sub If AddState = True Then Call execSQL("select * from tblmember_profile") RS.AddNew RS.Fields!PK = lblID.Text ElseIf EditState = True Then
70
Call execSQL("select * from tblmember_profile where PK='" & lblID.Text & "'") End If With RS .Fields!set_of_sbmembers = UCase(Combo1.Text) .Fields!FullName = UCase(txt2.Text) .Fields!address = UCase(txt3.Text) .Fields!contact = UCase(txt4.Text) .Update .Requery End With Set RS = Nothing Set CN = Nothing If AddState = True Then MsgBox "New record has been successfully saved.", vbInformation frmMemberProfileAE.Hide ClearText Me cb_additem Call GeneratePK("select * from tblmember_profile", lblID, "MEM") Else Unload Me End If If EditState = True Then MsgBox "Record changes has been successfully saved.", vbInformation Unload Me End If Call frmViewMemberProfile.FillListView("")End SubPrivate Sub Form_Load()
If AddState = True Then cb_additemCall GeneratePK("select * from tblmember_profile", lblID, "MEM")Else Exit SubEnd If
End Sub
Public Sub cb_additem()
With Combo1 .AddItem "" .AddItem "1ST" .AddItem "2ND" .AddItem "3RD" .AddItem "4TH" .AddItem "5TH" .AddItem "6TH" .AddItem "7TH" .AddItem "8TH" .AddItem "9TH" .AddItem "10TH" .AddItem "11TH" .AddItem "12TH" .AddItem "13TH" .AddItem "14TH" .AddItem "15TH" End WithEnd SubPrivate Sub txt2_GotFocus() HLText txt2End SubPrivate Sub txt3_GotFocus()
71
HLText txt3End SubPrivate Sub txt4_GotFocus() HLText txt4End SubPrivate Sub lblID_gotfocus() HLText lblIDEnd Sub
Figure 4.2.11 shows the Report Attendance Form which print the
attendance of Sangguniang Bayan Members as well as the Presiding Officer and
attach to the Order of Business calling those present, late or official business(OB)
during regular session.
Figure 4.2.11 ReportAttendance Form
Option Explicit
Private Sub Command1_Click()Dim sSQL As StringOn Error GoTo err: If Option1.Value = True Then Call execSQL("select * from tblsanggunian_attendance,tblsanggunian_session where tblsanggunian_attendance.FK=tblsanggunian_session.PK") ElseIf Option2.Value = True Then sSQL = "select * from tblsanggunian_attendance,tblsanggunian_session where tblsanggunian_session.session_date >='" & Format(DTPicker1.Value, "mmmm dd, yyyy") & "' and tblsanggunian_session.session_date <='" & Format(DTPicker2.Value, "mmmm dd, yyyy") & "'" Call execSQL(sSQL)
72
End If Set rptAttendance.DataSource = RS ChngPrinterOrientationPortrait Me rptAttendance.WindowState = vbMaximized rptAttendance.Sections("section3").Controls.Item("Label13").Caption = RS!secretary rptAttendance.Show vbModal Exit Suberr: MsgBox "error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = NothingEnd SubPrivate Sub Command2_Click()Unload MeEnd SubPrivate Sub Option1_Click()If Option2.Value = False Then Frame1.Enabled = FalseEnd IfEnd SubPrivate Sub Option2_Click()If Option2.Value = True Then Frame1.Enabled = True End IfEnd Sub
Figure 4.2.12 Report Local Legislation Form
73
Private Sub cmddreport_Click()picmonthly.Visible = Falsepicyear.Visible = Falsepicdaily.Visible = Truecbomm = "mm"cbodd = "dd"txtyyyy = "yyyy"End Sub
Private Sub cmdenter_Click()Call execSQL("Select * from tbllocal_legislation")lvList.ListItems.clearDim XWhile RS.EOF = FalseIf mm = RS!mm And yyyy = RS!yyyy ThenlvList.ListItems.Add , , RS!res_ord_ref_nolvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!full_titlelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!short_titlelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!BylvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_filedlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!co_authorslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_readlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!referral_onlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_report_nolvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!submitted_onlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!submitted_bylvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendationslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_includedlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!second_readinglvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_distributedlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!remarkslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!third_readinglvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!in_favorlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!againstlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!abstainlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_transmitted_on_the_mayorlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_received_by_mayorlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_acted_by_mayorlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!mayor_actionlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!infralvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!sociallvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!politicallvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!genadminlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!economiclvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!agriculturelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!otherslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!natureX = 1cmdprocess.Enabled = TrueEnd IfRS.MoveNextWendRS.CloseIf X <> 1 ThenMsgBox "Invalid month or year!", vbCritical, "System Message"
74
mm = ""yyyy = ""mm.SetFocusEnd IfSet RS = NothingSet CN = NothingEnd Sub
Private Sub cmdmreport_Click()picmonthly.Visible = Truepicdaily.Visible = Falsepicyear.Visible = Falsemm = "mm"yyyy = "yyyy"End Sub
Private Sub cmdout_Click()Unload MeMAIN.ShowEnd Sub
Private Sub cmdprint_Click()MsgBox "Process Complete!", vbInformation, "System Message"If picdaily.Visible = True ThenCall execSQL("select * from tblsanggunian_session,tbllocal_legislation where mm ='" & cbomm & "' and dd ='" & cbodd & "' and yyyy ='" & txtyyyy & "'")Set dtporeporlocallegislation.DataSource = RSChngPrinterOrientationPortrait Medtporeporlocallegislation.Sections("Section2").Controls.Item("lbldaily").Caption = "Daily"dtporeporlocallegislation.Sections("Section2").Controls.Item("Label13").Caption = cbommdtporeporlocallegislation.Sections("Section2").Controls.Item("Label14").Caption = cbodddtporeporlocallegislation.Sections("Section2").Controls.Item("Label17").Caption = txtyyyydtporeporlocallegislation.Sections("Section3").Controls.Item("Label21").Caption = RS!secretarydtporeporlocallegislation.Show vbModalcmdprint.Enabled = FalseRS.CloseEnd If
If picmonthly.Visible = True ThenCall execSQL("Select * from tblsanggunian_session,tbllocal_legislation where mm='" & mm & "' and yyyy='" & yyyy & "'")Set dtporeporlocallegislation.DataSource = RSChngPrinterOrientationPortrait Medtporeporlocallegislation.Sections("Section2").Controls.Item("lbldaily").Caption = "Monthly"dtporeporlocallegislation.Sections("Section2").Controls.Item("label13").Caption = mmdtporeporlocallegislation.Sections("Section2").Controls.Item("Label17").Caption = yyyydtporeporlocallegislation.Sections("Section3").Controls.Item("Label21").Caption = RS!secretarydtporeporlocallegislation.Show vbModalcmdprint.Enabled = FalseRS.CloseEnd If
If picyear.Visible = True Then
75
Call execSQL("Select * from tblsanggunian_session,tbllocal_legislation where yyyy='" & txtyearyy & "'")Set dtporeporlocallegislation.DataSource = RSChngPrinterOrientationPortrait Medtporeporlocallegislation.Sections("Section2").Controls.Item("lbldaily").Caption = "Yearly"dtporeporlocallegislation.Sections("Section2").Controls.Item("Label17").Caption = txtyearyydtporeporlocallegislation.Sections("Section3").Controls.Item("Label21").Caption = RS!secretarydtporeporlocallegislation.Show vbModalcmdprint.Enabled = FalseRS.CloseEnd If
Set RS = Nothing Set CN = Nothing End Sub
Private Sub cmdprocess_Click()picinfo.Enabled = Falsepicprint.Visible = Truecmdprocess.Enabled = Falsecmdprint.Enabled = Truecmdout.Enabled = FalseEnd Sub
Private Sub cmdyreport_Click()picmonthly.Visible = Falsepicdaily.Visible = Falsepicyear.Visible = Truetxtyearyy = "yyyy"End Sub
Private Sub Command1_Click()
Call execSQL("Select * from tbllocal_legislation")lvList.ListItems.clearDim XWhile RS.EOF = FalseIf cbomm = RS!mm And cbodd = RS!dd And txtyyyy = RS!yyyy ThenlvList.ListItems.Add , , RS!res_ord_ref_nolvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!full_titlelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!short_titlelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!BylvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_filedlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!co_authorslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_readlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!referral_onlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_report_nolvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!submitted_onlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!submitted_bylvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendationslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_includedlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!second_readinglvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_distributedlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!remarkslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!third_readinglvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!in_favorlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!against
76
lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!abstainlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_transmitted_on_the_mayorlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_received_by_mayorlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_acted_by_mayorlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!mayor_actionlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!infralvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!sociallvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!politicallvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!genadminlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!economiclvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!agriculturelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!otherslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!natureX = 1cmdprocess.Enabled = TrueEnd IfRS.MoveNextWendRS.CloseIf X <> 1 ThenMsgBox "Invalid month, date or year!", vbCritical, "System Message"cbomm = ""cbodd = ""txtyyyy = ""cbomm.SetFocus
End IfSet RS = NothingSet CN = NothingEnd Sub
Private Sub Command2_Click()
Call execSQL("Select * from tbllocal_legislation")lvList.ListItems.clearDim XWhile RS.EOF = FalseIf txtyearyy = RS!yyyy ThenlvList.ListItems.Add , , RS!res_ord_ref_nolvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!full_titlelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!short_titlelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!BylvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_filedlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!co_authorslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_readlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!referral_onlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_report_nolvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!submitted_onlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!submitted_bylvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendationslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_includedlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!second_readinglvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_distributedlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!remarkslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!third_readinglvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!in_favorlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!againstlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!abstain
77
lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_transmitted_on_the_mayorlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_received_by_mayorlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_acted_by_mayorlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!mayor_actionlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!infralvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!sociallvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!politicallvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!genadminlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!economiclvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!agriculturelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!otherslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!natureX = 1cmdprocess.Enabled = TrueEnd IfRS.MoveNextWendRS.CloseIf X <> 1 ThenMsgBox "Invalid Year!", vbCritical, "System Message"txtyearyy = ""txtyearyy.SetFocusEnd IfSet RS = NothingSet CN = NothingEnd Sub
Private Sub Command3_Click()If cmdprint.Enabled = False Then Call clear picprint.Visible = False picinfo.Enabled = True cmdout.Enabled = TrueElse Call clear picprint.Visible = False picinfo.Enabled = True cmdout.Enabled = TrueEnd IfEnd Sub
Private Sub txtyearyy_Click()txtyearyy = ""txtyearyy.SetFocusEnd Sub
Private Sub txtyyyy_Click()txtyyyy = ""txtyyyy.SetFocusEnd Sub
Private Sub yyyy_Click()yyyy = ""yyyy.SetFocus
End Sub
Function clear()
78
cbomm = ""cbodd = ""txtyyyy = ""lvList.ListItems.clearmm = ""dd = ""yyyy = ""txttot = ""txtyearyy = ""End Function
Figure 4.2.13 Committee Report Form
Private Sub cmdyreport_Click()picmonthly.Visible = Falsepicdaily.Visible = Falsepicyear.Visible = Truetxtyearyy = "yyyy"End Sub
Private Sub Command1_Click()Call execSQL("Select * from tblstanding_sb_committee")lst.ListItems.clear
79
Dim XWhile RS.EOF = FalseIf txtyearyy = RS!yyyy Thenlst.ListItems.Add , , RS!subject_matterlst.ListItems(lst.ListItems.Count).ListSubItems.Add , , RS!date_referredlst.ListItems(lst.ListItems.Count).ListSubItems.Add , , RS!action_takenlst.ListItems(lst.ListItems.Count).ListSubItems.Add , , RS!StatusX = 1cmdprocess.Enabled = TrueEnd IfRS.MoveNextWendRS.CloseIf X <> 1 ThenMsgBox "Invalid Year!", vbCritical, "System Message"txtyearyy = ""txtyearyy.SetFocusEnd IfSet RS = NothingSet CN = NothingEnd Sub
Private Sub Command2_Click()If cmdprint.Enabled = False Then Call clear picprint.Visible = False picinfo.Enabled = True cmdout.Enabled = TrueElse Call clear picprint.Visible = False picinfo.Enabled = True cmdout.Enabled = TrueEnd IfEnd Sub
Private Sub Command3_Click()Call execSQL("Select * from tblstanding_sb_committee")lst.ListItems.clearDim XWhile RS.EOF = FalseIf cbomm = RS!mm And cbodd = RS!dd And txtyyyy = RS!yyyy Thenlst.ListItems.Add , , RS!subject_matterlst.ListItems(lst.ListItems.Count).ListSubItems.Add , , RS!date_referredlst.ListItems(lst.ListItems.Count).ListSubItems.Add , , RS!action_takenlst.ListItems(lst.ListItems.Count).ListSubItems.Add , , RS!StatusX = 1cmdprocess.Enabled = TrueEnd IfRS.MoveNextWendRS.CloseIf X <> 1 ThenMsgBox "Invalid month, date or year!", vbCritical, "System Message"cbomm = ""txtyyyy = ""cbodd = ""cbomm.SetFocusEnd IfSet RS = NothingSet CN = NothingEnd Sub
80
Private Sub cmddreport_Click()picmonthly.Visible = Falsepicyear.Visible = Falsepicdaily.Visible = Truecbomm = "mm"cbodd = "dd"txtyyyy = "yyyy"
End Sub
Private Sub cmdenter_Click()Call execSQL("Select * from tblstanding_sb_committee")lst.ListItems.clearDim XWhile RS.EOF = FalseIf mm = RS!mm And yyyy = RS!yyyy Thenlst.ListItems.Add , , RS!subject_matterlst.ListItems(lst.ListItems.Count).ListSubItems.Add , , RS!date_referredlst.ListItems(lst.ListItems.Count).ListSubItems.Add , , RS!action_takenlst.ListItems(lst.ListItems.Count).ListSubItems.Add , , RS!StatusX = 1cmdprocess.Enabled = TrueEnd IfRS.MoveNextWendRS.CloseIf X <> 1 ThenMsgBox "Invalid month or year!", vbCritical, "System Message"mm = ""yyyy = ""mm.SetFocusEnd IfSet RS = NothingSet CN = NothingEnd Sub
Private Sub cmdmreport_Click()picmonthly.Visible = Truepicdaily.Visible = Falsepicyear.Visible = Falsemm = "mm"yyyy = "yyyy"End Sub
Private Sub cmdout_Click()Unload MeMAIN.ShowEnd SubPrivate Sub cmdprint_Click()MsgBox "Process Complete!", vbInformation, "System Message"If picdaily.Visible = True ThenCall execSQL("Select * from tblsanggunian_session,tblstanding_sb_committee where mm ='" & cbomm & "' and dd ='" & cbodd & "' and yyyy ='" & txtyyyy & "'")Set dtporeport.DataSource = RSdtporeport.WindowState = vbMaximizeddtporeport.Sections("Section2").Controls.Item("lbldaily").Caption = "Daily"dtporeport.Sections("Section2").Controls.Item("label13").Caption = cbommdtporeport.Sections("Section2").Controls.Item("label14").Caption = cbodddtporeport.Sections("Section2").Controls.Item("Label17").Caption = txtyyyydtporeport.Sections("Section3").Controls.Item("lbluser").Caption = RS!secretarydtporeport.Sections("Section3").Controls.Item("lbldate").Caption = Datedtporeport.Show vbModalcmdprint.Enabled = False
81
RS.MoveNextEnd If
If picmonthly.Visible = True ThenCall execSQL("Select * from tblsanggunian_session,tblstanding_sb_committee where mm='" & mm & "' and yyyy='" & yyyy & "'")Set dtporeport.DataSource = RSdtporeport.WindowState = vbMaximizeddtporeport.Sections("Section2").Controls.Item("lbldaily").Caption = "Monthly"dtporeport.Sections("Section2").Controls.Item("label13").Caption = mmdtporeport.Sections("Section2").Controls.Item("Label17").Caption = yyyydtporeport.Sections("Section3").Controls.Item("lbluser").Caption = RS!secretarydtporeport.Sections("Section3").Controls.Item("lbldate").Caption = Datedtporeport.Show vbModalcmdprint.Enabled = FalseRS.MoveNext
ElseIf picyear.Visible = True ThenCall execSQL("Select * from tblsanggunian_session,tblstanding_sb_committee where yyyy='" & txtyearyy & "'")Set dtporeport.DataSource = RSdtporeport.WindowState = vbMaximizeddtporeport.Sections("Section2").Controls.Item("lbldaily").Caption = "Yearly"dtporeport.Sections("Section2").Controls.Item("Label17").Caption = txtyearyydtporeport.Sections("Section3").Controls.Item("lbluser").Caption = RS!secretarydtporeport.Sections("Section3").Controls.Item("lbldate").Caption = Datedtporeport.Show vbModalcmdprint.Enabled = FalseRS.MoveNext
End IfEnd If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub cmdprocess_Click()picinfo.Enabled = Falsepicprint.Visible = Truecmdprocess.Enabled = Falsecmdprint.Enabled = Truecmdout.Enabled = FalseEnd Sub
Function clear()cbomm = ""cbodd = ""txtyyyy = ""lst.ListItems.clearmm = ""dd = ""yyyy = ""txttot = ""txtyearyy = ""End Function
Private Sub txtyearyy_Click()txtyearyy = ""txtyearyy.SetFocusEnd Sub
82
Private Sub txtyyyy_Click()txtyyyy = ""txtyyyy.SetFocus
End SubPrivate Sub yyyy_Click()yyyy = ""yyyy.SetFocus
End Sub
Figure 4.2.14 Sanggunian Member Data Entry Form
Option Explicit
Private Sub btnCancel_Click() Unload MeEnd Sub
Private Sub btnok_Click()Unload MeEnd Sub
Private Sub btnSave_Click()
If is_Empty(Text2) = False Then: Exit Sub If AddState = False And EditState = False Then: Exit Sub If AddState = True Then Call execSQL("select * from tblsanggunian_member") RS.AddNew RS.Fields!FK = Text1.Text ElseIf EditState = True Then Call execSQL("select * from tblsanggunian_member where FK='" & Text1.Text & "' and members='" & lblcaption.Caption & "'") End If
83
With RS .Fields!members = UCase(Text2.Text) .Fields!Position = UCase(Text3.Text) .Fields!remarks = UCase(Text4.Text) .Update .Requery End With Set RS = Nothing Set CN = Nothing If AddState = True Then MsgBox "New record has been successfully saved.", vbInformation frmSanggunianMemberAE.Hide Text2.Text = "" Text3.Text = "" Text4.Text = "" Else Unload Me End If If EditState = True Then MsgBox "Record changes has been successfully saved.", vbInformation Unload Me End If frmViewSetOfSanggunian.FillListView1End Sub
Private Sub Command1_Click()Selection = 2frmSelectMember.Show vbModalEnd Sub
Private Sub Command2_Click()Selection = 2frmViewDesignation.Show vbModalEnd Sub
Figure 4.2.15 shows the Sanggunian Session Data Entry Form which here
the details are entered after the session including the date of session, session
number, terms of SB, presiding officer, secretary and the type of session.
84
Figure 4.2.15 Sanggunian Session Data Entry Form
Option Explicit
Private Sub btnCancel_Click()Unload MeEnd Sub
Private Sub btnok_Click()Unload MeEnd Sub
Private Sub btnSave_Click() If AddState = False And EditState = False Then: Exit Sub If AddState = True Then Call execSQL("select * from tblsanggunian_session") RS.AddNew RS.Fields!PK = Text1.Text ElseIf EditState = True Then Call execSQL("select * from tblsanggunian_session where PK='" & Text1.Text & "'") End If With RS .Fields!terms_of_sb = Combo1.Text .Fields!presided_by = UCase(Text5.Text) .Fields!session_number = UCase(cboses.Text) .Fields!session_date = UCase(Text4.Text) .Fields!secretary = UCase(Text6.Text) .Fields!session_type = UCase(Text9.Text) .Update .Requery End With Set RS = Nothing Set CN = Nothing If AddState = True Then MsgBox "New record has been successfully saved.", vbInformation
85
frmSanggunianSessionAE.Hide ClearText Me Combo1.Text = "" Call GeneratePK("select * from tblsanggunian_session", Text1, "SES") Else Unload Me End If If EditState = True Then MsgBox "Record changes has been successfully saved.", vbInformation Unload Me End If Call frmViewSanggunianSession.FillListView("") End Sub
Private Sub Command1_Click()frmViewSessionType.Show vbModalEnd Sub
Private Sub Command2_Click()Selection = 5frmSelectMember.Show vbModalEnd Sub
Private Sub Command3_Click()Selection = 4frmSelectMember.Show vbModal
End Sub
Private Sub Command4_Click()Selection = 8frmSelectMember.Show vbModalEnd Sub
Private Sub DTPicker1_Change() Text4.Text = Format(DTPicker1.Value, "mmmm dd, yyyy")End Sub
Private Sub Form_Load() cb_additem If AddState = True Then Call GeneratePK("select * from tblsanggunian_session", Text1, "SES") End IfEnd Sub
Private Sub cb_additem() With Combo1 .AddItem "" .AddItem "1952-1955" .AddItem "1956-1959" .AddItem "1960-1963" .AddItem "1964-1967" .AddItem "1968-1971" .AddItem "1972-1976" .AddItem "1976-1980" .AddItem "1980-1986" .AddItem "November 3, 1986 - August 5, 1987"
86
.AddItem "May 21, 1986 - November 2, 1986" .AddItem "August 6, 1986 - November 1987" .AddItem "November 1987 - January 1988" .AddItem "1988 -1992" .AddItem "1992 -1995" .AddItem "1995 -1998" .AddItem "1998 - 2001" .AddItem "2001 - 2004" .AddItem "2004 - 2007" .AddItem "2007 - 2010" .AddItem "2010-2013" End WithEnd Sub
Figure 4.2.16 Search Records Form
Option Explicit
Private Sub cboOperation1_Change()If cboOperation1.Text = "between" Then DTPicker1.Visible = True DTPicker2.Visible = True Text1.Visible = False
End If
End Sub
Private Sub cboOperation1_Click()cboOperation1_ChangeEnd Sub
Private Sub cboOperation1_LostFocus()If cboOperation1.Text = "between" Then DTPicker1.Visible = True DTPicker2.Visible = True Text1.Visible = FalseEnd IfEnd Sub
87
Private Sub cboOperation2_Change()If cboOperation2.Text = "between" Then DTPicker3.Visible = True DTPicker4.Visible = True Text2.Visible = FalseEnd If
End Sub
Private Sub cboOperation2_Click()cboOperation2_ChangeEnd Sub
Private Sub cboOperation2_LostFocus()If cboOperation2.Text = "between" Then DTPicker3.Visible = True DTPicker4.Visible = True Text2.Visible = FalseEnd IfEnd Sub
Private Sub Command1_Click()Unload MeEnd Sub
Private Sub Command2_Click()SearchRecords End Sub
Private Sub SearchRecords()
Dim strFilter As String Dim srcTable As String Dim srcNameFields As Integer srcNameFields = MySearch Select Case srcNameFields Case 1 Select Case Combo1.ListIndex Case 0: srcTable = "PK" Case 1: srcTable = "set_of_sbmembers" Case 2: srcTable = "fullname" Case 3: srcTable = "address" Case 4: srcTable = "contact" End Select Case 2 Select Case Combo1.ListIndex Case 0: srcTable = "PK" Case 1: srcTable = "set_of_sb" Case 2: srcTable = "committee_name" Case 3: srcTable = "chairman" Case 4: srcTable = "vice_chairman" Case 5: srcTable = "members" Case 6: srcTable = "subject_matter" Case 7: srcTable = "date_referred" Case 8: srcTable = "action_taken" Case 9: srcTable = "status" Case 10: srcTable = "committee_schedule" Case 11: srcTable = "recommendation"
88
End Select Case 3 Select Case Combo1.ListIndex Case 0: srcTable = "PK" Case 1: srcTable = "terms_of_sb" Case 2: srcTable = "date_from" Case 3: srcTable = "date_to" End Select Case 4 Select Case Combo1.ListIndex Case 0: srcTable = "PK" Case 1: srcTable = "terms_of_sb" Case 2: srcTable = "session_number" Case 3: srcTable = "presided_by" Case 4: srcTable = "session_date" Case 5: srcTable = "secretary" Case 6: srcTable = "member" Case 7: srcTable = "status" Case 8: srcTable = "session_type" End Select Case 5
Select Case Combo1.ListIndex Case 0: srcTable = "PK" Case 1: srcTable = "terms_of_sb" Case 2: srcTable = "hearing_type" Case 3: srcTable = "committees" Case 4: srcTable = "presiding_officer" Case 5: srcTable = "hearing_date" Case 6: srcTable = "secretary" Case 7: srcTable = "summary" Case 8: srcTable = "remarks" End Select End Select Select Case cboOperation1.ListIndex Case 0: strFilter = " LIKE '%" & Text1.Text & "%'" Case 1: strFilter = " = '" & Text1.Text & "'" Case 2: strFilter = " <> '" & Text1.Text & "'" Case 3: strFilter = " > '" & Text1.Text & "'" Case 4: strFilter = " >= '" & Text1.Text & "'" Case 5: strFilter = " < '" & Text1.Text & "'" Case 6: strFilter = " <= '" & Text1.Text & "'" Case 7: strFilter = " BETWEEN #" & DTPicker1.Value & "# AND #" & DTPicker2.Value & "#" End Select If cboOperation2.Text <> "" Then If Option1.Value = True Then strFilter = strFilter & " AND " Else strFilter = strFilter & " OR " End If strFilter = strFilter & srcTable Select Case cboOperation2.ListIndex Case 0: strFilter = strFilter & " LIKE '%" & Text2.Text & "%'" Case 1: strFilter = strFilter & " = '" & Text2.Text & "'" Case 2: strFilter = strFilter & " <> '" & Text2.Text & "'" Case 3: strFilter = strFilter & " > '" & Text2.Text & "'" Case 4: strFilter = strFilter & " >= '" & Text2.Text & "'" Case 5: strFilter = strFilter & " < '" & Text2.Text & "'"
89
Case 6: strFilter = strFilter & " <= '" & Text2.Text & "'" Case 7: strFilter = strFilter & " BETWEEN #" & DTPicker3.Value & "# AND #" & DTPicker4.Value & "#" End Select End If Select Case MySearch Case 1 Call frmViewMemberProfile.FillListView("Select * from tblmember_profile where " & srcTable & " " & strFilter) Case 2 Call frmViewStandingCommittee.FillListView("Select * from tblstanding_sb_committee where " & srcTable & " " & strFilter) Case 3 Call frmViewSetOfSanggunian.FillListView("Select * from tblset_of_sanggunian where " & srcTable & " " & strFilter) Case 4 Call frmViewSanggunianSession.FillListView("select * from tblsanggunian_session where " & srcTable & " " & strFilter) Case 5 Call frmViewHearings.FillListView("select * from tblhearing where " & srcTable & " " & strFilter) Case 6 End Select Unload MeEnd Sub
Figure 4.2.17 shows the Search Local Legislation Records Form in which
the Secretary, Mayor and Sanggunian Bayan Members are authorized to access
this form in order to search data based on the committee’s concerned.
90
Figure 4.2.17 Search Local Legislation Records Form
Option Explicit
Private Sub Command1_Click()Dim sSQL As String
sSQL = "select * from tbllocal_legislation where date_read >='" & Format(DTPicker1.Value, "mmmm dd, yyyy") & "' and date_read <='" & Format(DTPicker2.Value, "mmmm dd, yyyy") & "'" If Check8.Value = 1 Then sSQL = sSQL & " AND infra=" & ConX(Check1.Value) & " AND social=" & ConX(Check2.Value) & "" sSQL = sSQL & " AND political=" & ConX(Check3.Value) & " AND genadmin=" & ConX(Check4.Value) & "" sSQL = sSQL & " AND economic=" & ConX(Check5.Value) & " AND agriculture=" & ConX(Check6.Value) & "" sSQL = sSQL & " AND others=" & ConX(Check7.Value) & "" End If If Check9.Value = 1 Then sSQL = sSQL & " AND co_authors LIKE '%" & Text1.Text & "%'" End If If Check10.Value = 1 Then sSQL = sSQL & " AND terms_of_sb LIKE '%" & Combo1.Text & "%'"
91
End If If Check11.Value = 1 Then sSQL = sSQL & " AND res_ordno=" & Text2.Text & "" End If Call frmViewLocalLegislation.FillListView(sSQL) Unload MeEnd Sub
Private Sub Command2_Click()Unload Me
End Sub
Private Sub Command3_Click()Selection = 13frmSelectMember.Show vbModalEnd Sub
Figure 4.2.18 shows the List of Members Form where the members of the
Sanggunian Bayan are view and this form use to locate in all the process of the
system.
92
Figure 4.2.18 List of Members Form
Option Explicit
Private Sub btnAdd_Click()AddState = TrueEditState = FalsefrmMemberProfileAE.Caption = "Add New Entry"frmMemberProfileAE.btnok.Visible = FalsefrmMemberProfileAE.btnSave.Visible = TruefrmMemberProfileAE.btnCancel.Visible = TruefrmMemberProfileAE.Show vbModalEnd Sub
Private Sub btnCancel_Click()Unload MeEnd Sub
Private Sub btnDelete_Click()Call delete_rec("tblmember_profile", "PK", lvList) FillListViewEnd Sub
Private Sub btnSelect_Click()
If Selection = 1 ThenElseIf Selection = 2 ThenfrmSanggunianMemberAE.Text2.Text = lvList.SelectedItem.TextElseIf Selection = 3 ThenfrmCommitteeMemberAE.Text2.Text = lvList.SelectedItem.TextElseIf Selection = 4 ThenfrmSanggunianSessionAE.Text5.Text = lvList.SelectedItem.TextElseIf Selection = 5 ThenfrmSanggunianSessionAE.Text6.Text = lvList.SelectedItem.TextElseIf Selection = 6 ThenfrmHearingAE.Text4.Text = lvList.SelectedItem.TextElseIf Selection = 7 Then frmHearingAE.Text2.Text = lvList.SelectedItem.TextElseIf Selection = 8 Then
93
frmAttendanceAE.Text3.Text = lvList.SelectedItem.TextElseIf Selection = 9 Then frmReportLocal.Text1.Text = lvList.SelectedItem.TextElseIf Selection = 10 Then frmStandingSBCommitteeAE.Text2.Text = lvList.SelectedItem.TextElseIf Selection = 11 Then frmStandingSBCommitteeAE.Text3.Text = lvList.SelectedItem.TextElseIf Selection = 12 Then frmStandingSBCommitteeAE.Text6.Text = lvList.SelectedItem.TextElseIf Selection = 13 Then frmSearchLocal.Text1.Text = lvList.SelectedItem.TextElseIf Selection = 14 Then frmLocalLegislationAE.Text5.Text = lvList.SelectedItem.TextEnd IfUnload MeEnd Sub
Private Sub Command1_Click() End Sub
Private Sub Form_Load() FillListViewEnd Sub
Private Sub FillListView() Dim X execSQL "select fullname from tblmember_profile" lvList.ListItems.clear With RS While Not .EOF Set X = lvList.ListItems.Add(, , .Fields!FullName, 1, 1)
.MoveNext Wend End With Set RS = Nothing Set CN = NothingEnd Sub
Private Sub lvList_DblClick()btnSelect_ClickEnd Sub
94
Figure 4.2.19 Type of Session Form
Option Explicit
Private Sub btnCancel_Click()Unload Me
End Sub
Private Sub btnSave_Click() If AddState = True Then Call execSQL("select UCASE(description) as description from tblsession") With RS .AddNew .Fields!Description = UCase(Text1.Text) .Update .Requery End With MsgBox "New record has been successfully saved.", vbInformation ElseIf EditState = True Then Call execSQL("select * from tblsession where description='" & lblcaption.Caption & "'") With RS .Fields!Description = Text1.Text .Update .Requery End With MsgBox "Record has been successfully saved.", vbInformation End If Unload MeSet RS = NothingSet CN = Nothing frmViewSessionType.FillListViewEnd Sub
Figure 4.2.20 show the Set of Sanggunian Data Entry Form which
describe the political affiliation of the all Sangguniang Bayan Members.
95
Figure 4.2.20 Set of Sanggunian Data Entry Form
Option Explicit
Private Sub cb_additem() With Combo1 .AddItem "" .AddItem "1952-1955" .AddItem "1956-1959" .AddItem "1960-1963" .AddItem "1964-1967" .AddItem "1968-1971" .AddItem "1972-1976" .AddItem "1976-1980" .AddItem "1980-1986" .AddItem "November 3, 1986 - August 5, 1987" .AddItem "May 21, 1986 - November 2, 1986" .AddItem "August 6, 1986 - November 1987" .AddItem "November 1987 - January 1988" .AddItem "1988 -1992" .AddItem "1992 -1995" .AddItem "1995 -1998" .AddItem "1998 - 2001" .AddItem "2001 - 2004" .AddItem "2004 - 2007" .AddItem "2007 - 2010" .AddItem "2010-2013" End WithEnd Sub
Private Sub btnCancel_Click()Unload MeEnd Sub
Private Sub btnok_Click()Unload MeEnd Sub
Private Sub btnSave_Click() If AddState = False And EditState = False Then: Exit Sub
96
If AddState = True Then Call execSQL("select * from tblset_of_sanggunian") RS.AddNew RS.Fields!PK = Text1.Text ElseIf EditState = True Then Call execSQL("select * from tblset_of_sanggunian where PK='" & Text1.Text & "'") End If With RS .Fields!terms_of_sb = UCase(Combo1.Text) .Fields!date_from = UCase(Text4.Text) .Fields!date_to = UCase(Text5.Text) .Update .Requery End With Set RS = Nothing Set CN = Nothing If AddState = True Then MsgBox "New record has been successfully saved.", vbInformation
frmSetOfSanggunianAE.Hide ClearText Me Combo1.Text = "" Text4.Text = "yyyy-mm-dd" Text5.Text = "yyyy-mm-dd" Call GeneratePK("select * from tblset_of_sanggunian", Text1, "SET") Else Unload Me End If If EditState = True Then MsgBox "Record changes has been successfully saved.", vbInformation Unload Me End If Call frmViewSetOfSanggunian.FillListView("")End Sub
Private Sub DTPicker1_Change() Text4.Text = Format(DTPicker1.Value, "mmmm dd, yyyy")End Sub
Private Sub DTPicker2_Change()Text5.Text = Format(DTPicker2.Value, "mmmm dd, yyyy")End Sub
Private Sub Form_Load()
cb_additem If AddState = True Then Call GeneratePK("select * from tblset_of_sanggunian", Text1, "SET") End If End Sub
97
Figure 4.2.21 shows the Splash Form which gives an attraction before to
start running the program.
Figure 4.2.21 Splash Form
Option Explicit
Private Sub Timer1_Timer()Dim i As Integerpgbar.Min = 0pgbar.Max = 10000For i = 0 To pgbar.Max pgbar.Value = iNext frmLogin.Show Unload MeExit SubEnd Sub
98
Figure 4.2.22 StandingSBCommittee Data Entry Form
Option Explicit
Private Sub btnCancel_Click()Unload MeEnd Sub
Private Sub btnok_Click()Unload MeEnd Sub
Private Sub btnSave_Click() If AddState = False And EditState = False Then: Exit Sub If AddState = True Then Call execSQL("select * from tblstanding_sb_committee") RS.AddNew RS.Fields!PK = Text1.Text ElseIf EditState = True Then Call execSQL("select * from tblstanding_sb_committee where PK='" & Text1.Text & "'") End If With RS .Fields!set_of_sb = UCase(Combo1.Text) .Fields!date_referred = UCase(Text4.Text) .Fields!committee_schedule = UCase(Text5.Text) .Fields!committee_name = UCase(Combo2.Text) .Fields!chairman = UCase(Text2.Text) .Fields!vice_chairman = UCase(Text3.Text) .Fields!members = UCase(Text6.Text)
99
.Fields!subject_matter = UCase(Text7.Text) .Fields!action_taken = UCase(Combo3.Text) .Fields!Status = UCase(Combo4.Text) .Fields!recommendation = UCase(Text8.Text) .Fields!mm = Format(Date, "mm") .Fields!dd = Format(Date, "dd") .Fields!yyyy = Format(Date, "yyyy") .Update .Requery End With Set RS = Nothing Set CN = Nothing If AddState = True Then MsgBox "New record has been successfully saved.", vbInformation frmStandingSBCommitteeAE.Hide ClearText Me cb_additem Combo1.Text = "" Call GeneratePK("Select * from tblstanding_sb_committee", Text1, "COM") Else Unload Me End If If EditState = True Then MsgBox "Record changes has been successfully saved.", vbInformation Unload Me End If Call frmViewStandingCommittee.FillListView("")End Sub
Private Sub Command1_Click()Selection = 10frmSelectMember.Show vbModalEnd Sub
Private Sub Command2_Click()Selection = 11frmSelectMember.Show vbModalEnd Sub
Private Sub Command3_Click()Selection = 12frmSelectMember.Show vbModalEnd Sub
Private Sub DTPicker1_Change()Text4.Text = Format(DTPicker1.Value, "mmmm dd, yyyy")End Sub
Private Sub DTPicker2_Change() Text5.Text = Format(DTPicker2.Value, "mmmm dd, yyyy")End Sub
Private Sub Form_Load() txtdate = Format(Date, "mm/dd/yyyy")
100
If AddState = True Then Call GeneratePK("Select * from tblstanding_sb_committee", Text1, "COM") End Ifcb_additemEnd Sub
Public Sub cb_additem()
With Combo1 .AddItem "" .AddItem "1ST" .AddItem "2ND" .AddItem "3RD" .AddItem "4TH" .AddItem "5TH" .AddItem "6TH" .AddItem "7TH" .AddItem "8TH" .AddItem "9TH" .AddItem "10TH" .AddItem "11TH" .AddItem "12TH" .AddItem "13TH" .AddItem "14TH" .AddItem "15TH" End With With Combo2 .AddItem "" .AddItem "COMMITTEE ON RULES, LAWS, ORDINANCES, LEGAL MATTERS AND PRIVILEGES" .AddItem "COMMITTEE ON WAYS AND MEANS, FINANCE AND APPROPRIATIONS" .AddItem "COMMITTEE ON TRANSPORTATION AND COMMUNICATION" .AddItem "COMMITTEE ON EDUCATION AND TOURISM" .AddItem "COMMITTEE ON WOMEN AND FAMILY WELFARE" .AddItem "COMMITTEE ON HEALTH, SANITATION AND NUTRITION" .AddItem "COMMITTEE ON SOCIAL WELFARE AND COMMUNITY DEVELOPMENT" .AddItem "COMMITTEE ON AGRICULTURE, ENVIRONMENT AND NATURAL RESOURCES" .AddItem "COMMITTEE ON LABOR AND EMPLOYMENT, COOPERATIVE, TRADE AND INDUSTRY" .AddItem "COMMITTEE ON POLICE MATTERS, FIRE AND PUBLIC SAFETY" .AddItem "COMMITTEE ON PUBLIC WORKS AND INFRASTRUCTURE" .AddItem "COMMITTEE ON GOOD GOVERNMENT AND HUMAN RIGHTS" .AddItem "COMMITTEE ON SPORTS AND YOUTH DEVELOPMENT" .AddItem "COMMITTEE ON BARANGAY AFFAIRS" .AddItem "COMMITTEE ON MARKET AND SLAUGHTERHOUSE" End With With Combo3 .AddItem "" .AddItem "APPROVED" .AddItem "DISAPPROVED" End With
With Combo4 .AddItem "" .AddItem "AMENDED" .AddItem "RECOMMENDATION" End With End Sub
101
Figure 4.2.23 shows the User Data Entry Form which the Secretary can
access this area to add new user that could have privileges depends on the
function of such user added in the user accounts.
Figure 4.2.23 User Data Entry Form
Option Explicit
Private Sub Command1_Click() If Text2.Text = Text3.Text Then Else MsgBox "The password did not match!. Please retype your password.", vbExclamation Exit Sub End If If AddState = True Then Call execSQL("select * from tbluser_account") RS.AddNew RS.Fields!PK = Text9.Text ElseIf EditState = True Then Call execSQL("select * from tbluser_account where PK='" & Text9.Text & "'") End If
102
With RS .Fields!UserName = Text1.Text .Fields!Password = Encode(Text3.Text) .Fields!usertype = Combo1.Text .Fields!Add = Text4.Text .Fields!edit = Text5.Text .Fields!Delete = Text6.Text .Fields!View = Text7.Text .Fields!print = Text8.Text .Update .Requery End With Set RS = Nothing Set CN = Nothing If AddState = True Then MsgBox "New record has been successfully saved.", vbInformation frmUserAE.Hide ClearText Me Combo1.Text = "" Call GeneratePK("select * from tbluser_account", Text9, "USR") Else Unload Me End If If EditState = True Then MsgBox "Record changes has been successfully saved.", vbInformation Unload Me End If frmViewUsers.FillListViewEnd Sub
Private Sub Command2_Click()Unload MeEnd Sub
Private Sub Form_Load() If AddState = True Then Call GeneratePK("select * from tbluser_account", Text9, "USR") End If End Sub
103
Figure 4.2.24 List of Designations Form
Option Explicit
Private Sub btnAdd_Click() AddState = True EditState = False frmDesignationAE.Caption = "Add New Entry" frmDesignationAE.Show vbModalEnd Sub
Private Sub btnDelete_Click() Call delete_rec("tbldesignation", "assign", lvList) FillListViewEnd Sub
Private Sub btnEdit_Click() EditState = True AddState = False On Error GoTo err: frmDesignationAE.Caption = "Edit Entry" frmDesignationAE.Text1.Text = lvList.SelectedItem.Text frmDesignationAE.lblcaption.Caption = lvList.SelectedItem.Text frmDesignationAE.Show vbModal Exit Suberr: If err.Number = 91 Then MsgBox "No record where to be found!", vbExclamation Else MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation End If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub btnSelect_Click()If Selection = 1 Then
104
ElseIf Selection = 2 ThenfrmSanggunianMemberAE.Text3.Text = lvList.SelectedItem.TextElseIf Selection = 3 ThenfrmCommitteeMemberAE.Text3.Text = lvList.SelectedItem.TextElseIf Selection = 4 ThenfrmSanggunianSessionAE.Text5.Text = lvList.SelectedItem.TextElseIf Selection = 5 ThenfrmSanggunianSessionAE.Text6.Text = lvList.SelectedItem.TextElseIf Selection = 6 ThenfrmHearingAE.Text4.Text = lvList.SelectedItem.TextElseIf Selection = 7 Then frmHearingAE.Text2.Text = lvList.SelectedItem.TextElseIf Selection = 8 Then frmAttendanceAE.Text3.Text = lvList.SelectedItem.TextElseIf Selection = 9 Then frmReportLocal.Text1.Text = lvList.SelectedItem.TextEnd IfUnload MeEnd Sub
Private Sub Form_Load()FillListViewEnd Sub
Private Sub lvList_DblClick()btnSelect_ClickEnd Sub
Public Sub FillListView() Dim X Call execSQL("select * from tbldesignation") lvList.ListItems.clear With RS While Not .EOF Set X = lvList.ListItems.Add(, , .Fields(0), 1, 1) .MoveNext Wend End With Set RS = Nothing Set CN = NothingEnd Sub
105
Figure 4.2.25 shows the View Hearing Form to view the information of
committee meeting in a session.
Figure 4.2.25 View Hearing Form
Private Sub btnAddNew_Click() If usrPrivilege("add", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "You don't have access in this area!.Only the Secretary.", vbExclamation: Exit Sub AddState = True EditState = False If SSTab1.Tab = 0 Then frmHearingAE.Caption = "Add New Entry" frmHearingAE.btnok.Visible = False frmHearingAE.Show vbModal End If End Sub
Private Sub btnClose_Click()Unload MeEnd Sub
Private Sub btnEdit_Click() If usrPrivilege("edit", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "You don't have access in this area!.Only the Secretary.", vbExclamation: Exit Sub EditState = True AddState = False
106
On Error GoTo err:If SSTab1.Tab = 0 Then frmHearingAE.Caption = "Edit Entry" frmHearingAE.Text1.Text = lvList.SelectedItem.Text frmHearingAE.Combo1.Text = lvList.SelectedItem.SubItems(1) frmHearingAE.Combo2.Text = lvList.SelectedItem.SubItems(2) frmHearingAE.Combo3.Text = lvList.SelectedItem.SubItems(3) frmHearingAE.Text4.Text = lvList.SelectedItem.SubItems(4) frmHearingAE.Text5.Text = lvList.SelectedItem.SubItems(5) frmHearingAE.Text2.Text = lvList.SelectedItem.SubItems(6) frmHearingAE.Text3.Text = lvList.SelectedItem.SubItems(7) frmHearingAE.Text9.Text = lvList.SelectedItem.SubItems(8) frmHearingAE.btnok.Visible = False frmHearingAE.Show vbModal End If Exit Suberr: If err.Number = 91 Then MsgBox "No record where to be found!", vbExclamation Else MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation End If Set RS = Nothing Set CN = Nothing End Sub
Private Sub btnRefresh_Click()Call FillListView("")End Sub
Private Sub btnSearch_Click()If SSTab1.Tab = 0 Then MySearch = 5 With frmSearch.Combo1 .AddItem "Hearing ID" .AddItem "Terms of SB" .AddItem "Hearing Type" .AddItem "Committees" .AddItem "Presided By" .AddItem "Hearing Date" .AddItem "Secretary" .AddItem "Summary" .AddItem "Remarks" End With frmSearch.Show vbModal End If End Sub
Private Sub btnSort_Click()If SSTab1.Tab = 0 Then ElseIf SSTab1.Tab = 1 Then End If End Sub
Private Sub btnView_Click()
107
If usrPrivilege("view", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "You don't have access in this area!.All users can view.", vbExclamation: Exit Sub AddState = False EditState = False
On Error GoTo err:
If SSTab1.Tab = 0 Then frmHearingAE.Caption = "View Entry" frmHearingAE.Text1.Text = lvList.SelectedItem.Text frmHearingAE.Combo1.Text = lvList.SelectedItem.SubItems(1) frmHearingAE.Combo2.Text = lvList.SelectedItem.SubItems(2) frmHearingAE.Text3.Text = lvList.SelectedItem.SubItems(3) frmHearingAE.Text4.Text = lvList.SelectedItem.SubItems(4) frmHearingAE.Text5.Text = lvList.SelectedItem.SubItems(5) frmHearingAE.Text2.Text = lvList.SelectedItem.SubItems(6) frmHearingAE.Text3.Text = lvList.SelectedItem.SubItems(7) frmHearingAE.Text9.Text = lvList.SelectedItem.SubItems(8) frmHearingAE.btnSave.Visible = False frmHearingAE.btnCancel.Visible = False frmHearingAE.btnok.Visible = True frmHearingAE.Show vbModal End If Exit Suberr: If err.Number = 91 Then MsgBox "No record where to be found!", vbExclamation Else MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation End If Set RS = Nothing Set CN = Nothing End Sub
Private Sub Form_Load()Call FillListView("")End Sub
Private Sub Form_Resize()SSTab1.Width = Me.ScaleWidth - 50 SSTab1.Height = Me.Height - 2800 lvList.Width = Me.ScaleWidth - 300 lvList.Height = Me.Height - 3300ctrlSeparator1.Top = Me.Height - 2200 ctrlSeparator1.Width = Me.ScaleWidth - 300 picControl.Top = Me.Height - 2000 picControl.Left = Me.ScaleLeft + 8500 Frame1.Top = Me.Height - 2000 Frame1.Left = Me.Width - 2500 lblcaption.Width = Me.Width picMessage.Top = Me.Height - 2000End Sub
Private Sub lvList_DblClick()btnEdit_Click
End Sub
108
Private Sub lvList_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then PopupMenu mnuMenu End IfEnd Sub
Private Sub lvList1_DblClick() btnEdit_ClickEnd Sub
Private Sub lvList1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then PopupMenu mnuMenu End IfEnd Sub
Private Sub lvList2_DblClick() btnEdit_ClickEnd Sub
Private Sub lvList2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then PopupMenu mnuMenu End IfEnd SubPrivate Sub lvList3_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then PopupMenu mnuMenu End IfEnd SubPrivate Sub lvList4_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then PopupMenu mnuMenu End IfEnd Sub
Private Sub mnuAccounts_Click() On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then frmViewUsers.Show vbModal Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing
109
Set CN = NothingEnd Sub
Private Sub mnuAllAttendances_Click()frmReportAttendance.ShowEnd Sub
Private Sub mnuBackup_Click() On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then Dim srcLocation As String If MsgBox("Are you sure you want to backup your database?", vbYesNo + vbInformation) = vbNo Then Exit Sub Else CommonDialog1.FileName = Format(Now, "yyyy-mm-dd") CommonDialog1.ShowSave srcLocation = CommonDialog1.FileName & "sbdata.mdb" FileCopy App.Path & ReadINI("Settings", "DBpath"), srcLocation MsgBox "Database has been successfully back-up.", vbInformation End If Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub
Private Sub mnuCalc_Click()Shell "calc.exe", vbNormalFocusEnd Sub
Private Sub mnuCommitteeReport_Click()frmReportonCommittee.Show vbModalEnd Sub
Private Sub mnudateandtime_Click()Shell ("C:\WINDOWS\system32\control.exe date/time")
End Sub
Private Sub mnuExit_Click()EndEnd Sub
Private Sub mnuExplorer_Click()Shell "Explorer.exe", vbNormalFocus
110
End Sub
Private Sub mnuFile_Click() If mnuAccounts.Enabled = True Then mnuLogin.Enabled = False mnuExit.Enabled = True
Else If mnuLogout.Enabled = False Then mnuLogin.Enabled = True If mnuTools.Enabled = False Then mnuFile.Enabled = True mnuhelp.Enabled = False mnuReport.Enabled = False mnuAbout.Enabled = False
End IfEnd IfEnd IfEnd Sub
Private Sub mnuhowto_Click()frmhowto.ShowEnd Sub
Private Sub mnuLocallegislation_Click()frmReportLocalLegislation.ShowEnd Sub
Private Sub mnuLock_Click()frmLock.Show vbModalEnd Sub
Private Sub mnuLogout_Click()Dim Cancel As IntegerIf MsgBox("Do you want to Logout the application? Click yes to continue.", vbYesNo + vbExclamation) = vbNo Then Cancel = 1 Else UserLogOut Unload Me frmViewHearings.Hide frmViewLocalLegislation.Hide frmViewMemberProfile.Hide frmViewSanggunianSession.Hide frmViewSetOfSanggunian.Hide frmViewStandingCommittee.Hide MAIN.Hide frmLogin.Show End If End Sub
Private Sub mnuNotepad_Click()Shell "notepad.exe", vbNormalFocusEnd Sub
Private Sub mnuPaint_Click()Shell "mspaint.exe", vbNormalFocusEnd Sub
111
Private Sub mnuRefresh_Click()btnRefresh_ClickEnd Sub
Private Sub mnuReport_Click()On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = NothingEnd Sub
Private Sub mnuRestore_Click() On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then If MsgBox("Are you sure you to load another database?.This should be done with precaution." & vbCrLf & vbCrLf & "WARNING: YOU CANNOT UNDO THIS PROCESS", vbYesNo + vbCritical) = vbYes Then Dim srcLocation As String Set RS = Nothing Set CN = Nothing CommonDialog1.ShowOpen srcLocation = CommonDialog1.FileName Call WriteINI("Settings", "DBpath", srcLocation) Else Exit Sub End If Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation
112
Set RS = Nothing Set CN = Nothing
End Sub
Private Sub mnuSelectAttendance_Click()frmReportAttendance.ShowEnd Sub
Private Sub mnuSelectLocal_Click()frmReportLocal.Show vbModalEnd Sub
Private Sub mnuSystemInfo_Click()frmABOUTPROGRAM.Show vbModalEnd Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)Select Case Button.Index Case 1 Call NavigateListView(lvList, m_FIRST_PAGE, , lblSelected) Case 2 Call NavigateListView(lvList, m_PREV_PAGE, , lblSelected) Case 3 Call NavigateListView(lvList, m_NEXT_PAGE, , lblSelected) Case 4 Call NavigateListView(lvList, m_LAST_PAGE, lblTotal, lblSelected) End SelectEnd Sub
Public Sub FillListView(sSQL As String) Dim X, tot If sSQL = "" Then Call execSQL("select * from tblhearing") Else Call execSQL(sSQL) End If lvList.ListItems.clear With RS While Not .EOF Set X = lvList.ListItems.Add(, , .Fields!PK, 5, 5) X.SubItems(1) = .Fields!terms_of_sb X.SubItems(2) = .Fields!hearing_type X.SubItems(3) = .Fields!committees X.SubItems(4) = .Fields!presiding_officer X.SubItems(5) = Format(.Fields!hearing_date, "mmmm dd, yyyy") X.SubItems(6) = .Fields!secretary X.SubItems(7) = .Fields!summary X.SubItems(8) = .Fields!remarks .MoveNext tot = tot + 1 Wend End With lblTotal.Caption = tot Set RS = Nothing Set CN = Nothing End Sub Private Sub mnuAddNew_click() btnAddNew_Click
113
End Sub
Private Sub mnuEdit_click() btnEdit_Click End Sub Private Sub mnuSearch_click() btnSearch_Click End Sub Private Sub mnuView_click() btnView_Click End Sub Private Sub mnuSort_click() btnSort_Click End Sub
Private Sub mnuClose_click() btnClose_Click End Sub
Private Sub UserLogOut()Call execSQL("SELECT * FROM tbllog_time")
With RS.AddNew.Fields!user = MAIN.StatusBar1.Panels(2).Text.Fields!logout = Format(Now, "MMM-dd-yyyy-HH:mm").Update.RequeryEnd WithSet RS = NothingSet CN = NothingMsgBox MAIN.StatusBar1.Panels(2).Text & " " & "Has been Successfully Logout.", vbInformation, Format(Now, "MMM-dd-yyyy-HH:mm")
End Sub
114
Figure 4.2.26 View Local Legislation Form
Option ExplicitPrivate Sub btnAddNew_Click()
If usrPrivilege("add", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "You don't have access in this area!. Only the Secretary.", vbExclamation: Exit Sub AddState = True EditState = False If SSTab1.Tab = 0 Then frmLocalLegislationAE.Caption = "Add New Entry" frmLocalLegislationAE.btnok.Visible = False frmLocalLegislationAE.Show vbModal ElseIf SSTab1.Tab = 1 Then frmCommitteeReportCR.Text1.Text = lvList.SelectedItem.Text frmCommitteeReportCR.Text2 = lvList.SelectedItem.SubItems(13) frmCommitteeReportCR.Caption = "Add New Entry" frmCommitteeReportCR.btnok.Visible = False frmCommitteeReportCR.Show vbModal End IfEnd Sub
Private Sub btnClose_Click()Unload MeEnd Sub
Private Sub btnEdit_Click()Dim cb_additem As String
115
If usrPrivilege("edit", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "You don't have access in this area!. Only the Secretary.", vbExclamation: Exit Sub EditState = True AddState = False On Error GoTo err: If SSTab1.Tab = 0 Then Call execSQL("select * from tbllocal_legislation where PK='" & lvList.SelectedItem.Text & "'") With RS frmLocalLegislationAE.Caption = "Edit Entry" frmLocalLegislationAE.Text1.Text = .Fields!PK frmLocalLegislationAE.Combo1.Text = .Fields!terms_of_sb frmLocalLegislationAE.Text3.Text = .Fields!res_ordno frmLocalLegislationAE.Combo3.Text = .Fields!res_ord_ref_no frmLocalLegislationAE.Combo2.Text = .Fields!nature frmLocalLegislationAE.Text2.Text = .Fields!full_title frmLocalLegislationAE.Text6.Text = .Fields!short_title frmLocalLegislationAE.Text9.Text = .Fields!By frmLocalLegislationAE.Text7.Text = Format(.Fields!date_filed, "mmmm dd, yyyy") frmLocalLegislationAE.Text5.Text = .Fields!co_authors frmLocalLegislationAE.Text10.Text = Format(.Fields!date_read, "mmmm dd, yyyy") frmLocalLegislationAE.Text11.Text = Format(.Fields!referral_on, "mmmm dd, yyyy") frmLocalLegislationAE.Combo11.Text = .Fields!committee_name frmLocalLegislationAE.Text12.Text = .Fields!committee_report_no frmLocalLegislationAE.Text13.Text = Format(.Fields!submitted_on, "mmmm dd, yyyy") frmLocalLegislationAE.Combo4.Text = .Fields!submitted_by frmLocalLegislationAE.Combo5.Text = .Fields!recommendations frmLocalLegislationAE.Text14.Text = Format(.Fields!date_included, "mmmm dd, yyyy") frmLocalLegislationAE.Text15.Text = Format(.Fields!second_reading, "mmmm dd, yyyy") frmLocalLegislationAE.Text16.Text = Format(.Fields!date_distributed, "mmmm dd, yyyy") frmLocalLegislationAE.Combo6.Text = .Fields!remarks frmLocalLegislationAE.Text8.Text = Format(.Fields!third_reading, "mmmm dd, yyyy") frmLocalLegislationAE.Combo7.Text = .Fields!in_favor frmLocalLegislationAE.Combo8.Text = .Fields!against frmLocalLegislationAE.Combo9.Text = .Fields!abstain frmLocalLegislationAE.Text17.Text = Format(.Fields!date_transmitted_on_the_mayor, "mmmm dd, yyyy") frmLocalLegislationAE.Text18.Text = Format(.Fields!date_received_by_mayor, "mmmm dd, yyyy") frmLocalLegislationAE.Text19.Text = Format(.Fields!date_acted_by_mayor, "mmmm dd, yyyy") frmLocalLegislationAE.Combo10.Text = .Fields!mayor_action frmLocalLegislationAE.Check1.Value = ConvBool(.Fields!infra) frmLocalLegislationAE.Check2.Value = ConvBool(.Fields!social) frmLocalLegislationAE.Check3.Value = ConvBool(.Fields!political) frmLocalLegislationAE.Check4.Value = ConvBool(.Fields!genadmin) frmLocalLegislationAE.Check5.Value = ConvBool(.Fields!economic) frmLocalLegislationAE.Check6.Value = ConvBool(.Fields!agriculture) frmLocalLegislationAE.Check7.Value = ConvBool(.Fields!others) frmLocalLegislationAE.btnok.Visible = False
116
End With Set RS = Nothing Set CN = Nothing frmLocalLegislationAE.Show vbModal ElseIf SSTab1.Tab = 1 Then frmCommitteeReportCR.Caption = "Edit Entry" frmCommitteeReportCR.Text1.Text = lvList.SelectedItem.Text frmCommitteeReportCR.Text2.Text = lvList1.SelectedItem.SubItems(1) frmCommitteeReportCR.Combo1.Text = lvList1.SelectedItem.SubItems(2) frmCommitteeReportCR.Text3.Text = lvList1.SelectedItem.SubItems(3) frmCommitteeReportCR.Text4.Text = lvList1.SelectedItem.SubItems(4) frmCommitteeReportCR.Text5.Text = lvList1.SelectedItem.SubItems(5) frmCommitteeReportCR.Text7.Text = lvList1.SelectedItem.SubItems(6) frmCommitteeReportCR.Text8.Text = lvList1.SelectedItem.SubItems(7) frmCommitteeReportCR.btnok.Visible = False frmCommitteeReportCR.Show vbModal End If Exit Suberr: If err.Number = 91 Then MsgBox "No record where to be found!", vbExclamation Else MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation End If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub btnprint_Click()If usrPrivilege("print", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "You don't have access in this area!. Only the Secretary.", vbExclamation: Exit Sub AddState = True EditState = False
frmReportLocalLegislation.Show vbModal
End Sub
Private Sub btnRefresh_Click() Call FillListView("")End Sub
Private Sub btnSearch_Click()frmSearchLocal.Show vbModalEnd Sub
Private Sub btnSort_Click()If SSTab1.Tab = 0 Then ElseIf SSTab1.Tab = 1 Then End If End Sub
Private Sub btnView_Click()
If usrPrivilege("view", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "You don't have access in this area!. All users can view.", vbExclamation: Exit Sub
117
AddState = FalseEditState = False On Error GoTo err: If SSTab1.Tab = 0 Then Call execSQL("select * from tbllocal_legislation where PK='" & lvList.SelectedItem.Text & "'") With RS frmLocalLegislationAE.Caption = "View Entry" frmLocalLegislationAE.Caption = "Edit Entry" frmLocalLegislationAE.Text1.Text = .Fields!PK frmLocalLegislationAE.Combo1.Text = .Fields!terms_of_sb frmLocalLegislationAE.Text3.Text = .Fields!res_ordno frmLocalLegislationAE.Combo3.Text = .Fields!res_ord_ref_no frmLocalLegislationAE.Combo2.Text = .Fields!nature frmLocalLegislationAE.Text2.Text = .Fields!full_title frmLocalLegislationAE.Text6.Text = .Fields!short_title frmLocalLegislationAE.Text9.Text = .Fields!By frmLocalLegislationAE.Text7.Text = Format(.Fields!date_filed, "mmmm dd, yyyy") frmLocalLegislationAE.Text5.Text = .Fields!co_authors frmLocalLegislationAE.Text10.Text = Format(.Fields!date_read, "mmmm dd, yyyy") frmLocalLegislationAE.Text11.Text = Format(.Fields!referral_on, "mmmm dd, yyyy") frmLocalLegislationAE.Combo11.Text = .Fields!committee_name frmLocalLegislationAE.Text12.Text = .Fields!committee_report_no frmLocalLegislationAE.Text13.Text = Format(.Fields!submitted_on, "mmmm dd, yyyy") frmLocalLegislationAE.Combo4.Text = .Fields!submitted_by frmLocalLegislationAE.Combo5.Text = .Fields!recommendations frmLocalLegislationAE.Text14.Text = Format(.Fields!date_included, "mmmm dd, yyyy") frmLocalLegislationAE.Text15.Text = Format(.Fields!second_reading, "mmmm dd, yyyy") frmLocalLegislationAE.Text16.Text = Format(.Fields!date_distributed, "mmmm dd, yyyy") frmLocalLegislationAE.Combo6.Text = .Fields!remarks frmLocalLegislationAE.Text8.Text = Format(.Fields!third_reading, "mmmm dd, yyyy") frmLocalLegislationAE.Combo7.Text = .Fields!in_favor frmLocalLegislationAE.Combo8.Text = .Fields!against frmLocalLegislationAE.Combo9.Text = .Fields!abstain frmLocalLegislationAE.Text17.Text = Format(.Fields!date_transmitted_on_the_mayor, "mmmm dd, yyyy") frmLocalLegislationAE.Text18.Text = Format(.Fields!date_received_by_mayor, "mmmm dd, yyyy") frmLocalLegislationAE.Text19.Text = Format(.Fields!date_acted_by_mayor, "mmmm dd, yyyy") frmLocalLegislationAE.Combo10.Text = .Fields!mayor_action frmLocalLegislationAE.Check1.Value = ConvBool(.Fields!infra) frmLocalLegislationAE.Check2.Value = ConvBool(.Fields!social) frmLocalLegislationAE.Check3.Value = ConvBool(.Fields!political) frmLocalLegislationAE.Check4.Value = ConvBool(.Fields!genadmin) frmLocalLegislationAE.Check5.Value = ConvBool(.Fields!economic) frmLocalLegislationAE.Check6.Value = ConvBool(.Fields!agriculture) frmLocalLegislationAE.Check7.Value = ConvBool(.Fields!others) frmLocalLegislationAE.btnSave.Visible = False frmLocalLegislationAE.btnCancel.Visible = False frmLocalLegislationAE.btnok.Visible = True
End With Set RS = Nothing Set CN = Nothing
118
frmLocalLegislationAE.Show vbModal ElseIf SSTab1.Tab = 1 Then frmCommitteeReportCR.Caption = "View Entry" frmCommitteeReportCR.Text1.Text = lvList.SelectedItem.Text frmCommitteeReportCR.Text2.Text = lvList1.SelectedItem.SubItems(1) frmCommitteeReportCR.Combo1.Text = lvList1.SelectedItem.SubItems(2) frmCommitteeReportCR.Text3.Text = lvList1.SelectedItem.SubItems(3) frmCommitteeReportCR.Text4.Text = lvList1.SelectedItem.SubItems(4) frmCommitteeReportCR.Text5.Text = lvList1.SelectedItem.SubItems(5) frmCommitteeReportCR.Text7.Text = lvList1.SelectedItem.SubItems(6) frmCommitteeReportCR.Text8.Text = lvList1.SelectedItem.SubItems(7) frmCommitteeReportCR.btnSave.Visible = False frmCommitteeReportCR.btnCancel.Visible = False frmCommitteeReportCR.btnok.Visible = True frmCommitteeReportCR.Show vbModal End If Exit Suberr: If err.Number = 91 Then MsgBox "No record where to be found!", vbExclamation Else MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation End If Set RS = Nothing Set CN = Nothing End Sub
Private Sub Form_Load()FillListView ("")End Sub
Private Sub Form_Resize()SSTab1.Width = Me.ScaleWidth - 50 SSTab1.Height = Me.Height - 2800 lvList.Width = Me.ScaleWidth - 300 lvList.Height = Me.Height - 3300 lvList1.Width = Me.ScaleWidth - 300 lvList1.Height = Me.Height - 3300ctrlSeparator1.Top = Me.Height - 2200 ctrlSeparator1.Width = Me.ScaleWidth - 300 picControl.Top = Me.Height - 2000 picControl.Left = Me.ScaleLeft + 8500 Frame1.Top = Me.Height - 2000 Frame1.Left = Me.Width - 2500 lblcaption.Width = Me.Width picMessage.Top = Me.Height - 2000End SubPublic Sub FillListView(ByVal sSQL As String) Dim X, tot If sSQL = "" Then Call execSQL("select * from tbllocal_legislation") Else Call execSQL(sSQL) End If lvList.ListItems.clear With RS
119
While Not .EOF Set X = lvList.ListItems.Add(, , .Fields!PK, 5, 5) X.SubItems(1) = .Fields!terms_of_sb X.SubItems(2) = .Fields!res_ordno X.SubItems(3) = .Fields!res_ord_ref_no X.SubItems(4) = .Fields!nature X.SubItems(5) = .Fields!full_title X.SubItems(6) = .Fields!short_title X.SubItems(7) = .Fields!By X.SubItems(8) = Format(.Fields!date_filed, "mmmm dd, yyyy") X.SubItems(9) = .Fields!co_authors X.SubItems(10) = Format(.Fields!date_read, "mmmm dd, yyyy") X.SubItems(11) = Format(.Fields!referral_on, "mmmm dd, yyyy") X.SubItems(12) = .Fields!committee_name X.SubItems(13) = .Fields!committee_report_no X.SubItems(14) = Format(.Fields!submitted_on, "mmmm dd, yyyy") X.SubItems(15) = .Fields!submitted_by X.SubItems(16) = .Fields!recommendations X.SubItems(17) = Format(.Fields!date_included, "mmmm dd, yyyy") X.SubItems(18) = Format(.Fields!second_reading, "mmmm dd, yyyy") X.SubItems(19) = Format(.Fields!date_distributed, "mmmm dd, yyyy") X.SubItems(20) = .Fields!remarks X.SubItems(21) = Format(.Fields!third_reading, "mmmm dd, yyyy") X.SubItems(22) = .Fields!in_favor X.SubItems(23) = .Fields!against X.SubItems(24) = .Fields!abstain X.SubItems(25) = Format(.Fields!date_transmitted_on_the_mayor, "mmmm dd, yyyy") X.SubItems(26) = Format(.Fields!date_received_by_mayor, "mmmm dd, yyyy") X.SubItems(27) = Format(.Fields!date_acted_by_mayor, "mmmm dd, yyyy") X.SubItems(28) = .Fields!mayor_action .MoveNext tot = tot + 1 Wend End With lblTotal.Caption = tot Set RS = Nothing Set CN = NothingEnd Sub
Public Sub FillListView1()Dim X Call execSQL("select * from tblcommittee_report where FK='" & lvList.SelectedItem.Text & "'") lvList1.ListItems.clear With RS While Not .EOF Set X = lvList1.ListItems.Add(, , .Fields!FK, 5, 5) X.SubItems(1) = .Fields!committee_report_no X.SubItems(2) = .Fields!submitted_by X.SubItems(3) = .Fields!subjects X.SubItems(4) = Format(.Fields!Date, "mmmm dd, yyyy") X.SubItems(5) = .Fields!For X.SubItems(6) = .Fields!findings_comments_observations X.SubItems(7) = .Fields!recommendation .MoveNext Wend End With Set RS = Nothing Set CN = Nothing
120
End Sub
Private Sub lvList_Click()FillListView1
End Sub
Private Sub lvList_DblClick() btnEdit_ClickEnd Sub
Private Sub lvList_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then PopupMenu mnuLocal End IfEnd Sub
Private Sub lvList1_DblClick()btnEdit_ClickEnd Sub
Private Sub lvList1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then PopupMenu mnuLocal End IfEnd Sub
Private Sub lvList2_DblClick()btnEdit_ClickEnd Sub
Private Sub lvList2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)If Button = 2 Then PopupMenu mnuLocalEnd IfEnd Sub
Private Sub mnuAccounts_Click() On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then frmViewUsers.Show vbModal Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub
121
End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = NothingEnd Sub
Private Sub mnuAddNew_click()btnAddNew_ClickEnd Sub
Private Sub mnuAllAttendances_Click()frmReportAttendance.ShowEnd Sub
Private Sub mnuBackup_Click() On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then Dim srcLocation As String If MsgBox("Are you sure you want to backup your database?", vbYesNo + vbInformation) = vbNo Then Exit Sub Else CommonDialog1.FileName = Format(Now, "yyyy-mm-dd") CommonDialog1.ShowSave srcLocation = CommonDialog1.FileName & "sbdata.mdb" FileCopy App.Path & ReadINI("Settings", "DBpath"), srcLocation MsgBox "Database has been successfully back-up.", vbInformation End If Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub
Private Sub mnuCalc_Click()Shell "calc.exe", vbNormalFocusEnd Sub
Private Sub mnuClose_click()btnClose_ClickEnd Sub
Private Sub mnuCommitteeReport_Click()
122
frmReportonCommittee.Show vbModalEnd Sub
Private Sub mnudateandtime_Click()Shell ("C:\WINDOWS\system32\control.exe date/time")End SubPrivate Sub mnuEdit_click()btnEdit_ClickEnd Sub
Private Sub mnuExit_Click()EndEnd Sub
Private Sub mnuExplorer_Click()Shell "Explorer.exe", vbNormalFocusEnd Sub
Private Sub mnuFile_Click() If mnuAccounts.Enabled = True Then mnuLogin.Enabled = False mnuExit.Enabled = True Else If mnuLogout.Enabled = False Then mnuLogin.Enabled = True If mnuTools.Enabled = False Then mnuFile.Enabled = True mnuhelp.Enabled = False mnuReport.Enabled = False mnuAbout.Enabled = False
End IfEnd IfEnd IfEnd Sub
Private Sub mnuhowto_Click()frmhowto.ShowEnd Sub
Private Sub mnuLocallegislation_Click()frmReportLocalLegislation.ShowEnd Sub
Private Sub mnuLock_Click()frmLock.Show vbModalEnd Sub
Private Sub mnuLogout_Click()Dim Cancel As IntegerIf MsgBox("Do you want to Logout the application? Click yes to continue.", vbYesNo + vbExclamation) = vbNo Then Cancel = 1 Else UserLogOut Unload Me frmViewHearings.Hide frmViewLocalLegislation.Hide
123
frmViewMemberProfile.Hide frmViewSanggunianSession.Hide frmViewSetOfSanggunian.Hide frmViewStandingCommittee.Hide MAIN.Hide frmLogin.Show
End IfEnd Sub
Private Sub mnuNotepad_Click()Shell "notepad.exe", vbNormalFocusEnd Sub
Private Sub mnuPaint_Click()Shell "mspaint.exe", vbNormalFocusEnd Sub
Private Sub mnuPrint_Click()btnprint_ClickEnd Sub
Private Sub mnuRefresh_Click()btnRefresh_ClickEnd Sub
Private Sub mnuReport_Click()On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = NothingEnd Sub
Private Sub mnuRestore_Click() On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then
124
If MsgBox("Are you sure you to load another database?.This should be done with precaution." & vbCrLf & vbCrLf & "WARNING: YOU CANNOT UNDO THIS PROCESS", vbYesNo + vbCritical) = vbYes Then Dim srcLocation As String Set RS = Nothing Set CN = Nothing CommonDialog1.ShowOpen srcLocation = CommonDialog1.FileName Call WriteINI("Settings", "DBpath", srcLocation) Else Exit Sub End If Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing
End Sub
Private Sub mnuSearch_click()btnSearch_ClickEnd Sub
Private Sub mnuSelectAttendance_Click()frmReportAttendance.ShowEnd Sub
Private Sub mnuSelectLocal_Click()frmReportLocal.Show vbModalEnd Sub
Private Sub mnuSystemInfo_Click()frmABOUTPROGRAM.Show vbModalEnd Sub
Private Sub mnuView_click()btnView_ClickEnd Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button) Select Case Button.Index Case 1 Call NavigateListView(lvList, m_FIRST_PAGE, , lblSelected) Case 2 Call NavigateListView(lvList, m_PREV_PAGE, , lblSelected) Case 3 Call NavigateListView(lvList, m_NEXT_PAGE, , lblSelected) Case 4 Call NavigateListView(lvList, m_LAST_PAGE, lblTotal, lblSelected) End SelectEnd Sub
125
Private Sub UserLogOut()Call execSQL("SELECT * FROM tbllog_time")
With RS.AddNew.Fields!user = MAIN.StatusBar1.Panels(2).Text.Fields!logout = Format(Now, "MMM-dd-yyyy-HH:mm").Update.RequeryEnd WithSet RS = NothingSet CN = NothingMsgBox MAIN.StatusBar1.Panels(2).Text & " " & "Has been Successfully Logout.", vbInformation, Format(Now, "MMM-dd-yyyy-HH:mm")
End Sub
Figure 4.2.27 shows the View Member Profile Form to view the
information of the Sanggunian Bayan Members as well as the Secretary of
Sanggunian Bayan in Jasaan Municipality.
Figure 4.2.27 View Member Profile Form
Option ExplicitPrivate Sub btnAddNew_Click()
126
If usrPrivilege("add", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "You don't have access in this area!. Only the Secretary.", vbExclamation: Exit Sub AddState = True EditState = False frmMemberProfileAE.Caption = "Add New Entry" frmMemberProfileAE.btnok.Visible = False frmMemberProfileAE.btnSave.Visible = True frmMemberProfileAE.btnCancel.Visible = True frmMemberProfileAE.Show vbModalEnd Sub
Private Sub btnClose_Click()Unload MeEnd Sub
Private Sub btnEdit_Click() If usrPrivilege("edit", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "You don't have access in this area!. Only the Secretary.", vbExclamation: Exit Sub EditState = True AddState = False On Error GoTo err: Call execSQL("select * from tblmember_profile where PK='" & lvList.SelectedItem.Text & "'") With RS frmMemberProfileAE.Caption = "Edit Entry" frmMemberProfileAE.lblID.Text = .Fields!PK frmMemberProfileAE.Combo1.Text = .Fields!set_of_sbmembers frmMemberProfileAE.txt2.Text = .Fields!FullName frmMemberProfileAE.txt3.Text = .Fields!address frmMemberProfileAE.txt4.Text = .Fields!contact frmMemberProfileAE.cb_additem frmMemberProfileAE.btnok.Visible = False frmMemberProfileAE.btnSave.Visible = True frmMemberProfileAE.btnCancel.Visible = True End With Set RS = Nothing Set CN = Nothing frmMemberProfileAE.Show vbModal Exit Suberr: If err.Number = 91 Then MsgBox "No record where to be found!", vbExclamation Else MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation End If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub btnRefresh_Click()Call FillListView("")
127
End Sub
Private Sub btnSearch_Click() MySearch = 1 With frmSearch.Combo1 .AddItem "Member ID" .AddItem "Set of SB Members" .AddItem "Full Name" .AddItem "Address" .AddItem "Contact No." End With frmSearch.Show vbModal End Sub
Private Sub btnView_Click() If usrPrivilege("view", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "All users can view.", vbExclamation: Exit Sub AddState = False EditState = False On Error GoTo err: Call execSQL("select * from tblmember_profile where PK='" & lvList.SelectedItem.Text & "'") With RS frmMemberProfileAE.Caption = "View Entry" frmMemberProfileAE.lblID.Text = .Fields!PK frmMemberProfileAE.Combo1.Text = .Fields!set_of_sbmembers frmMemberProfileAE.txt2.Text = .Fields!FullName frmMemberProfileAE.txt3.Text = .Fields!address frmMemberProfileAE.txt4.Text = .Fields!contact frmMemberProfileAE.cb_additem frmMemberProfileAE.btnSave.Visible = False frmMemberProfileAE.btnCancel.Visible = False frmMemberProfileAE.btnok.Visible = True End With Set RS = Nothing Set CN = Nothing frmMemberProfileAE.Show vbModal Exit Suberr: If err.Number = 91 Then MsgBox "No record where to be found!", vbExclamation Else MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation End If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub Form_Load()FillListView ("")End Sub
Private Sub Form_Resize() lvList.Width = Me.ScaleWidth - 50 lvList.Height = Me.Height - 2800
128
ctrlSeparator1.Top = Me.Height - 2200 ctrlSeparator1.Width = Me.ScaleWidth - 300 picControl.Top = Me.Height - 2000 picControl.Left = Me.ScaleLeft + 8500 Frame1.Top = Me.Height - 2000 Frame1.Left = Me.Width - 2500 lblCaption.Width = Me.Width picMessage.Top = Me.Height - 2000End Sub
Public Sub FillListView(sSQL As String)Dim X, tot If sSQL = "" Then Call execSQL("select * from tblmember_profile") Else Call execSQL(sSQL) End If lvList.ListItems.clear With RS While Not .EOF Set X = lvList.ListItems.Add(, , .Fields!PK, 5, 5) X.SubItems(1) = .Fields!set_of_sbmembers X.SubItems(2) = .Fields!FullName X.SubItems(3) = .Fields!address X.SubItems(4) = .Fields!contact .MoveNext tot = tot + 1 Wend End With lblTotal.Caption = tot Set RS = Nothing Set CN = NothingEnd Sub
Private Sub lvList_DblClick()btnEdit_Click
End Sub
Private Sub lvList_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then PopupMenu mnuMemberProfiles End IfEnd Sub
Private Sub mnuAccounts_Click() On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then frmViewUsers.Show vbModal Else
129
MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = NothingEnd Sub
Private Sub mnuAdd_Click()btnAddNew_ClickEnd Sub
Private Sub mnuAllAttendances_Click()frmReportAttendance.ShowEnd Sub
Private Sub mnuBackup_Click() On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then Dim srcLocation As String If MsgBox("Are you sure you want to backup your database?", vbYesNo + vbInformation) = vbNo Then Exit Sub Else CommonDialog1.FileName = Format(Now, "yyyy-mm-dd") CommonDialog1.ShowSave srcLocation = CommonDialog1.FileName & "sbdata.mdb" FileCopy App.Path & ReadINI("Settings", "DBpath"), srcLocation MsgBox "Database has been successfully back-up.", vbInformation End If Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing
End Sub
Private Sub mnuCalc_Click()Shell "calc.exe", vbNormalFocusEnd Sub
Private Sub mnuCommitteeReport_Click()
130
frmReportonCommittee.Show vbModal
End Sub
Private Sub mnudateandtime_Click()Shell ("C:\WINDOWS\system32\control.exe date/time")End SubPrivate Sub mnuEdit_click()btnEdit_ClickEnd Sub
Private Sub mnuExit_Click()EndEnd Sub
Private Sub mnuExplorer_Click()Shell "Explorer.exe", vbNormalFocusEnd Sub
Private Sub mnuFile_Click() If mnuAccounts.Enabled = True Then mnuLogin.Enabled = False mnuExit.Enabled = True
Else If mnuLogout.Enabled = False Then mnuLogin.Enabled = True If mnuTools.Enabled = False Then mnuFile.Enabled = True mnuhelp.Enabled = False mnuReport.Enabled = False mnuAbout.Enabled = False
End IfEnd IfEnd IfEnd Sub
Private Sub mnuhowto_Click()frmhowto.ShowEnd Sub
Private Sub mnuLocallegislation_Click()frmReportLocalLegislation.ShowEnd Sub
Private Sub mnuLock_Click()frmLock.Show vbModalEnd Sub
Private Sub mnuLogout_Click() Dim Cancel As IntegerIf MsgBox("Do you want to Logout the application? Click yes to continue.", vbYesNo + vbExclamation) = vbNo Then Unload Me Cancel = 1 Else UserLogOut Unload Me frmViewHearings.Hide
131
frmViewLocalLegislation.Hide frmViewMemberProfile.Hide frmViewSanggunianSession.Hide frmViewSetOfSanggunian.Hide frmViewStandingCommittee.Hide MAIN.Hide frmLogin.Show End IfEnd Sub
Private Sub mnuNotepad_Click()Shell "notepad.exe", vbNormalFocusEnd Sub
Private Sub mnuPaint_Click()Shell "mspaint.exe", vbNormalFocusEnd Sub
Private Sub mnuRefresh_Click()btnRefresh_ClickEnd Sub
Private Sub mnuReport_Click()On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = NothingEnd Sub
Private Sub mnuRestore_Click() On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then If MsgBox("Are you sure you to load another database?.This should be done with precaution." & vbCrLf & vbCrLf & "WARNING: YOU CANNOT UNDO THIS PROCESS", vbYesNo + vbCritical) = vbYes Then Dim srcLocation As String Set RS = Nothing
132
Set CN = Nothing CommonDialog1.ShowOpen srcLocation = CommonDialog1.FileName Call WriteINI("Settings", "DBpath", srcLocation) Else Exit Sub End If Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing
End Sub
Private Sub mnuSearch_click()btnSearch_ClickEnd Sub
Private Sub mnuSelectAttendance_Click()frmReportAttendance.ShowEnd Sub
Private Sub mnuSelectLocal_Click()frmReportLocal.Show vbModalEnd Sub
Private Sub mnuSystemInfo_Click()frmABOUTPROGRAM.Show vbModalEnd Sub
Private Sub mnuView_click()btnView_ClickEnd Sub
Private Sub mnuClose_click()btnClose_ClickEnd Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button) Select Case Button.Index Case 1 Call NavigateListView(lvList, m_FIRST_PAGE, , lblSelected) Case 2 Call NavigateListView(lvList, m_PREV_PAGE, , lblSelected) Case 3 Call NavigateListView(lvList, m_NEXT_PAGE, , lblSelected) Case 4 Call NavigateListView(lvList, m_LAST_PAGE, lblTotal, lblSelected) End SelectEnd Sub
Private Sub UserLogOut()Call execSQL("SELECT * FROM tbllog_time")
133
With RS.AddNew.Fields!user = MAIN.StatusBar1.Panels(2).Text.Fields!logout = Format(Now, "MMM-dd-yyyy-HH:mm").Update.RequeryEnd WithSet RS = NothingSet CN = NothingMsgBox MAIN.StatusBar1.Panels(2).Text & " " & "Has been Successfully Logout.", vbInformation, Format(Now, "MMM-dd-yyyy-HH:mm")
End Sub
Figure 4.2.28 shows the View Sanggunian Session Form to view the status
of the Session as well as the Attendance of the Sanggunian Bayan Members.
Figure 4.2.28 View Sanggunian Session Form
Option Explicit
Private Sub btnAddNew_Click() If usrPrivilege("add", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "You don't have access in this area!. Only the Secretary.", vbExclamation: Exit Sub AddState = True EditState = False If SSTab1.Tab = 0 Then frmSanggunianSessionAE.Caption = "Add New Entry"
134
frmSanggunianSessionAE.btnok.Visible = False frmSanggunianSessionAE.Show vbModal
ElseIf SSTab1.Tab = 1 Then frmAttendanceAE.Caption = "Add New Entry" frmAttendanceAE.btnok.Visible = False frmAttendanceAE.Text1 = lvList.SelectedItem.Text frmAttendanceAE.Combo1.Text = lvList.SelectedItem.SubItems(1) frmAttendanceAE.Show vbModal End If End Sub
Private Sub btnClose_Click()Unload MeEnd Sub
Private Sub btnEdit_Click() On Error GoTo err: If usrPrivilege("edit", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "You don't have access in this area!. Only the Secretary.", vbExclamation: Exit Sub EditState = True AddState = FalseIf SSTab1.Tab = 0 Then frmSanggunianSessionAE.Caption = "Edit Entry" frmSanggunianSessionAE.Text1.Text = lvList.SelectedItem.Text frmSanggunianSessionAE.Combo1.Text = lvList.SelectedItem.SubItems(1) frmSanggunianSessionAE.cboses.Text = lvList.SelectedItem.SubItems(2) frmSanggunianSessionAE.Text5.Text = lvList.SelectedItem.SubItems(3) frmSanggunianSessionAE.Text4.Text = lvList.SelectedItem.SubItems(4) frmSanggunianSessionAE.Text6.Text = lvList.SelectedItem.SubItems(5) frmSanggunianSessionAE.Text9.Text = lvList.SelectedItem.SubItems(6) frmSanggunianSessionAE.btnok.Visible = False frmSanggunianSessionAE.Show vbModalElseIf SSTab1.Tab = 1 Then frmAttendanceAE.Caption = "Edit Entry" frmAttendanceAE.Text1.Text = lvList.SelectedItem.Text frmAttendanceAE.lblCaption.Caption = lvList1.SelectedItem.SubItems(1) frmAttendanceAE.Text3.Text = lvList1.SelectedItem.SubItems(1) frmAttendanceAE.Combo2.Text = lvList1.SelectedItem.SubItems(2) frmAttendanceAE.btnok.Visible = False frmAttendanceAE.Show vbModal End If Exit Suberr: If err.Number = 91 Then MsgBox "No record where to be found!", vbExclamation Else MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation End If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub btnprint_Click()
135
If usrPrivilege("print", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "You don't have access in this area!. Only the Secretary.", vbExclamation: Exit Sub AddState = True EditState = False frmReportAttendance.Show vbModal Set RS = Nothing Set CN = NothingEnd Sub
Private Sub btnRefresh_Click()Call FillListView("")End Sub
Private Sub btnSearch_Click()If SSTab1.Tab = 0 Then MySearch = 4 With frmSearch.Combo1 .AddItem "Session ID" .AddItem "Terms of SB" .AddItem "Session No" .AddItem "Presided By" .AddItem "Session Date" .AddItem "Secretary" .AddItem "Session Type" End With frmSearch.Show vbModal ElseIf SSTab1.Tab = 1 Then End IfEnd Sub
Private Sub btnSort_Click()If SSTab1.Tab = 0 Then ElseIf SSTab1.Tab = 1 Then End IfEnd Sub
Private Sub btnView_Click()If usrPrivilege("view", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "All users can view.", vbExclamation: Exit Sub AddState = False EditState = FalseIf SSTab1.Tab = 0 Then frmSanggunianSessionAE.Caption = "View Entry" frmSanggunianSessionAE.Text1.Text = lvList.SelectedItem.Text frmSanggunianSessionAE.Combo1.Text = lvList.SelectedItem.SubItems(1) frmSanggunianSessionAE.cboses.Text = lvList.SelectedItem.SubItems(2) frmSanggunianSessionAE.Text5.Text = lvList.SelectedItem.SubItems(3) frmSanggunianSessionAE.Text4.Text = lvList.SelectedItem.SubItems(4) frmSanggunianSessionAE.Text6.Text = lvList.SelectedItem.SubItems(5) frmSanggunianSessionAE.Text9.Text = lvList.SelectedItem.SubItems(6) frmSanggunianSessionAE.btnSave.Visible = False frmSanggunianSessionAE.btnCancel.Visible = False frmSanggunianSessionAE.btnok.Visible = True frmSanggunianSessionAE.Show vbModal ElseIf SSTab1.Tab = 1 Then frmAttendanceAE.Caption = "View Entry" frmAttendanceAE.Text1.Text = lvList.SelectedItem.Text
136
frmAttendanceAE.lblCaption.Caption = lvList1.SelectedItem.SubItems(1) frmAttendanceAE.Text3.Text = lvList1.SelectedItem.SubItems(1) frmAttendanceAE.Combo2.Text = lvList1.SelectedItem.SubItems(2) frmAttendanceAE.btnSave.Visible = False frmAttendanceAE.btnCancel.Visible = False frmAttendanceAE.btnok.Visible = True frmAttendanceAE.Show vbModal End If Exit Suberr: If err.Number = 91 Then MsgBox "No record where to be found!", vbExclamation Else MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation End If Set RS = Nothing Set CN = Nothing
End SubPrivate Sub Form_Load()Call FillListView("")End Sub
Private Sub Form_Resize() SSTab1.Width = Me.ScaleWidth - 50 SSTab1.Height = Me.Height - 2800 lvList.Width = Me.ScaleWidth - 300 lvList.Height = Me.Height - 3300 lvList1.Width = Me.ScaleWidth - 300 lvList1.Height = Me.Height - 3300ctrlSeparator1.Top = Me.Height - 2200 ctrlSeparator1.Width = Me.ScaleWidth - 300 picControl.Top = Me.Height - 2000 picControl.Left = Me.ScaleLeft + 8500 Frame1.Top = Me.Height - 2000 Frame1.Left = Me.Width - 2500 lblCaption.Width = Me.Width picMessage.Top = Me.Height - 2000End Sub
Private Sub lvList_Click()FillListView1
End Sub
Private Sub lvList_DblClick() btnEdit_ClickEnd Sub
Private Sub lvList_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then PopupMenu mnuMenu End IfEnd Sub
Private Sub lvList1_DblClick() btnEdit_ClickEnd Sub
137
Private Sub lvList1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)If Button = 2 Then PopupMenu mnuMenu End IfEnd Sub
Private Sub lvList2_DblClick()btnEdit_ClickEnd Sub
Private Sub lvList2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)If Button = 2 Then PopupMenu mnuMenu End IfEnd Sub
Private Sub mnuAccounts_Click() On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then frmViewUsers.Show vbModal Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = NothingEnd Sub
Private Sub mnuAllAttendances_Click()frmReportAttendance.ShowEnd Sub
Private Sub mnuBackup_Click() On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then Dim srcLocation As String
138
If MsgBox("Are you sure you want to backup your database?", vbYesNo + vbInformation) = vbNo Then Exit Sub Else CommonDialog1.FileName = Format(Now, "yyyy-mm-dd") CommonDialog1.ShowSave srcLocation = CommonDialog1.FileName & "sbdata.mdb" FileCopy App.Path & ReadINI("Settings", "DBpath"), srcLocation MsgBox "Database has been successfully back-up.", vbInformation End If Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub
Private Sub mnuCalc_Click()Shell "calc.exe", vbNormalFocusEnd Sub
Private Sub mnuCommitteeReport_Click()frmReportonCommittee.Show vbModal
End Sub
Private Sub mnudateandtime_Click()Shell ("C:\WINDOWS\system32\control.exe date/time")End Sub
Private Sub mnuExit_Click()EndEnd Sub
Private Sub mnuExplorer_Click()Shell "Explorer.exe", vbNormalFocusEnd Sub
Private Sub mnuFile_Click() If mnuAccounts.Enabled = True Then mnuLogin.Enabled = False mnuExit.Enabled = True Else If mnuLogout.Enabled = False Then mnuLogin.Enabled = True If mnuTools.Enabled = False Then mnuFile.Enabled = True mnuhelp.Enabled = False mnuReport.Enabled = False mnuAbout.Enabled = False
End If
139
End IfEnd IfEnd Sub
Private Sub mnuhowto_Click()frmhowto.ShowEnd Sub
Private Sub mnuLocallegislation_Click()frmReportLocalLegislation.ShowEnd Sub
Private Sub mnuLock_Click()frmLock.Show vbModalEnd Sub
Private Sub mnuLogout_Click()Dim Cancel As IntegerIf MsgBox("Do you want to Logout the application? Click yes to continue.", vbYesNo + vbExclamation) = vbNo Then Cancel = 1 Else UserLogOut Unload Me frmViewHearings.Hide frmViewLocalLegislation.Hide frmViewMemberProfile.Hide frmViewSanggunianSession.Hide frmViewSetOfSanggunian.Hide frmViewStandingCommittee.Hide MAIN.Hide frmLogin.Show End IfEnd Sub
Private Sub mnuNotepad_Click()Shell "notepad.exe", vbNormalFocusEnd Sub
Private Sub mnuPaint_Click()Shell "mspaint.exe", vbNormalFocusEnd Sub
Private Sub mnuPrint_Click()btnprint_ClickEnd Sub
Private Sub mnuReport_Click()On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then Else MsgBox "You don't have the privileges to access this area.", vbExclamation
140
Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = NothingEnd Sub
Private Sub mnuRestore_Click() On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then If MsgBox("Are you sure you to load another database?.This should be done with precaution." & vbCrLf & vbCrLf & "WARNING: YOU CANNOT UNDO THIS PROCESS", vbYesNo + vbCritical) = vbYes Then Dim srcLocation As String Set RS = Nothing Set CN = Nothing CommonDialog1.ShowOpen srcLocation = CommonDialog1.FileName Call WriteINI("Settings", "DBpath", srcLocation) Else Exit Sub End If Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing
End Sub
Private Sub mnuSelectAttendance_Click()frmReportAttendance.ShowEnd Sub
Private Sub mnuSelectLocal_Click()frmReportAttendance.ShowEnd Sub
Private Sub mnuSystemInfo_Click()frmABOUTPROGRAM.Show vbModalEnd Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)Select Case Button.Index
141
Case 1 Call NavigateListView(lvList, m_FIRST_PAGE, , lblSelected) Case 2 Call NavigateListView(lvList, m_PREV_PAGE, , lblSelected) Case 3 Call NavigateListView(lvList, m_NEXT_PAGE, , lblSelected) Case 4 Call NavigateListView(lvList, m_LAST_PAGE, lblTotal, lblSelected) End Select
End Sub
Public Sub FillListView(sSQL As String) Dim X, tot If sSQL = "" Then Call execSQL("select * from tblsanggunian_session") Else Call execSQL(sSQL) End If lvList.ListItems.clear With RS While Not .EOF Set X = lvList.ListItems.Add(, , .Fields!PK, 5, 5) X.SubItems(1) = .Fields!terms_of_sb X.SubItems(2) = .Fields!session_number X.SubItems(3) = .Fields!presided_by X.SubItems(4) = Format(.Fields!session_date, "mmmm dd, yyyy") X.SubItems(5) = .Fields!secretary X.SubItems(6) = .Fields!session_type .MoveNext tot = tot + 1 Wend End With lblTotal.Caption = tot Set RS = Nothing Set CN = NothingEnd Sub
Private Sub mnuAddNew_click()btnAddNew_ClickEnd SubPrivate Sub mnuEdit_click()btnEdit_ClickEnd SubPrivate Sub mnuSearch_click()btnSearch_ClickEnd SubPrivate Sub mnuView_click()btnView_ClickEnd SubPrivate Sub mnuSort_click()btnSort_ClickEnd SubPrivate Sub mnuRefresh_Click()
142
btnRefresh_ClickEnd SubPrivate Sub mnuClose_click()btnClose_ClickEnd Sub
Private Sub UserLogOut()Call execSQL("SELECT * FROM tbllog_time")
With RS.AddNew.Fields!user = MAIN.StatusBar1.Panels(2).Text.Fields!logout = Format(Now, "MMM-dd-yyyy-HH:mm").Update.RequeryEnd WithSet RS = NothingSet CN = NothingMsgBox MAIN.StatusBar1.Panels(2).Text & " " & "Has been Successfully Logout.", vbInformation, Format(Now, "MMM-dd-yyyy-HH:mm")
End Sub
Public Sub FillListView1() Dim X Call execSQL("select * from tblsanggunian_attendance,tblsanggunian_session where tblsanggunian_session.PK=FK and tblsanggunian_session.PK='" & lvList.SelectedItem.Text & "'") lvList1.ListItems.clear With RS While Not .EOF Set X = lvList1.ListItems.Add(, , .Fields!FK, 5, 5) X.SubItems(1) = .Fields!members X.SubItems(2) = .Fields!Status .MoveNext Wend End With Set RS = Nothing Set CN = NothingEnd Sub
143
Figure 4.2.29 View SessionType Form
Option Explicit
Private Sub btnAdd_Click() AddState = True EditState = False frmSessionTypeAE.Caption = "Add New Entry" frmSessionTypeAE.Show vbModalEnd Sub
Private Sub btnCancel_Click()Unload MeEnd Sub
Private Sub btnDelete_Click()Call delete_rec("tblsession", "description", lvList)FillListViewEnd Sub
Private Sub btnEdit_Click() EditState = True AddState = False On Error GoTo err: frmSessionTypeAE.Caption = "Edit Entry" frmSessionTypeAE.lblCaption.Caption = lvList.SelectedItem.Text frmSessionTypeAE.Text1.Text = lvList.SelectedItem.Text frmSessionTypeAE.Show vbModal Exit Suberr: If err.Number = 91 Then MsgBox "No record where to be found!", vbExclamation Else MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation End If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub btnSelect_Click()
144
frmSanggunianSessionAE.Text9.Text = lvList.SelectedItem.Text Unload MeEnd Sub
Private Sub Form_Load()FillListViewEnd Sub
Public Sub FillListView() Dim X Call execSQL("select UCASE(description)as description from tblsession") lvList.ListItems.clear With RS While Not .EOF Set X = lvList.ListItems.Add(, , .Fields(0), 1, 1) .MoveNext Wend End With Set RS = Nothing Set CN = NothingEnd Sub
Private Sub lvList_DblClick() btnEdit_ClickEnd Sub
Figure 4.2.30 shows the View Set of Sanggunian Form to view the
background information about terms of SB of Sanggunian Bayan Members as
well as the political affiliation of each member.
145
Figure 4.2.30 View Set of Sanggunian Form
Option Explicit
Private Sub btnAddNew_Click()
If usrPrivilege("add", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "You don't have access in this area!. Only the Secretary.", vbExclamation: Exit Sub
AddState = TrueEditState = False
If SSTab1.Tab = 0 Then frmSetOfSanggunianAE.Caption = "Add New Entry" frmSetOfSanggunianAE.btnok.Visible = False frmSetOfSanggunianAE.Show vbModalElseIf SSTab1.Tab = 1 Then frmSanggunianMemberAE.Caption = "Add New Entry" frmSanggunianMemberAE.btnok.Visible = False frmSanggunianMemberAE.Text1.Text = lvList.SelectedItem.Text frmSanggunianMemberAE.Show vbModalEnd If
End Sub
Private Sub btnClose_Click()Unload MeEnd Sub
Private Sub btnEdit_Click()On Error GoTo err:
146
If usrPrivilege("edit", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "You don't have access in this area!. Only the Secretary.", vbExclamation: Exit Sub
EditState = TrueAddState = FalseOn Error GoTo err:If SSTab1.Tab = 0 Then frmSetOfSanggunianAE.Caption = "Edit Entry" frmSetOfSanggunianAE.Text1.Text = lvList.SelectedItem.Text frmSetOfSanggunianAE.Combo1.Text = lvList.SelectedItem.SubItems(1) frmSetOfSanggunianAE.Text4.Text = lvList.SelectedItem.SubItems(2) frmSetOfSanggunianAE.Text5.Text = lvList.SelectedItem.SubItems(3) frmSetOfSanggunianAE.btnok.Visible = False frmSetOfSanggunianAE.Show vbModal
ElseIf SSTab1.Tab = 1 Then frmSanggunianMemberAE.Caption = "Edit Entry" frmSanggunianMemberAE.lblCaption.Caption = lvList1.SelectedItem.SubItems(1) frmSanggunianMemberAE.Text1.Text = lvList1.SelectedItem.Text frmSanggunianMemberAE.Text2.Text = lvList1.SelectedItem.SubItems(1) frmSanggunianMemberAE.Text3.Text = lvList1.SelectedItem.SubItems(2) frmSanggunianMemberAE.Text4.Text = lvList1.SelectedItem.SubItems(3) frmSanggunianMemberAE.btnok.Visible = False frmSanggunianMemberAE.Show vbModalEnd If
Exit Suberr: If err.Number = 91 Then MsgBox "No record where to be found!", vbExclamation Else MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation End If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub btnRefresh_Click()Call FillListView("")End Sub
Private Sub btnSearch_Click() If SSTab1.Tab = 0 Then MySearch = 3 With frmSearch.Combo1 .AddItem "Sanggunian set ID" .AddItem "Terms of SB" .AddItem "Date From" .AddItem "Date To" End With frmSearch.Show vbModal ElseIf SSTab1.Tab = 1 Then End IfEnd Sub
Private Sub btnSort_Click()If SSTab1.Tab = 0 Then ElseIf SSTab1.Tab = 1 Then End If End Sub
147
Private Sub btnView_Click()
If usrPrivilege("view", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "All users can view.", vbExclamation: Exit Sub
AddState = FalseEditState = False On Error GoTo err:If SSTab1.Tab = 0 Then frmSetOfSanggunianAE.Caption = "View Entry" frmSetOfSanggunianAE.Text1.Text = lvList.SelectedItem.Text frmSetOfSanggunianAE.Combo1.Text = lvList.SelectedItem.SubItems(1) frmSetOfSanggunianAE.Text4.Text = lvList.SelectedItem.SubItems(2) frmSetOfSanggunianAE.Text5.Text = lvList.SelectedItem.SubItems(3) frmSetOfSanggunianAE.btnSave.Visible = False frmSetOfSanggunianAE.btnCancel.Visible = False frmSetOfSanggunianAE.Show vbModalElseIf SSTab1.Tab = 1 Then frmSanggunianMemberAE.Caption = "View Entry" frmSanggunianMemberAE.lblCaption.Caption = lvList1.SelectedItem.SubItems(1) frmSanggunianMemberAE.Text1.Text = lvList1.SelectedItem.Text frmSanggunianMemberAE.Text2.Text = lvList1.SelectedItem.SubItems(1) frmSanggunianMemberAE.Text3.Text = lvList1.SelectedItem.SubItems(2) frmSanggunianMemberAE.Text4.Text = lvList1.SelectedItem.SubItems(3) frmSanggunianMemberAE.btnSave.Visible = False frmSanggunianMemberAE.btnCancel.Visible = False frmSanggunianMemberAE.Show vbModalEnd If
Exit Suberr: If err.Number = 91 Then MsgBox "No record where to be found!", vbExclamation Else MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation End If Set RS = Nothing Set CN = Nothing
End SubPrivate Sub Form_Load()Call FillListView("")End Sub
Private Sub Form_Resize()SSTab1.Width = Me.ScaleWidth - 50 SSTab1.Height = Me.Height - 2800 lvList.Width = Me.ScaleWidth - 300 lvList.Height = Me.Height - 3300 lvList1.Width = Me.ScaleWidth - 300 lvList1.Height = Me.Height - 3300ctrlSeparator1.Top = Me.Height - 2200 ctrlSeparator1.Width = Me.ScaleWidth - 300 picControl.Top = Me.Height - 2000 picControl.Left = Me.ScaleLeft + 8500 Frame1.Left = Me.Width - 2500 lblCaption.Width = Me.Width picMessage.Top = Me.Height - 2000End Sub
Public Sub FillListView(sSQL As String)
148
On Error GoTo err: Dim X, tot If sSQL = "" Then Call execSQL("select * from tblset_of_sanggunian") Else Call execSQL(sSQL) End If lvList.ListItems.clear With RS While Not .EOF Set X = lvList.ListItems.Add(, , .Fields!PK, 5, 5) X.SubItems(1) = .Fields!terms_of_sb X.SubItems(2) = Format(.Fields!date_from, "mmmm dd, yyyy") X.SubItems(3) = Format(.Fields!date_to, "mmmm dd, yyyy") .MoveNext tot = tot + 1 Wend End With lblTotal.Caption = totSet RS = NothingSet CN = NothingExit Suberr: If err.Number = 91 Then MsgBox "No record where to be found!", vbExclamation Else MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation End If Set RS = Nothing Set CN = NothingEnd Sub
Public Sub FillListView1()On Error GoTo err: Dim X Call execSQL("select * from tblsanggunian_member where FK='" & lvList.SelectedItem.Text & "'") lvList1.ListItems.clear With RS While Not .EOF Set X = lvList1.ListItems.Add(, , .Fields!FK, 5, 5) X.SubItems(1) = .Fields!members X.SubItems(2) = .Fields!Position X.SubItems(3) = .Fields!remarks .MoveNext Wend End With Set RS = Nothing Set CN = Nothing Exit Suberr: If err.Number = 91 Then MsgBox "No record where to be found!", vbExclamation Else MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation End If Set RS = Nothing
149
Set CN = NothingEnd Sub
Private Sub lvList_Click()FillListView1End Sub
Private Sub lvList_DblClick()btnEdit_ClickEnd Sub
Private Sub lvList_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)If Button = 2 Then: PopupMenu mnuMenu: Exit SubEnd Sub
Private Sub lvList1_DblClick()btnEdit_ClickEnd Sub
Private Sub lvList1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then: PopupMenu mnuMenu: Exit SubEnd Sub
Private Sub mnuAccounts_Click() On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then frmViewUsers.Show vbModal Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = NothingEnd Sub
Private Sub mnuAllAttendances_Click()frmReportAttendance.ShowEnd Sub
Private Sub mnuBackup_Click() On Error GoTo err: Dim sUserType As String
150
Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then Dim srcLocation As String If MsgBox("Are you sure you want to backup your database?", vbYesNo + vbInformation) = vbNo Then Exit Sub Else CommonDialog1.FileName = Format(Now, "yyyy-mm-dd") CommonDialog1.ShowSave srcLocation = CommonDialog1.FileName & "sbdata.mdb" FileCopy App.Path & ReadINI("Settings", "DBpath"), srcLocation MsgBox "Database has been successfully back-up.", vbInformation End If Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing
End Sub
Private Sub mnuCalc_Click()Shell "calc.exe", vbNormalFocusEnd Sub
Private Sub mnuCommitteeReport_Click()frmReportonCommittee.Show vbModalEnd Sub
Private Sub mnudateandtime_Click()Shell ("C:\WINDOWS\system32\control.exe date/time")
End Sub
Private Sub mnuExit_Click()EndEnd Sub
Private Sub mnuExplorer_Click()Shell "Explorer.exe", vbNormalFocusEnd Sub
Private Sub mnuFile_Click() If mnuAccounts.Enabled = True Then mnuLogin.Enabled = False mnuExit.Enabled = True
Else
151
If mnuLogout.Enabled = False Then mnuLogin.Enabled = True If mnuTools.Enabled = False Then mnuFile.Enabled = True mnuhelp.Enabled = False mnuReport.Enabled = False mnuAbout.Enabled = False
End IfEnd IfEnd IfEnd Sub
Private Sub mnuhowto_Click()frmhowto.ShowEnd Sub
Private Sub mnuLocallegislation_Click()frmReportLocalLegislation.ShowEnd Sub
Private Sub mnuLock_Click()frmLock.Show vbModalEnd Sub
Private Sub mnuLogout_Click()Dim Cancel As IntegerIf MsgBox("Do you want to Logout the application? Click yes to continue.", vbYesNo + vbExclamation) = vbNo Then Cancel = 1 Else UserLogOut Unload Me frmViewHearings.Hide frmViewLocalLegislation.Hide frmViewMemberProfile.Hide frmViewSanggunianSession.Hide frmViewSetOfSanggunian.Hide frmViewStandingCommittee.Hide MAIN.Hide frmLogin.Show End IfEnd Sub
Private Sub mnuNotepad_Click()Shell "notepad.exe", vbNormalFocusEnd Sub
Private Sub mnuPaint_Click()Shell "mspaint.exe", vbNormalFocus
End Sub
Private Sub mnuReport_Click()On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing
152
Set CN = Nothing If sUserType = "ADMINISTRATOR" Then Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = NothingEnd Sub
Private Sub mnuRestore_Click() On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then If MsgBox("Are you sure you to load another database?.This should be done with precaution." & vbCrLf & vbCrLf & "WARNING: YOU CANNOT UNDO THIS PROCESS", vbYesNo + vbCritical) = vbYes Then Dim srcLocation As String Set RS = Nothing Set CN = Nothing CommonDialog1.ShowOpen srcLocation = CommonDialog1.FileName Call WriteINI("Settings", "DBpath", srcLocation) Else Exit Sub End If Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing
End Sub
Private Sub mnuSearch_click()btnSearch_ClickEnd Sub
Private Sub mnuSelectAttendance_Click()frmReportAttendance.ShowEnd Sub
153
Private Sub mnuSelectLocal_Click()frmReportLocal.Show vbModalEnd Sub
Private Sub mnuSystemInfo_Click()frmABOUTPROGRAM.Show vbModalEnd Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)On Error GoTo err:
Select Case Button.Index Case 1 Call NavigateListView(lvList, m_FIRST_PAGE, , lblSelected) Case 2 Call NavigateListView(lvList, m_PREV_PAGE, , lblSelected) Case 3 Call NavigateListView(lvList, m_NEXT_PAGE, , lblSelected) Case 4 Call NavigateListView(lvList, m_LAST_PAGE, lblTotal, lblSelected) End Select Exit Suberr: If err.Number = 91 Then MsgBox "No record where to be found!", vbExclamation Else MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation End If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub mnuAddNew_click() btnAddNew_ClickEnd SubPrivate Sub mnuEdit_click() btnEdit_ClickEnd SubPrivate Sub mnuRefresh_Click() btnRefresh_ClickEnd Sub
Private Sub mnuClose_click() btnClose_ClickEnd SubPrivate Sub mnuView_click()btnView_ClickEnd Sub
Private Sub UserLogOut()Call execSQL("SELECT * FROM tbllog_time")
With RS.AddNew.Fields!user = MAIN.StatusBar1.Panels(2).Text.Fields!logout = Format(Now, "MMM-dd-yyyy-HH:mm").Update.RequeryEnd With
154
Set RS = NothingSet CN = NothingMsgBox MAIN.StatusBar1.Panels(2).Text & " " & "Has been Successfully Logout.", vbInformation, Format(Now, "MMM-dd-yyyy-HH:mm")
End Sub
Figure 4.2.31 View Standing Committee Form
Option Explicit
Private Sub btnAddNew_Click() If usrPrivilege("add", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "You don't have access in this area!. Only the Secretary.", vbExclamation: Exit Sub AddState = True EditState = False If SSTab1.Tab = 0 Then frmStandingSBCommitteeAE.Caption = "Add New Entry" frmStandingSBCommitteeAE.btnok.Visible = False frmStandingSBCommitteeAE.Show vbModal ElseIf SSTab1.Tab = 1 Then frmCommitteeMemberAE.Text1.Text = lvList.SelectedItem.Text frmCommitteeMemberAE.btnok.Visible = False frmCommitteeMemberAE.Caption = "Add New Entry" frmCommitteeMemberAE.Show vbModal End IfEnd SubPrivate Sub btnClose_Click()Unload MeEnd Sub
155
Private Sub btnEdit_Click()
If usrPrivilege("edit", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "You don't have access in this area!. Only the Secretary.", vbExclamation: Exit Sub
EditState = TrueAddState = False On Error GoTo err:If SSTab1.Tab = 0 Then frmStandingSBCommitteeAE.Caption = "Edit Entry" frmStandingSBCommitteeAE.Text1.Text = lvList.SelectedItem.Text frmStandingSBCommitteeAE.Combo1.Text = lvList.SelectedItem.SubItems(1) frmStandingSBCommitteeAE.Text2.Text = lvList.SelectedItem.SubItems(2) frmStandingSBCommitteeAE.Text3.Text = lvList.SelectedItem.SubItems(3) frmStandingSBCommitteeAE.Text6.Text = lvList.SelectedItem.SubItems(4) frmStandingSBCommitteeAE.Text4.Text = lvList.SelectedItem.SubItems(5) frmStandingSBCommitteeAE.Text5.Text = lvList.SelectedItem.SubItems(6) frmStandingSBCommitteeAE.Combo2.Text = lvList.SelectedItem.SubItems(7) frmStandingSBCommitteeAE.Text7.Text = lvList.SelectedItem.SubItems(8) frmStandingSBCommitteeAE.Combo3.Text = lvList.SelectedItem.SubItems(9) frmStandingSBCommitteeAE.Combo4.Text = lvList.SelectedItem.SubItems(10) frmStandingSBCommitteeAE.Text8.Text = lvList.SelectedItem.SubItems(11) frmStandingSBCommitteeAE.cb_additem frmStandingSBCommitteeAE.btnok.Visible = False frmStandingSBCommitteeAE.Show vbModal ElseIf SSTab1.Tab = 1 Then frmCommitteeMemberAE.Caption = "Edit Entry" frmCommitteeMemberAE.lblCaption.Caption = lvList1.SelectedItem.SubItems(1) frmCommitteeMemberAE.Text1.Text = lvList1.SelectedItem.Text frmCommitteeMemberAE.Text2.Text = lvList1.SelectedItem.SubItems(1) frmCommitteeMemberAE.Text3.Text = lvList1.SelectedItem.SubItems(2) frmCommitteeMemberAE.Text4.Text = lvList1.SelectedItem.SubItems(3) frmCommitteeMemberAE.btnok.Visible = False frmCommitteeMemberAE.Show vbModal End If Exit Suberr: If err.Number = 91 Then MsgBox "No record where to be found!", vbExclamation Else MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation End If Set RS = Nothing Set CN = Nothing End Sub
Private Sub btnprint_Click()If usrPrivilege("print", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "You don't have access in this area!. Only the Secretary.", vbExclamation: Exit Sub AddState = True EditState = False frmReportonCommittee.ShowEnd Sub
Private Sub btnRefresh_Click()Call FillListView("")End Sub
156
Private Sub btnSearch_Click()If SSTab1.Tab = 0 Then MySearch = 2 With frmSearch.Combo1 .AddItem "SB Committee ID" .AddItem "Set of SB" .AddItem "Chairman" .AddItem "Vice_Chairman" .AddItem "Members" .AddItem "Date_Referred" .AddItem "Committee_Schedule" .AddItem "Committee Name" .AddItem "Subject_Matter" .AddItem "Action Taken" .AddItem "Status" .AddItem "Recommendation" End With frmSearch.Show ElseIf SSTab1.Tab = 1 Then End IfEnd Sub
Private Sub btnSort_Click()If SSTab1.Tab = 0 Then ElseIf SSTab1.Tab = 1 Then ElseIf SSTab1.Tab = 2 Then ElseIf SSTab1.Tab = 3 Then ElseIf SSTab1.Tab = 4 Then ElseIf SSTab1.Tab = 5 Then ElseIf SSTab1.Tab = 6 Then End IfEnd Sub
Private Sub btnView_Click() If usrPrivilege("view", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "All users can view.", vbExclamation: Exit Sub AddState = False EditState = False On Error GoTo err:
If SSTab1.Tab = 0 Then frmStandingSBCommitteeAE.Caption = "View Entry" frmStandingSBCommitteeAE.Text1.Text = lvList.SelectedItem.Text frmStandingSBCommitteeAE.Combo1.Text = lvList.SelectedItem.SubItems(1) frmStandingSBCommitteeAE.Text2.Text = lvList.SelectedItem.SubItems(2) frmStandingSBCommitteeAE.Text3.Text = lvList.SelectedItem.SubItems(3) frmStandingSBCommitteeAE.Text6.Text = lvList.SelectedItem.SubItems(4) frmStandingSBCommitteeAE.Text4.Text = lvList.SelectedItem.SubItems(5) frmStandingSBCommitteeAE.Text5.Text = lvList.SelectedItem.SubItems(6) frmStandingSBCommitteeAE.Combo2.Text = lvList.SelectedItem.SubItems(7) frmStandingSBCommitteeAE.Text7.Text = lvList.SelectedItem.SubItems(8)
157
frmStandingSBCommitteeAE.Combo3.Text = lvList.SelectedItem.SubItems(9) frmStandingSBCommitteeAE.Combo4.Text = lvList.SelectedItem.SubItems(10) frmStandingSBCommitteeAE.Text8.Text = lvList.SelectedItem.SubItems(11) frmStandingSBCommitteeAE.cb_additem frmStandingSBCommitteeAE.btnSave.Visible = False frmStandingSBCommitteeAE.btnCancel.Visible = False frmStandingSBCommitteeAE.Show vbModal ElseIf SSTab1.Tab = 1 Then frmCommitteeMemberAE.Caption = "View Entry" frmCommitteeMemberAE.Text1.Text = lvList1.SelectedItem.Text frmCommitteeMemberAE.Text2.Text = lvList1.SelectedItem.SubItems(1) frmCommitteeMemberAE.Text3.Text = lvList1.SelectedItem.SubItems(2) frmCommitteeMemberAE.Text4.Text = lvList1.SelectedItem.SubItems(3) frmCommitteeMemberAE.btnSave.Visible = False frmCommitteeMemberAE.btnCancel.Visible = False frmCommitteeMemberAE.Show vbModal End If Exit Suberr: If err.Number = 91 Then MsgBox "No record where to be found!", vbExclamation Else MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation End If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub Command2_Click()SSTab1.Tab = 2frmViewStandingCommittee.lvList2.Visible = TrueCall execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON WAYS AND MEANS, FINANCE AND APPROPRIATIONS'")lvList2.ListItems.clearWhile RS.EOF = FalselvList2.ListItems.Add , , RS!PKlvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!memberslvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!StatuslvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
WendRS.CloseCall reload
End Sub
Private Sub Form_Load() Call FillListView("") Call reload
158
End Sub
Private Sub Form_Resize()SSTab1.Width = Me.ScaleWidth - 100 SSTab1.Height = Me.Height - 2800 lvList.Width = Me.ScaleWidth - 100 lvList.Height = Me.Height - 3300 lvList1.Width = Me.ScaleWidth - 1000 lvList1.Height = Me.Height - 3300 lvList2.Width = Me.ScaleWidth - 1000 lvList2.Height = Me.Height - 3300 lvList3.Width = Me.ScaleWidth - 1000 lvList3.Height = Me.Height - 3300 lvList4.Width = Me.ScaleWidth - 1000 lvList4.Height = Me.Height - 3300 lvList5.Width = Me.ScaleWidth - 1000 lvList5.Height = Me.Height - 3300 lvList6.Width = Me.ScaleWidth - 1000 lvList6.Height = Me.Height - 3300ctrlSeparator1.Top = Me.Height - 2200 ctrlSeparator1.Width = Me.ScaleWidth - 300 picControl.Top = Me.Height - 2000 picControl.Left = Me.ScaleLeft + 8500 Frame1.Top = Me.Height - 2000 Frame1.Left = Me.Width - 2500 lblCaption.Width = Me.Width picMessage.Top = Me.Height - 2000End Sub
Private Sub lvList_Click() FillListView1End Sub
Private Sub lvList_DblClick()btnEdit_ClickEnd Sub
Private Sub lvList_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then PopupMenu mnuMenu End If End Sub
Private Sub lvList1_DblClick() btnEdit_ClickEnd Sub
Private Sub lvList1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)If Button = 2 Then PopupMenu mnuMenu End IfEnd Sub
Public Sub FillListView(sSQL As String) On Error GoTo err: Dim X, tot If sSQL = "" Then
159
Call execSQL("select * from tblstanding_sb_committee") Else Call execSQL(sSQL) End If lvList.ListItems.clear With RS While Not .EOF Set X = lvList.ListItems.Add(, , .Fields!PK, 5, 5) X.SubItems(1) = .Fields!set_of_sb X.SubItems(2) = .Fields!chairman X.SubItems(3) = .Fields!vice_chairman X.SubItems(4) = .Fields!members X.SubItems(5) = Format(.Fields!date_referred, "mmmm dd, yyyy") X.SubItems(6) = Format(.Fields!committee_schedule, "mmmm dd, yyyy") X.SubItems(7) = .Fields!committee_name X.SubItems(8) = .Fields!subject_matter X.SubItems(9) = .Fields!action_taken X.SubItems(10) = .Fields!Status X.SubItems(11) = .Fields!recommendation .MoveNext tot = tot + 1 Wend End With lblTotal.Caption = tot Set RS = Nothing Set CN = Nothing Exit Suberr: If err.Number = 91 Then MsgBox "No record where to be found!", vbExclamation Else MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation End If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub lvList2_DblClick()btnEdit_ClickEnd Sub
Private Sub lvList3_DblClick()btnEdit_ClickEnd Sub
Private Sub lvList4_DblClick()btnEdit_ClickEnd Sub
Private Sub lvList5_DblClick()btnEdit_ClickEnd Sub
Private Sub lvList6_DblClick()btnEdit_ClickEnd Sub
Private Sub mnuAccounts_Click() On Error GoTo err:
160
Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then frmViewUsers.Show vbModal Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = NothingEnd Sub
Private Sub mnuAllAttendances_Click()frmReportAttendance.ShowEnd Sub
Private Sub mnuBackup_Click() On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then Dim srcLocation As String If MsgBox("Are you sure you want to backup your database?", vbYesNo + vbInformation) = vbNo Then Exit Sub Else CommonDialog1.FileName = Format(Now, "yyyy-mm-dd") CommonDialog1.ShowSave srcLocation = CommonDialog1.FileName & "sbdata.mdb" FileCopy App.Path & ReadINI("Settings", "DBpath"), srcLocation MsgBox "Database has been successfully back-up.", vbInformation End If Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing
161
End Sub
Private Sub mnuCalc_Click()Shell "calc.exe", vbNormalFocusEnd Sub
Private Sub mnuCommitteeReport_Click()frmReportonCommittee.Show vbModalEnd Sub
Private Sub mnudateandtime_Click()Shell ("C:\WINDOWS\system32\control.exe date/time")End Sub
Private Sub mnuExit_Click()EndEnd Sub
Private Sub mnuExplorer_Click()Shell "Explorer.exe", vbNormalFocusEnd Sub
Private Sub mnuFile_Click() If mnuAccounts.Enabled = True Then mnuLogin.Enabled = False mnuExit.Enabled = True Else If mnuLogout.Enabled = False Then mnuLogin.Enabled = True If mnuTools.Enabled = False Then mnuFile.Enabled = True mnuhelp.Enabled = False mnuReport.Enabled = False mnuAbout.Enabled = False
End IfEnd IfEnd IfEnd Sub
Private Sub mnuhowto_Click()frmhowto.ShowEnd Sub
Private Sub mnuLocallegislation_Click()frmReportLocalLegislation.ShowEnd Sub
Private Sub mnuLock_Click()frmLock.Show vbModalEnd Sub
Private Sub mnuLogout_Click()Dim Cancel As IntegerIf MsgBox("Do you want to Logout the application? Click yes to continue.", vbYesNo + vbExclamation) = vbNo Then Cancel = 1 Else UserLogOut
162
Unload Me frmViewHearings.Hide frmViewLocalLegislation.Hide frmViewMemberProfile.Hide frmViewSanggunianSession.Hide frmViewSetOfSanggunian.Hide frmViewStandingCommittee.Hide MAIN.Hide frmLogin.Show End IfEnd Sub
Private Sub mnuNotepad_Click()Shell "notepad.exe", vbNormalFocusEnd Sub
Private Sub mnuPaint_Click()Shell "mspaint.exe", vbNormalFocusEnd Sub
Private Sub mnupreview_Click()
End Sub
Private Sub mnuPrint_Click()btnprint_ClickEnd Sub
Private Sub mnuReport_Click()On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = NothingEnd Sub
Private Sub mnuRestore_Click() On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then
163
If MsgBox("Are you sure you to load another database?.This should be done with precaution." & vbCrLf & vbCrLf & "WARNING: YOU CANNOT UNDO THIS PROCESS", vbYesNo + vbCritical) = vbYes Then Dim srcLocation As String Set RS = Nothing Set CN = Nothing CommonDialog1.ShowOpen srcLocation = CommonDialog1.FileName Call WriteINI("Settings", "DBpath", srcLocation) Else Exit Sub End If Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing
End Sub
Private Sub mnuSelectAttendance_Click()frmReportAttendance.ShowEnd Sub
Private Sub mnuSelectLocal_Click()frmReportLocal.Show vbModalEnd Sub
Private Sub mnuSystemInfo_Click()frmABOUTPROGRAM.Show vbModal
End Sub
Private Sub optCommitteeonAgriculture_Click()If optCommitteeonAgriculture.Value = True ThenSSTab1.Tab = 0frmViewStandingCommittee.lvList.Visible = TrueCall execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON AGRICULTURE, ENVIRONMENT AND NATURAL RESOURCES'")lvList.ListItems.clearWhile RS.EOF = FalselvList.ListItems.Add , , RS!PKlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!memberslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!StatuslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
164
WendRS.CloseCall reload End If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub optCommitteeonBarangay_Click()If optCommitteeonBarangay.Value = True ThenSSTab1.Tab = 0frmViewStandingCommittee.lvList.Visible = TrueCall execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON BARANGAY AFFAIRS'")lvList.ListItems.clearWhile RS.EOF = FalselvList.ListItems.Add , , RS!PKlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!memberslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!StatuslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
WendRS.CloseCall reload End If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub optCommitteeonGood_Click()If optCommitteeonGood.Value = True ThenSSTab1.Tab = 0frmViewStandingCommittee.lvList.Visible = TrueCall execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON GOOD GOVERNMENT AND HUMAN RIGHTS'")lvList.ListItems.clearWhile RS.EOF = FalselvList.ListItems.Add , , RS!PKlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!memberslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!StatuslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
165
WendRS.Close End If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub optCommitteeonHealth_Click()If optCommitteeonHealth.Value = True ThenSSTab1.Tab = 0frmViewStandingCommittee.lvList.Visible = TrueCall execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON HEALTH, SANITATION AND NUTRITION'")lvList.ListItems.clearWhile RS.EOF = FalselvList.ListItems.Add , , RS!PKlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!memberslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!StatuslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
WendRS.CloseCall reload End If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub optCommitteeonLabor_Click()If optCommitteeonLabor.Value = True ThenSSTab1.Tab = 0frmViewStandingCommittee.lvList.Visible = TrueCall execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON LABOR AND EMPLOYMENT, COOPERATIVE, TRADE AND INDUSTRY'")lvList.ListItems.clearWhile RS.EOF = FalselvList.ListItems.Add , , RS!PKlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!memberslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!StatuslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
WendRS.Close
166
Call reload End If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub optCommitteeonMarket_Click()If optCommitteeonMarket.Value = True ThenSSTab1.Tab = 6frmViewStandingCommittee.lvList6.Visible = TrueCall execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON MARKET AND SLAUGHTERHOUSE'")lvList6.ListItems.clearWhile RS.EOF = FalselvList6.ListItems.Add , , RS!PKlvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!memberslvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!StatuslvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
WendRS.CloseCall reload End If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub optCommitteeonPolice_Click()If optCommitteeonPolice.Value = True ThenSSTab1.Tab = 0frmViewStandingCommittee.lvList.Visible = TrueCall execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON POLICE MATTERS, FIRE AND PUBLIC SAFETY'")lvList.ListItems.clearWhile RS.EOF = FalselvList.ListItems.Add , , RS!PKlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!memberslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!StatuslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
WendRS.CloseCall reload
167
End If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub optCommitteeonPublic_Click()If optCommitteeonPublic.Value = True ThenSSTab1.Tab = 0frmViewStandingCommittee.lvList.Visible = TrueCall execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON PUBLIC WORKS AND INFRASTRUCTURE'")lvList.ListItems.clearWhile RS.EOF = FalselvList.ListItems.Add , , RS!PKlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!memberslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!StatuslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
WendRS.CloseCall reload End If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub optCommitteeonRules_Click()If optCommitteeonRules.Value = True ThenSSTab1.Tab = 0frmViewStandingCommittee.lvList.Visible = TrueCall execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON RULES, LAWS, ORDINANCES, LEGAL MATTERS AND PRIVILEGES'")lvList.ListItems.clearWhile RS.EOF = FalselvList.ListItems.Add , , RS!PKlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!memberslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!StatuslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
WendRS.CloseCall reload End If
168
Set RS = Nothing Set CN = Nothing
End Sub
Private Sub optCommitteeonSocial_Click()If optCommitteeonSocial.Value = True ThenSSTab1.Tab = 0frmViewStandingCommittee.lvList.Visible = TrueCall execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON SOCIAL WELFARE AND COMMUNITY DEVELOPMENT'")lvList.ListItems.clearWhile RS.EOF = FalselvList.ListItems.Add , , RS!PKlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!memberslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!StatuslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
WendRS.Close End If Set RS = Nothing Set CN = Nothing
End Sub
Private Sub optCommitteeonSports_Click()If optCommitteeonSports.Value = True ThenSSTab1.Tab = 0frmViewStandingCommittee.lvList.Visible = TrueCall execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON SPORTS AND YOUTH DEVELOPMENT'")lvList.ListItems.clearWhile RS.EOF = FalselvList.ListItems.Add , , RS!PKlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!memberslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!StatuslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
WendRS.CloseCall reload
169
End If Set RS = Nothing Set CN = NothingEnd Sub
Private Sub optCommitteeonTransportation_Click()If optCommitteeonTransportation.Value = True ThenSSTab1.Tab = 0frmViewStandingCommittee.lvList.Visible = TrueCall execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON TRANSPORTATION AND COMMUNICATION'")lvList.ListItems.clearWhile RS.EOF = FalselvList.ListItems.Add , , RS!PKlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!memberslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!StatuslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
WendRS.Close End If Set RS = Nothing Set CN = Nothing
End Sub
Private Sub optCommitteeonWays_Click()If optCommitteeonWays.Value = True ThenSSTab1.Tab = 0frmViewStandingCommittee.lvList.Visible = TrueCall execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON WAYS AND MEANS, FINANCE AND APPROPRIATIONS'")lvList.ListItems.clearWhile RS.EOF = FalselvList.ListItems.Add , , RS!PKlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!memberslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!StatuslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
WendRS.Close End If Set RS = Nothing
170
Set CN = Nothing
End Sub
Private Sub optCommitteeonWomen_Click()If optCommitteeonWomen.Value = True ThenSSTab1.Tab = 0frmViewStandingCommittee.lvList.Visible = TrueCall execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON WOMEN AND FAMILY WELFARE'")lvList.ListItems.clearWhile RS.EOF = FalselvList.ListItems.Add , , RS!PKlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!memberslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!StatuslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
WendRS.CloseCall reload End IfSet RS = Nothing Set CN = NothingEnd Sub
Private Sub optCommitteonEducation_Click()If optCommitteonEducation.Value = True ThenSSTab1.Tab = 0frmViewStandingCommittee.lvList.Visible = TrueCall execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON EDUCATION AND TOURISM'")lvList.ListItems.clearWhile RS.EOF = FalselvList.ListItems.Add , , RS!PKlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!memberslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!StatuslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
WendRS.Close End If Set RS = Nothing
171
Set CN = Nothing
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)Select Case Button.Index Case 1 Call NavigateListView(lvList, m_FIRST_PAGE, , lblSelected) Case 2 Call NavigateListView(lvList, m_PREV_PAGE, , lblSelected) Case 3 Call NavigateListView(lvList, m_NEXT_PAGE, , lblSelected) Case 4 Call NavigateListView(lvList, m_LAST_PAGE, lblTotal, lblSelected) End SelectEnd Sub
Public Sub FillListView1()On Error GoTo err: Dim X Call execSQL("select * from tblcommittee_member where FK='" & lvList.SelectedItem.Text & "'") lvList1.ListItems.clear With RS While Not .EOF Set X = lvList1.ListItems.Add(, , .Fields!FK, 5, 5) X.SubItems(1) = .Fields!members X.SubItems(2) = .Fields!Position X.SubItems(3) = .Fields!remarks .MoveNext Wend End With Set RS = Nothing Set CN = Nothing Exit Suberr: If err.Number = 91 Then MsgBox "No record where to be found!", vbExclamation Else MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation End If Set RS = Nothing Set CN = NothingEnd SubPrivate Sub mnuAddNew_click() btnAddNew_Click
End SubPrivate Sub mnuEdit_click() btnEdit_ClickEnd SubPrivate Sub mnuSearch_click() btnSearch_ClickEnd Sub
Private Sub mnuView_click() btnView_ClickEnd SubPrivate Sub mnuClose_click() btnClose_Click
172
End Sub
Private Sub UserLogOut()Call execSQL("SELECT * FROM tbllog_time")
With RS.AddNew.Fields!user = MAIN.StatusBar1.Panels(2).Text.Fields!logout = Format(Now, "MMM-dd-yyyy-HH:mm").Update.RequeryEnd WithSet RS = NothingSet CN = NothingMsgBox MAIN.StatusBar1.Panels(2).Text & " " & "Has been Successfully Logout.", vbInformation, Format(Now, "MMM-dd-yyyy-HH:mm")
End Sub
Function reload()If SSTab1.Tab = 2 ThenfrmViewStandingCommittee.lvList2.Visible = TrueCall execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON RULES, LAWS, ORDINANCES, LEGAL MATTERS AND PRIVILEGES'")lvList2.ListItems.clearWhile RS.EOF = FalselvList2.ListItems.Add , , RS!PKlvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!memberslvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!StatuslvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNextWendEnd If
If optCommitteeonWays.Value = True ThenSSTab1.Tab = 3frmViewStandingCommittee.lvList3.Visible = True
Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON WAYS AND MEANS, FINANCE AND APPROPRIATIONS'")lvList3.ListItems.clearWhile RS.EOF = FalselvList3.ListItems.Add , , RS!PKlvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!memberslvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!Status
173
lvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
WendEnd If
If optCommitteeonTransportation.Value = True ThenSSTab1.Tab = 4frmViewStandingCommittee.lvList4.Visible = True
Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON TRANSPORTATION AND COMMUNICATION'")lvList4.ListItems.clearWhile RS.EOF = FalselvList4.ListItems.Add , , RS!PKlvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!memberslvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!StatuslvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
WendEnd If
If optCommitteonEducation.Value = True ThenSSTab1.Tab = 5frmViewStandingCommittee.lvList5.Visible = True
Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON EDUCATION AND TOURISM'")lvList5.ListItems.clearWhile RS.EOF = FalselvList5.ListItems.Add , , RS!PKlvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!memberslvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!StatuslvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
WendEnd If
If optCommitteonEducation.Value = True ThenSSTab1.Tab = 6frmViewStandingCommittee.lvList6.Visible = True
174
Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON MARKET AND SLAUGHTERHOUSE'")lvList6.ListItems.clearWhile RS.EOF = FalselvList6.ListItems.Add , , RS!PKlvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!memberslvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!StatuslvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
WendEnd If
If optCommitteeonSocial.Value = True ThenSSTab1.Tab = 0frmViewStandingCommittee.lvList.Visible = TrueCall execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON SOCIAL WELFARE AND COMMUNITY DEVELOPMENT'")lvList.ListItems.clearWhile RS.EOF = FalselvList.ListItems.Add , , RS!PKlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sblvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairmanlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!memberslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referredlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_schedulelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_namelvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matterlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_takenlvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!StatuslvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendationRS.MoveNext
Wend
End If Set RS = Nothing Set CN = NothingEnd Function
Function clear()frmStandingSBCommitteeAE.Text1 = ""frmStandingSBCommitteeAE.Combo1 = ""frmStandingSBCommitteeAE.Text2 = ""frmStandingSBCommitteeAE.Text3 = ""frmStandingSBCommitteeAE.Text6 = ""frmStandingSBCommitteeAE.Text4 = ""frmStandingSBCommitteeAE.Text5 = ""frmStandingSBCommitteeAE.Combo2 = ""frmStandingSBCommitteeAE.Text7 = ""
175
frmStandingSBCommitteeAE.Combo3 = ""frmStandingSBCommitteeAE.Combo4 = ""frmStandingSBCommitteeAE.Text8 = ""End Function
Figure 4.2.32 View User Accounts Form
Option Explicit
Private Sub Command1_Click() Call delete_rec("tbluser_account", "PK", lvList) FillListViewEnd Sub
Private Sub Command2_Click()Unload MeEnd Sub
Private Sub Command3_Click() EditState = True AddState = False On Error GoTo err: Call execSQL("select * from tbluser_account where PK='" & lvList.SelectedItem.Text & "'") With RS frmUserAE.Caption = "Edit Entry" frmUserAE.Text9.Text = .Fields!PK frmUserAE.Text1.Text = .Fields!UserName
176
frmUserAE.Text2.Text = DeCode(.Fields!Password) frmUserAE.Text3.Text = DeCode(.Fields!Password) frmUserAE.Combo1.Text = .Fields!usertype frmUserAE.Text4.Text = .Fields!Add frmUserAE.Text5.Text = .Fields!edit frmUserAE.Text6.Text = .Fields!Delete frmUserAE.Text7.Text = .Fields!View frmUserAE.Text8.Text = .Fields!print End With Set RS = Nothing Set CN = Nothing frmUserAE.Show vbModal Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbInformation Set RS = Nothing Set CN = NothingEnd Sub
Private Sub Command4_Click() AddState = True EditState = FalsefrmUserAE.Caption = "Add New Entry"frmUserAE.Show vbModalEnd Sub
Private Sub Command5_Click()On Error GoTo err:
Dim X Call execSQL("select * from tbluser_account where username like '" & Trim(Text1.Text) & "%'") lvList.ListItems.clear With RS While Not .EOF Set X = lvList.ListItems.Add(, , .Fields!PK, 1, 1) X.SubItems(1) = .Fields!UserName X.SubItems(2) = .Fields!Add X.SubItems(3) = .Fields!edit X.SubItems(4) = .Fields!Delete X.SubItems(5) = .Fields!View X.SubItems(6) = .Fields!print .MoveNext Wend End With Set RS = Nothing Set CN = Nothing
Exit Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = NothingEnd Sub
Private Sub Form_Load()
177
FillListViewEnd Sub
Public Sub FillListView() Dim X Call execSQL("select * from tbluser_account") lvList.ListItems.clear With RS While Not .EOF Set X = lvList.ListItems.Add(, , .Fields!PK, 1, 1) X.SubItems(1) = .Fields!UserName X.SubItems(2) = .Fields!Add X.SubItems(3) = .Fields!edit X.SubItems(4) = .Fields!Delete X.SubItems(5) = .Fields!View X.SubItems(6) = .Fields!print .MoveNext Wend End With Set RS = Nothing Set CN = NothingEnd Sub
Private Sub lvList_DblClick()Command3_ClickEnd Sub
178
Figure 4.2.33 shows the MAIN Form which contains seven sub forms
such as Local Legislation, Member Profile, Set of Sanggunian, Standing
Committee, Sanggunian Session, Hearing and User Accounts. Furthermore, it has
also file menu, tools menu, help menu, about menu and reports menu. Aside from
that, every time the user login automatically shown on this form located below
and identify if it is a Secretary, Mayor and Sanggunian Bayan Members logged on
that is saved to the database with time it is logged on.
Figure 4.2.33 MAIN Form
Option Explicit
Private Sub mnSanggunian_Click()frmReportAttendance.Show vbModalEnd Sub
Private Sub btnAddNew_Click()
End Sub
Private Sub btnlocal_Click()
179
End Sub
Private Sub Label1_Click()MAIN.HidefrmViewLocalLegislation.ShowEnd Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)Label1.BackStyle = 1Label1.BorderStyle = 1End Sub
Private Sub Label2_Click()MAIN.HidefrmViewMemberProfile.ShowEnd Sub
Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)Label2.BackStyle = 1Label2.BorderStyle = 1End Sub
Private Sub Label3_Click() MAIN.Hide frmViewSetOfSanggunian.ShowEnd Sub
Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)Label3.BackStyle = 1Label3.BorderStyle = 1End Sub
Private Sub Label4_Click()MAIN.HidefrmViewStandingCommittee.ShowEnd Sub
Private Sub Label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)Label4.BackStyle = 1Label4.BorderStyle = 1End Sub
Private Sub Label5_Click()MAIN.Hide frmViewSanggunianSession.ShowEnd Sub
Private Sub Label5_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)Label5.BackStyle = 1Label5.BorderStyle = 1End Sub
Private Sub Label6_Click()MAIN.Hide frmViewHearings.Show
180
End Sub
Private Sub Label6_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)Label6.BackStyle = 1Label6.BorderStyle = 1End Sub
Private Sub Label7_Click()
On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then frmViewUsers.Show vbModal Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = NothingEnd Sub
Private Sub Label7_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)Label7.BackStyle = 1Label7.BorderStyle = 1End Sub
Private Sub lblpm_Click()
End SubPrivate Sub MDIForm_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)Label1.BackStyle = 0Label1.BorderStyle = 0Label2.BackStyle = 0Label2.BorderStyle = 0Label3.BackStyle = 0Label3.BorderStyle = 0Label4.BackStyle = 0Label4.BorderStyle = 0Label5.BackStyle = 0Label5.BorderStyle = 0Label6.BackStyle = 0Label6.BorderStyle = 0Label7.BackStyle = 0Label7.BorderStyle = 0End Sub
Private Sub mnuAbout_Click()
181
If mnuTools.Enabled = False Then mnuFile.Enabled = True mnuhelp.Enabled = False mnuReport.Enabled = False mnuAbout.Enabled = False End IfEnd Sub
Private Sub mnuAccounts_Click() On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then frmViewUsers.Show vbModal Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = NothingEnd Sub
Private Sub mnuAllAttendance_Click() End Sub
Private Sub mnuAllAttendances_Click()frmReportAttendance.ShowEnd Sub
Private Sub mnuBackup_Click() On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then Dim srcLocation As String If MsgBox("Are you sure you want to backup your database?", vbYesNo + vbInformation) = vbNo Then Exit Sub Else CommonDialog1.FileName = Format(Now, "yyyy-mm-dd") CommonDialog1.ShowSave
182
srcLocation = CommonDialog1.FileName & "sbdata.mdb" FileCopy App.Path & ReadINI("Settings", "DBpath"), srcLocation MsgBox "Database has been successfully back-up.", vbInformation End If Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End SubPrivate Sub mnuCalc_Click()Shell "calc.exe", vbNormalFocusEnd Sub
Private Sub mnucommitteeonrules_Click()
End Sub
Private Sub mnuCommitteeReport_Click()frmReportonCommittee.Show vbModalEnd Sub
Private Sub mnudateandtime_Click()Shell ("C:\WINDOWS\system32\control.exe date/time")End Sub
Private Sub mnuExit_Click()EndEnd Sub
Private Sub mnuExplorer_Click()Shell "Explorer.exe", vbNormalFocusEnd Sub
Private Sub mnuFile_Click() If mnuAccounts.Enabled = True Then mnuLogin.Enabled = False mnuExit.Enabled = True Else If mnuLogout.Enabled = False Then mnuLogin.Enabled = True If mnuTools.Enabled = False Then mnuFile.Enabled = True mnuhelp.Enabled = False mnuReport.Enabled = False mnuAbout.Enabled = False
End IfEnd IfEnd IfEnd Sub
183
Private Sub mnuhelp_Click()If mnuTools.Enabled = False Then mnuFile.Enabled = True mnuhelp.Enabled = False mnuReport.Enabled = False mnuAbout.Enabled = False End IfEnd Sub
Private Sub mnuhowto_Click()frmhowto.ShowEnd Sub
Private Sub mnuLocallegislation_Click()
frmReportLocalLegislation.ShowEnd Sub
Private Sub mnuLock_Click()frmLock.Show vbModalEnd Sub
Private Sub mnuLogout_Click()Dim Cancel As IntegerIf MsgBox("Do you want to Logout the application? Click yes to continue.", vbYesNo + vbExclamation) = vbNo Then Cancel = 1 Else Unload Me UserLogOut MAIN.Hide frmLogin.Show End IfEnd Sub
Private Sub mnuNotepad_Click()Shell "notepad.exe", vbNormalFocusEnd Sub
Private Sub mnuPaint_Click()Shell "mspaint.exe", vbNormalFocusEnd Sub
Private Sub mnuReport_Click()On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then Else MsgBox "You don't have the privileges to access this area.", vbExclamation
184
Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = NothingEnd Sub
Private Sub mnuRestore_Click()
On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then If MsgBox("Are you sure you to load another database?.This should be done with precaution." & vbCrLf & vbCrLf & "WARNING: YOU CANNOT UNDO THIS PROCESS", vbYesNo + vbCritical) = vbYes Then Dim srcLocation As String Set RS = Nothing Set CN = Nothing CommonDialog1.ShowOpen srcLocation = CommonDialog1.FileName Call WriteINI("Settings", "DBpath", srcLocation) Else Exit Sub End If Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing
End Sub
Private Sub mnuSanggunian_Click()
End Sub
Private Sub mnuSelectAttendance_Click()frmReportAttendance.ShowEnd Sub
Private Sub mnuSelectLocal_Click()frmReportLocal.Show vbModalEnd SubPrivate Sub mnuSystemInfo_Click()frmABOUTPROGRAM.Show vbModal
185
End Sub
Private Sub mnuTools_Click()If mnuTools.Enabled = False Then mnuFile.Enabled = True mnuhelp.Enabled = False mnuReport.Enabled = False mnuAbout.Enabled = False End IfEnd Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button) Select Case Button.Index Case 1 frmViewLocalLegislation.Show Case 2 frmViewMemberProfile.Show Case 3 frmViewSetOfSanggunian.Show Case 4 frmViewStandingCommittee.Show Case 5 frmViewSanggunianSession.Show Case 6 frmViewHearings.Show Case 7 On Error GoTo err: Dim sUserType As String Call execSQL("select * from tbluser_account where username='" & MAIN.StatusBar1.Panels(2).Text & "'") sUserType = RS.Fields("usertype") Set RS = Nothing Set CN = Nothing If sUserType = "ADMINISTRATOR" Then frmViewUsers.Show vbModal Else MsgBox "You don't have the privileges to access this area.", vbExclamation Exit Sub End If Exit Suberr: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing Case 8 Case 9 End SelectEnd Sub
Private Sub UserLogOut()Call execSQL("SELECT * FROM tbllog_time")
With RS
186
.AddNew
.Fields!user = MAIN.StatusBar1.Panels(2).Text
.Fields!logout = Format(Now, "MMM-dd-yyyy-HH:mm")
.Update
.RequeryEnd WithSet RS = NothingSet CN = NothingMsgBox MAIN.StatusBar1.Panels(2).Text & " " & "Has been Successfully Logout.", vbInformation, Format(Now, "MMM-dd-yyyy-HH:mm")
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)Label1.BackStyle = 0Label1.BorderStyle = 0End Sub
187
CHAPTER 5
CONCLUSIONS AND RECOMMENDATIONS
5.1 Conclusion
Based on the analysis gathered through interviews and observations, the
proponents found out that the study answers the problems in Legislative
Department. After several test, the researchers concluded that the system is more
efficient, effective and reliable. The system offers greater advantage than the
existing one that could help the Sanggunian in tracking ordinances and resolutions
efficiently and effectively. This application software is a user friendly program so
it can be easily understood and easily access by the user. The only need to know
is the basic computer operation for them to familiarize the system. This system is
reliable and assured information since the system is protected by a password to
prevent unauthorized access to system. Finally, the proponents therefore
concluded the system could be applied to Sanggunian Bayan Office in Jasaan
Municipality and could lead closer to its fullest capacity, and its future that of the
most efficient, effective and capable organization.
188
5.2 Recommendation
In view of the foregoing findings and conclusions, the following
recommendations are made:
1. It would be better if the next researchers enhance the Legislative
Tracking System in Jasaan Municipality into Web – based application using PHP,
AJAX and other software that is capable in making a database to help the
Sanggunian Bayan Members in the municipality to keep track through the use of
Internet on the status of their submitted ordinances and resolutions.
2. The proponents recommend to use the Visual Basic components such as
common dialog box or other tools that is capable to open files such as .doc
and .pdf extension format.
3. The Sangguniang Bayan Secretary and the proponents also recommend
to apply backup system on the web.
189
Bibliography
Book:
Barangay Newly Election Officials (BNEO) Training Manual (2007),
Department of Interior and Local Government (DILG)
Internet:
Baker, J. (2002). Innovative Tracking System.
Available:
http://www.gemstone.umd.edu/teams/documents/innovative.pdf
Retrieved September 27, 2011.
Bourguard, J.A; (2011). Keeping up With Online Tracking Services.
Available: http://nest.typepad.com/the=thicket/2011/01/keeping-up-with-
online-
legislative-tracking-services.html
[April 08, 2011]
Dihan, R.M.; Pasig City: Local Government Academy (1998). Subject:
Local laws Philippines; Local government – law and legislation, Ortigas,
Philippines.
190
Glass and Hopkins (1984). What is Descriptive Research?
Available: http:// www.acct.or/edtech/edI/41/4-01/html
[August 03, 2011]
Hamilton, L. (2004). Congress needs the deliberative process. Indiana University
Retrieved [August 10, 2011.]
Hoffman, B. (1981). A Legislative Tracking and Monitoring for California Judges
Association. Retrieved September 27, 2011. Available:
http://www/spa.america.edu/justice-old/documents164.pdf [June 1981]
Isde (2010), Vice Gov. Bagulaya says Leyte SP to implement Legislative agenda
for 2011. Available: http://leytesamardaily.net/2010/12/vice-gov-
bagulaya-sayas-leyte-spto-implement-legislative-agenda-for-2011/
[April 08, 2011]
Pia Press Release (2011), Zambales gov’t steps digital services.
Available:http://www.pia.gov.ph/?
m=7&r=RO3&id=26809&y=2011&mo=04
[April 08, 2011]
191
Provincial Government of Bohol (2008). Legislative Tracking System:
Technology at your fingertips. Available:
http://www.bohol.gov.ph/lts.html
[August 4, 2011]
Villaluz, S., (2004) Local legislator’s toolkit, Philippines – Canada Local
Government Support Program (LGSV)
192
Appendices
193
Research Instrument
The researchers conduct a series of interview and observation in order to
obtain and identify the problems to the Sangguniang Bayan Office of Jasaan
Municipality.
1. What are the main problems encountered during the manual transaction?
The proposed resolution requested and submitted by the committee’s
concerned with the same subject matter can be a source of redundant data
and the duration of time to find data request such as municipal ordinance
or resolution into a record book could be inconvenient and time
consuming to the Sangguniang Bayan Secretary because some of the files
been saved in the Microsoft office excel and Microsoft office word. Since
the proposed ordinances and resolutions started in year 1948, the records
been filed in a stored cabinet that can lead into a lot of problems to keep
the records safe.
194
2. Why is it considered as a problem?
A Sangguniang Bayan should be service oriented and the customer should
be satisfied but due to difficulties of manual tracking the service of
Sangguniang Bayan Office in Jasaan Municipality sometimes experienced
problems in retrieving proposed ordinances and resolutions.
3. What are the requirements that can solve these problems?
If a new system like Legislative Tracking System will be implemented, the
problem faced by the Sangguniang Bayan in Jasaan Municipality will be
solved and the production will be increased which is an efficient to the
legislative assistance to accomplish tasks.
4. What are the menus that should be in the system?
The system must contain the important details that been tackled in the
sessions which includes reference number, full title, short title, date filed,
195
co-authors, date read, referral on, committee name, committee report
number, submitted on, submitted by, recommendations, date included,
second reading, remarks, third reading, in favour, against, abstain, date
transmitted on mayor, date received by the mayor, date acted by the
mayor, mayor action, nature and terms of Sanggunian Bayan for the
proposed ordinances and resolutions.
5. Who are the possible users for the system?
The system is only applicable to the Sangguniang Bayan Secretary and in
case of manipulation it is not possible because every session is been
recorded by the stenographer.
196
MINUTES for the first checking
October 19, 2011
According to Mrs. Chio the Problem should be change into INTRODUCTION
and remove the phrase “As the world turns day” and change it to Nowadays. On
other hand, Ms. Dal suggested that remove “Thus” and replace it with “This” in
paragraph four.They also suggested what will be the benefits of having a
computerized system compared to the manual system and observe proper margin
and no page number in every start of each chapter.
In the statement of the problem which is “the study aims”, it should be change
to implement. Mrs. Chio added that the necessary problems should be stated on
the introduction.
For the objectives, Ms. Dal stated that it must contain the following :
- UML
- Program flowchart
197
- ER-diagram
And also, the significance of the study should be state directly and must use
future tense.
For scope and limitations there are some corrections regarding the words used
like remove the phrase In a process of, that passed and change it to submitted,
and Ms. Dal said that don’t forget to use future tense and also include the status of
the ordinances in the database.
According to Mrs. Chio, insert a conceptual framework after Scope and
Limitation in order to know the process of the system. In related studies, the first
paragraph was deleted and no more summaries of related studies and this
according to Mrs. Chio.
198
MINUTES for the second checking
January 26, 2012
According to Ms. Dal the proponents must specify User 1 as Secretary or
use Dummy 1 and Dummy 2 for other users. Mrs. Chio said that the Set of SB is
not necessary just remove it or explain to the panel what is Set of SB.
For futher information regarding the manual tracking in Sangguniang Bayan,
Mrs. Chio suggested that it is better to make a movie clip or make documentation
about the manual transaction of the Sangguniang Bayan Office and what is the
impact of the proposed Legislative Tracking System and Login for UML should
be on top or before add.
. On the other hand, Ms. Dal stated that the Nature of Local Legislation must
be in combo box.
199
MINUTES for the first and final defense
February 27, 2012
According to Mrs. Chio, the delete function for user privilege should be
remove and the buttons for add, edit, print and save must be disable. Mrs. Chio,
also said that the proponents must conduct an performance evaluation for both
manual tracking and proposed Legislative Tracking System. For hardware
specification, Mr. Catipay suggested that the description of the hardware should
be technical.
On the other hand, Ms. Dal said that it is better to have single spacing for
the codes and the sample documents should be included in the documentation and
the numbering of the figures and tables of its chapter must be change. Ms. Dal
also suggested to discuss the relationship of the Sangguniang Bayan to the
Municipal Office.
200
CurriculumVitae
201
MARICEL N. RALLOS
PBCM Compound, San Antonio, Jasaan
Misamis Oriental
Mobile Number: (09)068658228
Email: maricelrallos2008@yahoo.com
EDUCATION HISTORY
2011-2012
Mindanao University of Science and Technology – Jasaan Campus
Upper Jasaan, Jasaan Misamis Oriental
Bachelor of Science in Information Technology
2005-2006
Master Tomas D. Euginio Sr. Foundation School
PBCM Compound, San Antonio, Jasaan, Misamis Oriental
2001-2002
Master Tomas D. Euginio Sr. Foundation School
PBCM Compound, San Antonio, Jasaan, Misamis Oriental
202
AFFILIATION
Member, Society of Computer Enthusiast (SOCE), Mindanao
University of Science and Technology – Jasaan Campus, S.Y.
2008-2012
Member, Youth Reform and Service Organization, PBCM
Compound, San Antonio, Jasaan, Misamis Oriental, September
2009-2012
Member, Anime Circle, Mindanao University of Science and
Technology – Jasaan Campus, S.Y. 2011-2012
Member, DXN International Private LTD, Bugo, Cagayan de Oro
City, June 2006
SKILLS
Proficient in Cisco Networking
Proficient in Web Designing
Proficient in Computer Hardware
Proficient in Visual Basic Programming Language
Proficient in Windows Application Program
203
WORK EXPERIENCES
On the Job Trainee:
Philippine Ports Authority - PMO CDO
Macabalan, Cagayan de Oro City
April-May 2011
Sangguniang Bayan Office of Jasaan Municipality
Upper Jasaan, Jasaan Misamis Oriental
November 2011 – January 2012
TRAINING/SEMINARS
“Trips and Seminar”, Cebu City, November 2011
“Conducting Research in Information Technology Seminar”,
Kahulugan Spring Resort, Jasaan Misamis Oriental, July 2011
“Search Engine Optimization Seminar”, Mindanao University of
Science and Technology, Lapasan Cagayan de Oro City, February
2011
204
“Latest Trends in Networking Seminar”, Mindanao University of
Science and Technology, Lapasan Cagayan de Oro City, February
2011
Mikrotik Router and Firewall Management and Linux File
Permission Seminar, Mindanao University of Science and
Technology, Lapasan Cagayan de Oro City, August 2011
“Current Trends in Web Development Seminar”, Mindanao
University of Science and Technology, Lapasan Cagayan de Oro
City, August 2011
“GIS”, Mindanao University of Science and Technology, Lapasan
Cagayan de Oro City, October 2011
Electronic Commerce”, Mindanao University of Science and
Technology, Lapasan Cagayan de Oro City, October 2011
PERSONAL DATA
Date of Birth : June 26, 1989
Place of Birth : Agusan Del Sur
Religion : PBCM
Father’s Name : Rodrigo P. Rallos
Mother’s Name : Guadalope N. Rallos
205
RESSHILLE ANN T. SALLEY
264 Old National Highway, Lower Jasaan,
Jasaan Misamis Oriental
Mobile Number: (09)058534611
Email: salley_rat@yahoo.com
EDUCATIONAL ATTAINMENT
2011-2012
Mindanao University of Science and Technology – Jasaan Campus
Upper Jasaan, Jasaan Misamis Oriental
Bachelor of Science in Information Technology
2007-2008
Jasaan National High School
Upper Jasaan, Jasaan Misamis Oriental
2003-2004
Jasaan Central School
Upper Jasaan, Jasaan Misamis Oriental
206
AFFILITATION
Sangguniang Kabataan Official, Lower Jasaan, Jasaan Misamis
Oriental, November 2007- October 2010
Member, Society of Computer Enthusiast (SOCE), S.Y. 2011-2012
Member, Anime Circle, Mindanao University of Science and
Technology – Jasaan Campus, S.Y. 2011-2012
SKILLS
Proficient in Cisco Networking
Proficient in Web Designing
Proficient in Computer Hardware
Proficient in Windows Application Program
WORK EXPERIENCES
On the Job Trainee:
Dataworld Computer Center
Tirso Neri St. Divisorio, Cagayan de Oro City
April – May 2011
Sangguniang Bayan Office of Jasaan Municipality
207
Upper Jasaan, Jasaan Misamis Oriental
November 2011 – January 2012
TRAINING/SEMINARS
“Trips and Seminar”, Cebu City, November 2011
“Conducting Research in Information Technology Seminar”,
Kahulugan Spring Resort, Jasaan Misamis Oriental, July 2011
“Search Engine Optimization Seminar”, Mindanao University of
Science and Technology, Lapasan Cagayan de Oro City, February
2011
“Latest Trends in Networking Seminar”, Mindanao University of
Science and Technology, Lapasan Cagayan de Oro City, February
2011
Mikrotik Router and Firewall Management and Linux File
Permission Seminar, Mindanao University of Science and
Technology, Lapasan Cagayan de Oro City, August 2011
“Current Trends in Web Development Seminar”, Mindanao
University of Science and Technology, Lapasan Cagayan de Oro
City, August 2011
208
“Integrated Sanggunian Kabataan Organizational Leadership and
Reorientation – Basic Orientation Seminar (ISKOLAR-BOS)”,
Gardenia Hotel, 2007
“GIS”, Mindanao University of Science and Technology, Lapasan
Cagayan de Oro City, October 2011
Electronic Commerce”, Mindanao University of Science and
Technology, Lapasan Cagayan de Oro City, October 2011
PERSONAL DATA
Date of Birth : December 06, 1991
Place of Birth : Poblacion Malitbog Bukidnon
Religion : Roman Catholic
Father’s Name : Rey G. Salley
Mother’s Name : Nenita C. Tabamo
Mindanao University of Science and Technology -
Jasaan Campus
Jasaan Misamis Oriental
209
Legislative Tracking System in Jasaan Municipality
March 05, 2012
COMMENTS:
__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
SUGGESTIONS:
__________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Grade: _____
Evaluated by:
________________________
210