1. Introduction1.1 Overview of Project1.2 Objectives1.3 Modules1.4 Architecture and Design of the project2. Literature Sur...
4. Design 4.1 Data Flow Diagram Notations 4.2 Context Diagram 4.3 Low Level DFD 4.3.1 Level1 DFD Admin 4.3.2 Level1 DFD Us...
Chapter 1IntroductionWe all know health is a wealth. We do not need a fancy car, big apartment, a doctor degreewithout a h...
our attitude depends on how we feel. Being healthy and fit gives us energy to do anything. Sohow do we stay fit? Be active...
1.3 Modules:Administrator ModuleThis module includes storing and retrieving the details of the data. The detail of theente...
The application will be made of Desktop based distributed two-tier architecture tosupport user entertainment at the same t...
DFD LEVEL-0: CONTEXT DIAGRAM :                                 11
12
Chapter 2Literature Survey    Everything on the earth either living or non-living has an evolution cycle. Like scientist h...
As we have developed this application for the first time. Similar application’s of differentcompanies are present in the m...
The online mobile shopping application is user-friendly application. Most of the informationabout different brand of lates...
effort required on your part and makes programming enjoyable. Visual Basic makes manyaspects of programming as simple as d...
viable programs; you will need to update your program periodically to reflect changes thatimpact the program. In addition,...
*Double-click on a control in the toolbox and it appears on the form.*Click on the control icon. Move the mouse over the f...
13. Shape and line   14. OLE2.3.1.8 Label   Label control allows the user to display text on a form, which does not change...
Password char: Specifies the masking character for text displayed in the textbox. Suppose thepassword is set to “*”, the u...
Just about everything we could write about Visual Basic is, from language reference to ADOdatabase handling, from creating...
• Error handlers• Applications that use the printer• Word processor applications• File handlers for text and binary data• ...
2.3.1.12 Visual Basic with Databases A database is a collection of information. This information is stored in a very struc...
2.3.1.13 ActiveX Data Object ComponentsThe first step in editing an ADO database is to open that database, which is called...
Generically, any database management system (DBMS) that can response to queries fromclient machines formatted on the SQL l...
Requirement Analysis3.1 Role of SRS       Application Requirement Specification (SRS) is the starting point of the applica...
d. The application must work properly without problems on all targeted devices and networksupport.3.3 PurposeThe purpose o...
3.6 Hardware Requirements           RAM                        512 MB or higher           Hard Disk                   10GB...
Administrator has all the rights of maintaining all the records of Mobile Management.Administrators will be responsible fo...
Performance is measured in terms of the output provided by the application. Requirementspecification plays an important pa...
Design4.1 Data flow diagram notations          The dataflow diagram (DFD) is the one of the most important modeling tools....
Data Flow            An arrow line represents it and name of the data is specified by the side of the   line as label. Thi...
Table 2: userGroup table                           DATA        FIELD NAME                       SIZE                      ...
FIELD NAME        DATA TYPE    SIZE                           long      memberId                         integer      firs...
chest             double       calves            double       mdate            Date/Time       bodyfat           double   ...
Coding         36
DialogLoading Form:Option ExplicitDim counter As IntegerPrivate Sub Form_Load()   Dim Action As AnimationActions   Action ...
Call disconnectdatabase   MsgBox "You are not granted to access", vbOKOnly + vbExclamation, "Authentication"   txtPassword...
Exit Sub   End If   Dim arr() As String   arr = Split(qcombGroup.Text, " ")   Call databaseconnection   rs.Open "Select * ...
qgroupName.Text = "" Then   MsgBox "Fields cannot be blank!", vbOKOnly + vbExclamation, "Warning"   Exit SubEnd IfCall dat...
rs.Fields(6) = 1   Else      rs.Fields(6) = 0   End If   If qreadProgress.ListIndex = 0 Then      rs.Fields(7) = 1   Else ...
End IfDo Until rs.EOFIf rs.Fields(0) = permId Then   If qmemberRead.ListIndex = 0 Then      rs.Fields(1) = 1   Else      r...
Private Sub Form_Load()Call databaseconnectionCall refreshLoginTableCall refreshMembershipPlanTableuserId = -1planName = "...
Gym details loadingCall databaseconnectionrs.Open "select * from gymDetail", con, adOpenDynamic, adLockOptimisticIf Not rs...
Exit Sub   End If   Call databaseconnection   rs.Open "select * from gymDetail", con, adOpenDynamic, adLockOptimistic   If...
Call disconnectdatabase       add = 1       lcmdAdd.Caption = "*Add"       Exit Sub    End If    If add = 1 Then       If ...
MsgBox "Select a user to delete!", vbOKOnly + vbExclamation, "Notification"   Exit Sub End IfCall databaseconnection rs.Op...
Call clearLoginFields      Call refreshLoginTableEnd SubPrivate Sub lcmdRefresh_Click()   Call refreshLoginTableEnd SubPri...
rs.MoveNextWendEnd SubPrivate Sub mcmdSave_Click()If mtxtplanname.Text = "" And mtxtamount.Text = "" And mtxtdiscount.Text...
rsTemp.Fields(2) = Val(mtxtfinalAMT.Caption)   rsTemp.Update     mtxtplanname.Text = ""     mtxtfinalAMT.Caption = ""     ...
rs.Close  qgroupId.Enabled = False  cmdSave.Enabled = True  rs.Open "select * from userPermission", con, adOpenDynamic, ad...
End If           If rs.Fields(3) = 1 Then              qmemberEdit.ListIndex = 0           Else              qmemberEdit.L...
rs.Close  Call disconnectdatabase  qcombGroup.AddItem ("Add new group")End SubPublic Sub clearGroup()     qmemberAdd.Text ...
frmIndividualReport Form:Option ExplicitDim mId As IntegerPrivate Sub cmdGenerate_Click()  If mId = -1 Then   MsgBox "Sele...
If Not str = "" ThenlblLastPaymentDate.Caption = "Last Payment Date : " & strElselblLastPaymentDate.Caption = "Payment His...
memberTableDC.Refresh     memberTable.Refresh  End IfEnd SubPrivate Sub txtSearch_GotFocus()  If optRno.Value = False And ...
txtUserName.BackColor = RGB(241, 241, 241)txtPassword.BackColor = RGB(241, 241, 241)lblOk.MousePointer = 99lblOk.MouseIcon...
(ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long, _    ByVal hBitmapUnchecked As Long, ByVal hBitmapChe...
MsgBox "Invalid Image File!", vbOKOnly + vbExclamation, "Notification"  Exit SubEnd Ifadd icons to the menu    Dim hMenu A...
Call SetMenuItemBitmaps(hSubMenu, 2, MF_BYPOSITION, hMenuImg, 0)  sFileName = App.Path & "IconsmenuIconsProgress.bmp"  hMe...
End SubPrivate Sub setWallpaper_Click()dialogToChangeWallpaper.ShowEnd SubPrivate Sub shutsystem_Click()If MsgBox("Are you...
Else  cmdReport.Caption = "Hide Report"  Me.Width = 13920  isClicked = True  End IfEnd SubPrivate Sub cmdSave_Click()  If ...
If Not rs.EOF Then        rs.MoveLast     End If     rs.AddNew     rs.Fields(0) = txtid.Text     rs.Fields(1) = txtfname.T...
If loadType = 1 Then#######memberModify    Me.Caption = "Edit member"    txtid.Enabled = False    txtdoj.Enabled = False  ...
txtnumber.Enabled = False  Me.Height = 9210  Me.Width = Line2.X2  rs.Open "select * from members", con, adOpenDynamic, adL...
If rs.EOF = True Then       txtid.Text = 1   Else       rs.MoveLast       txtid.Text = rs.Fields(0) + 1   End If   rs.Clos...
If Not str = "" ThenlblLastPaymentDate.Caption = "Last Payment Date : " & strElselblLastPaymentDate.Caption = "Payment His...
Do While Not rs.EOF        If rs.Fields(0) = memberId Then           rs.Delete           rs.Update           rs.Close     ...
End SubPrivate Sub cmdShowProfile_Click()  If memberId = -1 Then     MsgBox "Select the member to modify!", vbOKOnly + vbE...
ElseIf optFname Then      DataGrid1.ClearFields      memberTableDC.CommandType = adCmdText      memberTableDC.RecordSource...
End IfEnd SubPrivate Sub c6forearm_KeyPress(KeyAscii As Integer)  If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then...
rs.Fields(5) = Val(c4hips.Text)  rs.Fields(6) = Val(d2thigh.Text)  rs.Fields(7) = Val(c3neck.Text)  rs.Fields(8) = Val(c6f...
lblDate.Caption = dateTimeNow  Call databaseconnection  rs.Open "select * from members", con, adOpenDynamic, adLockOptimis...
KeyAscii = 0   End IfEnd SubPrivate Sub c2weight_KeyPress(KeyAscii As Integer)If Not Chr(KeyAscii) Like "[0-9]" And KeyAsc...
c3neck.Text = "" And _     c4hips.Text = "" And _     c5waist.Text = "" And _     c6forearm.Text = "" And _     c7wrist.Te...
End IfEnd SubPrivate Sub d3chest_KeyPress(KeyAscii As Integer)  If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then  ...
End SubPrivate Sub optionCore_Click()  corePanel.Enabled = True  detailedPanel.Enabled = False  detailedPanel.BackColor = ...
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Smart Gym System documentation
Upcoming SlideShare
Loading in...5
×

Smart Gym System documentation

10,969

Published on

Published in: Technology
0 Comments
12 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
10,969
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
763
Comments
0
Likes
12
Embeds 0
No embeds

No notes for slide

Transcript of "Smart Gym System documentation"

  1. 1. 1. Introduction1.1 Overview of Project1.2 Objectives1.3 Modules1.4 Architecture and Design of the project2. Literature Survey2.1 Existing System 2.1.1 Drawbacks of Existing System2.2 Proposed System 2.2.1 Merits of Proposed System2.3 Overview of Language used 2.3.1 Introduction of Microsoft Visual Basic 6.0 2.3.1.1 The Programming Process 2.3.1.2 Understanding Program Maintenance 2.3.1.3 Visual Basic is a Smart Language 2.3.1.4 Tool Box Control 2.3.1.5 Adding Control 2.3.1.6 Removing Control 2.3.1.7 Intrinsic Control 2.3.1.8 Label Control 2.3.1.9 Command Bottom 2.3.1.10 Text Control 2.3.1.11 what does VB 6.0 has 2.3.1.12 Visual Basic with Databases 2.3.1.13 Active X Data Object Components 2.3.2 Introduction of MS Access 20033. Requirement Analysis3.1 Role of SRS3.2 Aim3.3 Purpose3.4 Scope3.5 Application Requirements3.6 Hardware Requirements3.7 Functional Requirements 3.7.1 Administrator Functional Requirements3.8 Non-Functional Requirements 3.8.1 Reliability 3.8.2 Usability 3.8.3 Maintainability 3.8.4 Performance 5
  2. 2. 4. Design 4.1 Data Flow Diagram Notations 4.2 Context Diagram 4.3 Low Level DFD 4.3.1 Level1 DFD Admin 4.3.2 Level1 DFD User 4.4 High Level DFD 4.4.1 Level2 DFD User 4.4.2 Level2 DFD Admin 4.5 Entity-Relationship Diagram 4.6 Module Design 4.6.1 4.6.2 4.6.3 4.6.4 4.7 Database Design 4.7.1 Introduction to Database Design 4.7.2 Tables Created5. Coding6. Testing 6.1 Introduction to Testing 6.1.1 White Box Testing 6.1.2 Black Box Testing 6.1.3 Application Strategies 6.1.4 Unit Testing 6.1.5 Integration Testing 6.1.6 Validation Testing 6.1.7 System Testing 6.2 Multi-User System6.3 Testing Results7. Conclusion8. Future Enhancement9. Bibliography10. User Manual 10.1 Screen Shots 6
  3. 3. Chapter 1IntroductionWe all know health is a wealth. We do not need a fancy car, big apartment, a doctor degreewithout a health. Being healthy is a first thing we need to keep in mind. Because most of time 7
  4. 4. our attitude depends on how we feel. Being healthy and fit gives us energy to do anything. Sohow do we stay fit? Be active, eat green and hit a gym! Physical fitness is very necessary for a healthy and tension free life. Physical fitness includesdiet, exercise and sleep. These three basic things have their own importance in eachindividuals life and everyone should be sensible with regard to these for a healthy life.1.1 Overview of Project Our proposed “Smart Gym System” is for those who runs a gym business. Before doinganything we did a decent research on major difficulties for gym owners. We examined carefullyabout how to make a huge registering system without failure as well as different functions fordifferent kind of user depending on their privilege.ObjectivesFirst thing we wanted to do in designing is avoid boring formal user interface. So we tried todevelop modern graphic user interface system. This application is for gym owners as well as fortheir staffs to register new member, and take body measurements and see the reports of financialand individual body progress. To use features of our application user has to enter password andusername. If you want to visit and make changes in admin panel you have to unlock the adminpanel by typing password in it. In the admin panel admin able to create username withpassword, set privilege to groups which means which user can do what operations like seereport, take measurement etc. Also admin able to create groups and membership plans andapply it. 8
  5. 5. 1.3 Modules:Administrator ModuleThis module includes storing and retrieving the details of the data. The detail of theentertainment which is stored is categorized into different types like:Creating userAdmin can create an user along with password. Admin also able to put a user in aparticular groups.Creating groupCreate a group and set privilege for it. It includes read, read/write, read/write/deletepermissions.Creating membership planCreate a flexible membership plans for gym members. Plans can be various dependingon member needs.User ModuleDepends on the privilege user’s access to features of the application is granted.1.4 Architecture and Design of the project 9
  6. 6. The application will be made of Desktop based distributed two-tier architecture tosupport user entertainment at the same time. 10
  7. 7. DFD LEVEL-0: CONTEXT DIAGRAM : 11
  8. 8. 12
  9. 9. Chapter 2Literature Survey Everything on the earth either living or non-living has an evolution cycle. Like scientist hasproved that human has completed an evolution cycle from ape to man. In same manner thecomputer has an evolution cycle, as technology is improving the computers are becoming moreand more efficient. Similarly as the computer architecture is improving day by day, it alsorequires upgrading the previous systems accordingly. 13
  10. 10. As we have developed this application for the first time. Similar application’s of differentcompanies are present in the market and we tried to study those, a brief discussion was carriedout with the project guide to know more details about existing system. After discussion thevarious deficiencies in the system was identified these points are noted down and discussed withproject guide again and decide where to make modification over existing system.Since we are implementing our application in the new envoirnment and using the presenttechnologies so as to make it more efficient, there was a need to understand the application’senvironment and also about the new technologies. And while implementing the applicationvarious thing has been taken into consideration like application will also be usable for those endusers who don’t understand english.2.1 Existing SystemAn Existing system refers to the system that is being followed till now. Presently all the resumeFunctionalities are done manually. This is making the person very difficult to keep track of theclient and the members in the job seeker.2.1.1 Drawbacks of Existing System a. Time consuming. b. Updating and Retrieval tasks are very tedious. c. Highly error prone. d. Easy Customer service is difficult. e. Lot of paper work results in lot of confusion. f. No direct role for the higher officials.To avoid all these limitations and make the system working more accurately it needs to becomputerized.2.2 Proposed System 14
  11. 11. The online mobile shopping application is user-friendly application. Most of the informationabout different brand of latest mobile to the customer who wants to know the details and want tobuy. It is very simple in design and to implement. The system requirements are very low.System resources and the system will work in almost all configurations.The main objectives of the proposed system can be enumerated as follows:a. Customer can easily search different brand of mobile.b. Customer can also search according to price.c. User can register and buy that particular product.2.2.1 Merits of Proposed SystemThe system is very simple in design and to implement. The system requiresVery low system resources and the system will work in almost allConfigurations a. Security of data b. Ensure data accuracy c. Administrator controls the entire system d. Reduce the damages of the machines e. Minimize manual data entry f. Greater efficiency g. User friendly and interactive h. Saves lot of time i. Retrieval and Updating tasks can be performed much faster and easier2.3 Overview of languages used2.3.1 Introduction to MICROSOFT VISUAL BASIC 6.0Visual Basic 6 is Microsofts latest and greatest version of the Visual Basic programminglanguage. Although writing programs can be a tedious chore at times, Visual Basic reduces the 15
  12. 12. effort required on your part and makes programming enjoyable. Visual Basic makes manyaspects of programming as simple as dragging graphic objects onto the screen with your mouse.Microsoft based Visual Basic on a programming language written for beginners called BASIC.BASIC has been around for more than 35 years in one form or another. The original languagedesigners wanted to develop a programming language that beginners could use. With BASIC,new programmers could become proficient right away.BASIC stands for Beginners All-purpose Symbolic Instruction Code. Thats some abbreviation!A programming language is a set of commands and command options, called arguments, thatyou use to give instructions to the computer. Computers cannot (yet) understand humanlanguages because people deal well with ambiguous commands, and a computer cannotunderstand such ambiguity. A programming language must be more precise than a spokenlanguage.2.3.1.1 The Programming ProcessOver time youll find your own way of writing programs that works best for you. Nevertheless,youll generally follow these standard set of steps when creating your Visual Basic programs:1. Decide what your application is to do by creating an overall design.2. Create the visual portion of your application (the screens and menus that your users willinteract with).3. Add Visual Basic programming language code to tie the visual elements together and toautomate the program.4. Test your application to locate and remove any bugs you find.5. Compile your tested application and distribute the compiled application to your users.2.3.1.2 Understanding Program MaintenanceBugs are not the only reason that you will work on a program after you think youre completelydone with it. Program maintenance is necessary because requirements change, companieschange, and laws change. You must also change the programs you write so that they remain 16
  13. 13. viable programs; you will need to update your program periodically to reflect changes thatimpact the program. In addition, users will think of new things that they want the program to do.Program maintenance is the term used for the updating of a program after the program is putinto use. This update may be a result of a users request or a change in the way the programneeds to operate.It is said that a program is written once and modified many times. The more programmaintenance you perform, the more likely that your program will be up-to-date and in use. Youmay want to release new versions of your program so that users can, with a different versionnumber on the opening screen that you place there, keep track of the latest version installed ontheir system.2.3.1.3 Visual Basic Is a Smart LanguageThe main reason why Visual Basic is so popular and powerful is the same reason behind thesuccess of Windows. Microsoft took a complex technology (writing computer programs) andmade it easier to use through a graphical interface. Suppose you have to write a program foryour company. In a visual programming environment, you can quickly design the windows thatthe user sees by drawing and arranging them just as you would lay out elements for anewspaper.In a text-based programming system, you control the user interface through program languagecommands. Common sense tells you that the visual programming method is easier fornewcomers to learn and requires less time to maintain. In this case, the old adage “a picture isworth a thousand words” truly applies. However, do not let me give you the impression thatVisual Basic is just another pretty interface.Another key concept of Visual Basic is the ability to create and use self-contained components,or objects.2.3.1.4 Tool Box ControlsThe toolbox contains all the custom control needed for a visual basic application .severaladvanced controls can be added to the project from the menu bar tool, Project – Components.Each control has its own properties, Events and methods. The properties of the controls can beset either through code or in the properties window, user – defined controls can also be createdand added to the tool box. Controls work with multimedia and internet too.2.3.1.5 Adding controlsControls can be added to a form in two ways: 17
  14. 14. *Double-click on a control in the toolbox and it appears on the form.*Click on the control icon. Move the mouse over the form, click and draw the control to therequired size.2.3.1.6 Removing controlsTo remove a control from the form*Select the control.*Press the delete key. Controls can be placed anywhere on the form. Their size can be changed by using the sizinghandle which appear when a control in selected.2.3.1.7 Intrinsic controlsThe default controls which are automatically displayed in a toolbox when a form is loaded areknown as intrinsic controls. The intrinsic controls in visual basic are very powerful, sinceobjects such as buttons, labels, text boxes, and combo or list boxes can be added to a form easilyand coded.Some common intrinsic controls which are described below are: 1. Label 2. Command button 3. Text box 4. Frame 5. Option button 6. Check box 7. Picture box 8. Inage box 9. Timer 10. Combo box 11. List box 12. Horizontal & vertical scroll box 18
  15. 15. 13. Shape and line 14. OLE2.3.1.8 Label Label control allows the user to display text on a form, which does not change. For example Label1.caption=”Name;” Generally labels are used to print captions for other controls. Text printed on labels cannot be edited during runtime.2.3.1.9 Command buttonsCommands buttons is one of the most powerful and frequently used controls in windowsapplication. It is used to invoke response from the user or to invoke special functions on theform.2.3.1.10 Textbox controlTextbox control is one of the most popular and versatile mechanism used to display and enterstext in a window user interface. It behaves like a mini text editor providing all the basic textediting facilities.Basic text propertiesThe basic properties of a textbox determine the appearance and functionality of a textboxcontrol. Some of them are as described below:Enabled: Indicates whether the user can interact with the control or not.Index: Determine the control array index.Locked: Boolean. Indicates whether the user can type in the textbox or not.Max Length: Indicates the maximum number of characters input in the textbox. Default valuesare 0, which means any number of characters. The maximum of text can be typed in a textbox isnearly 64 kb.Max length property can be set to a specific value restricting the user to type only that manycharacter.Multi Line: Specifies whether the textbox will hold a single line or multiple lines. 19
  16. 16. Password char: Specifies the masking character for text displayed in the textbox. Suppose thepassword is set to “*”, the user than sees an asterisk in the place of every character typed in thattextbox.Scrollbars: Indicates horizontal scrollbars, vertical scrollbars or both for the textbox. Thisproperty is used with multiline property. Multiline textboxes can have horizontal, vertical orboth scroll bars. If a horizontal scrollbar is attached to a text box, the text will not wrapautomatically. The user must press enter to start new line.Text: Specifies the text in the textbox.Alignment: Alignment of text in a textbox can be Left-justified, centered or right-justified.SelText: Returns the selected text. A selected text can be converted to uppercase by thefollowing code:Text1. SelText= Ucase(Text1.SelText)SelStart: Specifies the position of the first character of the selected text.SetLength: Returns the length of the selected text. The most common use of these properties isto select a piece of text at runtime to select the text in a textbox.Text1.selstart=1Text1.selLength=Len (Text1)Click: Click event is called when the text box is clicked with the mouse.Key press: Occurs every time a key is pressed and stores the ASCII code of the key pressed inkeyASCII(an integer type). This event can be used to restrict the user to type only certaincharacters.Controls are elements you can use when designing a user interface.Visual Basic controls enable you to add features to your programs without you having to beinvolved in the details of how these features work. For example, receiving input from a user ofyour program is as simple as drawing a control that accepts input. This is a great advantage ofvisual programming languages—you can concentrate on what you want your program to do, nothow to get the programming language to do it.2.3.1.11 What does VB 6.0 have…. 20
  17. 17. Just about everything we could write about Visual Basic is, from language reference to ADOdatabase handling, from creating Web browsers to dragging and dropping data acrossapplications, from email applications to multimedia players, from creating ActiveX controls andActiveXDocuments to setup programs, it’s all here.Here’s some of what we’ll see:• ActiveX controls• ActiveX documents• ADO, DAO, and RDO database applications• Multimedia AVI, MPG, WAV, and MID players• CD players that play CDs from the computer’s CD-ROM drive• Bitmapped menu items• Full Web browsers• Pie charts, line charts, bar charts, and others• Code clients that call methods in programs like Microsoft Excel• Code components (OLE automation servers)• Graphics animation• Applications that use the Windows Common Dialogs• Customized toolbars with embedded controls like combo boxes• Data entry forms• Database editing applications• Direct connections to the Windows API• Direct connections to code written in Visual C++• Drag/drop operations• Graphics applications that draw arcs, circles, rectangles, lines, and more• Email applications 21
  18. 18. • Error handlers• Applications that use the printer• Word processor applications• File handlers for text and binary data• FTP applications• Dialog boxes• Windows Help files• MDI applications• Pop-up menus activated with right mouse clicks• Application deployment• HTTP applications• Image handling: blur, emboss, engrave, flip, sweep, stretch images, and more• OLE applications• Applications that use the Windows Registry• List views and tree views• Applications that create controls at runtime• Mouse capture• OLE drags (dragging data between applications)• Online user registration• Picture clip applications• Setup programs• Screen capture• Spreadsheets• Status bars and toolbars• Tab strips, progress bars, and others 22
  19. 19. 2.3.1.12 Visual Basic with Databases A database is a collection of information. This information is stored in a very structuredmanner. By exploiting this known structure, we can access and modify the information quicklyand correctly.For database management, Visual Basic application acts as a front-end to the database. Thismeans the Visual Basic application provides the interface between the user and the database.This interface allows the user to tell the database what he or she needs and allows the databasetorespond to the request displaying the requested information in some manner. A Visual Basic application cannot directly interact with a database. There are two intermediatecomponents between the application and the database: the data control and the databaseengine: The data control is a Visual Basic object that connects the application to the databasevia the database engine. It is the conduit between the application and the engine, passinginformation back and forth between the two. The database engine is the heart of a Visual Basic database management system. It isthe actual application that does the management. Having this engine saves programmers a lot ofwork. The database engine native to Visual Basic is known as the Jet engine. It is the sameengine used by Microsoft Access for database management. Hence, it is primarily used towork with Access databases, but it can also work with others. 23
  20. 20. 2.3.1.13 ActiveX Data Object ComponentsThe first step in editing an ADO database is to open that database, which is called a data sourcein ADO terminology, by setting up a Connection object.To use that and other ADO objects in code, use the Project|References item, select theMicrosoft ActiveX Data Objects Library item, and click on OK, adding the ADO Object Libraryto your program.Now create a new ADO Connection object with the Connection object’s Open method:Here are the arguments for this method:• Connection String—String containing connection information.• UserID—String containing a username to use when establishing the connection.• Password—String containing a password to use when establishing the connection.• OpenOptions—if set to adConnectAsync, the connection will be opened asynchronously.Here are the possible values for the Type argument:• dbOpenKeyset—Opens a dynaset-type Recordset object, which is like an ODBC keysetcursor.• dbOpenDynamic—Opens a dynamic-type Recordset object, which lets the application seechanges made by other users.• dbOpenStatic—Opens a static-type Recordset object.• dbOpenForwardOnly—Opens a forward-only-type Recordset object, where you can only useMoveNext to move.Here are the possible values for the LockType argument:• AdLockReadOnly—The default; read-only.• adLockPessimistic—Pessimistic locking, record by record.• adLockOptimistic—Optimistic locking, record by record.• adLockBatchOptimistic—Optimistic batch updates.Here are the possible values for the Options argument:• adCmdText—Provider should evaluate Source as a definition of a command.• adCmdTable—ADO should generate an SQL query to return all rows from the table named inSource.• adCmdTableDirect—Provider should return all rows from the table named in Source.• adCmdStoredProc—Provider should evaluate Source as a stored procedure.• adCmdUnknown—Type of command in the Source argument is not known.• adCommandFile—Record set should be restored from the file named in Source.• adExecuteAsync—Source should be executed asynchronously.• adFetchAsync—After the initial quantity specified in the CacheSize property is fetched, anyremaining rows should be fetched asynchronously.2.3.2 Introduction of MS Access 2003 24
  21. 21. Generically, any database management system (DBMS) that can response to queries fromclient machines formatted on the SQL language..Chapter 25
  22. 22. Requirement Analysis3.1 Role of SRS Application Requirement Specification (SRS) is the starting point of the applicationdeveloping activity. As system grew more complex it became evident that the goal of the entiresystem cannot be easily comprehended. Hence the need for the requirement phase arose. Theapplication project is initiated by the client needs. The SRS is the means of translating the ideasof the minds of clients (the input) into a formal document. Application RequirementSpecification is the medium though which the client and user needs are accurately specified. Itforms the basis of application development.3.2 Aima. This application is designed to maintain the database of job seeker and job providers.b. The application must give universal access for the users of the system.c. The application is user friendly and provides all the information required. 26
  23. 23. d. The application must work properly without problems on all targeted devices and networksupport.3.3 PurposeThe purpose of this document is to describe all external requirements of Mobile Management.It also describes the interfaces for the system. The basic idea behind the project is to bridge thecommunication gap between job seekers and the organization.3.4 ScopeThis document is the only one that describes the requirements of the system. It is meant for theuse by the developers, and will also be the basis for validating the final delivered system. Anychanges made to the requirements in the future will have to go through a formal changeapproval process. The developer is responsible for asking for clarifications, where necessary,and will not make any alterations without the permission of the client. This project helps the job seeker to keep track of the Member and clients details.3.5 Application Requirements Operating system Windows XP, Windows 7 Front End Microsoft Visual Basic 6.0 Database Microsoft Access 2003 Connectivity ActiveX Data Object Report Data Report 27
  24. 24. 3.6 Hardware Requirements RAM 512 MB or higher Hard Disk 10GB or higher Computer Processor Pentium IV Clock Speed 700MHZ Processor3.7 Functional Requirements The main purpose of functional requirements is to define all activities or operations thattake place in the system. These are derived through interactions with the users of the system.Since requirements specification is a comprehensive document and contains a lot of data, it hasbeen broken down into different stages in this report.3.7.1 Administrator module functional requirements 28
  25. 25. Administrator has all the rights of maintaining all the records of Mobile Management.Administrators will be responsible for editing and updating the information of the application.Administrator will only have the rights to create users and give the permissions to the users. 3.7.2 Client module functional requirementsA client has all the privileges on job seeker and the job seeker details. Client cannot make anychanges in the new user creations.3.8 Non-Functional Requirements3.8.1 ReliabilityReliability is the correlation of an item, scale, or instrument with a hypothetical one, which trulymeasures what it is supposed to. Since the true instrument is not available. The programaccording to the requirement can perform the intended function.b. Error-handling- exception occurring while accessing database need to be addressed.3.8.2 Usability Usability refers to the capability of the product to be understood, learned, and used and userfriendly to users, when used under specified conditions. This section should include all of thoserequirements that affect usability.3.8.3 MaintainabilityMaintainability is the ease with which a program/specification can be corrected if an erroroccurs desires a change in requirements. Specify attributes of application that relate to the easeof maintenance of the application itself.3.8.4 Performance 29
  26. 26. Performance is measured in terms of the output provided by the application. Requirementspecification plays an important part in the analysis of a system. Only when the requirementspecifications are properly given, it is possible to design a system, which will fit into requiredenvironment.The requirement specification for any system can be broadly stated as given below: a. The system should be able to interface with the existing system. b. The system should be accurate. c. The system should be better than the existing system.The existing system is completely dependent on the user to perform all the duties.Chapter 4 30
  27. 27. Design4.1 Data flow diagram notations The dataflow diagram (DFD) is the one of the most important modeling tools. It shows the use of the data pictorially. DFD represents the flow of data between different transformations and process in the system. The dataflow shows logical flow of the data. Different notations used in DFD are:Functional Processing It is represented by a diamond. This notation specifies the processing or main transactions. 31
  28. 28. Data Flow An arrow line represents it and name of the data is specified by the side of the line as label. This arrow line is used to indicate data movement.Source or Sink It is represented by a rectangle .It is used for specifying from where data is coming and where it will reach.4.7.2 Tables CreatedTable 1: login table FIELD DATA SIZE NAME TYPE long userId number integer username text 30 password text 30 firstname text 30 lastname text 50 long gid number integer 32
  29. 29. Table 2: userGroup table DATA FIELD NAME SIZE TYPE long groupId number integer groupName text 255 long permissionSetId number integerTable 3: userPermission DATA FIELD NAME SIZE TYPE permissionId integer canSeeMember integer canAddMember integer canEditMember integer canDeleteMember integer canTakeMeasurement integer canSeeReport integer canSeeBodyProgress integerTable 4: members table 33
  30. 30. FIELD NAME DATA TYPE SIZE long memberId integer firstname text 50 lastname text 50 gender text 10 long number integer address text 255 doj Date/Time dob Date/Time profilePhotoUrl text 255 dueDate text 255Table 5: progressMember Table FIELD NAME DATA TYPE SIZE long memberId integer height double weight double bmi double biceps double hips double thigh double neck double forearms double 34
  31. 31. chest double calves double mdate Date/Time bodyfat double waist double wrist doubleTable 6: paymentTransaction Table FIELD NAME DATA TYPE SIZE long memberId integer date Date/Time amt CurrencyTable 7: gymDetail Table DATATYP FIELD E SIZE gymName text 255 gymAddress text 255 gymLogoUrl text 255 gymPhone text 255 35
  32. 32. Coding 36
  33. 33. DialogLoading Form:Option ExplicitDim counter As IntegerPrivate Sub Form_Load() Dim Action As AnimationActions Action = gfaPlay counter = 0End SubPrivate Sub Timer1_Timer() If counter >= 2 Then frmMain.Show Unload Me Exit Sub End If counter = counter + 1End SubDialogToAccessAdmin Form:Option ExplicitPrivate Sub CancelButton_Click()Unload MeEnd SubPrivate Sub Form_Load()If Me.Visible = True ThentxtPassword.SetFocusCall CenterChild(frmMain, Me)End IfEnd SubPrivate Sub OKButton_Click() Call databaseconnection rs.Open "select * from login", con, adOpenStatic While Not rs.EOF If rs.Fields(2) = txtPassword.Text Then Call disconnectdatabase frmAdmin.Show Unload Me Exit Sub Else rs.MoveNext End If Wend 37
  34. 34. Call disconnectdatabase MsgBox "You are not granted to access", vbOKOnly + vbExclamation, "Authentication" txtPassword.Text = "" txtPassword.SetFocusEnd SubdialogToChangeWallpaper Form:Option ExplicitDim file As StringPrivate Sub CancelButton_Click()Unload MeEnd SubPrivate Sub cmdBwse_Click() CommonDialog1.ShowOpen Dim ext As String ext = GetFileExtension(CommonDialog1.FileName) If ext = "jpg" Or ext = "png" Or ext = "jpeg" Or ext = "bmp" Then file = CommonDialog1.FileName Image1.Picture = LoadPicture(file) Else MsgBox "Invalid image file!", vbOKOnly + vbExclamation, "Notification" Exit SubEnd IfEnd SubPrivate Sub cmdSave_Click()If file = "" ThenMsgBox "Choose the wallpaper to set!", vbOKOnly + vbExclamation, "Notification"Exit SubEnd IfFileCopy file, App.Path & "wallpaper.jpeg"frmMain.Picture = LoadPicture(App.Path & "wallpaper.jpeg")Unload MefrmMain.SetFocusEnd SubPrivate Sub Form_Load()file = ""Me.Caption = ""End SubfrmAdmin Form:Dim add As IntegerDim userId As IntegerDim planName As StringDim permId As IntegerDim file As StringPrivate Sub cmdDelete_Click() delete group sub If qcombGroup.ListIndex = -1 Then MsgBox "Select a group to delete!", vbOKOnly + vbExclamation, "Warning" 38
  35. 35. Exit Sub End If Dim arr() As String arr = Split(qcombGroup.Text, " ") Call databaseconnection rs.Open "Select * from userGroup", con, adOpenDynamic, adLockOptimistic If Not rs.EOF Then rs.MoveFirst End If Do Until rs.EOF If rs.Fields(0) = Val(arr(1)) Then rs.Delete rs.Update Exit Do End If rs.MoveNext Loop rs.Close rs.Open "select * from userPermission", con, adOpenDynamic, adLockOptimistic If Not rs.EOF Then rs.MoveFirst End If Do Until rs.EOF If rs.Fields(0) = permId Then rs.Delete rs.Update Exit Do End If rs.MoveNext Loop rs.Close Call readGroup MsgBox "Group deleted!", vbOKOnly + vbInformation, "Warning" Call disconnectdatabaseEnd SubPrivate Sub cmdSave_Click()check the empty fieldscheck whether group id is exited or notaddIf qmemberAdd.ListIndex = -1 And _ qmemberDelete.ListIndex = -1 And _ qmemberEdit.ListIndex = -1 And _ qmemberRead.ListIndex = -1 And _ qmeasureAdd.ListIndex = -1 And _ qreadReport.ListIndex = -1 And _ qreadProgress.ListIndex = -1 And _ qgroupId.Text = "" And _ 39
  36. 36. qgroupName.Text = "" Then MsgBox "Fields cannot be blank!", vbOKOnly + vbExclamation, "Warning" Exit SubEnd IfCall databaseconnectionrs.Open "select * from userGroup"If Not rs.EOF Thenrs.MoveLastEnd Ifrs.AddNewrs.Fields(0) = Val(qgroupId.Text)rs.Fields(1) = Trim(qgroupName.Text)rs.Fields(2) = permIdrs.Updaters.Closers.Open "select * from userPermission", con, adOpenDynamic, adLockOptimisticIf Not rs.EOF Thenrs.MoveLastEnd Ifrs.AddNewrs.Fields(0) = permId If qmemberRead.ListIndex = 0 Then rs.Fields(1) = 1 Else rs.Fields(1) = 0 End If If qmemberAdd.ListIndex = 0 Then rs.Fields(2) = 1 Else rs.Fields(2) = 0 End If If qmemberEdit.ListIndex = 0 Then rs.Fields(3) = 1 Else rs.Fields(3) = 0 End If If qmemberDelete.ListIndex = 0 Then rs.Fields(4) = 1 Else rs.Fields(4) = 0 End If If qmeasureAdd.ListIndex = 0 Then rs.Fields(5) = 1 Else rs.Fields(5) = 0 End If If qreadReport.ListIndex = 0 Then 40
  37. 37. rs.Fields(6) = 1 Else rs.Fields(6) = 0 End If If qreadProgress.ListIndex = 0 Then rs.Fields(7) = 1 Else rs.Fields(8) = 0 End Ifrs.Updaters.CloseCall readGroupCall clearGroupEnd SubPrivate Sub cmdUpdate_Click()check the empty fieldscheck the group id matches, if then addIf qmemberAdd.ListIndex = -1 And _ qmemberDelete.ListIndex = -1 And _ qmemberEdit.ListIndex = -1 And _ qmemberRead.ListIndex = -1 And _ qmeasureAdd.ListIndex = -1 And _ qreadReport.ListIndex = -1 And _ qreadProgress.ListIndex = -1 And _ qgroupId.Text = "" And _ qgroupName.Text = "" Then MsgBox "Fields cannot be blank", vbOKOnly + vbExclamation, "Notification" Exit SubEnd IfCall databaseconnectionrs.Open "select * from userGroup"If Not rs.EOF Thenrs.MoveFirstEnd IfDo While Not rs.EOFIf rs.Fields(0) = Val(qgroupId.Text) Thenrs.Fields(0) = Val(qgroupId.Text)rs.Fields(1) = Trim(qgroupName.Text)rs.UpdateExit DoEnd Ifrs.MoveNextLooprs.Closers.Open "select * from userPermission", con, adOpenDynamic, adLockOptimisticIf Not rs.EOF Thenrs.MoveLast 41
  38. 38. End IfDo Until rs.EOFIf rs.Fields(0) = permId Then If qmemberRead.ListIndex = 0 Then rs.Fields(1) = 1 Else rs.Fields(1) = 0 End If If qmemberAdd.ListIndex = 0 Then rs.Fields(2) = 1 Else rs.Fields(2) = 0 End If If qmemberEdit.ListIndex = 0 Then rs.Fields(3) = 1 Else rs.Fields(3) = 0 End If If qmemberDelete.ListIndex = 0 Then rs.Fields(4) = 1 Else rs.Fields(4) = 0 End If If qmeasureAdd.ListIndex = 0 Then rs.Fields(5) = 1 Else rs.Fields(5) = 0 End If If qreadReport.ListIndex = 0 Then rs.Fields(6) = 1 Else rs.Fields(6) = 0 End If If qreadProgress.ListIndex = 0 Then rs.Fields(7) = 1 Else rs.Fields(8) = 0 End If rs.Update Exit DoEnd Ifrs.MoveNextLooprs.CloseCall readGroupCall clearGroupEnd Sub 42
  39. 39. Private Sub Form_Load()Call databaseconnectionCall refreshLoginTableCall refreshMembershipPlanTableuserId = -1planName = ""Fill the tableCall fillTable***Initializing comboBoxqmemberAdd.AddItem ("Allow")qmemberAdd.AddItem ("Deny")qmemberEdit.AddItem ("Allow")qmemberEdit.AddItem ("Deny")qmemberRead.AddItem ("Allow")qmemberRead.AddItem ("Deny")qmemberDelete.AddItem ("Allow")qmemberDelete.AddItem ("Deny")qmeasureAdd.AddItem ("Allow")qmeasureAdd.AddItem ("Deny")qreadProgress.AddItem ("Allow")qreadProgress.AddItem ("Deny")qreadReport.AddItem ("Allow")qreadReport.AddItem ("Deny")cmdSave.Enabled = FalseDim I As IntegerI=1While I <= 24mtxtDuration.AddItem II=I+1Wend***Reading groupsCall readGroup***Fill lgroupCall databaseconnectionrs.Open "select * from userGroup", con, adOpenDynamic, adLockOptimisticIf Not rs.EOF Then rs.MoveFirstEnd IfWhile Not rs.EOF lgroup.AddItem (rs.Fields(0)) rs.MoveNextWendrs.CloseCall disconnectdatabaseMe.Caption = "Admin Panel"add = 0 43
  40. 40. Gym details loadingCall databaseconnectionrs.Open "select * from gymDetail", con, adOpenDynamic, adLockOptimisticIf Not rs.EOF Then rs.MoveFirstEnd IfDo Until rs.EOF gymName.Text = rs.Fields(0) gymAddress.Text = rs.Fields(1) If Not rs.Fields(2) = "" Then file = rs.Fields(2) Image1.Picture = LoadPicture(App.Path & rs.Fields(2)) Else file = "" End If gymPhone.Text = rs.Fields(3) rs.MoveNextLooprs.CloseEnd SubPrivate Sub Form_Unload(Cancel As Integer)If MsgBox("Do you want to exit Admin panel?", vbYesNo + vbQuestion, "Notification") = vbYes Then Unload MeElse Me.SetFocusEnd IfEnd SubPrivate Sub gymCmdBrowse_Click() logo.ShowOpen Dim ext As String ext = GetFileExtension(logo.FileName) If ext = "jpg" Or ext = "png" Or ext = "jpeg" Or ext = "bmp" Then file = logo.FileName Image1.Picture = LoadPicture(file) Else MsgBox "Invalid image file", vbOKOnly + vbExclamation, "Notification" Exit Sub End IfEnd SubPrivate Sub gymCmdSave_Click() If gymName.Text = "" And _ gymAddress.Text = "" And _ gymPhone.Text = "" And _ file = "" Then MsgBox "All fields are mandatory!", vbOKOnly + vbExclamation, "Notification" 44
  41. 41. Exit Sub End If Call databaseconnection rs.Open "select * from gymDetail", con, adOpenDynamic, adLockOptimistic If Not rs.EOF Then rs.MoveFirst End If If rs.RecordCount = 0 Then rs.AddNew rs.Fields(0) = Trim(gymName.Text) rs.Fields(1) = gymAddress.Text rs.Fields(2) = file rs.Fields(3) = Val(gymPhone.Text) rs.Update Else Do Until rs.EOF rs.Fields(0) = Trim(gymName.Text) rs.Fields(1) = gymAddress.Text If Not file = App.Path & "gymLogo.jpeg" Then FileCopy file, App.Path & "gymLogo.jpeg" End If rs.Fields(2) = "gymLogo.jpeg" rs.Fields(3) = Val(gymPhone.Text) rs.Update rs.MoveNext Loop End If rs.Close MsgBox "Gym details saved!", vbOKOnly + vbInformation, "Notification"End SubPrivate Sub gymPhone_KeyPress(KeyAscii As Integer)If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub lcmdAdd_Click() If add = 0 Then Call clearLoginFields lusername.SetFocus lid.Enabled = False Call databaseconnection rs.Open "select * from login", con, adOpenDynamic, adLockOptimistic If Not rs.EOF Then rs.MoveLast End If lid.Text = rs.Fields(0) + 1 rs.Close 45
  42. 42. Call disconnectdatabase add = 1 lcmdAdd.Caption = "*Add" Exit Sub End If If add = 1 Then If lid.Text = "" And lusername.Text = "" And lpassword.Text = "" And lfname.Text = "" Andllname.Text = "" And lgroup.Text = "" Then MsgBox "All fields are mandatory!", vbOKOnly + vbExclamation, "Notification" Exit Sub End If Call databaseconnection rs.Open "select * from login", con, adOpenDynamic, adLockOptimistic If Not rs.EOF Then rs.MoveFirst End If Do Until rs.EOF If rs.Fields(1) = lusername.Text Then MsgBox "Username exists! Choose different!", vbOKOnly + vbExclamation, "Warning" Exit Sub End If rs.MoveNext Loop rs.MoveLast rs.AddNew rs.Fields(0) = lid.Text rs.Fields(1) = lusername.Text rs.Fields(2) = lpassword.Text rs.Fields(3) = lfname.Text rs.Fields(4) = llname.Text rs.Fields(5) = lgroup.Text rs.Update rs.Close Call disconnectdatabase MsgBox "Record saved", vbOKOnly + vbInformation, "Notification" lcmdAdd.Caption = "Add" add = 0 Call clearLoginFields Call refreshLoginTable Exit Sub End IfEnd SubPrivate Sub lcmdCancel_Click()Unload MeEnd SubPrivate Sub lcmdDelete_Click() If userId = -1 Then 46
  43. 43. MsgBox "Select a user to delete!", vbOKOnly + vbExclamation, "Notification" Exit Sub End IfCall databaseconnection rs.Open "Select * from login", con, adOpenDynamic, adLockOptimisticIf Not rs.EOF Then rs.MoveFirst End IfDo Until rs.EOF If rs.Fields(0) = userId Then rs.Delete MsgBox "User is deleted", vbOKOnly + vbInformation, "Notification" Exit Do End If rs.MoveNext Loop rs.Close Call refreshLoginTableEnd SubPrivate Sub lcmdModify_Click() If lid.Text = "" And lusername.Text = "" And lpassword.Text = "" And lfname.Text = "" And llname.Text= "" And lgroup.Text = "" Then MsgBox "All fields are mandatory!", vbOKOnly + vbExclamation, "Notification" Exit Sub End If Call databaseconnection rs.Open "select * from login", con, adOpenDynamic, adLockOptimistic If Not rs.EOF Then rs.MoveFirst End If Do Until rs.EOF If rs.Fields(0) = lid.Text Then rs.Fields(0) = lid.Text rs.Fields(1) = lusername.Text rs.Fields(2) = lpassword.Text rs.Fields(3) = lfname.Text rs.Fields(4) = llname.Text rs.Fields(5) = lgroup.Text rs.Update rs.Close Exit Do End If rs.MoveNext Loop Call disconnectdatabase MsgBox "Record updated!", vbOKOnly + vbInformation, "Notification" 47
  44. 44. Call clearLoginFields Call refreshLoginTableEnd SubPrivate Sub lcmdRefresh_Click() Call refreshLoginTableEnd SubPrivate Sub loginTable_Click() userId = loginTable.Columns(0) lid.Text = loginTable.Columns(0) lusername.Text = loginTable.Columns(1) lpassword.Text = loginTable.Columns(2) lfname.Text = loginTable.Columns(3) llname.Text = loginTable.Columns(4) Dim Index As Integer Index = 0 For Index = 0 To lgroup.ListCount - 1 If UCase$(lgroup.ItemData(Index)) = UCase$(loginTable.Columns(5)) Then lgroup.ListIndex = Index Exit For End If Next group from comboBoxEnd SubPrivate Sub mcmdDelete_Click()If planName = "" ThenMsgBox "Choose the plan to delete!", vbOKOnly + vbExclamation, "Notification"Exit SubEnd IfCall databaseconnectionrs.Open "select * from membershipPlan", con, adOpenDynamic, adLockOptimisticIf Not rs.EOF Thenrs.MoveFirstEnd IfWhile Not rs.EOFIf rs.Fields(0) = planName Thenrs.Deleters.Updaters.CloseplanName = ""Call disconnectdatabaseCall refreshMembershipPlanTablemtxtplanname.Text = ""mtxtfinalAMT.Caption = ""mtxtdiscount.Text = ""mtxtamount.Text = ""Exit SubEnd If 48
  45. 45. rs.MoveNextWendEnd SubPrivate Sub mcmdSave_Click()If mtxtplanname.Text = "" And mtxtamount.Text = "" And mtxtdiscount.Text = "" AndmtxtDuration.Text = "Select" ThenMsgBox "Fill the blanks!", vbOKOnly + vbExclamation, "Notification"Exit SubEnd IfCall databaseconnectionrs.Open "select * from membershipPlan", con, adOpenDynamic, adLockOptimisticIf Not rs.EOF Thenrs.MoveLastEnd Ifrs.AddNewrs.Fields(0) = Trim(mtxtplanname.Text)rs.Fields(1) = Val(mtxtDuration.Text)rs.Fields(2) = Val(mtxtfinalAMT.Caption)rs.Updaters.CloseCall disconnectdatabaseCall refreshMembershipPlanTablemtxtplanname.Text = ""mtxtfinalAMT.Caption = ""mtxtdiscount.Text = ""mtxtamount.Text = ""End SubPrivate Sub mcmdUpdate_Click()If mtxtplanname.Text = "" And mtxtamount.Text = "" And mtxtdiscount.Text = "" ThenMsgBox "Fill the blanks!", vbOKOnly + vbExclamation, "Notification"Exit SubEnd IfIf mtxtfinalAMT.Caption = "" ThenMsgBox "Final amount is not calculated!", vbOKOnly + vbExclamation, "Notification"Exit SubEnd IfCall databaseconnectionDim rsTemp As ADODB.RecordsetSet rsTemp = New ADODB.RecordsetrsTemp.Open "select * from membershipPlan", con, adOpenDynamic, adLockOptimisticIf Not rsTemp.EOF ThenrsTemp.MoveFirstEnd IfDo While Not rsTemp.EOF If rsTemp.Fields(0) = mtxtplanname.Text Then rsTemp.Fields(0) = mtxtplanname.Text rsTemp.Fields(1) = Val(mtxtDuration.Text) 49
  46. 46. rsTemp.Fields(2) = Val(mtxtfinalAMT.Caption) rsTemp.Update mtxtplanname.Text = "" mtxtfinalAMT.Caption = "" mtxtdiscount.Text = "" mtxtamount.Text = "" Call refreshMembershipPlanTable Exit Do End IfrsTemp.MoveNextLooprsTemp.CloseEnd SubPrivate Sub membershipPlan_Click()planName = Trim(membershipPlan.Columns(0))mtxtplanname = planNamemtxtamount = membershipPlan.Columns(2)mtxtDuration = membershipPlan.Columns(1)End SubPrivate Sub mtxtamount_KeyPress(KeyAscii As Integer)If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub mtxtdiscount_Change()mtxtfinalAMT = mtxtamount - (Val(mtxtdiscount) * Val(mtxtamount)) / 100End SubPrivate Sub mtxtdiscount_KeyPress(KeyAscii As Integer)If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub qcombGroup_Click() Call clearGroup Call databaseconnection add new group initialization If qcombGroup.Text = "Add new group" Then Call clearGroup cmdSave.Enabled = True cmdUpdate.Enabled = False qgroupName.SetFocus rs.Open "select * from userGroup", con, adOpenDynamic, adLockOptimistic If Not rs.EOF Then rs.MoveLast End If qgroupId.Text = rs.Fields(0) + 1 50
  47. 47. rs.Close qgroupId.Enabled = False cmdSave.Enabled = True rs.Open "select * from userPermission", con, adOpenDynamic, adLockOptimistic If Not rs.EOF Then rs.MoveLast End If permId = rs.Fields(0) + 1 rs.Close Exit SubEnd IfcmdSave.Enabled = FalsecmdUpdate.Enabled = TrueqgroupId.Enabled = FalseDim tempArray() As StringtempArray = Split(qcombGroup.Text, " ")rs.Open "select * from userGroup", con, adOpenDynamic, adLockOptimisticIf Not rs.EOF Thenrs.MoveFirstEnd IfDo While Not rs.EOF If rs.Fields(0) = Val(tempArray(0)) Then permId = rs.Fields(2) qgroupId.Text = rs.Fields(0) qgroupName.Text = rs.Fields(1) Exit Do End If rs.MoveNextLooprs.Closers.Open "select * from userPermission", con, adOpenDynamic, adLockOptimisticIf Not rs.EOF Then rs.MoveFirstEnd IfDo While Not rs.EOF If rs.Fields(0) = permId Then If rs.Fields(1) = 1 Then qmemberRead.ListIndex = 0 Else qmemberRead.ListIndex = 1 End If If rs.Fields(2) = 1 Then qmemberAdd.ListIndex = 0 Else qmemberAdd.ListIndex = 1 51
  48. 48. End If If rs.Fields(3) = 1 Then qmemberEdit.ListIndex = 0 Else qmemberEdit.ListIndex = 1 End If If rs.Fields(4) = 1 Then qmemberDelete.ListIndex = 0 Else qmemberDelete.ListIndex = 1 End If If rs.Fields(5) = 1 Then qmeasureAdd.ListIndex = 0 Else qmeasureAdd.ListIndex = 1 End If If rs.Fields(6) = 1 Then qreadReport.ListIndex = 0 Else qreadReport.ListIndex = 1 End If If rs.Fields(7) = 1 Then qreadProgress.ListIndex = 0 Else qreadProgress.ListIndex = 1 End If Exit Do End If rs.MoveNext Looprs.CloseCall disconnectdatabaseEnd SubPublic Sub readGroup() qcombGroup.clear Call databaseconnection rs.CursorLocation = adUseClient rs.Open "select * from userGroup", con, adOpenDynamic, adLockOptimistic If Not rs.EOF Then While Not rs.EOF qcombGroup.AddItem (rs.Fields(0) & " " & rs.Fields(1)) rs.MoveNext Wend Else MsgBox "Record set is empty!", vbOKOnly + vbExclamation, "Warning" End If 52
  49. 49. rs.Close Call disconnectdatabase qcombGroup.AddItem ("Add new group")End SubPublic Sub clearGroup() qmemberAdd.Text = "" qmemberEdit.Text = "" qmemberRead.Text = "" qmemberDelete.Text = "" qmeasureAdd.Text = "" qreadProgress.Text = "" qreadReport.Text = "" qgroupId.Text = "" qgroupName.Text = "" cmdUpdate.Enabled = True cmdSave.Enabled = TrueEnd SubPublic Sub clearLoginFields()lid.Text = ""lusername.Text = ""lpassword.Text = ""lfname.Text = ""llname.Text = ""lgroup.Text = ""End SubPublic Sub refreshLoginTable() loginTable.ClearFields loginTableDC.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path &"Datasgsdata.mdb;Persist Security Info=False" loginTableDC.CommandType = adCmdText loginTableDC.RecordSource = "select * from login" Set loginTable.DataSource = loginTableDC loginTableDC.Refresh loginTable.RefreshEnd SubPublic Sub refreshMembershipPlanTable() membershipPlan.ClearFields membershipPlanDC.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &App.Path & "Datasgsdata.mdb;Persist Security Info=False" membershipPlanDC.CommandType = adCmdText membershipPlanDC.RecordSource = "select * from membershipPlan" Set membershipPlan.DataSource = membershipPlanDC membershipPlanDC.Refresh membershipPlan.RefreshEnd Sub 53
  50. 50. frmIndividualReport Form:Option ExplicitDim mId As IntegerPrivate Sub cmdGenerate_Click() If mId = -1 Then MsgBox "Select a member!", vbOKOnly + vbExclamation, "Warning" Exit Sub End If generateSelfReport (mId)End SubPrivate Sub Form_Load() mId = -1 lblBMIChange.Caption = "" lblBodyFatChange.Caption = "" lblDueDate.Caption = "" lblLastMeasurementDate.Caption = "" lblLastPaymentDate.Caption = "" lblMemberNameGreeting.Caption = "" lblSinceJoinedDate.Caption = "" lblTotalAmtPaid.Caption = "" lblWeightChange.Caption = "" memberTableDC.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path &"Datasgsdata.mdb;Persist Security Info=False" memberTableDC.CommandType = adCmdText memberTableDC.RecordSource = "select memberId, firstname, lastname from members" Set memberTable.DataSource = memberTableDCEnd SubPrivate Sub memberTable_Click() mId = Val(memberTable.Columns(0))End SubPublic Function generateSelfReport(memberId As Integer)Dim str As StringlblMemberNameGreeting.Caption = memberTable.Columns(0) & " " & memberTable.Columns(1) & " "& memberTable.Columns(2)str = getLastMeasurementDateOf(memberId)If Not str = "" ThenlblLastMeasurementDate.Caption = "Last measurement date: " & strElselblLastMeasurementDate.Caption = "Measurement History is empty"End Ifstr = ""lblBMIChange.Caption = "BMI change : " & getBMIchangeOf(memberId)lblBodyFatChange.Caption = "Body Fat change : " & getBodyFatChangeOf(memberId)lblWeightChange.Caption = "Weight change : " & getWeightChangeOf(memberId)str = getLastPaymentDateOf(memberId) 54
  51. 51. If Not str = "" ThenlblLastPaymentDate.Caption = "Last Payment Date : " & strElselblLastPaymentDate.Caption = "Payment History is empty"End Ifstr = ""str = getTotalAmtPaidOf(memberId)If Not str = "" ThenlblTotalAmtPaid.Caption = "Total amount paid : " & strElselblTotalAmtPaid.Caption = "Payment History is empty"End Ifstr = ""lblSinceJoinedDate.Caption = sinceJoinedDateOf(memberId)lblDueDate.Caption = "Due Date : " & getDueDateOf(memberId)End FunctionPrivate Sub txtSearch_Change() If txtSearch.Text = "" Then memberTable.ClearFields memberTableDC.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path& "Datasgsdata.mdb;Persist Security Info=False" memberTableDC.CommandType = adCmdText memberTableDC.RecordSource = "select memberId, firstname, lastname from members" Set memberTable.DataSource = memberTableDC memberTableDC.Refresh memberTable.Refresh Exit Sub End If If optRno.Value Then memberTable.ClearFields memberTableDC.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path& "Datasgsdata.mdb;Persist Security Info=False" memberTableDC.CommandType = adCmdText memberTableDC.RecordSource = "select memberId, firstname, lastname from members wherememberId like " & Val(txtSearch.Text) & "%" Set memberTable.DataSource = memberTableDC memberTableDC.Refresh memberTable.Refresh ElseIf optFname.Value Then memberTable.ClearFields memberTableDC.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path& "Datasgsdata.mdb;Persist Security Info=False" memberTableDC.CommandType = adCmdText memberTableDC.RecordSource = "select memberId, firstname, lastname from members wherefirstname like " & txtSearch.Text & "%" Set memberTable.DataSource = memberTableDC 55
  52. 52. memberTableDC.Refresh memberTable.Refresh End IfEnd SubPrivate Sub txtSearch_GotFocus() If optRno.Value = False And optFname.Value = False Then MsgBox "Choose the search option!", vbOKOnly + vbExclamation, "Warning" Exit Sub End If txtSearch.Text = ""End SubPrivate Sub txtSearch_KeyPress(KeyAscii As Integer) If optRno Then If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 And KeyAscii <> 45 And KeyAscii <> 47 Then KeyAscii = 0 End If End IfEnd SubfrmInitialReport Form:Option ExplicitPrivate Sub cmdProceed_Click()If optIndividual.Value = False And optReport.Value = False Then MsgBox "Select the report type!", vbOKOnly + vbExclamation, "Notification" Exit SubElseIf optIndividual.Value Then frmIndividualReport.ShowElse frmReport.ShowEnd IfUnload MeEnd SubfrmLogin Form:Option ExplicitPublic LoginSucceeded As BooleanPrivate Sub cmdCancel_Click() set the global var to false to denote a failed login LoginSucceeded = False Me.HideEnd SubPrivate Sub cmdClose_Click() If MsgBox("Are you really quit? ", vbYesNo, "Notification") = vbYes Then Unload Me End IfEnd SubPrivate Sub Form_Load() 56
  53. 53. txtUserName.BackColor = RGB(241, 241, 241)txtPassword.BackColor = RGB(241, 241, 241)lblOk.MousePointer = 99lblOk.MouseIcon = LoadPicture(App.Path & "hand.ico")End SubPrivate Sub lblOk_Click()If txtUserName.Text = "" And txtPassword.Text = "" ThenMsgBox "Enter the username and password!", vbOKOnly + vbExclamation, "Login"txtUserName.Text = ""txtPassword.Text = ""ElseIf txtUserName.Text = "" ThenMsgBox "Enter the username", vbOKOnly + vbExclamation, "Login"txtUserName.Text = ""txtPassword.Text = ""ElseIf txtPassword.Text = "" ThenMsgBox "Enter the password", vbOKOnly + vbExclamation, "Login"txtUserName.Text = ""txtPassword.Text = ""Else Call databaseconnection rs.Open "select * from login", con, adOpenStatic If rs.EOF = True Then MsgBox "Login entry is empty!", vbOKOnly + vbCritical, "Error" Exit Sub Else rs.MoveFirst End If While Not rs.EOF If Trim(txtUserName.Text) = rs.Fields(1) And Trim(txtPassword.Text) = rs.Fields(2) Then barName = rs.Fields(3) & " " & rs.Fields(4) Call disconnectdatabase dialogLoading.Show Unload Me Exit Sub Else rs.MoveNext End If Wend Call disconnectdatabase MsgBox "Bad login", vbOKOnly + vbExclamation, "Login" txtPassword.SetFocus End IfEnd SubfrmMain Form:Private Declare Function GetMenu Lib "User32" (ByVal hWnd As Long) As LongPrivate Declare Function GetSubMenu Lib "User32" (ByVal hMenu As Long, ByVal nPos As Long) As LongPrivate Declare Function SetMenuItemBitmaps Lib "User32" _ 57
  54. 54. (ByVal hMenu As Long, ByVal nPosition As Long, ByVal wFlags As Long, _ ByVal hBitmapUnchecked As Long, ByVal hBitmapChecked As Long) As LongPrivate Declare Function LoadImage Lib "User32" Alias "LoadImageA" _ (ByVal hInst As Long, ByVal lpsz As String, ByVal un1 As Long, _ ByVal n1 As Long, ByVal n2 As Long, ByVal un2 As Long) As LongConstant for SetMenuItemBitmapsPrivate Const MF_BYPOSITION As Long = &H400&Constants for LoadImagePrivate Const IMAGE_BITMAP As Long = &O0Private Const LR_LOADFROMFILE As Long = 16Private Const LR_CREATEDIBSECTION As Long = 8192Private Sub addmember_Click()frmMember.loadType = 0frmMember.ShowEnd SubPrivate Sub adminpanel_Click()dialogToAccessAdmin.ShowEnd SubPrivate Sub bodyprogress_Click()frmSearch.loadBodyProgress = TruefrmSearch.ShowEnd SubPrivate Sub calc_Click()Shell "C:WINDOWSSystem32calc.exe"End SubPrivate Sub employees_Click(Index As Integer)End SubPrivate Sub hideMetroGrid_Click() frmMetroStyleMenu.Visible = FalseEnd SubPrivate Sub logout_Click()frmLogin.ShowUnload MeEnd SubPrivate Sub MDIForm_Load()Me.Caption = "Smart Gym System : " & barNamefrmSideBar.Showsetting to fullscreendX = Me.WidthdY = Me.HeightsetFullScreen MefrmMetroStyleMenu.ShowDim ext As Stringext = GetFileExtension(App.Path & "wallpaper.jpeg")If ext = "jpg" Or ext = "png" Or ext = "jpeg" Or ext = "bmp" Then Me.Picture = LoadPicture(App.Path & "wallpaper.jpeg")Else 58
  55. 55. MsgBox "Invalid Image File!", vbOKOnly + vbExclamation, "Notification" Exit SubEnd Ifadd icons to the menu Dim hMenu As Long Dim hSubMenu As Long Dim hMenuImg As Long Dim sFileName As String Get the bitmap. sFileName = App.Path & "IconsmenuIconsinvisible.bmp" hMenuImg = LoadImage(0, sFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE OrLR_CREATEDIBSECTION) Get the menu item handle. hMenu = GetMenu(Me.hWnd) hSubMenu = GetSubMenu(hMenu, 0) Set the "mnuTwo" bitmap to the one that is loaded in memory. Call SetMenuItemBitmaps(hSubMenu, 0, MF_BYPOSITION, hMenuImg, 0) sFileName = App.Path & "IconsmenuIconsvisible.bmp" hMenuImg = LoadImage(0, sFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE OrLR_CREATEDIBSECTION) Call SetMenuItemBitmaps(hSubMenu, 1, MF_BYPOSITION, hMenuImg, 0) sFileName = App.Path & "IconsmenuIconsAdminPanel.bmp" hMenuImg = LoadImage(0, sFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE OrLR_CREATEDIBSECTION) Call SetMenuItemBitmaps(hSubMenu, 2, MF_BYPOSITION, hMenuImg, 0) sFileName = App.Path & "IconsmenuIconsLogOut.bmp" hMenuImg = LoadImage(0, sFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE OrLR_CREATEDIBSECTION) Call SetMenuItemBitmaps(hSubMenu, 3, MF_BYPOSITION, hMenuImg, 0) sFileName = App.Path & "IconsmenuIconsShutsystem.bmp" hMenuImg = LoadImage(0, sFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE OrLR_CREATEDIBSECTION) Call SetMenuItemBitmaps(hSubMenu, 4, MF_BYPOSITION, hMenuImg, 0) hMenu = GetMenu(Me.hWnd) hSubMenu = GetSubMenu(hMenu, 1) sFileName = App.Path & "IconsmenuIconsMemberList.bmp" hMenuImg = LoadImage(0, sFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE OrLR_CREATEDIBSECTION) Call SetMenuItemBitmaps(hSubMenu, 0, MF_BYPOSITION, hMenuImg, 0) sFileName = App.Path & "IconsmenuIconsMemberAdd.bmp" hMenuImg = LoadImage(0, sFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE OrLR_CREATEDIBSECTION) Call SetMenuItemBitmaps(hSubMenu, 1, MF_BYPOSITION, hMenuImg, 0) sFileName = App.Path & "IconsmenuIconsMeasurement.bmp" hMenuImg = LoadImage(0, sFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE OrLR_CREATEDIBSECTION) 59
  56. 56. Call SetMenuItemBitmaps(hSubMenu, 2, MF_BYPOSITION, hMenuImg, 0) sFileName = App.Path & "IconsmenuIconsProgress.bmp" hMenuImg = LoadImage(0, sFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE OrLR_CREATEDIBSECTION) Call SetMenuItemBitmaps(hSubMenu, 3, MF_BYPOSITION, hMenuImg, 0) sFileName = App.Path & "IconsmenuIconsMakePayment.bmp" hMenuImg = LoadImage(0, sFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE OrLR_CREATEDIBSECTION) Call SetMenuItemBitmaps(hSubMenu, 4, MF_BYPOSITION, hMenuImg, 0) hMenu = GetMenu(Me.hWnd) hSubMenu = GetSubMenu(hMenu, 3) sFileName = App.Path & "IconsmenuIconsCalculator.bmp" hMenuImg = LoadImage(0, sFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE OrLR_CREATEDIBSECTION) Call SetMenuItemBitmaps(hSubMenu, 0, MF_BYPOSITION, hMenuImg, 0) sFileName = App.Path & "IconsmenuIconsChangeWall.bmp" hMenuImg = LoadImage(0, sFileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE OrLR_CREATEDIBSECTION) Call SetMenuItemBitmaps(hSubMenu, 1, MF_BYPOSITION, hMenuImg, 0)End SubPrivate Sub MDIForm_Unload(Cancel As Integer)If MsgBox("Are you really want to exit?", vbYesNo + vbQuestion, "Notification") = vbYes Then Unload MeEnd IfEnd SubPrivate Sub measurement_Click() frmSearch.loadMeasurement = True frmSearch.ShowEnd SubPrivate Sub memberdetails_Click()frmMemberlist.ShowEnd SubPrivate Sub metroGrid_Click() If frmMetroStyleMenu.Visible = False Then frmMetroStyleMenu.Visible = True Exit Sub End If frmMetroStyleMenu.ShowEnd SubPrivate Sub payment_Click() frmSearch.loadPayment = True frmSearch.ShowEnd SubPrivate Sub reports_Click() frmInitialReport.Show 60
  57. 57. End SubPrivate Sub setWallpaper_Click()dialogToChangeWallpaper.ShowEnd SubPrivate Sub shutsystem_Click()If MsgBox("Are you really want to exit?", vbYesNo + vbQuestion, "Notification") = vbYes Then Unload MeEnd IfEnd SubfrmMember Form:Public loadType As IntegerPublic payment As BooleanPublic memberId As IntegerDim ibj As ObjectDim dtmTest As DateDim dateTimeNow As StringDim dd As StringDim tt As StringDim photoUrl As StringDim photoName As StringDim isClicked As BooleanPrivate Sub cmdBrowse_Click()CommonDialog1.ShowOpenpictureProfile.Picture = LoadPicture(CommonDialog1.FileName)photoUrl = CommonDialog1.FileNamephotoName = CommonDialog1.FileTitleEnd SubPrivate Sub cmdCancel_Click()If MsgBox("Exit?", vbYesNo + vbQuestion, "Notification") = vbYes ThenCall disconnectdatabaseUnload MeEnd IfEnd SubPrivate Sub cmdClear_Click()Call clearEnd SubPrivate Sub cmdProgress_Click()End SubPrivate Sub cmdReport_Click() If isClicked Then cmdReport.Caption = "Show Report" Me.Width = Line2.X2 isClicked = False 61
  58. 58. Else cmdReport.Caption = "Hide Report" Me.Width = 13920 isClicked = True End IfEnd SubPrivate Sub cmdSave_Click() If txtid.Text = "" And txtfname.Text = "" And txtlname.Text = "" And txtgender.Text = "Select" Andtxtdob.Text = "" And txtnumber.Text = "" And txtaddress.Text = "" Then MsgBox "Fill the fields", vbOKOnly + vbExclamation, "Warning!" End If If loadType = 1 Then memberModify rs.Open "select * from members" If Not rs.EOF Then rs.MoveFirst End If While Not rs.EOF If rs.Fields(0) = txtid.Text Then rs.Fields(0) = txtid.Text rs.Fields(1) = txtfname.Text rs.Fields(2) = txtlname.Text rs.Fields(3) = txtgender.Text rs.Fields(4) = txtnumber.Text rs.Fields(5) = txtaddress.Text rs.Fields(7) = txtdob.Value delete the previous photo Kill App.Path & rs.Fields(8) new photo is copied here If Not photoUrl = "" Then FileCopy photoUrl, App.Path & "ProfilePicture" & photoName End If set the photo to the database rs.Fields(8) = "ProfilePicture" & photoName Unload Me Exit Sub End If rs.MoveNext Wend ElseIf loadType = 2 Then memberReadOnly Else memberAdd dd = Format$(Now, "mm/dd/yyyy") tt = Format$(time, "hh:mm:ssAM/PM") dateTimeNow = dd & " " & tt rs.Open "select * from members" 62
  59. 59. If Not rs.EOF Then rs.MoveLast End If rs.AddNew rs.Fields(0) = txtid.Text rs.Fields(1) = txtfname.Text rs.Fields(2) = txtlname.Text rs.Fields(3) = txtgender.Text rs.Fields(4) = txtnumber.Text rs.Fields(5) = txtaddress.Text rs.Fields(6) = dateTimeNow rs.Fields(7) = txtdob.Value rs.Fields("dueDate") = dd If Not photoUrl = "" Then FileCopy photoUrl, App.Path & "ProfilePicture" & photoName End If rs.Fields(8) = "ProfilePicture" & photoName rs.Update rs.Close MsgBox "Saved!", vbOKOnly + vbInformation, "Notification" If MsgBox("Are you want to make payment?", vbYesNo, "Payment") = vbYes Then frmPayment.txtid = txtid.Text frmPayment.txtname = txtfname.Text & " " & txtlname.Text frmPayment.Show Unload Me Else Me.Refresh Call clear Unload Me End IfEnd IfEnd SubPrivate Sub Form_Load()Call databaseconnectionCall cleartxtgender.AddItem "Male"txtgender.AddItem "Female"txtid.Enabled = TruetxtdueDate.Enabled = Falsetxtnumber.MaxLength = 12cmdReport.Visible = FalsecmdBrowse.Visible = TruecmdCancel.Visible = TruecmdClear.Visible = TruecmdSave.Visible = TrueMe.Height = 6000Me.Width = Line2.X2 63
  60. 60. If loadType = 1 Then#######memberModify Me.Caption = "Edit member" txtid.Enabled = False txtdoj.Enabled = False cmdSave.Caption = "Update" Me.Height = 6000 Me.Width = Line2.X2 cmdReport.Visible = False rs.Open "select * from members", con, adOpenDynamic, adLockOptimistic If Not rs.EOF Then rs.MoveFirst End If While Not rs.EOF If rs.Fields(0) = memberId Then txtid.Text = rs.Fields(0) txtfname.Text = rs.Fields(1) txtlname.Text = rs.Fields(2) txtgender.Text = rs.Fields(3) txtnumber.Text = rs.Fields(4) txtaddress.Text = rs.Fields(5) txtdoj.Text = rs.Fields(6) txtdob.Value = rs.Fields(7) If FileExists(App.Path & rs.Fields(8)) Then Image1.Picture = LoadPicture(App.Path & rs.Fields(8)) End If txtdueDate.Text = rs.Fields(9) rs.Close Exit Sub End If rs.MoveNext WendElseIf loadType = 2 Then########memberReadOnly Me.Caption = "Member in detail" cmdClear.Visible = False cmdCancel.Visible = False cmdSave.Visible = False cmdReport.Visible = True cmdBrowse.Visible = False txtaddress.Enabled = False txtdob.Enabled = False txtdoj.Enabled = False txtfname.Enabled = False txtgender.Enabled = False txtid.Enabled = False txtlname.Enabled = False 64
  61. 61. txtnumber.Enabled = False Me.Height = 9210 Me.Width = Line2.X2 rs.Open "select * from members", con, adOpenDynamic, adLockOptimistic If Not rs.EOF Then rs.MoveFirst End If Do While Not rs.EOF If rs.Fields(0) = memberId Then txtid.Text = rs.Fields(0) txtfname.Text = rs.Fields(1) txtlname.Text = rs.Fields(2) txtgender.Text = rs.Fields(3) txtdob.Value = rs.Fields(7) txtnumber.Text = rs.Fields(4) txtaddress.Text = rs.Fields(5) txtdoj.Text = rs.Fields(6) Dim fullPath As String fullPath = App.Path & rs.Fields(8) pictureProfile.Picture = LoadPicture(fullPath) txtdueDate.Text = rs.Fields(9) Exit Do End If rs.MoveNext Loop rs.Close Dim rs2 As ADODB.Recordset Set rs2 = New ADODB.Recordset rs2.CursorLocation = adUseClient rs2.Open "SELECT * FROM paymentTransaction WHERE memberId=" & Val(txtid.Text), con,adOpenDynamic, adLockOptimistic Set PaymentHistory.DataSource = rs2 Call generateSelfReport Exit SubElse#######memberAdd Me.Caption = "New member" txtdoj.Enabled = False Me.Height = Line1.Y2 + 400 dd = Format$(Now, "mm/dd/yyyy") tt = Format$(time, "hh:mm:ssAM/PM") dateTimeNow = dd & " " & tt txtdoj.Text = dateTimeNow ***********Generating ID for the newmember********************************* rs.Open "Select memberId from members", con, adOpenStatic, adLockOptimistic 65
  62. 62. If rs.EOF = True Then txtid.Text = 1 Else rs.MoveLast txtid.Text = rs.Fields(0) + 1 End If rs.Close****************************************************************************End IfEnd SubPublic Function clear() txtid.Locked = True txtid.Text = "" txtfname.Text = "" txtlname.Text = "" txtgender.Text = "Select" txtdob.Value = "1/1/2012" txtnumber.Text = "" txtaddress.Text = ""End FunctionPrivate Sub Form_Unload(Cancel As Integer) If loadType = 0 Then If MsgBox("Do you want to cancel?", vbOKOnly + vbQuestion, "Notification") = vbYes Then Unload Me Call disconnectdatabase Exit Sub Else Exit Sub End If End If Unload Me Call disconnectdatabaseEnd SubPublic Function generateSelfReport()Dim str As StringlblMemberNameGreeting.Caption = txtid.Text & " " & txtfname.Text & " " & txtlname.Textstr = getLastMeasurementDateOf(Val(txtid.Text))If Not str = "" ThenlblLastMeasurementDate.Caption = "Last measurement date: " & strElselblLastMeasurementDate.Caption = "Measurement History is empty"End Ifstr = ""lblBMIChange.Caption = "BMI change : " & getBMIchangeOf(Val(txtid.Text))lblBodyFatChange.Caption = "Body Fat change : " & getBodyFatChangeOf(Val(txtid.Text))lblWeightChange.Caption = "Weight change : " & getWeightChangeOf(Val(txtid.Text))str = getLastPaymentDateOf(Val(txtid.Text)) 66
  63. 63. If Not str = "" ThenlblLastPaymentDate.Caption = "Last Payment Date : " & strElselblLastPaymentDate.Caption = "Payment History is empty"End Ifstr = ""str = getTotalAmtPaidOf(Val(txtid.Text))If Not str = "" ThenlblTotalAmtPaid.Caption = "Total amount paid : " & strElselblTotalAmtPaid.Caption = "Payment History is empty"End Ifstr = ""lblSinceJoinedDate.Caption = sinceJoinedDateOf(Val(txtid.Text))lblDueDate.Caption = "Due Date : " & getDueDateOf(Val(txtid.Text))Dim rs3 As ADODB.RecordsetSet rs3 = New ADODB.Recordsetrs3.CursorLocation = adUseClientrs3.Open "SELECT * FROM progressMember WHERE memberId=" & Val(txtid.Text), con,adOpenDynamic, adLockOptimisticSet measurementHistory.DataSource = rs3End FunctionPrivate Sub txtnumber_KeyPress(KeyAscii As Integer) If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubfrmMemberlist Form:Dim memberId As IntegerDim oSelRows As SelBookmarksDim bookmark As DoublePrivate Sub cmdAddMember_Click() frmMember.loadType = 0 frmMember.ShowEnd SubPrivate Sub cmdDeleteMember_Click() If memberId = -1 Then MsgBox "Select the member to delete!", vbOKOnly + vbExclamation, "Notification" Exit Sub End If If MsgBox("Are you really want to delete the user?", vbYesNo + vbQuestion, "Notification") = vbYesThen delete rs.Open "Select * from members", con, adOpenDynamic, adLockOptimistic If Not rs.EOF Then rs.MoveFirst End If 67
  64. 64. Do While Not rs.EOF If rs.Fields(0) = memberId Then rs.Delete rs.Update rs.Close Exit Do End If rs.MoveNext Loop rs.Close rs.Open "select * from progressMember", con, adOpenDynamic, adLockOptimistic If Not rs.EOF Then rs.MoveFirst End If Do While Not rs.EOF If rs.Fields(0) = memberId Then rs.Delete rs.Update rs.Close Exit Do End If rs.MoveNext Loop rs.Close ElseIf answer = vbNo Then frmMemberlist.SetFocus End IfEnd SubPrivate Sub cmdMakePayment_Click() If memberId = -1 Then MsgBox "Select the member to make payment!", vbOKOnly + vbExclamation, "Notification" Exit Sub End If frmPayment.memberId = memberId frmPayment.Show memberId = -1End SubPrivate Sub cmdModifyMember_Click() If memberId = -1 Then MsgBox "Select the member to modify!", vbOKOnly + vbExclamation, "Notification" Exit Sub End If frmMember.loadType = 1 frmMember.memberId = memberId frmMember.Show memberId = -1 68
  65. 65. End SubPrivate Sub cmdShowProfile_Click() If memberId = -1 Then MsgBox "Select the member to modify!", vbOKOnly + vbExclamation, "Notification" Exit Sub End If frmMember.loadType = 2 frmMember.memberId = memberId frmMember.Show memberId = -1End SubPrivate Sub cmmdTakeMeasurement_Click() frmMemberMeasurement.memberId = Val(DataGrid1.Columns(0)) frmMemberMeasurement.ShowEnd SubPrivate Sub DataGrid1_Click() memberId = DataGrid1.Columns(0)End SubPrivate Sub Form_Load() memberId = -1 MsgBox memberId Me.Picture = Nothing memberTableDC.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path &"Datasgsdata.mdb;Persist Security Info=False" memberTableDC.CommandType = adCmdText memberTableDC.RecordSource = "select * from members" Set DataGrid1.DataSource = memberTableDCEnd SubPrivate Sub searchField_Change() If searchField.Text = "" Then DataGrid1.ClearFields memberTableDC.CommandType = adCmdText memberTableDC.RecordSource = "Select * from members" Set DataGrid1.DataSource = memberTableDC memberTableDC.Refresh DataGrid1.Refresh Exit Sub End If If optRno Then DataGrid1.ClearFields memberTableDC.CommandType = adCmdText memberTableDC.RecordSource = "Select * from members where memberId like " &Val(searchField.Text) & "%" Set DataGrid1.DataSource = memberTableDC memberTableDC.Refresh DataGrid1.Refresh 69
  66. 66. ElseIf optFname Then DataGrid1.ClearFields memberTableDC.CommandType = adCmdText memberTableDC.RecordSource = "Select * from members where firstname like " &searchField.Text & "%" Set DataGrid1.DataSource = memberTableDC memberTableDC.Refresh DataGrid1.Refresh End IfEnd SubPrivate Sub searchField_KeyPress(KeyAscii As Integer) If optRno Then If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End If End IfEnd SubfrmMemberMeasurementPublic memberId As IntegerPublic memberGender As BooleanDim dateTimeNow As StringDim dd As StringDim tt As StringPrivate Sub c1height_KeyPress(KeyAscii As Integer)If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub c2weight_KeyPress(KeyAscii As Integer)If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub c3neck_KeyPress(KeyAscii As Integer) If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub c4hips_KeyPress(KeyAscii As Integer) If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub c5waist_Change()If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 70
  67. 67. End IfEnd SubPrivate Sub c6forearm_KeyPress(KeyAscii As Integer) If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub c7wrist_KeyPress(KeyAscii As Integer) If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub cmdCalculate_Click() lblBMI.Caption = calculateBMIbyMetric(Val(c2weight.Text), Val(c1height.Text)) lblBodyFat.Caption = calculateBodyFat(memberGender, Val(c2weight.Text), Val(c5waist.Text),Val(c7wrist.Text), Val(c4hips.Text), Val(c6forearm.Text)) & "%"End SubPrivate Sub cmdCancel_Click() If MsgBox("Measurement will be declined", vbYesNo + vbQuestion, "Notification") = vbYes Then Unload Me End IfEnd SubPrivate Sub cmdSave_Click() If c1height.Text = "" And _ c2weight.Text = "" And _ c3neck.Text = "" And _ c4hips.Text = "" And _ c5waist.Text = "" And _ c6forearm.Text = "" And _ c7wrist.Text = "" Then MsgBox "Core Measurement fields are mandatory!", vbOKOnly + vbExclamation, "Notification" Exit Sub End If dd = Format$(Now, "mm/dd/yyyy") tt = Format$(time, "hh:mm:ssAM/PM") dateTimeNow = dd & " " & tt Call databaseconnection rs.Open "select * from progressMember", con, adOpenDynamic, adLockOptimistic If Not rs.EOF Then rs.MoveLast End If rs.AddNew rs.Fields(0) = Val(lblmemberId.Caption) rs.Fields(1) = Val(c1height.Text) rs.Fields(2) = Val(c2weight.Text) rs.Fields(3) = Val(lblBMI.Caption) rs.Fields(4) = Val(d1bicep.Text) 71
  68. 68. rs.Fields(5) = Val(c4hips.Text) rs.Fields(6) = Val(d2thigh.Text) rs.Fields(7) = Val(c3neck.Text) rs.Fields(8) = Val(c6forearm.Text) rs.Fields(9) = Val(d3chest.Text) rs.Fields(10) = Val(d4calves.Text) rs.Fields(11) = dateTimeNow Dim tempArray() As String tempArray = Split(lblBodyFat.Caption, "%") rs.Fields(12) = Val(tempArray(0)) rs.Fields(13) = Val(c5waist.Text) rs.Fields(14) = Val(c7wrist.Text) rs.Update rs.Close MsgBox "Measurement of " & memberId & " was successfully added", vbOKOnly + vbInformation,"Notification" Unload MeEnd SubPrivate Sub d1bicep_KeyPress(KeyAscii As Integer) If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub d2thigh_KeyPress(KeyAscii As Integer) If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub d3chest_KeyPress(KeyAscii As Integer) If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub d4calves_KeyPress(KeyAscii As Integer) If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub Form_Load() optionCore.Value = True corePanel.Enabled = True detailedPanel.Enabled = False detailedPanel.BackColor = &HE0E0E0 Me.Caption = "Measurement" dd = Format$(Now, "mm/dd/yyyy") tt = Format$(time, "hh:mm:ssAM/PM") dateTimeNow = dd 72
  69. 69. lblDate.Caption = dateTimeNow Call databaseconnection rs.Open "select * from members", con, adOpenDynamic, adLockOptimistic If Not rs.EOF Then rs.MoveFirst End If Do While Not rs.EOF If rs.Fields(0) = memberId Then lblmemberId.Caption = rs.Fields(0) lblname.Caption = rs.Fields(1) & " " & rs.Fields(2) If rs.Fields(3) = "Male" Then memberGender = True Else memberGender = False End If Exit Do End If rs.MoveNext Loop rs.CloseEnd SubPrivate Sub Form_Unload(Cancel As Integer) If MsgBox("Measurement will be declined", vbYesNo + vbQuestion, "Notification") = vbYes Then Unload Me End IfEnd SubPrivate Sub optionCore_Click() corePanel.Enabled = True detailedPanel.Enabled = False detailedPanel.BackColor = &HE0E0E0End SubPrivate Sub optionDetailed_Click() corePanel.Enabled = True detailedPanel.Enabled = True detailedPanel.BackColor = corePanel.BackColorEnd SubfrmMetroStyleMenuPublic memberId As IntegerPublic memberGender As BooleanDim dateTimeNow As StringDim dd As StringDim tt As StringPrivate Sub c1height_KeyPress(KeyAscii As Integer)If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then 73
  70. 70. KeyAscii = 0 End IfEnd SubPrivate Sub c2weight_KeyPress(KeyAscii As Integer)If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub c3neck_KeyPress(KeyAscii As Integer) If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub c4hips_KeyPress(KeyAscii As Integer) If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub c5waist_Change()If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub c6forearm_KeyPress(KeyAscii As Integer) If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub c7wrist_KeyPress(KeyAscii As Integer) If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub cmdCalculate_Click() lblBMI.Caption = calculateBMIbyMetric(Val(c2weight.Text), Val(c1height.Text)) lblBodyFat.Caption = calculateBodyFat(memberGender, Val(c2weight.Text), Val(c5waist.Text),Val(c7wrist.Text), Val(c4hips.Text), Val(c6forearm.Text)) & "%"End SubPrivate Sub cmdCancel_Click() If MsgBox("Measurement will be declined", vbYesNo + vbQuestion, "Notification") = vbYes Then Unload Me End IfEnd SubPrivate Sub cmdSave_Click() If c1height.Text = "" And _ c2weight.Text = "" And _ 74
  71. 71. c3neck.Text = "" And _ c4hips.Text = "" And _ c5waist.Text = "" And _ c6forearm.Text = "" And _ c7wrist.Text = "" Then MsgBox "Core Measurement fields are mandatory!", vbOKOnly + vbExclamation, "Notification" Exit Sub End If dd = Format$(Now, "mm/dd/yyyy") tt = Format$(time, "hh:mm:ssAM/PM") dateTimeNow = dd & " " & tt Call databaseconnection rs.Open "select * from progressMember", con, adOpenDynamic, adLockOptimistic If Not rs.EOF Then rs.MoveLast End If rs.AddNew rs.Fields(0) = Val(lblmemberId.Caption) rs.Fields(1) = Val(c1height.Text) rs.Fields(2) = Val(c2weight.Text) rs.Fields(3) = Val(lblBMI.Caption) rs.Fields(4) = Val(d1bicep.Text) rs.Fields(5) = Val(c4hips.Text) rs.Fields(6) = Val(d2thigh.Text) rs.Fields(7) = Val(c3neck.Text) rs.Fields(8) = Val(c6forearm.Text) rs.Fields(9) = Val(d3chest.Text) rs.Fields(10) = Val(d4calves.Text) rs.Fields(11) = dateTimeNow Dim tempArray() As String tempArray = Split(lblBodyFat.Caption, "%") rs.Fields(12) = Val(tempArray(0)) rs.Fields(13) = Val(c5waist.Text) rs.Fields(14) = Val(c7wrist.Text) rs.Update rs.Close MsgBox "Measurement of " & memberId & " was successfully added", vbOKOnly + vbInformation,"Notification" Unload MeEnd SubPrivate Sub d1bicep_KeyPress(KeyAscii As Integer) If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfPrivate Sub d2thigh_KeyPress(KeyAscii As Integer) If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 75
  72. 72. End IfEnd SubPrivate Sub d3chest_KeyPress(KeyAscii As Integer) If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub d4calves_KeyPress(KeyAscii As Integer) If Not Chr(KeyAscii) Like "[0-9]" And KeyAscii <> 8 Then KeyAscii = 0 End IfEnd SubPrivate Sub Form_Load() optionCore.Value = True corePanel.Enabled = True detailedPanel.Enabled = False detailedPanel.BackColor = &HE0E0E0 Me.Caption = "Measurement" dd = Format$(Now, "mm/dd/yyyy") tt = Format$(time, "hh:mm:ssAM/PM") dateTimeNow = dd lblDate.Caption = dateTimeNow Call databaseconnection rs.Open "select * from members", con, adOpenDynamic, adLockOptimistic If Not rs.EOF Then rs.MoveFirst End If Do While Not rs.EOF If rs.Fields(0) = memberId Then lblmemberId.Caption = rs.Fields(0) lblname.Caption = rs.Fields(1) & " " & rs.Fields(2) If rs.Fields(3) = "Male" Then memberGender = True Else memberGender = False End If Exit Do End If rs.MoveNext Loop rs.CloseEnd SubPrivate Sub Form_Unload(Cancel As Integer) If MsgBox("Measurement will be declined", vbYesNo + vbQuestion, "Notification") = vbYes Then Unload Me End If 76
  73. 73. End SubPrivate Sub optionCore_Click() corePanel.Enabled = True detailedPanel.Enabled = False detailedPanel.BackColor = &HE0E0E0End SubPrivate Sub optionDetailed_Click() corePanel.Enabled = True detailedPanel.Enabled = True detailedPanel.BackColor = corePanel.BackColorEnd SubfrmPayment Form:Public memberId As IntegerDim duration As IntegerOption ExplicitPrivate Sub cmdCancel_Click()Call disconnectdatabaseUnload MeEnd SubPrivate Sub cmdPay_Click()rs.Open "select * from paymentTransaction", con, adOpenDynamic, adLockOptimisticIf Not rs.EOF Thenrs.MoveLastEnd Ifrs.AddNewrs.Fields(0).Value = txtid.Textrs.Fields(1).Value = Format$(Now, "mm/dd/yyyy") & " " & Format$(time, "hh:mm:ssAM/PM")rs.Fields(2).Value = Val(txtPayableAmt.Caption)rs.Fields(3).Value = Val(lblBillno.Caption)rs.Updaters.Closers.Open "select * from members", con, adOpenDynamic, adLockOptimisticIf Not rs.EOF Thenrs.MoveFirstEnd IfDo Until rs.EOF If rs.Fields(0) = Val(txtid.Text) Then Dim dueSTR As String dueSTR = rs.Fields("dueDate").Value rs.Fields("dueDate").Value = addMonth(dueSTR, duration) rs.Update If MsgBox("Payment Transaction done! " & vbCrLf & "Do you want to print the receipt?", vbYesNo+ vbQuestion, "Notification") = vbYes Then Receipt Print page generation *************************************************** 77

×