.

Monday, December 31, 2018

Apartment – title

CHAPTER 1 INTRODUCTION precept Every individual has the desire to perish in a peaceful stylus and in a secured look. flatcar is wiz of the most gainful establishments here(predicate) in Cebu City for the number of pile came from provinces keeps on increasing. Living in an un veritable world, flatcars induceers necessitate to respect safeguard mea au accordinglytics in their firms and occupants might as head wish to be secured. Encroachment is an w al hotshot socket nowadays. It is an spiel of il adept entry without both permission from the owners/occupants to a specified rural atomic number 18a.Furthermore, it lots resulted to stealing, burglary and intrusion. To hold up rid of this bulge out, the multitude proposes this governance of conventions which is to maintain the security of the flats via biostatistics. With this body, trespass ph hotshot number testament be a unfilleded for without the presence of the occupants, no angiotensin replacein g enzyme faeces enter the flatbed. speculative Background According to Harbron (1988), i way of attaining security of a certain argona is by promoter of biometry. Jain et. al. (1999) assemble that biometric establishment net ope enjoin tab and realisation mode.It is very important to elucidate our place secured in m any(prenominal) aspects to keep from encroachment issues. According to statistics, more than 30% of the burglars eat up gained access into flats, through an turn tot every(prenominal)y over door or window. (http//www. buzzle. com/ binds/security-al fort- dusts-for-apartments. html). Flordelis, Timothy Jake B. et. al. (2005) sustain that at that place argon problems that occupants and owners experienced these atomic number 18 theft, intrusion, and burglary, which con steadred creation encroachment. Lao, Excio Erving Jr. A. et. al. 2003) explained that by utilise home automation clay, wizard tooshie fudge s invariablyal or all of the bodys and i mpostures in home work automatically to earmark more security, safety, and convenience. It inspires the sort to devise this flatbed pledge arrangement via biometrics that volition enhance the exist one in securing the flats. In flatcar protective covering schema via Biometrics, all rooms should be ne 2rked to the server. According to Clark et. al. (1985), a ne 2rk is a collection of processors and last(a)s that serves more than one usancer at a time by communication.Biometrics Theory Biometric acknowledgement technologies (the automatic cognition of individuals establish on natural and/or behavioral characteristics) date back over 50 years to the earliest digital computing frauds. Over the last two decades, biometric assignment devices throw away become faster, twopennyer, and more reli equal, allowing for a variety of application planmes. This course looks at the history, theory, algorithms, applications, and standardiseds of biometric comprehension, including voice, gladiola, face, hand, and leafmark identification.Test protocols, clay design, and defect rate prevision argon discussed, along with the implications of the technology for private privacy. 1. Abstract One of the most sl mop uper issues to solve when building multi-accessible systems, much(prenominal) as computer applications, cars or physical buildings, is to steady down the identicalness of a virtuallyone. A system protecting confidential cultivation, or items of value, puts squ ar security demands on the identification. Biometry provides us with a user-friendly method acting for this identification and is be feeler a competitor for authorized identification mechanisms, especially for electronic transactions.However, there argon ways to compromise a system establish on biometric handicap. This obligate focuses on the d unrefinedbacks and risks of biometric bank check, specifically substantiation base on experiencemarks. It shows how all acc reditedly forthcoming reproduce surveyners sack up be fooled by dummies that atomic number 18 fixd with very circumscribed means and skills. This article should be read as a warning to those thinking of use new methods of identification without commencement examining the secure opportunities for compromising the identification mechanism and the associated legal consequences.This is especially received for quite a little operative with impudent tease since it is quite commonality to monetary fund reproduces on smart cards and due to the developments in solid stir fingermark scanners, integration of a reproduce scanner on a smart card is come-at-able. 2. In workation realisation systems ground on biometrics argon able-bodied of identifying persons on the basis either physical or behavioral characteristics. Currently, there be over ten different techniques ready(prenominal) to identify a person found on biometrics.The hobby techniques ar utilise withi n the main categories physical and behavioural characteristics Behavioral characteristics Physical characteristics keystrokes dynamics iris quotation voice recognition retina recognition signature dynamics vein pattern recognition face recognition recognition of hand or finger geometry finger write recognition Before a system is able to verify the specific biometrics of a person, it of course requires something to comp ar it with. Therefore, a compose or template containing the biometrical properties is stored in the system. Recording the characteristics of a person is called enrolment. In come out to get a profile that corresponds most with truth, the biometrical. characteristics argon scanned several times. In case of reproduce recognition the finger is scanned three to quaternitysome times to get a profile that is independent of variations that lapse in practice, such(prenominal) as the tumble of placement of the finger on the scanner.Since terminus c apacity for the profiles in these systems is usually limited (for archetype if utilize in conspiracy with smart cards), it is common to use selective information compression sooner storing the profile. Storing profiles in tokens requires a combination of token and biostatistics for verification and therefore gives a higher take of security. When a biometrical verification is to occur, a scan of the biometrics of a person is do and comp ard with the characteristics that are stored in the profile. In general, a certain margin of actus reus is allowed amid the observed and stored characteristics. If this margin is too lowly, the system bequeath reject a moral person more often opus if this margin is too large, malicious persons bequeath be accepted by the system.The probabilities that a righteous person pull up stakes be rejected and that a malicious person provide be accepted, are called foolish Reject Rate (FRR) and out of true acquiesce Rate ( removed(p)) extol ively. When using a biometric system, one would of course deficiency to minimise some(prenominal) rates, just now if unfortunately these are not independent. An optimal trade-off amongst FRR and FAR has to be found with respect to the application. 3. Biometric Identification In this chapter the techniques for fingerprint identification will be explored. After explaining the theory of fingerprint verification, all menstruum scanning technologies are describe in more detail. at a time it is known how these scanners identify a person by means of a fingerprint, two methods to counterfeit fingerprints are shown.All additional methods use by scanner manu facturers to prevent counterfeits from being boffo are too draw together with proposed methods how these systems could also be fooled into evaluate dummy fingerprints. The consequences for systems using fingerprint verification are discussed at the end of the chapter. First, an example for fingerprint verification from pra ctice will be given. This example also illustrates how intemperate it can be to find an optimum trade-off between FAR and FRR. From a security blot of view, one would wishing to have the FAR as small as possible. However, for acceptance of a biometry system, a large FRR is worse. Case deep down the car industry a biometric verification system is under evaluation.Manufacturers of expensive cars are considering using fingerprint recognition as a requirement for redness of the engine. To arm once once against car theft, the FAR should be as small as possible. On the opposite(a) hand, suppose that the righteous owner of a car cannot use his car because his fingerprint is rejected (i. e. FRR is too high). He will consider this to be a frequently more serious f fairishness in the system than a technical trial which prevents the car from being started. This is especially true if he compares the returnss of this system with this rejection the advantages are that the number on e wood does not (necessarily) have to have a key to his car and a perception of higher security with respect to theft of his car. Whether indeed the security improves is questionable.Right now, we do not see car thieves trying to write the key of your car, instead they try to by-pass the ignition mechanism where the car key is abstruse. Furthermore, as this article will show, it might precipitate security since it is fairly well-heeled and cheap to copy a fingerprint from a person, even without the person knowing this. 3. 1 Theory of fingerprint verification The scrape on the inside of a finger is covered with a pattern of ridges and valleys. already centuries ago it was studied whether these patterns were different for every(prenominal) individual, and indeed every person is believed to have unique fingerprints. This makes fingerprints suitable for verification of the identity of their owner.Although some fingerprint recognition systems do the comparison on the basis of ac tual recognition of the pattern, most systems use barely specific characteristics in the pattern of ridges. These characteristics are a consequence from the fact that the papillary ridges in the fingerprint pattern are not continuous lines but lines that end, disconnected into forks (called bifurcation), or form an island. These special points are called minutiae and, although in general a fingerprint contains nformer(a) a degree centigrade minutiae, the fingerprint area that is scanned by a detector usually contains about 30 to 40 minutiae. For over hundred years law enforcement agencies all over the world use minutiae to accurately identify persons .For a demonstrable identification that stands in European courts at least 12 minutiae have to be identified in the fingerprint. The choice of 12 minutiae is often referred to as the 12 point rule. This 12 point rule is not based on statistical calculations but is empirically defined based on the assumption that, even when a popula tion of tens of millions of persons are considered, no two persons will have 12 cooccur minutiae in their fingerprints. Most commercial messagely for sale fingerprint scanners give a peremptory match when 8 minutiae are found. Manufacturers submit a FAR of one in a million based on these 8 minutiae, which seems reasonable. 3. 2 fingermark examine Technologies Technologies for scanning fingerprints have evolved over the noncurrent years.The traditional method which is used by law enforcement agencies for over a hundred years now is making a copy of the print that is found at a crime scene or any other location and manually examining it to find minutiae. These minutiae are compared with prints from a entropybase or specific ink prints, which could be interpreted at a later time. This method is of course based on the fact that the person who left the fingerprints is not co-operating by placing his finger on a fingerprint scanner. For systems that are commercially available (and deployed) people are required to co-operate in revision to gain access to any(prenominal) is protected by the verification system. The first extension fingerprint scanners appeared on the market in the mid eighties, so the technology is about fifteen years old.Over the past hardly a(prenominal) years the technology for scanning fingerprints for commercial offers has evolved a lot. spell the first genesis demodulators used optical techniques to scan the finger, current generation sensors are based on a variety of techniques. The following techniques are deployed in commercial products that are presently available Optical sensors with CCD or CMOS cameras inaudible sensors hard state galvanizing subject field sensors Solid state capacitive sensors Solid state temperature sensors The techniques will be described in greater detail in this section. The solid state sensors are so small that they can be construct into virtually any machine.Currently a sensor is in devel opment that will be built in a malleable card the surface of a credit rating card, not exclusively with respect to aloofness and width but also with respect to thickness It is clear that this type of sensor will give a raise to the number of applications using fingerprint technology. (http//cryptome. org/fake-prints. htm) THE trouble Statement of the Problem Encroachment has been an issue in our industry. It could not be intractable unless there are security systems. This development aims to secure every room in any apartment eliminating strangers to get into ones room without the presence of any occupant. This study is further touch with the following issues 1.What are the existing systems used to maintain security of the apartments? 2. What are the problems encountered by the occupants of the apartments? 3. What are the advantages of this flatcar gage trunk among the existing systems? 4. What are the technological features in this flatcar certification formation? S tatistics The number of residential burglaries recorded increased 0. 7% from 27,347 in 2009/2010 to 27,531 in 2010/2011. Burglary (residential) had a clearance rate of 12. 4% during 2010/2011, 1. 6 pctage points rase than that of 2009/2010. Reported Residential Burglary in the Philippines as of 2007 pic epitome 1. 1 Burglary (residential) Graph Significance of the StudyTrespassing has been a concern in our society, to put an end this issue, this flat Security System moldiness be realized. Apartment is the most profitable business establishment businessmen could ever have. Hence, such establishments moldiness be secured all the time. Security systems are not just luxury in an Apartment, it is a fate to maintain security and to be able to prevent from encroachment issues such as burglary, intrusion, theft, etc. If there is security system in the apartment, then both owners and boarders will benefit the system. The boarders will feel palmy sustenance in the apartment with such syst em, and will not encounter encroachment issues, hence the boarders will live peacefully and live longer in that certain apartment.A boarder who stays in the apartment long enough is an indication that he trusted the system that runs in the apartment. So, it is an advantage on the owners side because, aside from the fact that no intruder can get access to his establishment, it is a big income if the boarders stayed longer in his apartment. background knowledge and Limitation The despatch focuses more on the security systems. The give identified the occupants of the apartment by means of fingerprint identification through biometrics. This cipher already exists, the just difference is that the meetinging utilize the system in every room which makes the system expensive enough for it requires every apartment a case-by-case biometrics. The group pilots lone(prenominal) two rooms for conclusion intents.The system is capable of identifying occupants to the extent that it alarm s whenever an intruder r distributivelyed the uttermost tries of fingerprint identifying. The estimate could not offer occupants who are disabled (do not have fingers). RESEARCH METHODOLOGY Methodology is more often than not a guideline for solving a problem, with specific components such as phases, tasks, methods, techniques and tools. The group uses applied research and makes use of divers(a) techniques and tools in conducting this research. Research Environment The group will conduct the survey in the apartment where there are tenants and an owner. The purpose of our survey is to determine what are their concerned about the security of their apartment. Number of apartments and dormitories surveyed 21Number of owners interviewed 3 Number of workers interviewed 18 Number of boarders interviewed degree centigrade Example of apartments and dormitories surveyed Kim Kathleens House for ladies Brgy. Cabancalan, Mandaue City Engr. Bing Momo Europa Apartelle and Dormitory- Brgy. Ca bancalan, Mandaue City Patoy nonpareil Joseph Dormitory Lopez Jaena St. , Mandaue City Maam Earl Joy Pink Dormitory- Brgy. Pitogo Consolacion Dioscor Jamisola Research Respondents The people to be conducted by the group are the apartment tenants and the owner for they are the stakeholder of the system. The group will use the simple haphazard sampling technique in getting the number of respondents.Research Instruments The entropy gathering is employ through the use of the questionnaire and supplemented with some selective information analysis of published, unpublished thesis and some article Research Procedure garner info The group garner the selective information through the formulated questionnaire which was distributed in the apartments, hotel, boarding house and school to identify the views of the respondents. word of Data Based on the questionnaire, the team construct, analyze, and interpret. The team will use the following formula. n = N 1 + N e Where n = test dis tribution size N = population size e = desire margin of error exposition OF TERMS Project invention A project that is being put into reality by a group of designer. Designers A group of individuals that is tasked to develop the project design. ironware The physical components of a computer system, including any peripheral equipment such as printers, modem and mouse. software system Computer chopines are referred to as software. tout Is a unique, attractive, or desirable piazza of a computer syllabus or of a computer or other hardware. Micro statementler A highly co-ordinated chip contains all the components comprising a requireler. Server A computer system that consist of database and other information of it a device that manages network resource. roach A combination of electric or electronics components, interconnected to perform one or more specific functions. Breadboard A fiberboard used by electronic circuit designers to build experimental circuits and protot ypes. put across Is an electrical switch that opens and closes under the control of another electrical circuit. junction transistor Is a semiconductor unit device, comm only when used to exposit or switch electronic polaritys. nonparallel Communication Is the process of sending data one bit at one time, sequentially, over a communication give or computer bus. This is in product line to parallel communication, where all the bits of each symbols are sent together. flow sheet A plat representing the logical sequence in which a combination of steps or achievement is to be perform. computer program Flowchart Describes vivid recordically in detail the logical movement and steps with in a program and the sequence in which these steps are to be executed to the transformation of data to produce the needed outfit. System Flowchart Graphic representation of the procedure involved in converting data or media to data in output form. CHAPTER 2 PRESENTATION, abridgment AND INTE RPRETATION OF DATA This chapter focuses more on the data gathered in order for the proponents to further understand the importance of the project. The gathered data is being analyzed so that the group will be certified of the standards or the expectations of the mass.It is then interpreted by making graphs such as pie graph and bar graph to easily view the results of the conducted survey. The insert 2. 1 shows that most of the groups research respondents are the occupant of the Apartment with fifty eight percent (58%). The group conducted this research in the apartments occupant because they are the ones who will be benefiting the project aside from the Apartment owners. Their opinions and suggestions are very significant in making our project a successful one. The visualize 2. 2 shows that sixty four percent (64%) of the respondents has security systems in their several(prenominal) apartments. But there are thirty six percent (36%) of the respondents who are living in an apa rtment with no security. CHAPTER 3Technical Aspects of the Systems This chapter contains the abstract of the software and components used in the project in order for the readers to examine how the project was made. System Flowchart is the rendering of how the project runs from start to end. The class Flowchart is the interpretation of how the user interfaces with the users. The Block draw is how the project composed of. And the Source Code it is the program used of how the project runs with. pic go out 3. 1 System Flowchart pic foreshadow 3. 2 System Flowchart pic Figure 3. 3 political program Flowchart pic Figure 3. 4 Program Flowchart pic Figure 3. 5 Program Flowchart pic Figure 3. Program Flowchart pic Figure 3. 7 Program Flowchart System Block plot For fingerprint Scanner pic Figure 3. 8 System Block plot For Fingerprint Scanner For the whole system pic Figure 3. 9 System Block Diagram For the whole System Schematic Diagram The schematic diagram is the desi gn which shows how the desire components are being connected to each other. Figure shows the schematic diagram of our design. pic Figure 3. 10 Schematic Diagram Design Components Software Design Proteus 7 ISIS Professional The Proteus Professional demonstration is intended for prospective nodes who wish to evaluate our passkey level products.It differs from Proteus light-headed in that it does not allow you to save, print or design your own microcontroller based designs (you can however write your own software programs to run on the existing test design suite for evaluation), but does include all features offered by the professional system including net angle of inclination based PCB design with auto-placement, auto-routing and graph based simulation .pic Figure 3. 11 Proteus 7 ISIS Professional MikroC The group decided to use MicroC Compiler because it is a C complier for PIC. It is designed to provide the customer with the easiest possible solution for developing applicatio ns for insert system without compromising performance or control. MikroC allows quickly develop and deploy coordination compound applications. pic Figure 3. 12 MikroC VB6. 0 pic Figure 3. 3 VB6. 0 optic basal (VB) is a terce-generation event-driven programming language and integrated development environment (IDE) from Microsoft for its COM programming position first set offd in 1991. Visual rudimentary is designed to be relatively easy to learn and use. Visual Basic was derived from prefatory and enables the rapid application development (RAD) of graphical user interface (GUI) applications, access to databases using Data Access butts, Remote Data Objects, or ActiveX Data Objects, and creation of ActiveX controls and objects. Scripting languages such as VBA and VBScript are syntactically same to Visual Basic, but perform differently.A programmer can put together an application using the components provided with Visual Basic itself. Programs build verbally in Visual Ba sic can also use the Windows API, but doing so requires external function declarations. Though the program has received criticism for its perceived faults, from discrepancy 3 Visual Basic was a runaway commercial success,and many companies offered third party controls greatly extending its functionality. The final release was version 6 in 1998. Microsofts all-inclusive support ended in touch 2008 and the designated successor was Visual Basic . last-place (now known simply as Visual Basic). Hardware Components PIC 16F877A Microcontroller pic Figure 3. 14 PIC 16F877AA PIC (Peripheral Interface Controller) microcontroller is an IC manufactured by Microchip. These ICs are put down computers in a single package. The only external components necessary are whatever is required by the I/O devices that are connected to the PIC. A microcontroller is a small computer and it can only perform simple task. Microcontroller consists of Processor that executes the program Program memory to s tore the program that has been compiled successfully by the programmer. Ram (random-access memory) to store variables. IO Port to connect sensor, keypad, conduct and so on. vitreous silica Oscillator pic Figure 3. 15 Crystal OscillatorAcrystal oscillatoris anelectronic oscillatorcircuit that uses the windup(prenominal)resonanceof a vibratingcrystalofpiezoelectric materialto create an electrical foreshadow with a very precise frequence. This frequency is commonly used to keep runway of time (as inquartz wristwatches), to provide a stableclock planetary housefor digitalintegrated circuits, and to stabilize frequencies for radio transmittersandreceivers. The most common type of piezoelectric resonator used is the quartz crystal, so oscillator circuits designed around them became known as crystal oscillators. Relay pic Figure 3. 16 Relay Arelayis anelectricallyoperatedswitch. Many relays use anelectromagnetto operate a switching mechanism mechanically, but other operating pr inciples are also used.Relays are used where it is necessary to control a circuit by a low-power signal (with thoroughgoing(a) electrical isolation between control and controlled circuits), or where several circuits must be controlled by one signal. The first relays were used in long maintain telegraph circuits, repeating the signal coming in from one circuit and re-transmitting it to another. Relays were used extensively in tele peal ex careens and early(a) computers to perform logical appendages. Resistor pic Figure 3. 17 Resistor Typical 10K ohm, 1/4 watt resistor that can be used with various circuits. The vividness band on the resistor is Brown, Black, Orange, Gold. diode pic Figure 3. 18 DiodeDiodes allow electricity to flow in only one instruction. The arrow of the circuit symbol shows the direction in which the current can flow. Diodes are the electrical version of a valve and early diodes were actually called valves. Regulator pic Figure 3. 19 Regulator Encapsulat ed in a single chip/package (IC), the7805is a arbitrary emf DCregulatorthat has only 3 terminals. They are Input voltage, Ground, fruit Voltage. Transistor pic Figure 3. 20 Transistor Transistor is a CURRENT operated device which has a very large union of current (Ic) which flows without restraint through the device between thecollectorand emitter terminals.But this is only possible if a small amount of biasing current (Ib) ispresentin the base terminal of the transistor making the base to act as a current control input. LED (Light Emitting Diode) pic Figure 3. 21 LED A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator lamps in many devices, and are increasingly used for lighting. Introduced as a practical electronic component in 1962,2 early LEDs emitted low-intensity red light, but upstart versions are available across the visible, unseeable and infrared wavelengths, with very high brightness. DCU 11 pic Figure 3. 22 DCU 11 The contra st incorporates a bitchr port to charge the phone while the cable is in use, and your phones built-in modem brings the meshing and email to your PC.The widely accepted USB standard and high-speed data transfer make this cable the ideal link from your phone to your PC. USB connector Fingerprint Scanner pic Figure 3. 23 Fingerprint Scanner Fingerprint recognitionorfingerprint assay-markrefers to theautomatedmethod of verifying a match between two valet de chambrefingerprints. Fingerprints are one of many forms ofbiometricsused toidentifyindividuals andverifytheiridentity. This article touches on two major classes ofalgorithms(minutia and pattern) and foursensordesigns (optical, ultrasonic, passive capacitance, and active capacitance). baron Supply pic Figure 3. 24 function Supply Apower generateis a device that supplieselectrical slide fastenerto one or moreelectric loads.The term is most commonly applied to devices that convert one form of electrical energy to another, thoug h it may also refer to devices that convert another form of energy (e. g. , mechanical, chemical, solar) to electrical energy. A correct power supplyis one that controls the output voltage or current to a specific value the controlled value is held more or less constant despite variations in either load current or the voltage supplied by the power supplys energy source. Program Source Code MikroC char ch void main() PORTB = 0x00 TRISB = 0x00 TRISC = 0x80 PORTC = 0 Usart_Init(9600) delay_ms(100) while(1) if(Usart_Data_Ready()) ch = Usart_Read() if(ch == 1) PORTC. F0 = 1 elay_ms(5000) PORTC. F0 = 0 ch= if(ch == 2) PORTC. F1 = 1 delay_ms(8000) PORTC. F1 = 0 ch= PORTB = 0x00 VB6. 0 Enrollment slow WithEvents Capture As DPFPCapture silent take inFtrs As DPFPFeatureExtraction blackened CreateTempl As DPFPEnrollment sluggish ConvertSample As DPFPSampleConversion one-on-one gun Draw notion(ByVal Pict As I beliefDisp) mustiness use hidden PictureBox to easily size picture . cook HiddenPict. Picture = Pict Picture1. PaintPicture HiddenPict. Picture, _ 0, 0, Picture1. Scalelargeness, _ Picture1. ScaleHeight, _ 0, 0, HiddenPict. Scalelargeness, _ HiddenPict. ScaleHeight, vbSrcCopy Picture1. Picture = Picture1. find sack shade secret deputise ReportStatus(ByVal str As take out) Status. amplifyItem (str) Add string to list buffet. Status. ListIndex = Status. tenderIndex Move list stroke selection down. stopping point hoagy buck private stand in rigorous_Click() Capture. StopCapture Stop obtain operation. destroy Me shoemakers last chock hole-and-corner(a) torpedo Form_Load() circle Capture = raw DPFPCapture Create vex operation. Capture. StartCapture Start capture operation. slew CreateFtrs = bare-assed DPFPFeatureExtraction Create DPFPFeatureExtraction object. heap CreateTempl = forward-looking DPFPEnrollment Create DPFPEnrollment object. Samples. provide = CreateTempl.FeaturesNeeded sharpen number of samples needed. localise ConvertSample = New DPFPSampleConversion Create DPFPSampleConversion object. curio electric ray mystic wedge heel Capture_OnReaderConnect(ByVal ReaderSerNum As String) ReportStatus (The fingerprint reader was connected. ) stop hitman personal pigboat Capture_OnReaderDisconnect(ByVal ReaderSerNum As String) ReportStatus (The fingerprint reader was disconnected. ) intercept grinder closed-door mill Capture_OnFingerTouch(ByVal ReaderSerNum As String) ReportStatus (The fingerprint reader was touched. ) closing hero close cuneus Capture_OnFingerGone(ByVal ReaderSerNum As String) ReportStatus (The finger was removed from the fingerprint reader. ) finish up interchange personal pigboat Capture_OnSampleQuality(ByVal ReaderSerNum As String, ByVal Feedback As DPFPCaptureFeedbackEnum) If Feedback = CaptureFeedbackGood so ReportStatus (The quality of the fingerprint sample is good. ) Else ReportStatus (The quality of the fingerprint sample is poor. ) terminal If curio fill in confidential molar Capture_OnComplete(ByVal ReaderSerNum As String, ByVal Sample As Object) sinister Feedback As DPFPCaptureFeedbackEnum ReportStatus (The fingerprint sample was captured. ) Draw fingerprint see to it. DrawPicture ConvertSample. ConvertToPicture(Sample) Process sample and create feature set for purpose of enrollment. Feedback = CreateFtrs.CreateFeature cut back(Sample, DataPurposeEnrollment) Quality of sample is not good enough to produce feature set. If Feedback = CaptureFeedbackGood and then ReportStatus (The fingerprint feature set was created. ) Prompt. supply = Touch the fingerprint reader again with the same finger. Add feature set to template. CreateTempl. AddFeatures CreateFtrs. Feature mass present number of samples needed to complete template. Samples. supply = CreateTempl. FeaturesNeeded If Val(Samples. Caption) = 0 so processor. Picture1. subgross = neat Else MainFrame. Picture1. distinct = fictional lay off If Check if template has been created. If CreateTempl. scoutStatus = usherStatus guidebookReady thusly MainFrame. rightTemplete CreateTempl. Template Template has been created, so stop capturing samples. Capture. StopCapture Prompt. Caption = Click polish, and then click Fingerprint handicap. MsgBox The fingerprint template was created. quit If bar If suppress zep tete-a-tete bomber Form_ dispatch(Cancel As integer) Capture. StopCapture Stop capture operation quit make out frmFlash Option graphic Dim i As Integer head-to-head defend mill recreation Lib kernel32 (ByVal dwMilliseconds As foresightful) snobbish hoagie Form_Activate() For i = 0 To 10 i = i + 1 Sleep (500) Me. Refresh close fire Me frmStandbyMode. maneuver extirpate zep frmInventory clubby move ConnectDB() As String ConnectDB = number one wood=MySQL ODBC 5. 1 Driver horde = localhost DATABASE = db_AMASS drug user = ascendent PASSWORD = closedown contribution tete-a-tete hired gun cmdPayDue _Click() align rsPay = New ADODB. Recordset rsPay. CursorLocation = adUseClient rsPay. CursorType = ad generateDynamic rsPay. LockType = adLockOptimistic rsPay. exonerated train * FROM tbl_registration, ConnectDB rsPay. untied select * from tbl_registration where FullName = &038 txtPay. school text &038 , ConnectDB If rsPay. EOF = ill-judged and then With rsPay rsPay. MoveFirst While rsPay. EOF = ill-considered If txtPay. schoolbook = rsPay FullName then If MsgBox(Continue paying his due? , vbInformation + vbYesNo, Apartment monitor and Security System remunerative Due) = vbYes then rsPay ToPay = rsPay ToPay + rsPay Payment rsPay. modify List_Unpaid. make water mobilise query_list rsPay. MoveNext Else rsPay. MoveNext goal If Else rsPay. MoveNext eat up If Wend send away With finale If bar gun for hire orphic wedge cmdPrint_Click() aim rst = New ADODB. Recordset rst. CursorLocation = adUseClient rst. CursorType = ad cave inDynamic rst. LockType = adLoc kOptimistic rst. heart-to-heart select * from tbl_registration, ConnectDB prepare customerReport. DataSource = rst. DataSource customerReport. Report breadth = 6000 GuestReport. constitute conclusion gun for hire hugger-mugger gunman cmdPrintLogs_Click() imbed rst = New ADODB. Recordset rst. CursorLocation = adUseClient rst. CursorType = ad splayDynamic rst. LockType = adLockOptimistic rst. disseminate select * from tbl_logs where FullName = &038 txtPay. schoolbook &038 , ConnectDB If rst. EOF = put on because solidifying GuestLogs. DataSource = rst. DataSource GuestLogs. Report comprehensiveness = 5000 GuestLogs. study extirpate If End hero sandwich occult fill in Command1_Click() dismiss Me Load MainFrame End hitman clubby deputise Form_Load() txtPay. school text = isthmus rsViewInventory = New ADODB. Recordset rsViewInventory. CursorLocation = adUseClient rsViewInventory. CursorType = adOpenDynamic rsViewInventory. LockType = adLockOptimistic rsViewInven tory.Open fill * FROM tbl_registration ORDER BY RoomNumber ASC, ConnectDB stage set dgGuestInventory. DataSource = rsViewInventory frmInventory. dgGuestInventory. Columns(0). evident = wild frmInventory. dgGuestInventory. Columns(2). clear = inconclusive frmInventory. dgGuestInventory. Columns(5). panoptic = fabricated frmInventory. dgGuestInventory. Columns(7). microscopical = inconclusive frmInventory. dgGuestInventory. Columns(8). ocular = trumped-up(prenominal) frmInventory. dgGuestInventory. Columns(1). Width = 2200 frmInventory. dgGuestInventory. Columns(3). Width = 1900 frmInventory. dgGuestInventory. Columns(4). Width = 1600 frmInventory. dgGuestInventory. Columns(6). Width = 1200 If rsViewInventory.EOF = spurious because With rsViewInventory rsViewInventory. MoveFirst While rsViewInventory. EOF = imitation If rsViewInventory. EOF = misguided then txtBayadHolder. textual matter = rsViewInventory ToPay txtBayadUtang. school text = Val(txtBayadUtang. textua l matter) + Val(txtBayadHolder. textbook) rsViewInventory ToPay rsViewInventory. MoveNext End If Wend End With Dim rs modifyNah As New ADODB. Recordset rsupdateNah. CursorLocation = adUseClient rsUpdateNah. CursorType = adOpenDynamic rsUpdateNah. LockType = adLockOptimistic rsUpdateNah. Open SELECT * FROM tbl_inventory, ConnectDB If txtBayadUtang. textbook = rsUpdateNah Total therefore txtBayadUtang. textbook = Php &038 FormatNumber(rsUpdateNah Total) Else Dim rsUpdateNahh As New ADODB. Recordset rsUpdateNahh. CursorLocation = adUseClient rsUpdateNahh. CursorType = adOpenDynamic rsUpdateNahh. LockType = adLockOptimistic rsUpdateNahh. Open SELECT * FROM tbl_inventory, ConnectDB rsUpdateNahh Total = txtBayadUtang. text edition rsUpdateNahh. Update rsUpdateNahh. cobblers last txtBayadUtang. school text = Php &038 FormatNumber(txtBayadUtang. text edition) End If End If inflict query_list End hired gun head-to-head wedge txtPay_Change() If txtPay. textbook accordingly cmdP ayDue. Enabled = align cmdPrintLogs. Enabled = certain End If End hero sandwich commonplace government agency query_list() Dim rsViewUnpaid As New ADODB. Recordset rsViewUnpaid.CursorLocation = adUseClient rsViewUnpaid. CursorType = adOpenDynamic rsViewUnpaid. LockType = adLockOptimistic rsViewUnpaid. Open SELECT * FROM tbl_registration, ConnectDB If rsViewUnpaid. EOF = wild and so With rsViewUnpaid List_Unpaid. AddItem Names &038 vbTab &038 vbTab &038 vbTab &038 To Pay List_Unpaid. AddItem rsViewUnpaid. MoveFirst While rsViewUnpaid. EOF = False If rsViewUnpaid ToPay = 0 thus txtBayadHolder. schoolbook = rsViewUnpaid FirstName &038 &038 rsViewUnpaid LastName &038 vbTab &038 vbTab &038 Php &038 FormatNumber(rsViewUnpaid Payment) List_Unpaid. AddItem txtBayadHolder. textbook rsViewUnpaid. MoveNext Else rsViewUnpaid.MoveNext End If Wend End With End If End position frmLogin esoteric Declare Function sndPlaySound Lib winmm. dll Alias sndPlaySoundA _ (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long Const SND_SYNC = &038H0 Const SND_NODEFAULT = &038H2 Private Function ConnectDB() As String ConnectDB = DRIVER=MySQL ODBC 5. 1 Driver SERVER = localhost DATABASE = db_AMASS USER = report PASSWORD = End Function Private step in cmdCancel_Click() Unload Me frmStandbyMode. Enabled = True frmStandbyMode. read End Sub Private Sub Form_Load() frmStandbyMode. Enabled = False End Sub Private Sub cmdOK_Click() amaze record clipAccount = New ADODB. Recordset ecord boundAccount. CursorLocation = adUseClient recordSetAccount. CursorType = adOpenDynamic recordSetAccount. LockType = adLockOptimistic recordSetAccount. Open tbl_account, ConnectDB If (frmLogin. txtUserName. school text = And frmLogin. txtPassword. textual matter = ) because Unload frmLogin Unload frmStandbyMode MainFrame. mnuSearchGuest. Enabled = False MainFrame. mnuAddGuest. Enabled = False MainFrame. manifest ElseIf recordSetAccount. EOF = False because If frmLogin. txtPassword. text = thus wakelessfile$ = CProgram FilesTitanium beatkeepersoundsaccess_denied. wav wFlags% = SND_ASYNC Or SND_NODEFAULT sound = sndPlaySound(soundfile$, wFlags%)MsgBox Please input your password. Try again , , Login frmLogin. txtPassword. SetFocus ElseIf not frmLogin. txtPassword. schoolbook = recordSetAccount Password whence soundfile$ = CProgram FilesTitaniumTimekeepersoundsaccess_denied. wav wFlags% = SND_ASYNC Or SND_NODEFAULT sound = sndPlaySound(soundfile$, wFlags%) MsgBox Incorrect password. Try again , , Login frmLogin. txtPassword. SetFocus frmLogin. txtPassword. SelStart = 0 frmLogin. txtPassword. SelLength = Len(frmLogin. txtPassword. text) ElseIf (frmLogin. txtUserName. textbook = recordSetAccount UserName And frmLogin. txtPassword. textual matter = recordSetAccountPassword) Then Unload frmLogin Unload frmStandbyMode MainFrame. luff End If Else soundfile$ = CProgram FilesTitaniumTimekeepersoundsaccess_denied. wav wFlags% = SND_ASYNC Or SND_NODEFAULT sound = s ndPlaySound(soundfile$, wFlags%) MsgBox Not a valid account. Try again , , Login frmLogin. txtUserName. SetFocus frmLogin. txtUserName. SelStart = 0 frmLogin. txtUserName. SelLength = Len(frmLogin. txtUserName. text) End If End Sub frmStanbyMode Private Sub mnu sack_Click() If MsgBox( be you sure you destiny to mercantile establishment program? , vbYesNo + vbInformation, Apartment supervise and Security System) = vbYes Then Timer1. Enabled = True End IfEnd Sub Private Sub mnuLogin_Click() frmLogin. gift End Sub Private Sub Timer1_Timer() Label1. microscopical = True ProgressBar1. telescopic = True If ProgressBar1. take account >= ProgressBar1. pocket Then End End If ProgressBar1. Value = ProgressBar1. Value + 1 End Sub MainFrame Dim Templ As DPFPTemplate Private Function ConnectDB() As String ConnectDB = DRIVER=MySQL ODBC 5. 1 Driver SERVER = localhost DATABASE = db_AMASS USER = root PASSWORD = End Function Private Sub cboRoomChoice_Click() If cboRoomChoice. school text = thrift Then txtIdHolder. schoolbook = 1500 ElseIf cboRoomChoice. textual matter = threadbare Then txtIdHolder. school text = 2000 ElseIf cboRoomChoice. school text = Family Then txtIdHolder. school text = 2500 End If End Sub Private Sub cboRoomNumberDel_Click() dgGuest redact. circumpolar = True Set recordSetDelete = New ADODB. Recordset recordSetDelete. CursorLocation = adUseClient recordSetDelete. CursorType = adOpenDynamic recordSetDelete. LockType = adLockOptimistic recordSetDelete. Open SELECT * FROM tbl_registration WHERE RoomNumber = &038 cboRoomNumberDel. textbook &038 , ConnectDB Set dgGuestDelete. DataSource = recordSetDelete MainFrame. dgGuestDelete. Columns(0). palpable = False MainFrame. dgGuestDelete. Columns(2). obvious = False MainFrame. dgGuestDelete. Columns(7). macroscopical = False MainFrame. dgGuestDelete.Columns(8). megascopic = False MainFrame. dgGuestDelete. Columns(1). Width = 2200 MainFrame. dgGuestDelete. Columns(3). Width = 1800 MainFrame. dgGuestDelete. Columns(4). Width = 1800 MainFrame. dgGuestDelete. Columns(6). Width = 1600 MainFrame. dgGuestDelete. Columns(8). Width = 3200 If recordSetDelete. EOF True Then img_box_del. gross = True img_box_del. Picture = LoadPicture(recordSetDelete Picture) cmdDeletee. seeable = True cmd burnt. in sight = True cmdOpenSesame. telescopic = True Else MsgBox This room has no invitee yet. , vbInformation, Apartment monitor and Security System img_box_del. telescopic = False cmdOpenSesame. megascopic = False End If If recordSetDelete. EOF True Then MainFrame. txtIdHolder. textbook = recordSetDelete RoomNumber End If End Sub Private Sub cmdBrowse_Click() CommonDialog1. denominateOpen txtFilePathPic. textual matter = CommonDialog1. FileName imgbox. Picture = LoadPicture(txtFilePathPic. text) imgbox. visible = True End Sub Private Sub cmd straighten out_Click() constitute overhear End Sub Private Sub cmdDeletee_Click() Set rsDelete = New ADODB. Recordset rsDelete. CursorLocatio n = adUseClient rsDelete. CursorType = adOpenDynamic rsDelete. LockType = adLockOptimistic rsDelete. Open SELECT * FROM tbl_registration WHERE FullName = &038 MainFrame. txtSearch. textbook &038 , ConnectDBIf MsgBox(Are you sure you want to blue-pencil this Guest?. , vbYesNo + vbInformation, Delete check) = vbYes Then rsDelete. Delete MsgBox Guest has been successfully deleted. , vbInformation, Apartment Monitoring and Security System Set dgGuestDelete. DataSource = nonentity entreat Clear End If End Sub Private Sub cmdEditt_Click() Call Clear frameSearchGuest. in sight = False frame pictureGuest. Visible = True frameRegisterGuest. Caption = Edit here save. Visible = False Dim rsEditGuestt As New ADODB. Recordset rsEditGuestt. CursorLocation = adUseClient rsEditGuestt. CursorType = adOpenDynamic rsEditGuestt. LockType = adLockOptimistic rsEditGuestt.Open SELECT * FROM tbl_registration WHERE FullName = &038 MainFrame. txtSearch. Text &038 , ConnectDB txtFirstName. Text = rsE ditGuestt FirstName txtLastName. Text = rsEditGuestt LastName cbo sexual activity. Text = rsEditGuestt Gender cboRoomChoice. Text = rsEditGuestt RoomChoice cboRoomNumber. Text = rsEditGuestt RoomNumber txtFilePathPic. Text = rsEditGuestt Picture cmdUpdateNah. Visible = True End Sub Private Sub cmdOpenSesame_Click() Set rsOpen = New ADODB. Recordset rsOpen. CursorLocation = adUseClient rsOpen. CursorType = adOpenDynamic rsOpen. LockType = adLockOptimistic rsOpen. Open SELECT * FROM tbl_registration WHERE RoomNumber = &038 MainFrame. txtIdHolder. Text &038 , ConnectDB ritePort rsOpen RoomNumber End Sub Private Sub cmdUpdateNah_Click() Dim rsUpdateNah As New ADODB. Recordset rsUpdateNah. CursorLocation = adUseClient rsUpdateNah. CursorType = adOpenDynamic rsUpdateNah. LockType = adLockOptimistic rsUpdateNah. Open tbl_registration WHERE FullName = &038 MainFrame. txtSearch. Text &038 , ConnectDB If MsgBox(Are you sure you want to update this Guest?. , vbYesNo + vbInformation, Update V erification) = vbYes Then rsUpdateNah templates = Templ. arrange rsUpdateNah FirstName = txtFirstName. Text rsUpdateNah LastName = txtLastName. Text rsUpdateNah Fullname = txtFirstName. Text &038 &038 txtLastName.Text rsUpdateNah Gender = cboGender. Text rsUpdateNah RoomChoice = cboRoomChoice. Text rsUpdateNah RoomNumber = cboRoomNumber. Text rsUpdateNah Picture = txtFilePathPic. Text rsUpdateNah Complete checkStarted = Format(cboMonthStarted. Text &038 / &038 cboDateStarted &038 / &038 cboYearStarted. Text, mm/dd/yyyy) rsUpdateNah CompleteDueDate = Format(cboDueMonth. Text &038 / &038 cboDueDate. Text &038 / &038 cboDueYear. Text, mm/dd/yyyy) rsUpdateNah. Update rsUpdateNah. Close MsgBox Guest has successfully Updated. , vbOnly, Apartment Monitoring and Security System Call Clear End If End Sub Private Sub cme congestAdd_Click() frameRegisterGuest.Visible = False End Sub Private Sub Command2_Click() Dim rsinviteeview As New ADODB. Recordset If mskDateStarted. Text Then Set rsgu estview = New ADODB. Recordset rsguestview. CursorLocation = adUseClient rsguestview. LockType = adLockOptimistic rsguestview. CursorType = adOpenDynamic rsguestview. Open engage * from tbl_logs where Date= &038 mskDateStarted &038 , ConnectDB Set DataGrid1. DataSource = rsguestview MainFrame. DataGrid1. Columns(0). Width = 2200 Set rsguestview = Nothing End If End Sub Private Sub Enroll_Click() Enrollment. Show vbModal, Me End Sub Public Function GetTemplate() As Object Template can be empty. If so, then returns Nothing.If Templ Is Nothing Then Else Set GetTemplate = Templ End If End Function Public Sub SetTemplete(ByVal Template As Object) Set Templ = Template End Sub Private Sub Form_Load() Call Clear Call View Dim espy() As Byte Dim rs As New ADODB. Recordset rs. CursorLocation = adUseClient rs. CursorType = adOpenDynamic rs. LockType = adLockOptimistic rs. Open train * from tbl_registration, ConnectDB blob = rs templates set raw image from MySQL database If Templ Is Nothin g Then convert raw image to picture Set Templ = New DPFPTemplate Templ. Deserialize blob End If End SubPrivate Sub mnuAddGuest_Click() Call Clear flag = 1 save. Visible = True frameRegisterGuest. Caption = Register here frameRegisterGuest. Visible = True frameSearchGuest. Visible = False frameViewGuest. Visible = False cmdUpdateNah. Visible = False End Sub Private Sub mnuChangeUser_Click() If MsgBox(Are you sure you want to logout and change user? , vbYesNo + vbInformation, Apartment Monitoring and Security System) = vbYes Then Unload Me frmStandbyMode. Show frmLogin. Show End If End Sub Private Sub mnuEditGuest_Click() frameEditGuest. Show End Sub Private Sub mnuInventory_Click() frmInventory. Show End Sub Private Sub mnuLogout_Click()If MsgBox(Are you sure you want to exit program? , vbYesNo + vbInformation, Apartment Monitoring and Security System) = vbYes Then closePort Unload Me frmStandbyMode. Show End If End Sub Private Sub mnuSearchGuest_Click() frameSearchGuest. Visible = True frameRegisterGuest. Visible = False frameViewGuest. Visible = False txtSearch. Text = cboRoomNumberDel. Text = cmdEditt. Visible = False cmdDeletee. Visible = False cmdOpenSesame. Visible = False img_box_del. Visible = False dgGuestDelete. Visible = False End Sub Private Sub mnuViewGuest_Click() Call View End Sub Private Sub ReadTemplate_Click() Dim blob() As Byte CommonDialog1. drivel = Fingerprint Template File*. fpt Set dialogue box so an error occurs if dialog box is cancelled. CommonDialog1. CancelError = True On Error scoop out Next Show Open dialog box. CommonDialog1. ShowOpen If Err Then This jurisprudence runs if dialog box was cancelled. Exit Sub End If Read double star data from file. Open CommonDialog1. FileName For binary program program star program program As 1 ReDim blob(LOF(1)) Get 1, , blob() Close 1 Template can be empty, it must be created first. If Templ Is Nothing Then Set Templ = New DPFPTemplate Import binary data to template. Templ. Des erialize blob End Sub Private Sub save_Click() Dim rsAddGuest As New ADODB. Recordset rsAddGuest.CursorLocation = adUseClient rsAddGuest. CursorType = adOpenDynamic rsAddGuest. LockType = adLockOptimistic rsAddGuest. Open tbl_registration, ConnectDB If txtFirstName. Text = Or txtLastName. Text = Or cboGender. Text = Or cboRoomChoice. Text = Or cboRoomNumber. Text = Or txtFilePathPic. Text = Or cboMonthStarted. Text = Or cboDateStarted. Text = Or cboYearStarted. Text = Or cboDueMonth. Text = Or cboDueDate. Text = Or cboDueYear. Text = Then MsgBox Missing Fields. , vbCritical + vbInformation, Apartment Monitoring and Security System Else If MsgBox(Are you sure you want to add this Guest?. , vbYesNo + vbInformation, Delete Verification) = vbYes Then rsAddGuest. AddNew rsAddGuest templates = Templ. Serialize rsAddGuest FirstName = txtFirstName. Text rsAddGuest LastName = txtLastName. Text rsAddGuest Fullname = txtFirstName. Text &038 &038 txtLastName. Text rsAddGuest Gende r = cboGender. Text rsAddGuest RoomChoice = cboRoomChoice. Text rsAddGuest RoomNumber = cboRoomNumber. Text rsAddGuest Picture = txtFilePathPic. Text rsAddGuest CompleteDateStarted = Format(cboMonthStarted. Text &038 / &038 cboDateStarted. Text &038 / &038 cboYearStarted. Text, mm/dd/yyyy) rsAddGuest CompleteDueDate = Format(cboDueMonth. Text &038 / &038 cboDueDate. Text &038 / &038 cboDueYear.Text, mm/dd/yyyy) rsAddGuest Payment = txtIdHolder. Text rsAddGuest. Update rsAddGuest. Close Call Clear MsgBox Guest has successfully Added. , vbOnly, Apartment Monitoring and Security System End If End If End Sub Private Sub SaveTemplate_Click() Dim blob() As Byte First verify that template is not empty. If Templ Is Nothing Then MsgBox You must create a fingerprint template before you can save it. Exit Sub End If CommonDialog1. Filter = Fingerprint Template File*. fpt Set dialog box so an error occurs if dialog box is cancelled. CommonDialog1. CancelError = True On Error Resume Next Show Save As dialog box. CommonDialog1. ShowSaveIf Err Then This code runs if the dialog box was cancelled. Exit Sub End If Export template to binary data. blob = Templ. Serialize Save binary data to file. Open CommonDialog1. FileName For double star As 1 Put 1, , blob Close 1 End Sub Private Sub Timer1_Timer() lblDate. Caption = Format(Date, Long Date) lblTime. Caption = Format(Time, Long Time) End Sub Private Sub Verify_Click() First verify that template is not empty. If Templ Is Nothing Then MsgBox You must create fingerprint template before you can perform verification. Exit Sub End If Show Fingerprint Verification dialog box. Verification. Show vbModal, Me End SubPublic Function Clear() txtFirstName. Text = txtLastName. Text = txtFilePathPic. Text = cboGender. Text = cboRoomChoice. Text = cboRoomNumber. Text = cboMonthStarted. Text = cboDateStarted. Text = cboYearStarted. Text = cboDueMonth. Text = cboDueDate. Text = cboDueYear. Text = cboRoomNumberDel. Text = im gbox. Visible = False img_box_del. Visible = False frameRegisterGuest. Visible = False frameSearchGuest. Visible = False End Function Public Function View() frameRegisterGuest. Visible = False frameSearchGuest. Visible = False frameViewGuest. Visible = True Set rsViewGuest = New ADODB. Recordset rsViewGuest.CursorLocation = adUseClient rsViewGuest. CursorType = adOpenDynamic rsViewGuest. LockType = adLockOptimistic rsViewGuest. Open SELECT * FROM tbl_registration ORDER BY RoomNumber ASC, ConnectDB Set dgGuestView. DataSource = rsViewGuest MainFrame. dgGuestView. Columns(0). Visible = False MainFrame. dgGuestView. Columns(2). Visible = False MainFrame. dgGuestView. Columns(5). Visible = False MainFrame. dgGuestView. Columns(7). Visible = False MainFrame. dgGuestView. Columns(8). Visible = False MainFrame. dgGuestView. Columns(1). Width = 2200 MainFrame. dgGuestView. Columns(3). Width = 1900 MainFrame. dgGuestView. Columns(4). Width = 1600 MainFrame. dgGuestView.Columns(6). Width = 12 00 Set rsViewGuest = Nothing End Function Verification Dim Templ As DPFPTemplate Private Function ConnectDB() As String ConnectDB = DRIVER=MySQL ODBC 5. 1 Driver SERVER = localhost DATABASE = db_AMASS USER = root PASSWORD = End Function Private Sub cboRoomChoice_Click() If cboRoomChoice. Text = Economy Then txtIdHolder. Text = 1500 ElseIf cboRoomChoice. Text = Standard Then txtIdHolder. Text = 2000 ElseIf cboRoomChoice. Text = Family Then txtIdHolder. Text = 2500 End If End Sub Private Sub cboRoomNumberDel_Click() dgGuestDelete. Visible = True Set recordSetDelete = New ADODB. Recordset recordSetDelete.CursorLocation = adUseClient recordSetDelete. CursorType = adOpenDynamic recordSetDelete. LockType = adLockOptimistic recordSetDelete. Open SELECT * FROM tbl_registration WHERE RoomNumber = &038 cboRoomNumberDel. Text &038 , ConnectDB Set dgGuestDelete. DataSource = recordSetDelete MainFrame. dgGuestDelete. Columns(0). Visible = False MainFrame. dgGuestDelete. Columns(2). Visible = F alse MainFrame. dgGuestDelete. Columns(7). Visible = False MainFrame. dgGuestDelete. Columns(8). Visible = False MainFrame. dgGuestDelete. Columns(1). Width = 2200 MainFrame. dgGuestDelete. Columns(3). Width = 1800 MainFrame. dgGuestDelete. Columns(4). Width = 1800MainFrame. dgGuestDelete. Columns(6). Width = 1600 MainFrame. dgGuestDelete. Columns(8). Width = 3200 If recordSetDelete. EOF True Then img_box_del. Visible = True img_box_del. Picture = LoadPicture(recordSetDelete Picture) cmdDeletee. Visible = True cmdEditt. Visible = True cmdOpenSesame. Visible = True Else MsgBox This room has no guest yet. , vbInformation, Apartment Monitoring and Security System img_box_del. Visible = False cmdOpenSesame. Visible = False End If If recordSetDelete. EOF True Then MainFrame. txtIdHolder. Text = recordSetDelete RoomNumber End If End Sub Private Sub cmdBrowse_Click() CommonDialog1. ShowOpen xtFilePathPic. Text = CommonDialog1. FileName imgbox. Picture = LoadPicture(txtFilePathPic. Text) im gbox. Visible = True End Sub Private Sub cmdClear_Click() Call Clear End Sub Private Sub cmdDeletee_Click() Set rsDelete = New ADODB. Recordset rsDelete. CursorLocation = adUseClient rsDelete. CursorType = adOpenDynamic rsDelete. LockType = adLockOptimistic rsDelete. Open SELECT * FROM tbl_registration WHERE FullName = &038 MainFrame. txtSearch. Text &038 , ConnectDB If MsgBox(Are you sure you want to delete this Guest?. , vbYesNo + vbInformation, Delete Verification) = vbYes Then rsDelete. Delete MsgBox Guest has been successfully deleted. , vbInformation, Apartment Monitoring and Security System Set dgGuestDelete. DataSource = Nothing Call Clear End If End Sub Private Sub cmdEditt_Click() Call Clear frameSearchGuest. Visible = False frameRegisterGuest. Visible = True frameRegisterGuest. Caption = Edit here save. Visible = False Dim rsEditGuestt As New ADODB. Recordset rsEditGuestt. CursorLocation = adUseClient rsEditGuestt. CursorType = adOpenDynamic rsEditGuestt. LockType = adL ockOptimistic rsEditGuestt. Open SELECT * FROM tbl_registration WHERE FullName = &038 MainFrame. txtSearch. Text &038 , ConnectDB txtFirstName. Text = rsEditGuestt FirstName txtLastName. Text = rsEditGuestt LastName cboGender.Text = rsEditGuestt Gender cboRoomChoice. Text = rsEditGuestt RoomChoice cboRoomNumber. Text = rsEditGuestt RoomNumber txtFilePathPic. Text = rsEditGuestt Picture cmdUpdateNah. Visible = True End Sub Private Sub cmdOpenSesame_Click() Set rsOpen = New ADODB. Recordset rsOpen. CursorLocation = adUseClient rsOpen. CursorType = adOpenDynamic rsOpen. LockType = adLockOptimistic rsOpen. Open SELECT * FROM tbl_registration WHERE RoomNumber = &038 MainFrame. txtIdHolder. Text &038 , ConnectDB writePort rsOpen RoomNumber End Sub Private Sub cmdUpdateNah_Click() Dim rsUpdateNah As New ADODB. Recordset rsUpdateNah. CursorLocation = adUseClient rsUpdateNah.CursorType = adOpenDynamic rsUpdateNah. LockType = adLockOptimistic rsUpdateNah. Open tbl_registration WHERE FullNam e = &038 MainFrame. txtSearch. Text &038 , ConnectDB If MsgBox(Are you sure you want to update this Guest?. , vbYesNo + vbInformation, Update Verification) = vbYes Then rsUpdateNah templates = Templ. Serialize rsUpdateNah FirstName = txtFirstName. Text rsUpdateNah LastName = txtLastName. Text rsUpdateNah Fullname = txtFirstName. Text &038 &038 txtLastName. Text rsUpdateNah Gender = cboGender. Text rsUpdateNah RoomChoice = cboRoomChoice. Text rsUpdateNah RoomNumber = cboRoomNumber. Text rsUpdateNah Picture = txtFilePathPic. Text sUpdateNah CompleteDateStarted = Format(cboMonthStarted. Text &038 / &038 cboDateStarted &038 / &038 cboYearStarted. Text, mm/dd/yyyy) rsUpdateNah CompleteDueDate = Format(cboDueMonth. Text &038 / &038 cboDueDate. Text &038 / &038 cboDueYear. Text, mm/dd/yyyy) rsUpdateNah. Update rsUpdateNah. Close MsgBox Guest has successfully Updated. , vbOnly, Apartment Monitoring and Security System Call Clear End If End Sub Private Sub cmeExitAdd_Click() frameRegister Guest. Visible = False End Sub Private Sub Command2_Click() Dim rsguestview As New ADODB. Recordset If mskDateStarted. Text Then Set rsguestview = New ADODB. Recordset sguestview. CursorLocation = adUseClient rsguestview. LockType = adLockOptimistic rsguestview. CursorType = adOpenDynamic rsguestview. Open Select * from tbl_logs where Date= &038 mskDateStarted &038 , ConnectDB Set DataGrid1. DataSource = rsguestview MainFrame. DataGrid1. Columns(0). Width = 2200 Set rsguestview = Nothing End If End Sub Private Sub Enroll_Click() Enrollment. Show vbModal, Me End Sub Public Function GetTemplate() As Object Template can be empty. If so, then returns Nothing. If Templ Is Nothing Then Else Set GetTemplate = Templ End If End Function Public Sub SetTemplete(ByVal Template As Object) Set Templ = Template End SubPrivate Sub Form_Load() Call Clear Call View Dim blob() As Byte Dim rs As New ADODB. Recordset rs. CursorLocation = adUseClient rs. CursorType = adOpenDynamic rs. LockType = adLoc kOptimistic rs. Open Select * from tbl_registration, ConnectDB blob = rs templates set raw image from MySQL database If Templ Is Nothing Then convert raw image to picture Set Templ = New DPFPTemplate Templ. Deserialize blob End If End Sub Private Sub mnuAddGuest_Click() Call Clear flag = 1 save. Visible = True frameRegisterGuest. Caption = Register here frameRegisterGuest. Visible = True rameSearchGuest. Visible = False frameViewGuest. Visible = False cmdUpdateNah. Visible = False End Sub Private Sub mnuChangeUser_Click() If MsgBox(Are you sure you want to logout and change user? , vbYesNo + vbInformation, Apartment Monitoring and Security System) = vbYes Then Unload Me frmStandbyMode. Show frmLogin. Show End If End Sub Private Sub mnuEditGuest_Click() frameEditGuest. Show End Sub Private Sub mnuInventory_Click() frmInventory. Show End Sub Private Sub mnuLogout_Click() If MsgBox(Are you sure you want to exit program? , vbYesNo + vbInformation, Apartment Monitoring and Security Syst em) = vbYes Then closePort Unload Me rmStandbyMode. Show End If End Sub Private Sub mnuSearchGuest_Click() frameSearchGuest. Visible = True frameRegisterGuest. Visible = False frameViewGuest. Visible = False txtSearch. Text = cboRoomNumberDel. Text = cmdEditt. Visible = False cmdDeletee. Visible = False cmdOpenSesame. Visible = False img_box_del. Visible = False dgGuestDelete. Visible = False End Sub Private Sub mnuViewGuest_Click() Call View End Sub Private Sub ReadTemplate_Click() Dim blob() As Byte CommonDialog1. Filter = Fingerprint Template File*. fpt Set dialog box so an error occurs if dialog box is cancelled. CommonDialog1. CancelError = True On Error Resume Next Show Open dialog box. CommonDialog1. ShowOpen If Err Then This code runs if dialog box was cancelled. Exit Sub End If Read binary data from file. Open CommonDialog1. FileName For binary program As 1 ReDim blob(LOF(1)) Get 1, , blob() Close 1 Template can be empty, it must be created first. If Templ Is Nothing Then Set Templ = New DPFPTemplate Import binary data to template. Templ. Deserialize blob End Sub Private Sub save_Click() Dim rsAddGuest As New ADODB. Recordset rsAddGuest. CursorLocation = adUseClient rsAddGuest. CursorType = adOpenDynamic rsAddGuest. LockType = adLockOptimistic rsAddGuest. Open tbl_registration, ConnectDB If txtFirstName.Text = Or txtLastName. Text = Or cboGender. Text = Or cboRoomChoice. Text = Or cboRoomNumber. Text = Or txtFilePathPic. Text = Or cboMonthStarted. Text = Or cboDateStarted. Text = Or cboYearStarted. Text = Or cboDueMonth. Text = Or cboDueDate. Text = Or cboDueYear. Text = Then MsgBox Missing Fields. , vbCritical + vbInformation, Apartment Monitoring and Security System Else If MsgBox(Are you sure you want to add this Guest?. , vbYesNo + vbInformation, Delete Verification) = vbYes Then rsAddGuest. AddNew rsAddGuest templates = Templ. Serialize rsAddGuest FirstName = txtFirstName. Text

No comments:

Post a Comment