Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
INTRODUCTION
1.1
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 Migrio, 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 committees 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
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.
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
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 measures 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.
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.
CHAPTER 2
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 Migrio, 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
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).
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 Migrio, 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 Migrio, 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 Migrio, 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. StateNets 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 CJAs 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 startup business, TRX Systems. Use of TRXs 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 committees 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
18
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,
19
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
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.
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
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.
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 Back-end Specification MySQL Description Serves as the database of the system since the proposed Legislative Tracking System needs a complete database. A part which is accessible by everyone that displays Graphical User Interface. Software consisting of programs and data that runs on computers and manages computer hardware resources. Use to produce a detailed data model of DbSchema Base Design a database.
Front-end
Windows 7
Table 3.3.1.2 shows the hardware requirements as well as its specification and description. Table 3.3.1.2 Hardware Requirements
Hardware Monitor Power 22050-60 Hz 5A Supply Hard disk Drive AVR 320 GB SATA 220 V Specification LCD Description An electronic visual display for computer. The monitor comprises the display device circuitry and enclosure. Converts alternating current (AC) to direct current (DC). The mechanism that controls the positioning, reading, and writing of the hard disk, which furnishes the largest amount of data storage for the PC. A device that maintain the terminal voltage of a
32
generator within required limits variation in input Central Processing Unit Memory Keyboard Mouse Printer Flash (PS/2) Epson Stylus T13 Pentium Dual-Core DDR3-1333U Intex IT-2014B IT-OP51 Mouse Opti voltage or load Interprets and carries out basic instructions that operate a computer.
Electronic circuitry that holds binary data. A primary text input device. The standard mouse interface for the vast majority of computers with ATX and similar motherboards. 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 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 33
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 5
Descriptive Interpretation This indicates that the given criterion is implemented outstanding as the basis of functionality. This indicates that the given criterion is implemented very satisfactory as the basis of functionality. This indicates that the given criterion is implemented satisfactory as the basis of functionality. This indicates that the given criterion is implemented unsatisfactory as the basis of functionality. This indicates that the given criterion is implemented poor as the basis of functionality.
Very Satisfactory
Satisfactory
Unsatisfactory
Poor
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.
34
CHAPTER 4
35
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.
the
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.
36
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 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.
37
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 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.
38
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) 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.
39
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 In figure 4.1.9, it shows the Popup Message for Backup database inquires if the Secretary wants to backup.
40
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 In figure 4.1.11, it shows Popup Message gives confirmation that the Secretary has been successfully backup the database.
41
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.
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.
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.
In figure 4.1.16, it shows Double Click Statement is serves as a shortcut for edit.
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.
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.
In figure 4.1.18, Popup Message gives confirmation that the Secretary has been successfully saved the new record enter to the system.
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.
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.
In figure 4.1.20, this section shows the records that coincide to the codification entered by the Secretary.
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.
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.
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.
In figure 4.1.25, it shows the Edit Entry allows changing the username, password and privilege of the user.
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?
Satisfactory
2. How would you rate the transmittal system of approved ordinances and resolutions to the concerned personnel and agencies?
Very Satisfactory
51
3. How would you rate the filing system/records keeping of ordinances and resolutions?
Very Satisfactory
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.
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?
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
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.
54
Figure 4.2.2 shows the Attendance Entry Form for the sangguniang attendance in every session in the sanggunian bayan of Jasaan Municipality.
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.FillListView1 End Sub Private Sub Command3_Click() Selection = 8 frmSelectMember.Show vbModal End 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.
Option Explicit Private Sub btnCancel_Click() Unload Me End 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.FillListView1 End Sub Private Sub Command1_Click() Selection = 3 frmSelectMember.Show vbModal End Sub Private Sub Command2_Click() Selection = 3 frmViewDesignation.Show vbModal End 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.
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.FillListView1 End Sub Private Sub Command3_Click() Selection = 1 frmSelectMember.Show vbModal End 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_additem End 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 .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem End With End Sub
"COMMITTEE "COMMITTEE "COMMITTEE "COMMITTEE "COMMITTEE "COMMITTEE "COMMITTEE "COMMITTEE "COMMITTEE "COMMITTEE "COMMITTEE "COMMITTEE
ON ON ON ON ON ON ON ON ON ON ON ON
EDUCATION AND TOURISM" WOMEN AND FAMILY WELFARE" HEALTH, SANITATION AND NUTRITION" SOCIAL WELFARE AND COMMUNITY DEVELOPMENT" AGRICULTURE, ENVIRONMENT AND NATURAL RESOURCES" LABOR AND EMPLOYMENT, COOPERATIVE, TRADE AND INDUSTRY" POLICE MATTERS, FIRE AND PUBLIC SAFETY" PUBLIC WORKS AND INFRASTRUCTURE" GOOD GOVERNMENT AND HUMAN RIGHTS" SPORTS AND YOUTH DEVELOPMENT" BARANGAY AFFAIRS" MARKET AND SLAUGHTERHOUSE"
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.
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.FillListView End 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.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.
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 = 6 frmSelectMember.Show vbModal End Sub Private Sub Command2_Click() Selection = 7 frmSelectMember.Show vbModal End 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_additem End 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"
63
.AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem End With End Sub
"1988 -1992" "1992 -1995" "1995 -1998" "1998 - 2001" "2001 - 2004" "2004 - 2007" "2007 - 2010" "2010-2013"
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.
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
"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 Combo1 End Sub Private Sub Command2_Click() Selection = 14 frmSelectMember.Show vbModal End 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_additem End 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 .AddItem "FOR .AddItem "FOR .AddItem "FOR .AddItem "FOR .AddItem "FOR End With
With Combo4 .AddItem "" .AddItem "COMMITTEE .AddItem "COMMITTEE .AddItem "COMMITTEE .AddItem "COMMITTEE .AddItem "COMMITTEE .AddItem "COMMITTEE .AddItem "COMMITTEE .AddItem "COMMITTEE
ON ON ON ON ON ON ON ON
RULES, LAWS, ORDINANCES, LEGAL MATTERS AND PRIVILEGES" WAYS AND MEANS, FINANCE AND APPROPRIATIONS" TRANSPORTATION AND COMMUNICATION" EDUCATION AND TOURISM" WOMEN AND FAMILY WELFARE" HEALTH, SANITATION AND NUTRITION" SOCIAL WELFARE AND COMMUNITY DEVELOPMENT" AGRICULTURE, ENVIRONMENT AND NATURAL RESOURCES"
67
ON ON ON ON ON ON ON
LABOR AND EMPLOYMENT, COOPERATIVE, TRADE AND INDUSTRY" POLICE MATTERS, FIRE AND PUBLIC SAFETY" PUBLIC WORKS AND INFRASTRUCTURE" GOOD GOVERNMENT AND HUMAN RIGHTS" SPORTS AND YOUTH DEVELOPMENT" BARANGAY AFFAIRS" MARKET AND SLAUGHTERHOUSE"
With Combo5 .AddItem "" .AddItem "APPROVED" .AddItem "DISAPPROVED" End With With Combo6 .AddItem "" .AddItem "APPROVED" .AddItem "DISAPPROVED" End With With Combo7 .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem End With With Combo8 .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem 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" "" "1" "2" "3" "4" "5" "6" "7" "8" "9" "10"
"" "1" "2" "3" "4" "5" "6" "7" "8" "9" "10"
68
.AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem End With End Sub
"COMMITTEE "COMMITTEE "COMMITTEE "COMMITTEE "COMMITTEE "COMMITTEE "COMMITTEE "COMMITTEE "COMMITTEE "COMMITTEE "COMMITTEE "COMMITTEE "COMMITTEE
ON ON ON ON ON ON ON ON ON ON ON ON ON
TRANSPORTATION AND COMMUNICATION" EDUCATION AND TOURISM" WOMEN AND FAMILY WELFARE" HEALTH, SANITATION AND NUTRITION" SOCIAL WELFARE AND COMMUNITY DEVELOPMENT" AGRICULTURE, ENVIRONMENT AND NATURAL RESOURCES" LABOR AND EMPLOYMENT, COOPERATIVE, TRADE AND INDUSTRY" POLICE MATTERS, FIRE AND PUBLIC SAFETY" PUBLIC WORKS AND INFRASTRUCTURE" GOOD GOVERNMENT AND HUMAN RIGHTS" SPORTS AND YOUTH DEVELOPMENT" BARANGAY AFFAIRS" MARKET AND SLAUGHTERHOUSE"
Private Sub Text1_GotFocus() HLText Text1 End Sub Private Sub Text12_GotFocus() HLText Text12 End Sub Private Sub Text2_GotFocus() HLText Text2 End Sub Private Sub Text3_GotFocus() HLText Text3 End Sub Private Sub Text5_GotFocus() HLText Text5 End Sub Private Sub Text6_GotFocus() HLText Text6 End Sub
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
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 Sub Private Sub Form_Load() If AddState = True Then cb_additem Call GeneratePK("select * from tblmember_profile", lblID, "MEM") Else Exit Sub End 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 With End Sub Private Sub txt2_GotFocus() HLText txt2 End Sub Private Sub txt3_GotFocus()
71
HLText txt3 End Sub Private Sub txt4_GotFocus() HLText txt4 End Sub Private Sub lblID_gotfocus() HLText lblID End 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.
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 Sub err: MsgBox "error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub Option1_Click() If Option2.Value = False Then Frame1.Enabled = False End If End Sub Private Sub Option2_Click() If Option2.Value = True Then Frame1.Enabled = True End If End Sub
Private Sub cmddreport_Click() picmonthly.Visible = False picyear.Visible = False picdaily.Visible = True cbomm = "mm" cbodd = "dd" txtyyyy = "yyyy" End Sub Private Sub cmdenter_Click() Call execSQL("Select * from tbllocal_legislation") lvList.ListItems.clear Dim X While RS.EOF = False If mm = RS!mm And yyyy = RS!yyyy Then lvList.ListItems.Add , , RS!res_ord_ref_no lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , committee_report_no lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , date_transmitted_on_the_mayor lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , date_received_by_mayor lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , date_acted_by_mayor lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , X = 1 cmdprocess.Enabled = True End If RS.MoveNext Wend RS.Close If X <> 1 Then MsgBox "Invalid month or year!", vbCritical, "System Message"
RS!full_title RS!short_title RS!By RS!date_filed RS!co_authors RS!date_read RS!referral_on RS!committee_name RS! RS!submitted_on RS!submitted_by RS!recommendations RS!date_included RS!second_reading RS!date_distributed RS!remarks RS!third_reading RS!in_favor RS!against RS!abstain RS! RS! RS! RS!mayor_action RS!infra RS!social RS!political RS!genadmin RS!economic RS!agriculture RS!others RS!nature
74
mm = "" yyyy = "" mm.SetFocus End If Set RS = Nothing Set CN = Nothing End Sub Private Sub cmdmreport_Click() picmonthly.Visible = True picdaily.Visible = False picyear.Visible = False mm = "mm" yyyy = "yyyy" End Sub Private Sub cmdout_Click() Unload Me MAIN.Show End Sub Private Sub cmdprint_Click() MsgBox "Process Complete!", vbInformation, "System Message" If picdaily.Visible = True Then Call execSQL("select * from tblsanggunian_session,tbllocal_legislation where mm ='" & cbomm & "' and dd ='" & cbodd & "' and yyyy ='" & txtyyyy & "'") Set dtporeporlocallegislation.DataSource = RS ChngPrinterOrientationPortrait Me dtporeporlocallegislation.Sections("Section2").Controls.Item("lbldaily").Caption = "Daily" dtporeporlocallegislation.Sections("Section2").Controls.Item("Label13").Caption = cbomm dtporeporlocallegislation.Sections("Section2").Controls.Item("Label14").Caption = cbodd dtporeporlocallegislation.Sections("Section2").Controls.Item("Label17").Caption = txtyyyy dtporeporlocallegislation.Sections("Section3").Controls.Item("Label21").Caption = RS!secretary dtporeporlocallegislation.Show vbModal cmdprint.Enabled = False RS.Close End If If picmonthly.Visible = True Then Call execSQL("Select * from tblsanggunian_session,tbllocal_legislation where mm='" & mm & "' and yyyy='" & yyyy & "'") Set dtporeporlocallegislation.DataSource = RS ChngPrinterOrientationPortrait Me dtporeporlocallegislation.Sections("Section2").Controls.Item("lbldaily").Caption = "Monthly" dtporeporlocallegislation.Sections("Section2").Controls.Item("label13").Caption = mm dtporeporlocallegislation.Sections("Section2").Controls.Item("Label17").Caption = yyyy dtporeporlocallegislation.Sections("Section3").Controls.Item("Label21").Caption = RS!secretary dtporeporlocallegislation.Show vbModal cmdprint.Enabled = False RS.Close End If If picyear.Visible = True Then
75
Call execSQL("Select * from tblsanggunian_session,tbllocal_legislation where yyyy='" & txtyearyy & "'") Set dtporeporlocallegislation.DataSource = RS ChngPrinterOrientationPortrait Me dtporeporlocallegislation.Sections("Section2").Controls.Item("lbldaily").Caption = "Yearly" dtporeporlocallegislation.Sections("Section2").Controls.Item("Label17").Caption = txtyearyy dtporeporlocallegislation.Sections("Section3").Controls.Item("Label21").Caption = RS!secretary dtporeporlocallegislation.Show vbModal cmdprint.Enabled = False RS.Close End If Set RS = Nothing Set CN = Nothing End Sub Private Sub cmdprocess_Click() picinfo.Enabled = False picprint.Visible = True cmdprocess.Enabled = False cmdprint.Enabled = True cmdout.Enabled = False End Sub Private Sub cmdyreport_Click() picmonthly.Visible = False picdaily.Visible = False picyear.Visible = True txtyearyy = "yyyy" End Sub Private Sub Command1_Click() Call execSQL("Select * from tbllocal_legislation") lvList.ListItems.clear Dim X While RS.EOF = False If cbomm = RS!mm And cbodd = RS!dd And txtyyyy = RS!yyyy Then lvList.ListItems.Add , , RS!res_ord_ref_no lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , committee_report_no lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , ,
RS!full_title RS!short_title RS!By RS!date_filed RS!co_authors RS!date_read RS!referral_on RS!committee_name RS! RS!submitted_on RS!submitted_by RS!recommendations RS!date_included RS!second_reading RS!date_distributed RS!remarks RS!third_reading RS!in_favor RS!against
76
lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!abstain lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS! date_transmitted_on_the_mayor lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS! date_received_by_mayor lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS! date_acted_by_mayor lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!mayor_action lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!infra lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!social lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!political lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!genadmin lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!economic lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!agriculture lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!others lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!nature X = 1 cmdprocess.Enabled = True End If RS.MoveNext Wend RS.Close If X <> 1 Then MsgBox "Invalid month, date or year!", vbCritical, "System Message" cbomm = "" cbodd = "" txtyyyy = "" cbomm.SetFocus End Set Set End If RS = Nothing CN = Nothing Sub
Private Sub Command2_Click() Call execSQL("Select * from tbllocal_legislation") lvList.ListItems.clear Dim X While RS.EOF = False If txtyearyy = RS!yyyy Then lvList.ListItems.Add , , RS!res_ord_ref_no lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add committee_report_no lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add
, , , , , , , , , , , , , , , , , , , ,
, , , , , , , , , , , , , , , , , , , ,
RS!full_title RS!short_title RS!By RS!date_filed RS!co_authors RS!date_read RS!referral_on RS!committee_name RS! RS!submitted_on RS!submitted_by RS!recommendations RS!date_included RS!second_reading RS!date_distributed RS!remarks RS!third_reading RS!in_favor RS!against RS!abstain
77
lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add date_transmitted_on_the_mayor lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add date_received_by_mayor lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add date_acted_by_mayor lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add X = 1 cmdprocess.Enabled = True End If RS.MoveNext Wend RS.Close If X <> 1 Then MsgBox "Invalid Year!", vbCritical, "System Message" txtyearyy = "" txtyearyy.SetFocus End If Set RS = Nothing Set CN = Nothing End Sub Private Sub Command3_Click() If cmdprint.Enabled = False Then Call clear picprint.Visible = False picinfo.Enabled = True cmdout.Enabled = True Else Call clear picprint.Visible = False picinfo.Enabled = True cmdout.Enabled = True End If End Sub Private Sub txtyearyy_Click() txtyearyy = "" txtyearyy.SetFocus End Sub Private Sub txtyyyy_Click() txtyyyy = "" txtyyyy.SetFocus End Sub Private Sub yyyy_Click() yyyy = "" yyyy.SetFocus End Sub Function clear()
, , RS! , , RS! , , RS! , , , , , , , , , , , , , , , , , , RS!mayor_action RS!infra RS!social RS!political RS!genadmin RS!economic RS!agriculture RS!others RS!nature
78
cbomm = "" cbodd = "" txtyyyy = "" lvList.ListItems.clear mm = "" dd = "" yyyy = "" txttot = "" txtyearyy = "" End Function
Private Sub cmdyreport_Click() picmonthly.Visible = False picdaily.Visible = False picyear.Visible = True txtyearyy = "yyyy" End Sub Private Sub Command1_Click() Call execSQL("Select * from tblstanding_sb_committee") lst.ListItems.clear
79
Dim X While RS.EOF = False If txtyearyy = RS!yyyy Then lst.ListItems.Add , , RS!subject_matter lst.ListItems(lst.ListItems.Count).ListSubItems.Add , , RS!date_referred lst.ListItems(lst.ListItems.Count).ListSubItems.Add , , RS!action_taken lst.ListItems(lst.ListItems.Count).ListSubItems.Add , , RS!Status X = 1 cmdprocess.Enabled = True End If RS.MoveNext Wend RS.Close If X <> 1 Then MsgBox "Invalid Year!", vbCritical, "System Message" txtyearyy = "" txtyearyy.SetFocus End If Set RS = Nothing Set CN = Nothing End Sub Private Sub Command2_Click() If cmdprint.Enabled = False Then Call clear picprint.Visible = False picinfo.Enabled = True cmdout.Enabled = True Else Call clear picprint.Visible = False picinfo.Enabled = True cmdout.Enabled = True End If End Sub Private Sub Command3_Click() Call execSQL("Select * from tblstanding_sb_committee") lst.ListItems.clear Dim X While RS.EOF = False If cbomm = RS!mm And cbodd = RS!dd And txtyyyy = RS!yyyy Then lst.ListItems.Add , , RS!subject_matter lst.ListItems(lst.ListItems.Count).ListSubItems.Add , , RS!date_referred lst.ListItems(lst.ListItems.Count).ListSubItems.Add , , RS!action_taken lst.ListItems(lst.ListItems.Count).ListSubItems.Add , , RS!Status X = 1 cmdprocess.Enabled = True End If RS.MoveNext Wend RS.Close If X <> 1 Then MsgBox "Invalid month, date or year!", vbCritical, "System Message" cbomm = "" txtyyyy = "" cbodd = "" cbomm.SetFocus End If Set RS = Nothing Set CN = Nothing End Sub
80
Private Sub cmddreport_Click() picmonthly.Visible = False picyear.Visible = False picdaily.Visible = True cbomm = "mm" cbodd = "dd" txtyyyy = "yyyy" End Sub Private Sub cmdenter_Click() Call execSQL("Select * from tblstanding_sb_committee") lst.ListItems.clear Dim X While RS.EOF = False If mm = RS!mm And yyyy = RS!yyyy Then lst.ListItems.Add , , RS!subject_matter lst.ListItems(lst.ListItems.Count).ListSubItems.Add , , RS!date_referred lst.ListItems(lst.ListItems.Count).ListSubItems.Add , , RS!action_taken lst.ListItems(lst.ListItems.Count).ListSubItems.Add , , RS!Status X = 1 cmdprocess.Enabled = True End If RS.MoveNext Wend RS.Close If X <> 1 Then MsgBox "Invalid month or year!", vbCritical, "System Message" mm = "" yyyy = "" mm.SetFocus End If Set RS = Nothing Set CN = Nothing End Sub Private Sub cmdmreport_Click() picmonthly.Visible = True picdaily.Visible = False picyear.Visible = False mm = "mm" yyyy = "yyyy" End Sub Private Sub cmdout_Click() Unload Me MAIN.Show End Sub Private Sub cmdprint_Click() MsgBox "Process Complete!", vbInformation, "System Message" If picdaily.Visible = True Then Call execSQL("Select * from tblsanggunian_session,tblstanding_sb_committee where mm ='" & cbomm & "' and dd ='" & cbodd & "' and yyyy ='" & txtyyyy & "'") Set dtporeport.DataSource = RS dtporeport.WindowState = vbMaximized dtporeport.Sections("Section2").Controls.Item("lbldaily").Caption = "Daily" dtporeport.Sections("Section2").Controls.Item("label13").Caption = cbomm dtporeport.Sections("Section2").Controls.Item("label14").Caption = cbodd dtporeport.Sections("Section2").Controls.Item("Label17").Caption = txtyyyy dtporeport.Sections("Section3").Controls.Item("lbluser").Caption = RS!secretary dtporeport.Sections("Section3").Controls.Item("lbldate").Caption = Date dtporeport.Show vbModal cmdprint.Enabled = False
81
RS.MoveNext End If If picmonthly.Visible = True Then Call execSQL("Select * from tblsanggunian_session,tblstanding_sb_committee where mm='" & mm & "' and yyyy='" & yyyy & "'") Set dtporeport.DataSource = RS dtporeport.WindowState = vbMaximized dtporeport.Sections("Section2").Controls.Item("lbldaily").Caption = "Monthly" dtporeport.Sections("Section2").Controls.Item("label13").Caption = mm dtporeport.Sections("Section2").Controls.Item("Label17").Caption = yyyy dtporeport.Sections("Section3").Controls.Item("lbluser").Caption = RS!secretary dtporeport.Sections("Section3").Controls.Item("lbldate").Caption = Date dtporeport.Show vbModal cmdprint.Enabled = False RS.MoveNext Else If picyear.Visible = True Then Call execSQL("Select * from tblsanggunian_session,tblstanding_sb_committee where yyyy='" & txtyearyy & "'") Set dtporeport.DataSource = RS dtporeport.WindowState = vbMaximized dtporeport.Sections("Section2").Controls.Item("lbldaily").Caption = "Yearly" dtporeport.Sections("Section2").Controls.Item("Label17").Caption = txtyearyy dtporeport.Sections("Section3").Controls.Item("lbluser").Caption = RS!secretary dtporeport.Sections("Section3").Controls.Item("lbldate").Caption = Date dtporeport.Show vbModal cmdprint.Enabled = False RS.MoveNext End If End If Set RS = Nothing Set CN = Nothing End Sub Private Sub cmdprocess_Click() picinfo.Enabled = False picprint.Visible = True cmdprocess.Enabled = False cmdprint.Enabled = True cmdout.Enabled = False End Sub Function clear() cbomm = "" cbodd = "" txtyyyy = "" lst.ListItems.clear mm = "" dd = "" yyyy = "" txttot = "" txtyearyy = "" End Function Private Sub txtyearyy_Click() txtyearyy = "" txtyearyy.SetFocus End Sub
82
Private Sub txtyyyy_Click() txtyyyy = "" txtyyyy.SetFocus End Sub Private Sub yyyy_Click() yyyy = "" yyyy.SetFocus End Sub
Option Explicit Private Sub btnCancel_Click() Unload Me End Sub Private Sub btnok_Click() Unload Me 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 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.FillListView1 End Sub Private Sub Command1_Click() Selection = 2 frmSelectMember.Show vbModal End Sub Private Sub Command2_Click() Selection = 2 frmViewDesignation.Show vbModal End 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
85
frmSanggunianSessionAE.Hide ClearText Me Combo1.Text = "" Call GeneratePK("select * from tblsanggunian_session", Text1, 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 vbModal End Sub Private Sub Command2_Click() Selection = 5 frmSelectMember.Show vbModal End Sub Private Sub Command3_Click() Selection = 4 frmSelectMember.Show vbModal End Sub Private Sub Command4_Click() Selection = 8 frmSelectMember.Show vbModal End 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 If End 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"
"SES")
86
.AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem End With End Sub
"May 21, 1986 - November 2, 1986" "August 6, 1986 - November 1987" "November 1987 - January 1988" "1988 -1992" "1992 -1995" "1995 -1998" "1998 - 2001" "2001 - 2004" "2004 - 2007" "2007 - 2010" "2010-2013"
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_Change End Sub Private Sub cboOperation1_LostFocus() If cboOperation1.Text = "between" Then DTPicker1.Visible = True DTPicker2.Visible = True Text1.Visible = False End If End Sub
87
Private Sub cboOperation2_Change() If cboOperation2.Text = "between" Then DTPicker3.Visible = True DTPicker4.Visible = True Text2.Visible = False End If End Sub Private Sub cboOperation2_Click() cboOperation2_Change End Sub Private Sub cboOperation2_LostFocus() If cboOperation2.Text = "between" Then DTPicker3.Visible = True DTPicker4.Visible = True Text2.Visible = False End If End Sub Private Sub Command1_Click() Unload Me End 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 Case Case Case Case Case Case cboOperation2.ListIndex 0: strFilter = strFilter & " 1: strFilter = strFilter & " 2: strFilter = strFilter & " 3: strFilter = strFilter & " 4: strFilter = strFilter & " 5: strFilter = strFilter & " LIKE '%" & Text2.Text & "%'" = '" & Text2.Text & "'" <> '" & Text2.Text & "'" > '" & Text2.Text & "'" >= '" & Text2.Text & "'" < '" & 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 Me End 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 committees concerned.
90
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 ConX(Check2.Value) & "" sSQL = sSQL & " AND ConX(Check4.Value) & "" sSQL = sSQL & " AND & ConX(Check6.Value) & "" sSQL = sSQL & " AND End If infra=" & ConX(Check1.Value) & " AND social=" & political=" & ConX(Check3.Value) & " AND genadmin=" & economic=" & ConX(Check5.Value) & " AND agriculture=" others=" & ConX(Check7.Value) & ""
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 Me End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub Command3_Click() Selection = 13 frmSelectMember.Show vbModal End 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
Private Sub btnSelect_Click() If Selection = 1 Then ElseIf Selection = 2 Then frmSanggunianMemberAE.Text2.Text = lvList.SelectedItem.Text ElseIf Selection = 3 Then frmCommitteeMemberAE.Text2.Text = lvList.SelectedItem.Text ElseIf Selection = 4 Then frmSanggunianSessionAE.Text5.Text = lvList.SelectedItem.Text ElseIf Selection = 5 Then frmSanggunianSessionAE.Text6.Text = lvList.SelectedItem.Text ElseIf Selection = 6 Then frmHearingAE.Text4.Text = lvList.SelectedItem.Text ElseIf Selection = 7 Then frmHearingAE.Text2.Text = lvList.SelectedItem.Text ElseIf Selection = 8 Then
93
frmAttendanceAE.Text3.Text = lvList.SelectedItem.Text ElseIf Selection = 9 Then frmReportLocal.Text1.Text = lvList.SelectedItem.Text ElseIf Selection = 10 Then frmStandingSBCommitteeAE.Text2.Text = lvList.SelectedItem.Text ElseIf Selection = 11 Then frmStandingSBCommitteeAE.Text3.Text = lvList.SelectedItem.Text ElseIf Selection = 12 Then frmStandingSBCommitteeAE.Text6.Text = lvList.SelectedItem.Text ElseIf Selection = 13 Then frmSearchLocal.Text1.Text = lvList.SelectedItem.Text ElseIf Selection = 14 Then frmLocalLegislationAE.Text5.Text = lvList.SelectedItem.Text End If Unload Me End Sub Private Sub Command1_Click() End Sub Private Sub Form_Load() FillListView End 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 = Nothing End Sub Private Sub lvList_DblClick() btnSelect_Click End Sub
94
Figure 4.2.20 show the Set of Sanggunian Data Entry Form which describe the political affiliation of the all Sangguniang Bayan Members.
95
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.
98
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 = 10 frmSelectMember.Show vbModal End Sub Private Sub Command2_Click() Selection = 11 frmSelectMember.Show vbModal End Sub Private Sub Command3_Click() Selection = 12 frmSelectMember.Show vbModal 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() txtdate = Format(Date, "mm/dd/yyyy")
100
If AddState = True Then Call GeneratePK("Select * from tblstanding_sb_committee", Text1, "COM") End If cb_additem End Sub Public Sub cb_additem() With Combo1 .AddItem "" .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem .AddItem End With
"1ST" "2ND" "3RD" "4TH" "5TH" "6TH" "7TH" "8TH" "9TH" "10TH" "11TH" "12TH" "13TH" "14TH" "15TH"
With Combo2 .AddItem "" .AddItem "COMMITTEE .AddItem "COMMITTEE .AddItem "COMMITTEE .AddItem "COMMITTEE .AddItem "COMMITTEE .AddItem "COMMITTEE .AddItem "COMMITTEE .AddItem "COMMITTEE .AddItem "COMMITTEE .AddItem "COMMITTEE .AddItem "COMMITTEE .AddItem "COMMITTEE .AddItem "COMMITTEE .AddItem "COMMITTEE .AddItem "COMMITTEE End With
ON ON ON ON ON ON ON ON ON ON ON ON ON ON ON
RULES, LAWS, ORDINANCES, LEGAL MATTERS AND PRIVILEGES" WAYS AND MEANS, FINANCE AND APPROPRIATIONS" TRANSPORTATION AND COMMUNICATION" EDUCATION AND TOURISM" WOMEN AND FAMILY WELFARE" HEALTH, SANITATION AND NUTRITION" SOCIAL WELFARE AND COMMUNITY DEVELOPMENT" AGRICULTURE, ENVIRONMENT AND NATURAL RESOURCES" LABOR AND EMPLOYMENT, COOPERATIVE, TRADE AND INDUSTRY" POLICE MATTERS, FIRE AND PUBLIC SAFETY" PUBLIC WORKS AND INFRASTRUCTURE" GOOD GOVERNMENT AND HUMAN RIGHTS" SPORTS AND YOUTH DEVELOPMENT" BARANGAY AFFAIRS" MARKET AND SLAUGHTERHOUSE"
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.
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.FillListView End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub Form_Load() If AddState = True Then Call GeneratePK("select * from tbluser_account", Text9, "USR") End If End Sub
103
Option Explicit Private Sub btnAdd_Click() AddState = True EditState = False frmDesignationAE.Caption = "Add New Entry" frmDesignationAE.Show vbModal End Sub Private Sub btnDelete_Click() Call delete_rec("tbldesignation", "assign", lvList) FillListView End 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 Sub err: 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 btnSelect_Click() If Selection = 1 Then
104
ElseIf Selection = 2 Then frmSanggunianMemberAE.Text3.Text = lvList.SelectedItem.Text ElseIf Selection = 3 Then frmCommitteeMemberAE.Text3.Text = lvList.SelectedItem.Text ElseIf Selection = 4 Then frmSanggunianSessionAE.Text5.Text = lvList.SelectedItem.Text ElseIf Selection = 5 Then frmSanggunianSessionAE.Text6.Text = lvList.SelectedItem.Text ElseIf Selection = 6 Then frmHearingAE.Text4.Text = lvList.SelectedItem.Text ElseIf Selection = 7 Then frmHearingAE.Text2.Text = lvList.SelectedItem.Text ElseIf Selection = 8 Then frmAttendanceAE.Text3.Text = lvList.SelectedItem.Text ElseIf Selection = 9 Then frmReportLocal.Text1.Text = lvList.SelectedItem.Text End If Unload Me End Sub Private Sub Form_Load() FillListView End Sub Private Sub lvList_DblClick() btnSelect_Click End 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 = Nothing End Sub
105
Figure 4.2.25 shows the View Hearing Form to view the information of committee meeting in a session.
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 Sub err: 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 Sub err: 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 - 3300 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 - 2000 End 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 If End Sub Private Sub lvList1_DblClick() btnEdit_Click End Sub Private Sub lvList1_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 lvList2_DblClick() btnEdit_Click End Sub Private Sub lvList2_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 lvList3_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 lvList4_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 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing
109
End Sub
Set CN = Nothing
Private Sub mnuAllAttendances_Click() frmReportAttendance.Show End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub Private Sub mnuCalc_Click() Shell "calc.exe", vbNormalFocus End 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() End End 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 If End If End If End Sub Private Sub mnuhowto_Click() frmhowto.Show End Sub Private Sub mnuLocallegislation_Click() frmReportLocalLegislation.Show End Sub Private Sub mnuLock_Click() frmLock.Show vbModal End Sub Private Sub mnuLogout_Click() Dim Cancel As Integer If 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", vbNormalFocus End Sub Private Sub mnuPaint_Click() Shell "mspaint.exe", vbNormalFocus End Sub
111
Private Sub mnuRefresh_Click() btnRefresh_Click 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 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation
112
Set RS = Nothing Set CN = Nothing End Sub Private Sub mnuSelectAttendance_Click() frmReportAttendance.Show End Sub Private Sub mnuSelectLocal_Click() frmReportLocal.Show vbModal End Sub Private Sub mnuSystemInfo_Click() frmABOUTPROGRAM.Show vbModal 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 Select End 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 .Requery End With Set RS = Nothing Set CN = Nothing MsgBox MAIN.StatusBar1.Panels(2).Text & " " & "Has been Successfully Logout.", vbInformation, Format(Now, "MMM-dd-yyyy-HH:mm") End Sub
114
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 Sub err: 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 frmReportLocalLegislation.Show vbModal End Sub Private Sub btnRefresh_Click() Call FillListView("") End Sub Private Sub btnSearch_Click() frmSearchLocal.Show vbModal End 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 = False EditState = 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 Sub err: 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 - 3300 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 - 2000 End Sub Public 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 = Nothing End 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_Click End Sub Private Sub lvList_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then PopupMenu mnuLocal End If End Sub
Private Sub lvList1_DblClick() btnEdit_Click End Sub Private Sub lvList1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then PopupMenu mnuLocal End If End Sub
Private Sub lvList2_DblClick() btnEdit_Click End Sub Private Sub lvList2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then PopupMenu mnuLocal End If End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub Private Sub mnuAddNew_click() btnAddNew_Click End Sub Private Sub mnuAllAttendances_Click() frmReportAttendance.Show End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub Private Sub mnuCalc_Click() Shell "calc.exe", vbNormalFocus End Sub Private Sub mnuClose_click() btnClose_Click End Sub Private Sub mnuCommitteeReport_Click()
122
frmReportonCommittee.Show vbModal End Sub Private Sub mnudateandtime_Click() Shell ("C:\WINDOWS\system32\control.exe date/time") End Sub Private Sub mnuEdit_click() btnEdit_Click End Sub Private Sub mnuExit_Click() End End Sub Private Sub mnuExplorer_Click() Shell "Explorer.exe", vbNormalFocus 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 If End If End If End Sub Private Sub mnuhowto_Click() frmhowto.Show End Sub Private Sub mnuLocallegislation_Click() frmReportLocalLegislation.Show End Sub Private Sub mnuLock_Click() frmLock.Show vbModal End Sub Private Sub mnuLogout_Click() Dim Cancel As Integer If 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 If End Sub Private Sub mnuNotepad_Click() Shell "notepad.exe", vbNormalFocus End Sub Private Sub mnuPaint_Click() Shell "mspaint.exe", vbNormalFocus End Sub Private Sub mnuPrint_Click() btnprint_Click End Sub Private Sub mnuRefresh_Click() btnRefresh_Click 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 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub Private Sub mnuSearch_click() btnSearch_Click End Sub
Private Sub mnuSelectAttendance_Click() frmReportAttendance.Show End Sub Private Sub mnuSelectLocal_Click() frmReportLocal.Show vbModal End Sub Private Sub mnuSystemInfo_Click() frmABOUTPROGRAM.Show vbModal End Sub Private Sub mnuView_click() btnView_Click 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 Select End 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 .Requery End With Set RS = Nothing Set CN = Nothing MsgBox 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.
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 vbModal End Sub Private Sub btnClose_Click() Unload Me End 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 Sub err: 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("")
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 Sub err: 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() 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 - 2000 End 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 = Nothing End 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 If End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub Private Sub mnuAdd_Click() btnAddNew_Click End Sub Private Sub mnuAllAttendances_Click() frmReportAttendance.Show End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub Private Sub mnuCalc_Click() Shell "calc.exe", vbNormalFocus End Sub Private Sub mnuCommitteeReport_Click()
130
frmReportonCommittee.Show vbModal End Sub Private Sub mnudateandtime_Click() Shell ("C:\WINDOWS\system32\control.exe date/time") End Sub Private Sub mnuEdit_click() btnEdit_Click End Sub Private Sub mnuExit_Click() End End Sub Private Sub mnuExplorer_Click() Shell "Explorer.exe", vbNormalFocus 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 If End If End If End Sub Private Sub mnuhowto_Click() frmhowto.Show End Sub Private Sub mnuLocallegislation_Click() frmReportLocalLegislation.Show End Sub Private Sub mnuLock_Click() frmLock.Show vbModal End Sub Private Sub mnuLogout_Click() Dim Cancel As Integer If 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 If End Sub Private Sub mnuNotepad_Click() Shell "notepad.exe", vbNormalFocus End Sub Private Sub mnuPaint_Click() Shell "mspaint.exe", vbNormalFocus End Sub Private Sub mnuRefresh_Click() btnRefresh_Click 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 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub Private Sub mnuSearch_click() btnSearch_Click End Sub Private Sub mnuSelectAttendance_Click() frmReportAttendance.Show End Sub Private Sub mnuSelectLocal_Click() frmReportLocal.Show vbModal End Sub Private Sub mnuSystemInfo_Click() frmABOUTPROGRAM.Show vbModal End Sub Private Sub mnuView_click() btnView_Click End Sub Private Sub mnuClose_click() btnClose_Click 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 Select End 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 .Requery End With Set RS = Nothing Set CN = Nothing MsgBox 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.
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 Me End 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 = False If 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 vbModal ElseIf 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 Sub err: 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()
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 = Nothing End 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 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() If usrPrivilege("view", MAIN.StatusBar1.Panels(2).Text) = False Then: MsgBox "All users can view.", vbExclamation: Exit Sub AddState = False EditState = False If 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 Sub err: 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 - 3300 lvList1.Width = Me.ScaleWidth - 300 lvList1.Height = Me.Height - 3300 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 - 2000 End Sub Private Sub lvList_Click() FillListView1 End 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 mnuMenu End If End Sub Private Sub lvList1_DblClick() btnEdit_Click End 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 If End Sub Private Sub lvList2_DblClick() btnEdit_Click End Sub Private Sub lvList2_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 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub Private Sub mnuAllAttendances_Click() frmReportAttendance.Show End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub Private Sub mnuCalc_Click() Shell "calc.exe", vbNormalFocus End 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() End End Sub Private Sub mnuExplorer_Click() Shell "Explorer.exe", vbNormalFocus 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 If
139
End If End If End Sub Private Sub mnuhowto_Click() frmhowto.Show End Sub Private Sub mnuLocallegislation_Click() frmReportLocalLegislation.Show End Sub Private Sub mnuLock_Click() frmLock.Show vbModal End Sub Private Sub mnuLogout_Click() Dim Cancel As Integer If 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", vbNormalFocus End Sub Private Sub mnuPaint_Click() Shell "mspaint.exe", vbNormalFocus End Sub Private Sub mnuPrint_Click() btnprint_Click 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 Set CN = Nothing If sUserType = "ADMINISTRATOR" Then Else MsgBox "You don't have the privileges to access this area.", vbExclamation
140
err:
MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub Private Sub mnuSelectAttendance_Click() frmReportAttendance.Show End Sub Private Sub mnuSelectLocal_Click() frmReportAttendance.Show End Sub Private Sub mnuSystemInfo_Click() frmABOUTPROGRAM.Show vbModal End Sub Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button) Select Case Button.Index
141
Case 1 Call NavigateListView(lvList, Case 2 Call NavigateListView(lvList, Case 3 Call NavigateListView(lvList, Case 4 Call NavigateListView(lvList, 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 = Nothing End Sub
Private Sub mnuAddNew_click() btnAddNew_Click 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 mnuRefresh_Click()
142
btnRefresh_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 .Requery End With Set RS = Nothing Set CN = Nothing MsgBox 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 = Nothing End Sub
143
144
frmSanggunianSessionAE.Text9.Text = lvList.SelectedItem.Text Unload Me End Sub Private Sub Form_Load() FillListView End 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 = Nothing End 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
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 frmSetOfSanggunianAE.Caption = "Add New Entry" frmSetOfSanggunianAE.btnok.Visible = False frmSetOfSanggunianAE.Show vbModal ElseIf SSTab1.Tab = 1 Then frmSanggunianMemberAE.Caption = "Add New Entry" frmSanggunianMemberAE.btnok.Visible = False frmSanggunianMemberAE.Text1.Text = lvList.SelectedItem.Text frmSanggunianMemberAE.Show vbModal End If End Sub Private Sub btnClose_Click() Unload Me End Sub
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 = True AddState = False On 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 vbModal End If Exit Sub err: 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 = 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 If End 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 = False EditState = 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 vbModal ElseIf 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 vbModal End If Exit Sub err: 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 - 3300 lvList1.Width = Me.ScaleWidth - 300 lvList1.Height = Me.Height - 3300 ctrlSeparator1.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 - 2000 End 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 = tot Set RS = Nothing Set CN = Nothing Exit Sub err: 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 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 Sub err: 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 = Nothing End Sub Private Sub lvList_Click() FillListView1 End 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 mnuMenu: Exit Sub End Sub
Private Sub lvList1_DblClick() btnEdit_Click End Sub Private Sub lvList1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then: PopupMenu mnuMenu: Exit Sub End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub Private Sub mnuAllAttendances_Click() frmReportAttendance.Show End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub Private Sub mnuCalc_Click() Shell "calc.exe", vbNormalFocus End 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() End End Sub Private Sub mnuExplorer_Click() Shell "Explorer.exe", vbNormalFocus End 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 If End If End If End Sub Private Sub mnuhowto_Click() frmhowto.Show End Sub Private Sub mnuLocallegislation_Click() frmReportLocalLegislation.Show End Sub Private Sub mnuLock_Click() frmLock.Show vbModal End Sub Private Sub mnuLogout_Click() Dim Cancel As Integer If 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", vbNormalFocus End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub Private Sub mnuSearch_click() btnSearch_Click End Sub Private Sub mnuSelectAttendance_Click() frmReportAttendance.Show End Sub
153
Private Sub mnuSelectLocal_Click() frmReportLocal.Show vbModal End Sub Private Sub mnuSystemInfo_Click() frmABOUTPROGRAM.Show vbModal End 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 Sub err: 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 mnuAddNew_click() btnAddNew_Click End Sub Private Sub mnuEdit_click() btnEdit_Click End Sub Private Sub mnuRefresh_Click() btnRefresh_Click End Sub Private Sub mnuClose_click() btnClose_Click End Sub Private Sub mnuView_click() btnView_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 .Requery End With
154
Set RS = Nothing Set CN = Nothing MsgBox MAIN.StatusBar1.Panels(2).Text & " " & "Has been Successfully Logout.", vbInformation, Format(Now, "MMM-dd-yyyy-HH:mm") End 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 = True AddState = 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 Sub err: 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.Show End 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 If End 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 If 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: 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 Sub err: 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 Command2_Click() SSTab1.Tab = 2 frmViewStandingCommittee.lvList2.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON WAYS AND MEANS, FINANCE AND APPROPRIATIONS'") lvList2.ListItems.clear While RS.EOF = False lvList2.ListItems.Add , , RS!PK lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!chairman lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!members lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!Status lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend RS.Close Call 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 - 3300 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 - 2000 End Sub Private Sub lvList_Click() FillListView1 End 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 mnuMenu End If End Sub Private Sub lvList1_DblClick() btnEdit_Click End Sub Private Sub lvList1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = 2 Then PopupMenu mnuMenu End If End 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 Sub err: 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 lvList2_DblClick() btnEdit_Click End Sub Private Sub lvList3_DblClick() btnEdit_Click End Sub Private Sub lvList4_DblClick() btnEdit_Click End Sub Private Sub lvList5_DblClick() btnEdit_Click End Sub Private Sub lvList6_DblClick() btnEdit_Click End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub Private Sub mnuAllAttendances_Click() frmReportAttendance.Show End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing
161
End Sub Private Sub mnuCalc_Click() Shell "calc.exe", vbNormalFocus End 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() End End Sub Private Sub mnuExplorer_Click() Shell "Explorer.exe", vbNormalFocus 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 If End If End If End Sub Private Sub mnuhowto_Click() frmhowto.Show End Sub Private Sub mnuLocallegislation_Click() frmReportLocalLegislation.Show End Sub Private Sub mnuLock_Click() frmLock.Show vbModal End Sub Private Sub mnuLogout_Click() Dim Cancel As Integer If 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 If End Sub Private Sub mnuNotepad_Click() Shell "notepad.exe", vbNormalFocus End Sub Private Sub mnuPaint_Click() Shell "mspaint.exe", vbNormalFocus End Sub Private Sub mnupreview_Click() End Sub Private Sub mnuPrint_Click() btnprint_Click 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 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub Private Sub mnuSelectAttendance_Click() frmReportAttendance.Show End Sub Private Sub mnuSelectLocal_Click() frmReportLocal.Show vbModal End Sub Private Sub mnuSystemInfo_Click() frmABOUTPROGRAM.Show vbModal End Sub Private Sub optCommitteeonAgriculture_Click() If optCommitteeonAgriculture.Value = True Then SSTab1.Tab = 0 frmViewStandingCommittee.lvList.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON AGRICULTURE, ENVIRONMENT AND NATURAL RESOURCES'") lvList.ListItems.clear While RS.EOF = False lvList.ListItems.Add , , RS!PK lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!members lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!Status lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext
164
Wend RS.Close Call reload End If Set RS = Nothing Set CN = Nothing End Sub Private Sub optCommitteeonBarangay_Click() If optCommitteeonBarangay.Value = True Then SSTab1.Tab = 0 frmViewStandingCommittee.lvList.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON BARANGAY AFFAIRS'") lvList.ListItems.clear While RS.EOF = False lvList.ListItems.Add , , RS!PK lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!members lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!Status lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend RS.Close Call reload End If Set RS = Nothing Set CN = Nothing End Sub Private Sub optCommitteeonGood_Click() If optCommitteeonGood.Value = True Then SSTab1.Tab = 0 frmViewStandingCommittee.lvList.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON GOOD GOVERNMENT AND HUMAN RIGHTS'") lvList.ListItems.clear While RS.EOF = False lvList.ListItems.Add , , RS!PK lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!members lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!Status lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext
165
Wend RS.Close End If Set RS = Nothing Set CN = Nothing End Sub Private Sub optCommitteeonHealth_Click() If optCommitteeonHealth.Value = True Then SSTab1.Tab = 0 frmViewStandingCommittee.lvList.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON HEALTH, SANITATION AND NUTRITION'") lvList.ListItems.clear While RS.EOF = False lvList.ListItems.Add , , RS!PK lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!members lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!Status lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend RS.Close Call reload End If Set RS = Nothing Set CN = Nothing End Sub Private Sub optCommitteeonLabor_Click() If optCommitteeonLabor.Value = True Then SSTab1.Tab = 0 frmViewStandingCommittee.lvList.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON LABOR AND EMPLOYMENT, COOPERATIVE, TRADE AND INDUSTRY'") lvList.ListItems.clear While RS.EOF = False lvList.ListItems.Add , , RS!PK lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!members lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!Status lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend RS.Close
166
Call reload End If Set RS = Nothing Set CN = Nothing End Sub Private Sub optCommitteeonMarket_Click() If optCommitteeonMarket.Value = True Then SSTab1.Tab = 6 frmViewStandingCommittee.lvList6.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON MARKET AND SLAUGHTERHOUSE'") lvList6.ListItems.clear While RS.EOF = False lvList6.ListItems.Add , , RS!PK lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!chairman lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!members lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!Status lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend RS.Close Call reload End If Set RS = Nothing Set CN = Nothing End Sub Private Sub optCommitteeonPolice_Click() If optCommitteeonPolice.Value = True Then SSTab1.Tab = 0 frmViewStandingCommittee.lvList.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON POLICE MATTERS, FIRE AND PUBLIC SAFETY'") lvList.ListItems.clear While RS.EOF = False lvList.ListItems.Add , , RS!PK lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!members lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!Status lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend RS.Close Call reload
167
End If Set RS = Nothing Set CN = Nothing End Sub Private Sub optCommitteeonPublic_Click() If optCommitteeonPublic.Value = True Then SSTab1.Tab = 0 frmViewStandingCommittee.lvList.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON PUBLIC WORKS AND INFRASTRUCTURE'") lvList.ListItems.clear While RS.EOF = False lvList.ListItems.Add , , RS!PK lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!members lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!Status lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend RS.Close Call reload End If Set RS = Nothing Set CN = Nothing End Sub Private Sub optCommitteeonRules_Click() If optCommitteeonRules.Value = True Then SSTab1.Tab = 0 frmViewStandingCommittee.lvList.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON RULES, LAWS, ORDINANCES, LEGAL MATTERS AND PRIVILEGES'") lvList.ListItems.clear While RS.EOF = False lvList.ListItems.Add , , RS!PK lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!members lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!Status lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend RS.Close Call reload End If
168
Set RS = Nothing Set CN = Nothing End Sub Private Sub optCommitteeonSocial_Click() If optCommitteeonSocial.Value = True Then SSTab1.Tab = 0 frmViewStandingCommittee.lvList.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON SOCIAL WELFARE AND COMMUNITY DEVELOPMENT'") lvList.ListItems.clear While RS.EOF = False lvList.ListItems.Add , , RS!PK lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!members lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!Status lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend RS.Close End If Set RS = Nothing Set CN = Nothing End Sub Private Sub optCommitteeonSports_Click() If optCommitteeonSports.Value = True Then SSTab1.Tab = 0 frmViewStandingCommittee.lvList.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON SPORTS AND YOUTH DEVELOPMENT'") lvList.ListItems.clear While RS.EOF = False lvList.ListItems.Add , , RS!PK lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!members lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!Status lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend RS.Close Call reload
169
End If Set RS = Nothing Set CN = Nothing End Sub Private Sub optCommitteeonTransportation_Click() If optCommitteeonTransportation.Value = True Then SSTab1.Tab = 0 frmViewStandingCommittee.lvList.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON TRANSPORTATION AND COMMUNICATION'") lvList.ListItems.clear While RS.EOF = False lvList.ListItems.Add , , RS!PK lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!members lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!Status lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend RS.Close End If Set RS = Nothing Set CN = Nothing End Sub Private Sub optCommitteeonWays_Click() If optCommitteeonWays.Value = True Then SSTab1.Tab = 0 frmViewStandingCommittee.lvList.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON WAYS AND MEANS, FINANCE AND APPROPRIATIONS'") lvList.ListItems.clear While RS.EOF = False lvList.ListItems.Add , , RS!PK lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!members lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!Status lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend RS.Close End If Set RS = Nothing
170
Set CN = Nothing End Sub Private Sub optCommitteeonWomen_Click() If optCommitteeonWomen.Value = True Then SSTab1.Tab = 0 frmViewStandingCommittee.lvList.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON WOMEN AND FAMILY WELFARE'") lvList.ListItems.clear While RS.EOF = False lvList.ListItems.Add , , RS!PK lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!members lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!Status lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend RS.Close Call reload End If Set RS = Nothing Set CN = Nothing End Sub Private Sub optCommitteonEducation_Click() If optCommitteonEducation.Value = True Then SSTab1.Tab = 0 frmViewStandingCommittee.lvList.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON EDUCATION AND TOURISM'") lvList.ListItems.clear While RS.EOF = False lvList.ListItems.Add , , RS!PK lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!members lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!Status lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend RS.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 Select End 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 Sub err: 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 mnuAddNew_click() btnAddNew_Click 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 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 .Requery End With Set RS = Nothing Set CN = Nothing MsgBox 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 Then frmViewStandingCommittee.lvList2.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON RULES, LAWS, ORDINANCES, LEGAL MATTERS AND PRIVILEGES'") lvList2.ListItems.clear While RS.EOF = False lvList2.ListItems.Add , , RS!PK lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!chairman lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!members lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!Status lvList2.ListItems(lvList2.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend End If If optCommitteeonWays.Value = True Then SSTab1.Tab = 3 frmViewStandingCommittee.lvList3.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON WAYS AND MEANS, FINANCE AND APPROPRIATIONS'") lvList3.ListItems.clear While RS.EOF = False lvList3.ListItems.Add , , RS!PK lvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!chairman lvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!members lvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!Status
173
lvList3.ListItems(lvList3.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend End If If optCommitteeonTransportation.Value = True Then SSTab1.Tab = 4 frmViewStandingCommittee.lvList4.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON TRANSPORTATION AND COMMUNICATION'") lvList4.ListItems.clear While RS.EOF = False lvList4.ListItems.Add , , RS!PK lvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!chairman lvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!members lvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!Status lvList4.ListItems(lvList4.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend End If If optCommitteonEducation.Value = True Then SSTab1.Tab = 5 frmViewStandingCommittee.lvList5.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON EDUCATION AND TOURISM'") lvList5.ListItems.clear While RS.EOF = False lvList5.ListItems.Add , , RS!PK lvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!chairman lvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!members lvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!Status lvList5.ListItems(lvList5.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend End If If optCommitteonEducation.Value = True Then SSTab1.Tab = 6 frmViewStandingCommittee.lvList6.Visible = True
174
Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON MARKET AND SLAUGHTERHOUSE'") lvList6.ListItems.clear While RS.EOF = False lvList6.ListItems.Add , , RS!PK lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!chairman lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!members lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!Status lvList6.ListItems(lvList6.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend End If
If optCommitteeonSocial.Value = True Then SSTab1.Tab = 0 frmViewStandingCommittee.lvList.Visible = True Call execSQL("select * from tblstanding_sb_committee where committee_name ='COMMITTEE ON SOCIAL WELFARE AND COMMUNITY DEVELOPMENT'") lvList.ListItems.clear While RS.EOF = False lvList.ListItems.Add , , RS!PK lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!set_of_sb lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!vice_chairman lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!members lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!date_referred lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS! committee_schedule lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!committee_name lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!subject_matter lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!action_taken lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!Status lvList.ListItems(lvList.ListItems.Count).ListSubItems.Add , , RS!recommendation RS.MoveNext Wend End If Set RS = Nothing Set CN = Nothing End Function Function clear() frmStandingSBCommitteeAE.Text1 = "" frmStandingSBCommitteeAE.Combo1 = "" frmStandingSBCommitteeAE.Text2 = "" frmStandingSBCommitteeAE.Text3 = "" frmStandingSBCommitteeAE.Text6 = "" frmStandingSBCommitteeAE.Text4 = "" frmStandingSBCommitteeAE.Text5 = "" frmStandingSBCommitteeAE.Combo2 = "" frmStandingSBCommitteeAE.Text7 = ""
175
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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbInformation Set RS = Nothing Set CN = Nothing End Sub Private Sub Command4_Click() AddState = True EditState = False frmUserAE.Caption = "Add New Entry" frmUserAE.Show vbModal End 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 = Nothing End Sub Private Sub Form_Load()
177
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 = Nothing End Sub Private Sub lvList_DblClick() Command3_Click End 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.
179
End Sub Private Sub Label1_Click() MAIN.Hide frmViewLocalLegislation.Show End Sub Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Label1.BackStyle = 1 Label1.BorderStyle = 1 End Sub
Private Sub Label2_Click() MAIN.Hide frmViewMemberProfile.Show End Sub Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Label2.BackStyle = 1 Label2.BorderStyle = 1 End Sub Private Sub Label3_Click() MAIN.Hide frmViewSetOfSanggunian.Show End Sub Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Label3.BackStyle = 1 Label3.BorderStyle = 1 End Sub Private Sub Label4_Click() MAIN.Hide frmViewStandingCommittee.Show End Sub Private Sub Label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Label4.BackStyle = 1 Label4.BorderStyle = 1 End Sub Private Sub Label5_Click() MAIN.Hide frmViewSanggunianSession.Show End Sub Private Sub Label5_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Label5.BackStyle = 1 Label5.BorderStyle = 1 End 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 = 1 Label6.BorderStyle = 1 End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub Private Sub Label7_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Label7.BackStyle = 1 Label7.BorderStyle = 1 End Sub Private Sub lblpm_Click() End Sub Private Sub MDIForm_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Label1.BackStyle = 0 Label1.BorderStyle = 0 Label2.BackStyle = 0 Label2.BorderStyle = 0 Label3.BackStyle = 0 Label3.BorderStyle = 0 Label4.BackStyle = 0 Label4.BorderStyle = 0 Label5.BackStyle = 0 Label5.BorderStyle = 0 Label6.BackStyle = 0 Label6.BorderStyle = 0 Label7.BackStyle = 0 Label7.BorderStyle = 0 End Sub Private Sub mnuAbout_Click()
181
If mnuTools.Enabled = False Then mnuFile.Enabled = True mnuhelp.Enabled = False mnuReport.Enabled = False mnuAbout.Enabled = False End If End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub Private Sub mnuAllAttendance_Click() End Sub
Private Sub mnuAllAttendances_Click() frmReportAttendance.Show End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End Sub Private Sub mnuCalc_Click() Shell "calc.exe", vbNormalFocus End Sub Private Sub mnucommitteeonrules_Click() End 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() End End Sub Private Sub mnuExplorer_Click() Shell "Explorer.exe", vbNormalFocus 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 If End If End If End Sub
183
Private Sub mnuhelp_Click() If mnuTools.Enabled = False Then mnuFile.Enabled = True mnuhelp.Enabled = False mnuReport.Enabled = False mnuAbout.Enabled = False End If End Sub Private Sub mnuhowto_Click() frmhowto.Show End Sub Private Sub mnuLocallegislation_Click() frmReportLocalLegislation.Show End Sub Private Sub mnuLock_Click() frmLock.Show vbModal End Sub Private Sub mnuLogout_Click() Dim Cancel As Integer If 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 If End Sub Private Sub mnuNotepad_Click() Shell "notepad.exe", vbNormalFocus End 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 Set CN = Nothing If sUserType = "ADMINISTRATOR" Then Else MsgBox "You don't have the privileges to access this area.", vbExclamation
184
err:
MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing End 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 Sub err: 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.Show End Sub Private Sub mnuSelectLocal_Click() frmReportLocal.Show vbModal End Sub Private 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 If End 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 Sub err: MsgBox "Error#" & err.Number & " Description: " & err.Description, vbExclamation Set RS = Nothing Set CN = Nothing Case 8 Case 9 End Select End 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 .Requery End With Set RS = Nothing Set CN = Nothing MsgBox 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 = 0 Label1.BorderStyle = 0 End Sub
187
CHAPTER 5
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
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-withonlinelegislative-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-govbagulaya-sayas-leyte-spto-implement-legislative-agenda-for-2011/ [April 08, 2011] Pia Press Release (2011), Zambales govt 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 legislators 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 committees 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, 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
195
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
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 ER-diagram
197
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 dont 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
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
Curriculum Vitae
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
202
Master Tomas D. Euginio Sr. Foundation School PBCM Compound, San Antonio, Jasaan, Misamis Oriental
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 203
Proficient in Computer Hardware Proficient in Visual Basic Programming Language Proficient in Windows Application Program
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
204
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 GIS, Mindanao University of Science and Technology, Lapasan Cagayan de Oro City, October 2011 205
Electronic Commerce, Mindanao University of Science and Technology, Lapasan Cagayan de Oro City, October 2011
PERSONAL DATA Date of Birth Place of Birth Religion Fathers Name Mothers Name : : : : : June 26, 1989 Agusan Del Sur PBCM Rodrigo P. Rallos Guadalope N. Rallos
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
206
2007-2008 Jasaan National High School Upper Jasaan, Jasaan Misamis Oriental
AFFILITATION Sangguniang Kabataan Official, Lower Jasaan, Jasaan Misamis Oriental, November 2007- October 2010 Member, Society of Computer Enthusiast (SOCE), S.Y. 2011-2012
207
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 Upper Jasaan, Jasaan Misamis Oriental November 2011 January 2012 208
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
209
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 Place of Birth Religion Fathers Name Mothers Name : : : : : December 06, 1991 Poblacion Malitbog Bukidnon Roman Catholic Rey G. Salley Nenita C. Tabamo
210
Grade: _____
211