Sunteți pe pagina 1din 180

CHAPTER

1
INTRODUCTION & OBJECTIVES
1

INTRODUCTION
India will be global InfoTech giant in near future. This project is being used to automate all the phases of AC Nelson communication. This Project has helped to hole management in its smooth management and increase in efficiency and effectiveness.

This Software is made for gating record for Cellular Enquiry. It takes information about the Callar of the company where this Product is running and take information about complain Enquiry. You can use this product to store information about your Company employees.

Main phases are covered in the application :-

Maintain the Caller Details Detail Maintain Complain Maintain Enquiry Details Maintain Employee Details Administrator

Maintain the Caller Details Detail It maintains all the Information about Caller of an Enquiry. This form displays the Caller Personal Detail With his latest instrument Detail.The email Field of the Form is gated record of Channel Email Address.You modify the entire Field except Cell Number if you are a permitted User.The mobile number of the Caller is the Id of the Caller.You can change the Cell number of Caller to the help of change Cell Number Form but it can only possible for Administrator Log. Permitted User can also delete the Caller Record. Maintain Complain It maintains all the Complain of Caller of an Enquiry.This form displays the Caller Instrument detail and Complain of enquiry. Complain id of this field is auto generated. The auto number is date and 001 to 999. Maintain Enquiry Details It maintains all the Information about Enquiry after Enquiry Company working on it. It is necessary to maintain this record either problem is found or not. Otherwise product dos not accept other problem of that Cell number. Maintain Employee Details It maintains all the Information about Employee of the Enquiry Company It is necessary to maintain this record because it gives combo item for Employee

Administrator Change Password: -This form use to change changes the user password. To change password of a user select login of user and type password in password field. After this type new password and re password for checking new password and re password respectively. Click Apply to conform and after this click Ok button for change password.

Create User: -This form is use to create new users. Fill all fields and click Apply and Ok button. A new User is created.

Delete user: -This form use to delete a user select login id of Existing user and type the password and click delete button. When You click the Delete button a massage box is displayed if you click Ok button of massage box then User is deleted.

Change Cell Number: -This form is use to change the cell number of Caller. To change cell number Firstly type cell number and new cell number of a corresponding fields and click Apply and Ok button.

User Permission: -This form is use to giving permission to the users. To give permission Select the login id and check the permission and click apply

**OBJECTIVES**
Following are the main objective of the project titled AC

Nelson

communication is as follows: The main objectives of using Relational Database Management System are as follows: 1. CONTROL REDUNDANCY: The System should identify existence of

common data and avoid duplicate recording relationships of pointers should be used to locate data which are used many times selective redundancy is sometimes allowed to improve performance or far better reliability. 2. DATA INTEGRITY:Consistency of data values and relationships must be preserved in order to achieve this the system must ensure validity of data by using good editing, synchronize updating and propagating changes to other related data element it also involves maintaining audit trails to enable recovery if errors are deleted. 3. DATA SECURITY :This is concerned with protecting access to data protection is needed at many levels for access, modification, deletion or display access restriction may be for individual data items or group of items. 4. DATABASE PERFORMANCE: The system should be able to provide timely information as required. The cost of storing and retrieving the data should be commensurate with the value of information provided.

5. MANAGEMENT CONTROL : As the dependence of an organization on a database increases positive management controls should be exercised over addition, deletion, changes and disposition of data must be protected to start legal accounting and auditing requirements.

The objectives of the application are as follows: -

The COMMUNICATION CHANNEL SYSTEM is meant to provide facilities to record the information of each customer. To maintain the Enquiry about the Mobile Phone of various types customer must be register to the company. The main objective of COMMUNICATION CHANNEL SYSTEM is to keep the record of the entire enquiry and its lead\guidance. 1. Generating a unique customer enquiry number to each customer enquiry. 2. Customer mobile number is its unique number. 3. This application also maintains all records related to mobile channels, brand and its models. 4. Employee master is also maintained by this application. This application is not for a big company it is used by the lower level employee for data entry, but the main power is also given to Administrator.

The software also provides the facility to generate reports using the tool Data report designer for each customer enquiry corresponding to its mobile number or enquiry number. All the permission to users given by the administrator. These permissions are add, modify, delete, restore data, data backup.

CHAPTER

2
SYSTEM ANALYSIS

INTRODUCTION TO SYSTEM
A system is a set or arrangement of functionally dependent components interactively working together to predefined goal by processing information.

Analysis is the process of diagnosing situations, done with a defiant aim, with the boundaries of the system kept in mind to produce a report based on the findings. Analysis is a Fact Finding Technique where studies like Users need, System Requirement Specifications, Feasibility Analysis and Cost-Benefit Analysis are carried out. This is the most important step in a software project, where we get a general idea about the needs of the customers or end users by having man-to-man conversation with them and about the various conditions and restrictions that have to be taken care of while developing the software application. System analysis was conducted with the following objectives in mind:

* * *

Identification of need Information Gathering Evaluate the system concept of feasibility

1)

IDENTIFICATION OF NEED

The success of the system depends largely on how accurately a problem is defined, thoroughly investigated, and properly carried out through the choice of solution. Users

need identification and analysis are concerned with what the user needs rather then what he/she wants. Until the problem has been identified, defined, and evaluated the analyst shouldnt think about solutions and whether the problem is worth solving or not. This step is intended to help the user and the analyst understand the real problem rather than its symptoms.

2)

INFORMATION GATHERING

A key part of system development is gathering information. The analyst must know what information to get, where to find it, how to collect it, and how to make use of it. The proper use of tools for gathering information is the key to successful analysis.

Since the application to be developed is to be used on the Internet and there is no direct user available to interact so the

information is gathered from the existing sites and portals as well as various print media.

1.

Preliminary Investigation:
Once the request for the information system development is received, the

first system activity preliminary investigation begins. This activity is independent of the software-engineering paradigm. That means whether a system will be developed by

10

means of the system development life cycle (SDLC), a prototyping strategy, or the structured analysis method, or a combination of these methods, preliminary investigation must be performed first. The data that are collected from the organization as the part of preliminary investigation is basically follows three mechanisms also called Fact Finding Techniques : REVIEWING ORGANIZATION DOCUMENTS CONDUCTING INTERVIEWS AND ON-SITE OBSERVATION THIS ACTIVITY HAS THREE PARTS: REQUEST CLARIFICATION FEASIBILITY STUDY AND REQUEST APPROVAL

1.)

REQUEST CLARIFICATION

It may be possible that the request that has been received is not clearly defined and it is difficult to figure out what for the request is. So, in that case, the person who has made the request is contacted and asked to explain the request. If the request is appropriate enough then in that case feasibility study is carried out for that request. I.e. before the feasibility study, the request must be determined and defined precisely.

11

2.)

FEASIBILITY STUDY After request clarification the feasibility study is

performed. In actually when we are performing feasible study ,we must take care of three types of feasible study. These three feasibilities are as follows : i. TECHNICAL FEASIBILITY :- In this feasibility test,we check out that , can the work for the project be done with current equipment ? , Existing software tehnology & by available personnel.?

ii.

ECONOMIC FEASIBILITY: system to make the cost acceptable .?

Are there sufficient benefits in creating the

iii.

OPREATION FEASIBILITY :- Will the system be used if it is developed and implemented .?

NOTE :The feasibility study is carried out by small group of people who are familiar with information system techniques and understanding part of organization .who affect the project and skilled in system analysis and design process.

3.)

REQUEST APPROVAL

12

If the request for the information system is feasible in that case the request is approved and then starts the real analysis phase called Requirement study. It is not necessary that all the request are made from organization is desirable or feasible . some organization receives so many request from employees that are only few of them can be pursued . However , those projects are feasible and desirable are put into the schedule .

After a project request is approved its cost, priority ,completion time and personnel requirement are estimated and used to deter mine where it to add any existing project list.

13

CHAPTER

3
FEASIBILITY STUDY
14

FEASIBILITY STUDY
Introduction:
The Feasibility study of any system is mainly intended to study and analyse proposed system and to decide whether the system under consideration will be viable or not after implementation. That is it determines the usability of the project after deployment. To come to result a set of query is answered keeping the efficiency of the software and its impact on the domain for which it was developed. It main emphasis is on the following three questions elucidated below as: What are the users requirements and how does a candidate system meet them? What resources are available for the proposed systems. Is it worth solving the problem? What is the likely impact of the proposed system on the organisation? I.e. how does the proposed system fit with in the organisation? Thus since the feasibility study may lead to commitment of large resources, it becomes necessary that it should be conducted competently and no fundamental errors of judgment are made.

Different types of feasibility study and the way we performed on our project Communication Channel Systemare elucidated below.

15

FEASIBILITY STUDY

3.1

TECHINICAL FEASIBILITY
3.1.1 Features of Visual Basic 3.1.2 Features of SQL Server 3.1.3 Features of Seagate Data Reports 3.1.4 Data Reports Versus the Microsoft Data Report Designer

3.2

ECONOMIC FEASIBILITY
3.2.1 Classification of Costs & Benefits 3.2.1.1 Tangible or Intangible Costs & Benefits 3.2.1.2 Direct or Indirect Costs and Benefits 3.2.1.3 Fixed or Variable Costs and Benefits

3.2.2 Cost Estimations of the projects 3.2.3 The Time Value of Money

3.3

OPERATIONAL FEASIBILITY

3.1 Technical Feasibility:

16

In technical feasibility we study all technical issues regarding the proposed system. It is mainly concerned with the specifications of the equipments and the

software, which successfully satisfies the end-users requirement. The technical needs of the system may vary accordingly but include: The feasibility to produce outputs in a given time. Response time under certain conditions. Ability to process a certain volume of the transaction at a particular speed. Facility to communicate data to a distant location.
Under this analysis process questions like (i) does the compatible platform exist in the organization for the proposed system or can it be procured by the organization? (ii) does the proposed equipment have the technical capacity to hold the data required using the new system? (iii) would it be possible to upgrade the system after it is developed and implemented, if necessary? And (iv) would the recommended technology guarantee the reliability, accuracy and data security?

3.1.1 Features of Visual Basic


Visual Basic is a widely popular development environment. Microsoft estimates that there are upwards of three million VB developers in the world. Visual Basic provides integrated development environment or IDE as it integrates many functions such as design, editing, compiling and debugging within a common environment. In most traditional development tools, each

17

of these functions would operate as a separate program, each with its own interface. VB IDE allows us to create, run, and debug windows programs in one application without the need to open additional programs. It contains several kinds of windows controls such as command buttons, check boxes, scrollbars, text boxes etc. which can be added to our project as needed. Instead of writing numerous lines of code to describe the appearance and location of interface elements, the user

simply drag & drop prebuilt objects into place on the screen. It is Event Driven programming language i.e. programming which responds to Windows events like a mouse button click pressing a key, loading or unloading of forms etc. Events come from any of the controls as well as from internal activities such as the PCs clock, in random order. The user might perform several of these events in a different order each time the user runs the program. Inarguably VB is the most popular easiest and fastest way to create applications for the windows environment.

18

3.1.2 Features of Microsoft SQL Server


There are many management tools in SQL server as given below:

1. SQL Server Enterprise Manager: Used to perform server and enterprise administrative tasks. 2. SQL Server Profiler: Used to monitor, record, and support auditing of Microsoft SQL Server database activity. 3. SQL Server Query Analyzer: Used to enter Transact-SQL statements and procedures interactively. Also provides graphical query analysis in the form of graphical show plans. 4. MS DTC Client Support: Microsoft Distributed Transaction Coordinator is used to extend database transactions across multiple servers. 5. Replication Conflict Viewer: Used to view and, if necessary, change the way synchronization conflicts are resolved. Microsoft SQL Server includes many wizards that we can use to perform complex administrative tasks like Backup

19

Wizard, Failover Setup Wizard, Create Database Wizard, Create Index Wizard etc.

Microsoft SQL Server is designed to work effectively in a number of environments:


1.

As a two-tier or multitier client/server database system As a desktop database system

2.

Microsoft SQL Server includes many tools and features that simplify our ability to install, deploy, manage, and use databases. Having data stored and managed in a central location offers several advantages:
1.

Each data item is stored in a central location where all users can work with it. Business and security rules can be defined one time on the server and enforced equally among all users.

2.

3.

A relational database server optimizes network traffic by returning only the data an application needs.

20

4.

Hardware costs can be minimized. Because the data is not stored on each client, clients do not have to dedicate disk space to storing data.

5.

Maintenance tasks such as backing up and restoring data are simplified because they can focus on the central server.

While SQL Server works effectively as a server, it can also be used in applications that need stand-alone databases stored locally on the client

Dynamic Self-Management: SQL Server version 7.0 reconfigures itself automatically and dynamically while running. If more work is done in SQL Server, it can dynamically acquire additional resources, such as memory. As the workload falls, SQL Server frees the resources back to the system
SQL Server supports a number of APIs for building general-purpose database applications:

1. ActiveX Data Objects (ADO) 2. OLE DB

3. Open Database Connectivity (ODBC) and the object APIs built over ODBC: Remote Data Objects (RDO) and Data Access Objects (DAO)

21

4. Embedded SQL for C (ESQL) We can start transactions in Microsoft SQL Server Explicitly by issuing a BEGIN TRANSACTION statement, autocommit (default mode), or implicit transactions. This system of security is based on the IDs used to identify users. Microsoft SQL Server offers different types of Help to assist us.

3.1.3 Features of Data Reports


Data reports is an excellent reporting tool which can be used to prepare efficient & professional looking reports in few interactive steps. Data Reports now in its 8Th major revision, remains the market leader & defacto standard for business and corporate report writing. Data report is now bundled over 150 leading software packages, including Microsoft Back office& Visual studio packages together with ERP & accounting packages from different vendors. Data Reports developer interface have been designed to work with most popular windows development tools. Seagate software provides several methods for us to use visual basic to create custom reporting application. They are:

22

3 Report Engine API: The API completely exposes every Data Reports function that can be changed programmatically.

4 Report Engine Automation service: This was Seagates entry into the standard COM Automation Server Arena. 5 Report Designer Component: It combines both report design and integration functionality inside VB. Much of report design work can be accomplished right inside VB. 6 ActiveX Control: This ActiveX control is a very simple interface to Data Reports.

3.1.4 Data Reports Vs the Microsoft Data Report Designer


In VB versions prior to 6, the only reporting options we had were excruciatingly painful record-by-record coding options, or the various bundled versions of Data Reports. Visual Basic 6 introduced the Microsoft Data Report Designer. While the Data Report Designer is fairly well integrated with Visual Basic, it quickly runs out of steam. For really powerful, sophisticated reports, we need to turn to another tool.

Seagate Data Reports is unparallel & thus selected as reporting tool.

23

3.2 Economic Feasibility


Economic feasibility is the most frequently used technique for evaluating the effectiveness of the proposed system. More commonly known as cost/benefit analysis; the procedure is to determine the benefits and savings that are expected from the proposed system and compare them with the costs. If the benefits outweigh costs, a decision is taken to design and implement the system otherwise further justification or the alternative in the proposed system will have to be made if it is to have a chance of being approved. This is an outgoing effort that improves in accuracy at each phase of the system development life cycle.

3.2.1 Classification of Costs&benefits


The various Cost expected to incur & Benefit expected to realize are given below.

*****

3.2.1.1 Tangible or intangible Costs & Benefits

*****

Tangibility refers to the ease with which costs or benefits can be measured. An outlay of cash for a specific item or activity

24

is referred to as a tangible cost. They are shown as disbursements on the books. The purchase of hardware or software, personnel

training and employee salaries are examples of tangible costs. They are readily identified and measured. Costs that are known to exist but whose financial value cannot be accurately measured are referred to as an intangible costs. For example, the cost of the employee morale problems caused by the new system.

Benefits are also classified as tangible or intangible. Like costs, they are often difficult to specify accurately. Tangible benefits such as saving due to reduction in human resource, saving of material cost are quantifiable. Intangible benefits such as improved institution image is also taken into account in the system evaluation process.

*****

3.2.1.2 Direct or Indirect Costs & Benefits

*****

Direct costs are those with which a monetary figure can be directly associated in a project. They are applied directly to the operation. For example, the purchase of hard disk

25

or purchase of software is a direct cost. Direct benefits can also be specified to the given project. For example a new system that can handle 25 percent more transactions per day is a direct benefit. Indirect costs are the results of operation that are not directly associated with the given system or activity. They are

often referred to as overhead. Light, air conditioning, maintenance, protection of the computer center is all tangible costs, but it is difficult to determine the proportion of each attribute to a specific activity.

Indirect benefits are realized as a by-product of another activity or system. For example the VIGMIS system gives various information about vigilance officers, which can be used by the management for transfer-posting & promotion of employees.

***** *****

3.2.1.3 Fixed and Variable Costs and Benefits

Some costs and benefits are constant, regardless of how well a system is used. They are constant and do not change. Once encountered they will not recur. Example of fixed

26

cost is straight-line depreciation of hardware. In contrast, variable costs are incurred on a regular basis. They are proportion to work

volume and continue as long as is in operation. For example, the cost of printer paper and ribbon. Fixed benefits are also constant and do not change. For example decrease in no. of personnel by 20% resulting from the use

of new computerized system. The variable benefits, on the other hand , are realized on a regular basis. For example, the system

will save several hours of employees in preparing each report, which otherwise was prepared manually. Another examples are error free data entry, help about different topics and ease of use.

3.2.2 COST ESTIMATION OF THE PROJECT


The software project management process begins with a set of activities that are collectively called project planning. The first of these activities is ESTIMATION.

27

Whenever estimates are made, we look into the future and accept some degree of uncertainty as a matter of course. Estimation of resources, cost and schedule for a software development effort requires experiences, access to good historical information, and the courage to commit to quantitative measures when qualitative data are all that exist. Estimation carries inherent risk that leads to uncertainty.

Project size is another important factor can effect the accuracy of estimates. As size an increase, the interdependency among various elements of the software grows rapidly, time also effect cost of the project. If time increases then cost is also increased, this project takes two months for completion. According to 350- 450 Rs. Per days the total amount as cost is around 25000 Rs.

Risk is measured by the degree if uncertainty in the quantitative estimates established for resources, cost and schedule. If project scope is poorly understand or project requirements are subject to change, uncertainty and risk factors become dangerously high. The software planner should demand completeness of function, performance and interface definitions. The planner and the customer, should recognize that variability in software requirement means instability in cost and schedule, a project manager should not become obsessive about the estimation, modern software engineering approaches take an iterative view of

28

development. In such approaches, it is possible to revisit the estimate and revise it when customer makes changes to the requirements.

3.2.3 The time value of money


Money has a time value. Todays rupee and tomorrows rupee are not same. The time lag accounts for the time value of money. The time value of money is usually expressed in the form of interest on the funds invested to realize the future value. Assuming compounded interest, the formula is: F = P ( 1 + i )n Where F = Future Value of an Investment P = Present Value of the Investment i = Interest Rate per Compounding Period n = Number of Years

29

The Rs.2,05,000 if invested in fixed deposit in bank for ten years at 10 percent interest would have a value at maturity of: F = Rs. 2,05,000 ( 1 + 0.10)10 = = 2,05,000 ( 1.10) 10 2,05,000 * 2.5937424

= Rs.5,31,717.19 Rs.5,31,717 Actual Benefit = Expected Benefit over 10 years Future Value of The Investment= Rs.5,52,000 Rs.5,31,717 = Rs.20,283

3.3 Operational feasibility


Proposed projects are beneficial only if they can be turned into information system that will meet the operating requirements of the organization. It is mainly related to human organizational and political aspects. People are resistant to change, and computers have been known to facilitate change. Findings of operational feasibility analysis can be summarized as given below:

What changes will be brought with the system? What organizational structure are distributed? What new skills will be required? Do the existing staff members have be skills? If not, they can be trained in due course of time. 30

CHAPTER

CHAPTER 4 4

31

SOFTWARE AND HARDWARE REQUIREMENT SPECIFICATION


This analysis process requires more emphasis on sytem configuration importance rather than the actual hardware specifications. THE hardware requirement of our project THE MOBILE PHONE ENQUIRY & ITs DISTRIBUTION SYSTEM is defined as under. given more

TOOLS/PLATFORM AND LANGUAGE TO BE USED


HARDWARE

1. 2. 3.

100 MBPS processor RAM CACHE MEMORY

:- Intel Pentium III 600 MHz :- 128 MB :- 512 KB 32

4. 5. 6. 7. 8. 9. 10. 11. 12. 13.

HARD DISK MONITOR KEYBOARD MOUSE CD DRIVE LANCARD HUB FLOPPY DRIVE CABLES OTHERS

:- 20 GB :- 15 Microtek :- Multimedia + Internet :- Mechanical two buttons :- 52 X :- 10/100 MBPS :- !012 :- 1.44 MB :- Twisted Pair :- Speaker, Microphone etc.

SOFTWARE

1. 2. 3.

OPERATING SYSTEM FRONT END RDBMS

:- Window NT Server :- Visual Basic 6.0 :- Microsoft SQL server 7.0

33

CHAPTER

5
SYSTEM DESIGN

34

DATA FLOW DIAGRAM


Context Level
User- Login

User- Login
User details and its passwords Attend complains

Complain
Save enquiry and its leads Caller entries
Communication Channel System

Enquiry

Brand
Brand Details with its models

Caller

Channel

Type of channels Caller details

Entry of new employee and other updations


Changes of channels

Employee

caller

Employee details

Channels

Employee
Previous complains detail

Previous enquiry detail and is lead

Complain

Updated user permission User- Login or other changes Entry of new brand or modification of existing data

35

Enquiry

Brand

Entrance of user

Users

Validation Checking

Entrance with its permission

Successfully entrance of user

User login

Data related to user.

Channel

Channels appropriate details All necessary details

User permission Entry of Records

Employee

Brand

Information Entrance

Entrance of data Data entry

Brand

Users

Entry of record

Employee details

Channel

Employee

Explanation of above DFD :First process contain information from user (operator) and process hold information of each user from user login table after manipulation completed the process generate two type of outputs first permission granted and other is permission is not granted. If granted then is enter in second process. Second process contain information from user related to employee brands channel then generate updated and new data and save then in their related files.

36

Caller information

Caller important information

Caller Entrance

Updates records

Caller

Caller required details

Channel

Channel type

Brand

Brand name Employee name and its ID

Complaint process

Caller required details

Complain

Employee

Explanation of above DFD. In this section first process is caller Entrance in which it contains information of caller information and after processing its updated record saved in caller file Second process collect information from employee, brands, channels and caller then complaint process work and book the complain and save it in its related files.

37

Enquiry

Previous enquiry details

Enquiry Process
Employee
Employee name and its ID

Enquiry details

Enquiry

Explanation of above DFD. Enquiry process collects information these informations are collected form enquiry and employee files and save new and updated records in complain file.

Channels

Data related to channel

Sale & Repair Process


Brand
Brands information

Cash payment Pay by customer

Payment

Explanation of above DFD. Sales & repair process maintained all the information of sale of cards (channels) mobiles (brand) and save payment of collected data from process in payment file. 38

DATABASE TABLES

39

DATA BASE TABLES USED

Table Name :- Users


Field Name cLoginID cPassword cAdmin Cadd CMod CBack Crestore CDelete dCreateDate Data Type Char Char Number Number Number Number Number Number DateTime Length 20 20 1 1 1 1 1 1 ----

Table Name :- Brand


Field Name INumId CBrand cModelId Data Type Number Char Char Length --30 30

40

Table Name :- Channel

Field Name CChannel IStartnumber CEmailend

Data Type Char Number Char

Length 50 4 50

Table Name :- Caller

Field Name ICellNumber CName CPhoneNumber VEmail VAddress DBirthdate CGender CMaterialStatus CProfession IAge

Data Type Long Integer Char Char Char Char DateTime Char Char Char Integer

Length 10 50 15 40 70 ---15 15 25 3 41

Table Name :- Complain


Field Name CComplaneId DDateOfComlane CEmployeeId ICellNumber CName CStatus CChannel Data Type Char DateTime Char Long Integer Char Char Char Char CBand CModelId DPurchesDate VPerchehesDetails CEnquery cEmail Char DateTime Char Char Char 150 100 50 10 10 10 30 5 14 15 Length 15

42

43

Table Name :- Employee

Field Name CEmployeeID CEmployeeName IAge DDateOfBirth DJoiningDate VEmail CLPhone VLAddress CPPhone VPAddress VDegigNation CGender CMaterielStatus MSalary

Data Type Char Char Integer DateTime DateTime Char Char Char Char Char Char Char Char Integer

Length 10 40 3 --50 15 50 15 50 30 5 5 5

44

Table Name :- Enquiry


Field Name CenqueryID IcellNumber Vproblem Denquerydate Cemployee Clead CcomplaneID Data Type Char Long Integer Char DateTime Char Char Char Length 15 10 200 -40 40 20

45

CHAPTER

6
CODE OF THE PROJECT

CODING & FORMS REPRESENTATION


46

1.

Splash form

Coding Attached with this form Splash :

Private Sub Form_Load() Pb.Scrolling = ccScrollingStandard Pb.Min = 0 Pb.Max = 300 Pb.Orientation = ccOrientationHorizontal

47

Pb.Value = 0 End Sub Private Sub Timer1_Timer() Pb.Value = Pb.Value + 10 If Pb.Value = Pb.Max Then Unload Me Load frmLogin frmLogin.Show End If End Sub

48

2.

Login Form

Coding Attached with this form Login :


Dim rs As Recordset Private Sub Form_Load() connect Set rs = New Recordset rs.Open "select * from users ", con, adOpenDynamic, adLockOptimistic rs.MoveFirst While Not rs.EOF cmbUserName.AddItem Trim(rs(0)) rs.MoveNext Wend cmbUserName = cmbUserName.List(0) End Sub

Private Sub CmdCancel_Click() OK = False Me.Hide End End Sub

Private Sub CmdOk_Click() rs.MoveFirst

49

rs.Move cmbUserName.ListIndex If txtPassword <> "" Then If Trim(LCase(cmbUserName)) = Trim(LCase(rs("cLoginID"))) Then If Trim(LCase(txtPassword)) = Trim(LCase(rs("cPassword"))) Then OK = True usetvalues Unload Me Load frmTreeView frmTreeView.Show Else MsgBox "Invalid Password, try again!", , "Login" txtPassword.SetFocus txtPassword.SelStart = 0 txtPassword.SelLength = Len(txtPassword.Text) End If Else MsgBox "Invalid Loginid, try again!", , "Login" End If End If End Sub Private Sub Timer1_Timer() If lblNum.Caption = 100 Then lblNum.Caption = 1 End If lblNum.Caption = CInt(lblNum.Caption) + 1 If Len(lblNum.Caption) = 1 Then lblNum.Caption = "0" & lblNum.Caption End If If Len(lblNum.Caption) = 3 Then lblNum.Caption = "00" End If End Sub

Public Sub usetvalues() rs.MoveFirst rs.Move cmbUserName.ListIndex caddvalue = rs("CAdd") cmodvalue = rs("cMod") cdelvalue = rs("cDelete")

50

cbacvalue = rs("cBack") cresvalue = rs("cRestore") cadmvalue = rs("cAdmin") End Sub

51

Coding Attached with this form Desk Top : Public Sub mnubrandchannel_Click() If mnubrandchannel.Checked = False Then mnubrandchannel.Checked = True frmModel.Show Else mnubrandchannel.Checked = False Unload frmModel End If End Sub Public Sub mnuchangenumber_Click() On Error Resume Next If mnuchangenumber.Checked = False Then mnuchangenumber.Checked = True Unload Me.ActiveForm FrmChangeCellNumber.Show Else mnuchangenumber.Checked = False Unload FrmChangeCellNumber End If End Sub Public Sub mnuchengepassword_Click() On Error Resume Next If mnuchengepassword.Checked = False Then mnuchengepassword.Checked = True Unload Me.ActiveForm FrmChangePassword.Show Else mnuchengepassword.Checked = False Unload FrmChangePassword End If End Sub Private Sub mnuClose_Click() On Error Resume Next Unload frmMain.ActiveForm End Sub Public Sub mnuComplane_Click()

52

On Error Resume Next If mnuComplane.Checked = False Then mnuComplane.Checked = True frmComplens.Show Else mnuComplane.Checked = False Unload frmComplens End If End Sub Public Sub mnuComplaneReport_Click() If mnuComplaneReport.Checked = False Then mnuComplaneReport.Checked = True frmComplaneReport.Show Else mnuComplaneReport.Checked = False Unload frmComplaneReport End If End Sub Public Sub mnuCreateusers_Click() If cadmvalue = 1 Then If mnuCreateusers.Checked = False Then mnuCreateusers.Checked = True FrmCreateuser.Show Else mnuCreateusers.Checked = False Unload FrmCreateuser End If Else MsgBox "User can create only by Administreter Password", vbInformation, "ADMINISTRETER" End If End Sub Public Sub mnudeleteuser_Click() If cadmvalue = 1 Then If mnudeleteuser.Checked = False Then mnudeleteuser.Checked = True FrmDeleteUsers.Show Else mnudeleteuser.Checked = False Unload FrmDeleteUsers

53

End If Else MsgBox "User can delete only by Administreter Password", vbInformation, "ADMINISTRETER" End If End Sub Public Sub mnudesk_Click() If mnudesk.Checked = False Then mnudesk.Checked = True frmTreeView.Show Else mnudesk.Checked = False Unload frmTreeView End If End Sub Public Sub mnuEmailEnquery_Click() If mnuEnquiryReport.Checked = False Then mnuEnquiryReport.Checked = True frmEnqueryReport.Show Else mnuEnquiryReport.Checked = False Unload frmEnqueryReport End If End Sub Public Sub mnuEmployeeMaster_Click() If mnuEmployeeMaster.Checked = False Then mnuEmployeeMaster.Checked = True frmEmployment.Show frmEmployment.SetFocus Else mnuEmployeeMaster.Checked = False Unload frmEmployment End If End Sub Public Sub mnuEmployeeReport_Click() DataReportEmp.Show End Sub Public Sub mnuEnquiry_Click()

54

On Error Resume Next If mnuEnquiry.Checked = False Then mnuEnquiry.Checked = True frmEnquiry.Show frmEnquiry.SetFocus Else mnuEnquiry.Checked = False Unload frmEnquiry End If End Sub Public Sub mnuEnquiryReport_Click() On Error Resume Next If mnuEnquiryReport.Checked = False Then DataReportEnq.Show Else mnuEnquiryReport.Checked = False Unload DataReportEnq End If End Sub Private Sub mnuExit_Click() End End Sub Public Sub mnuHelp_Click() CD1.HelpCommand = &H3& CD1.HelpFile = App.Path & "\Cell.hlp" CD1.ShowHelp End Sub Public Sub mnuMaster_Click() If mnuMaster.Checked = False Then mnuMaster.Checked = True frmColler.Show frmColler.SetFocus Else mnuMaster.Checked = False Unload frmColler End If End Sub Public Sub mnuMasterReport_Click()

55

DataReportCell.Show End Sub Private Sub MnuReStart_Click() Unload Me Load frmSplash frmSplash.Show End Sub Private Sub mnuSearch_Click() If mnuSearch.Checked = False Then frmSearch.Show Else Unload frmSearch End If End Sub Public Sub mnuSearchdetails_Click() If mnuSearchdetails.Checked = False Then mnuSearchdetails.Checked = True frmSearch.Show Else mnuSearchdetails.Checked = False Unload frmSearch End If End Sub Public Sub mnuUserPermition_Click() If cadmvalue = 1 Then If mnuUserPermition.Checked = False Then mnuUserPermition.Checked = True FrmPermition.Show Else mnuPermition.Checked = False Unload FrmPermition End If Else MsgBox "Permission can be given by only by Administreter Password", vbInformation, "ADMINISTRETER" End If End Sub Private Sub mnuWindowArrangeIcons_Click()

56

Me.Arrange vbArrangeIcons End Sub Private Sub mnuWindowTileVertical_Click() Me.Arrange vbTileVertical End Sub Private Sub mnuWindowTileHorizontal_Click() Me.Arrange vbTileHorizontal End Sub Private Sub mnuWindowCascade_Click() Me.Arrange vbCascade End Sub Private Sub mnuViewStatusBar_Click() mnuViewStatusBar.Checked = Not mnuViewStatusBar.Checked sbStatusBar.Visible = mnuViewStatusBar.Checked End Sub Private Sub mnuViewToolbar_Click() mnuViewToolbar.Checked = Not mnuViewToolbar.Checked tbTableToolbar.Visible = mnuViewToolbar.Checked End Sub

Private Sub tbTableToolbar_ButtonClick(ByVal Button As MSComctlLib.Button) On Error Resume Next Select Case Button.Key Case "desk": 'case of Desktop mnudesk_Click Case "cool": mnuMaster_Click Case "enc": mnuEnquiry_Click Case "Comp": mnuComplane_Click Case "emp": mnuEmployeeMaster_Click Case "search": mnuSearchdetails_Click Case "close":

57

Unload ActiveForm Case "exit": End Case "help" mnuHelp_Click Case "ms" mnuMasterReport_Click Case "Compr" mnuComplaneReport_Click Case "empr" mnuEmployeeReport_Click Case "menr" mnuEmailEnquery_Click End Select End Sub

58

3.

Caller Details Form

Coding Attached with this form Caller Details :

Dim rsBrand As Recordset Dim iadd As Boolean Dim imod As Boolean Dim rschannel As Recordset Dim icellStart As Integer Private Sub cmbBirthdate_Change() Dim ddate As String ddate = Val(Year(Date)) - Val(Year(cmbBirthdate)) txtAge = ddate

59

End Sub Private Sub cmbchannel_Click() If iadd = True Then strstart = UCase(Trim(CmbChannel)) rschannel.MoveFirst Do While Not rschannel.EOF If strstart = Trim(UCase(rschannel("cChannel"))) Then If txtCell = "" Or Len(txtCell) = 4 Then If rschannel("istartnumber") <> "" Then txtCell = rschannel("iStartnumber") End If End If Exit Do Else End If rschannel.MoveNext Loop End If End Sub Private Sub cmdBack_Click() rsCell.MovePrevious If rsCell.BOF = False Then display Else rsCell.MoveFirst display cmdFirst.Enabled = False cmdBack.Enabled = False End If cmdNext.Enabled = True cmdLast.Enabled = True End Sub Private Sub cmbBrand_Click() cmbModelid.Clear AddModel cmbModelid = cmbModelid.List(0) End Sub Private Sub CmdCancel_Click()

60

On Error Resume Next disablebuttons rsCell.MoveFirst display End Sub Private Sub cmdDelete_Click() If cdelvalue = 1 Then Dim strmsg As String strmsg = MsgBox("You want To delete the Record", vbYesNo + vbInformation, "Deleting Information") If strmsg = vbYes Then rsCell.Delete rsCell.MoveNext If rsCell.EOF = True Then rsCell.MoveLast Else End If display End If Else MsgBox "You have not permission to Delete a Record", vbInformation, "Adding record" End If End Sub Private Sub cmdFirst_Click() On Error Resume Next rsCell.MoveFirst display cmdBack.Enabled = False cmdFirst.Enabled = False cmdLast.Enabled = True cmdNext.Enabled = True End Sub Private Sub cmdLast_Click() rsCell.MoveLast display cmdBack.Enabled = True cmdFirst.Enabled = True cmdLast.Enabled = False

61

cmdNext.Enabled = False End Sub Private Sub cmdModify_Click() If cmodvalue = 1 Then enablebuttons imod = True Else MsgBox "You have not permission to Update a Record", vbInformation, "Adding record" End If End Sub Private Sub cmdNew_Click() If caddvalue = 1 Then For Each Control In Me If TypeOf Control Is TextBox Then Control.Text = "" End If Next txtPhone.Mask = "" txtPhone = "" txtPhone.Mask = "[011]-###-####" enablebuttons txtAge = Val(Year(Date)) - Val(Year(cmbBirthdate)) Else MsgBox "You have not permission to add a Record", vbInformation, "Adding record" End If End Sub Private Sub cmdNext_Click() On Error Resume Next rsCell.MoveNext If rsCell.EOF = False Then display Else rsCell.MoveLast display cmdNext.Enabled = False cmdLast.Enabled = False End If cmdFirst.Enabled = True cmdBack.Enabled = True End Sub

62

Private Sub cmdSave_Click() Dim inum As Integer Dim isearch As Integer Dim isum As Integer inum = 0 Dim strcheckcell As String If txtCell = "" Or txtEnquery = "" Or txtName = "" Or txtAddress = "" Then MsgBox "Cell Number,Enquery,Name and Address field most be fill", vbInformation, "EMPTY DATA" ElseIf txtEnquery = "" Then MsgBox "Enquiry field most be fill", vbInformation, "EMPTY DATA" ElseIf txtperchese = "" Then MsgBox "Purchase Details field most be fill", vbInformation, "EMPTY DATA" ElseIf txtEmail = "" Then txtEmail = "---" ElseIf txtCEmail = "" Then txtCEmail = "---" End If If Len(txtCell) = 10 Then inum = 1 Else txtCell = "" txtCell.SetFocus MsgBox "Cell Number Shoud be in ten charecter", vbInformation, "CELL NUMBER" End If If inum = 1 Then isum = 0 isearch = 0 strcheckcell = Val(txtCell) rsCell.MoveFirst Do While Not rsCell.EOF If strcheckcell = rsCell("iCellNumber") Then isearch = 1 Exit Do End If isum = isum + 1 rsCell.MoveNext Loop If isearch = 0 Then genretcompid

63

rscomp.MoveLast rscomp.AddNew saveforcomplanes rscomp.Update End If If imod = True Then isearch = 0 End If If isearch = 0 Then rsCell.MoveLast rsCell.AddNew savedatafromrecordset rsCell.Update disablebuttons Else reply = MsgBox("Record for this Number is All ready Exist Do you want to Insert a new Complane", vbYesNo + vbInformation, "SavingERROR") If reply = vbYes Then Unload Me Load frmComplens frmComplens.SetFocus Else rsCell.MoveFirst rsCell.Move isum disablebuttons display End If End If End If End Sub Private Sub cmdSearch_Click() Dim strsearch As Double Dim inum As Integer Dim isum As Integer strsearch = txtCell inum = 0 isum = 0 rsCell.MoveFirst Do While Not rsCell.EOF If strsearch = rsCell("iCellNumber") Then inum = 1 Exit Do

64

End If isum = isum + 1 rsCell.MoveNext Loop If inum = 1 Then rsCell.MoveFirst rsCell.Move isum display Else MsgBox "You are Searching a Wrong Cell", vbInformation, "Search" End If cmdFirst.Enabled = True cmdLast.Enabled = True cmdNext.Enabled = True cmdBack.Enabled = True End Sub Private Sub Form_Load() connect cellularEntry employeepros complanesprosq Set rsBrand = New Recordset rsBrand.Open "select * from brand order by cBrand", con, adOpenDynamic, adLockOptimistic AddEmpID addChannel marquee addBrand addProfession AddModel txtPhone.Mask = "[011]-###-####" display cmdSave.Enabled = False cmdCancel.Enabled = False frmMain.mnuMaster.Checked = True End Sub

Public Sub display() Dim icountemail As Integer Dim icountatmail As Integer Dim rs As New ADODB.Recordset

65

On Error Resume Next txtCell = rsCell("iCellNumber") txtName = rsCell("cName") txtPhone = rsCell("cPhoneNumber") txtEmail = rsCell("vEmail") lblEmail = Right$(Trim(rsCell("vemail")), icountemail) txtAddress = rsCell("vAddress") cmbBirthdate = rsCell("dBirthdate") txtEmail = rsCell("vemail") If Trim(UCase(rsCell("cGender"))) = "M" Then optMale.Value = True Else optFemale.Value = True End If txtAge = rsCell("iage") cmbProfession = Trim(rsCell("cProfession")) If Trim(UCase(rsCell("cMaterialStatus"))) = "M" Then optMarried.Value = True Else optUnmarried.Value = True End If rs.Open "select * from complane where iCellNumber=" & txtCell & " order by dDateOfComlane", con, adOpenDynamic, adLockOptimistic rs.MoveLast cmbBrand = Trim(rs("cBand")) cmbModelid = Trim(rs("cModelId")) cmbPerchegeDate = rs("dPurchesDate") txtperchese = rs("vPerchehesDetails") cmbEmployeeId.Text = Trim(rs("cEmployeeID")) CmbChannel = Trim(rs("cChannel")) txtEnquery = rs("cEnquery") cmbCollDate = rs("dDateOfComlane") txtCEmail = rs("cEmail") & "" End Sub

Private Sub Form_Unload(Cancel As Integer) frmMain.mnuMaster.Checked = False End Sub Private Sub Timer1_Timer()

66

Dim count As Integer Dim num As Integer num = 1 count = count + 1 For count = 0 To 100 If Lblleft.Left < 8580 Then Lblleft.Left = Lblleft.Left + num Else Lblleft.Visible = False lblright.Visible = True Lblleft.Left = 120 Timer1.Enabled = False Timer2.Enabled = True End If Next End Sub Private Sub Timer2_Timer() Dim count As Integer Dim num As Integer num = 1 count = count + 1 For count = 0 To 100 If lblright.Left > 120 Then lblright.Left = lblright.Left - num Else lblright.Visible = False Lblleft.Visible = True lblright.Left = 8580 Timer2.Enabled = False Timer1.Enabled = True End If Next End Sub Public Sub marquee() Lblleft.Caption = "Cell Enquiry" lblright.Caption = "Cell Enquiry" Lblcenter.Visible = False Timer2.Enabled = False lblright.Visible = False End Sub

67

Private Sub txtCell_KeyPress(KeyAscii As Integer) On Error Resume Next Dim strValid As String Dim strstart As Integer strValid = "0123456789" If KeyAscii > 26 Then If InStr(strValid, Chr(KeyAscii)) = 0 Then KeyAscii = 0 End If End If If Len(txtCell) = 4 Then strstart = UCase(Trim(txtCell)) rschannel.MoveFirst Do While Not rschannel.EOF If strstart = Trim(UCase(rschannel("iStartnumber"))) Then CmbChannel = rschannel("cChannel") icellStart = 1 Exit Do Else txtCEmail = "" End If rschannel.MoveNext Loop End If End Sub Public Sub addBrand() Dim strsearch As String Dim strcheck As String rsBrand.MoveFirst cmbBrand.AddItem rsBrand("cbrand") strsearch = rsBrand("cbrand") While Not rsBrand.EOF strcheck = rsBrand("cbrand") If Trim(UCase(strsearch)) <> Trim(UCase(strcheck)) Then cmbBrand.AddItem rsBrand("cbrand") strsearch = strcheck End If rsBrand.MoveNext Wend cmbBrand.AddItem "Others" End Sub Public Sub AddModel()

68

Dim str As String str = Trim(LCase(cmbBrand)) rsBrand.MoveFirst While Not rsBrand.EOF If Trim(LCase(rsBrand("cBrand"))) = str Then cmbModelid.AddItem Trim(rsBrand("cModelId")) End If rsBrand.MoveNext Wend cmbModelid.AddItem "Others" End Sub Public Sub addChannel() Set rschannel = New Recordset rschannel.Open "select * from channel", con, adOpenDynamic, adLockOptimistic rschannel.MoveFirst While Not rschannel.EOF CmbChannel.AddItem Trim(rschannel("cChannel")) rschannel.MoveNext Wend CmbChannel.AddItem "Others" End Sub Public Sub addProfession() cmbProfession.AddItem "Officer" cmbProfession.AddItem "Clerk" cmbProfession.AddItem "Accountent" cmbProfession.AddItem "Maneger" cmbProfession.AddItem "Receptionist" cmbProfession.AddItem "Office Assistent" cmbProfession.AddItem "Com Opretor" cmbProfession.AddItem "Software Devloper" cmbProfession.AddItem "Programmer" cmbProfession.AddItem "Engineer" cmbProfession.AddItem "Doctor" cmbProfession.AddItem "business Man" cmbProfession.AddItem "Shop Keper" cmbProfession.AddItem "Trevel Line" cmbProfession.AddItem "Othere"

69

End Sub

Public Sub savedatafromrecordset() rsCell("iCellNumber") = txtCell rsCell("cName") = txtName rsCell("cPhoneNumber") = txtPhone rsCell("vEmail") = txtEmail rsCell("vAddress") = txtAddress rsCell("dBirthdate") = cmbBirthdate If optMale.Value = True Then rsCell("cGender") = "M" Else rsCell("cGender") = "F" End If rsCell("cProfession") = cmbProfession If optMarried.Value = True Then rsCell("cMaterialStatus") = "Mr" Else rsCell("cMaterialStatus") = "Ur" End If rsCell("iage") = txtAge End Sub Public Sub enablebuttons() cmdFirst.Enabled = False cmdLast.Enabled = False cmdNext.Enabled = False cmdBack.Enabled = False cmdNew.Enabled = False cmdDelete.Enabled = False cmdModify.Enabled = False cmdSave.Enabled = True cmdCancel.Enabled = True cmdSearch.Enabled = False iadd = True End Sub Public Sub disablebuttons() cmdFirst.Enabled = True cmdLast.Enabled = True cmdNext.Enabled = True cmdBack.Enabled = True

70

cmdNew.Enabled = True cmdDelete.Enabled = True cmdModify.Enabled = True cmdSave.Enabled = False cmdCancel.Enabled = False cmdSearch.Enabled = True iadd = False imod = False End Sub

Private Sub txtCell_LostFocus() On Error Resume Next If icellStart = 1 And Len(txtCell) = 10 Then txtCEmail = txtCell & rschannel("cemailend") End If If IsNumeric(txtCell) <> True Then txtCell = "" txtCell.SetFocus End If End Sub Private Sub txtName_KeyPress(KeyAscii As Integer) Dim strValid As String strValid = " QWERTYUIOPLKJHGFDSAZXCVBNMqwertyuioplkjhgfdsazxcvbnm" If KeyAscii > 26 Then If InStr(strValid, Chr(KeyAscii)) = 0 Then KeyAscii = 0 End If End If If Len(txtName) = 0 Then If KeyAscii >= 97 And KeyAscii < 123 Then KeyAscii = KeyAscii - 32 End If End If End Sub

Public Sub saveforcomplanes() rscomp("cComplaneId") = strcopid rscomp("dDateOfComlane") = cmbCollDate rscomp("cEmployeeId") = cmbEmployeeId rscomp("iCellNumber") = txtCell

71

rscomp("cName") = txtName rscomp("cStatus") = "Comp" rscomp("cChannel") = CmbChannel rscomp("cBand") = cmbBrand rscomp("cModelId") = cmbModelid rscomp("dPurchesDate") = cmbPerchegeDate rscomp("vPerchehesDetails") = txtperchese rscomp("cEmployeeID") = cmbEmployeeId rscomp("cEnquery") = txtEnquery rscomp("cEmail") = txtCEmail & "" End Sub Public Sub AddEmpID() While Not rsEmp.EOF cmbEmployeeId.AddItem Trim(rsEmp("cEmployeeID")) + "-" + Trim(rsEmp("cEmployeeName")) rsEmp.MoveNext WendEnd Sub

72

4.

Enquiry Detail Form

Coding Attached with this form Enquiry Details : Dim rs As Recordset Dim strstart As Integer Dim strcheck As Integer Dim strcopid As String Dim rscomp1 As Recordset Dim inum As Integer Dim isum As Integer Private Sub cmdBack_Click() rs.MovePrevious If rs.BOF = False Then display Else rs.MoveFirst display

73

cmdFirst.Enabled = False cmdBack.Enabled = False End If cmdNext.Enabled = True cmdLast.Enabled = True End Sub Private Sub CmdCancel_Click() rs.CancelUpdate rs.MoveFirst display disablebuttons End Sub Private Sub cmdDelete_Click() If cdelvalue = 1 Then Dim strmsg As String strmsg = MsgBox("You want To delete the Record", vbYesNo + vbInformation, "Deleting Information") If strmsg = vbYes Then rs.Delete rs.MoveNext If rs.EOF = True Then rs.MoveLast Else End If display End If Else MsgBox "You have not permission to Delete a Record", vbInformation, "Adding record" End If End Sub Private Sub cmdFirst_Click() rs.MoveFirst display cmdBack.Enabled = False cmdFirst.Enabled = False cmdLast.Enabled = True cmdNext.Enabled = True End Sub

74

Private Sub cmdLast_Click() rs.MoveLast display cmdBack.Enabled = False cmdFirst.Enabled = False cmdLast.Enabled = True cmdNext.Enabled = True End Sub Private Sub cmdModify_Click() If vmodvalue = 1 Then enablebuttons Else MsgBox "You have not permission to Update a Record", vbInformation, "Adding record" End If End Sub Private Sub cmdNew_Click() If caddvalue = 1 Then On Error Resume Next genretedID txtEnquery = strcopid cmbEnquiryDate = Date txtCell = "" txtLead = "" txtProblem = "" rs.MoveLast rs.AddNew enablebuttons Else MsgBox "You have not permission to add a Record", vbInformation, "Adding record" End If End Sub Private Sub cmdNext_Click() rs.MoveNext If rs.EOF = False Then

75

display Else rs.MoveLast display cmdNext.Enabled = False cmdLast.Enabled = False End If cmdFirst.Enabled = True cmdBack.Enabled = True End Sub Private Sub cmdSave_Click() Dim icheck As Integer Dim icellcheck As Integer icheck = 1 If txtCell = "" Then icheck = 0 MsgBox "Cell Number Is Empity", vbInformation, "CEll Number" End If If icheck = 1 Then icellcheck = 0 rsCell.MoveFirst Do While Not rsCell.EOF If rsCell("iCellNumber") = txtCell Then icellcheck = 1 End If rsCell.MoveNext Loop End If If icellcheck = 1 Then checkcomplane If inum = 1 Then savedataforenquery rscomp1.MoveFirst rscomp1.Move isum rscomp1("cStatus") = "Enqur" rs("cComplaneID") = rscomp1("cComplaneId") rs.Update rscomp1.Update If rscomp1.EOF = True Or rscomp1.BOF = True Then rscomp1.Close End If

76

disablebuttons Else MsgBox "Enquery entry should be done for this Cell Number", vbInformation, "ENQUERY" rs.CancelUpdate rs.MoveFirst display disablebuttons End If Else MsgBox "There is not a Master record for this Cell number", vbInformation, "CELL Number" rs.CancelUpdate disablebuttons rs.MoveFirst display End If End Sub Private Sub cmdSearch_Click() Dim rssearch As Recordset Dim icheck As String Dim isearchnum As Integer Dim isearchsum As Integer Dim isearch As String Set rssearch = New Recordset rssearch.Open "select * from enquery where iCellNumber =" & txtCell, con, adOpenDynamic, adLockOptimistic rssearch.MoveFirst isearch = rssearch("dEnquerydate") While Not rssearch.EOF icheck = rssearch("dEnquerydate") If icheck > isearch Then isearch = icheck End If rssearch.MoveNext Wend rssearch.MoveFirst isearchnum = 0 isearchsum = 0 Do While Not rssearch.EOF

77

If isearch = rssearch("dEnquerydate") Then isearchnum = 1 Exit Do End If isearchsum = isearchsum + 1 rssearch.MoveNext Loop If isearchnum = 1 Then rssearch.MoveFirst rssearch.Move isearchsum txtCell = rssearch("iCellNumber") txtEnquery = rssearch("cEnqueryID") txtProblem = rssearch("vProblem") cmbEnquiryDate = rssearch("dEnquerydate") cmbEmployeeId = rssearch("cEmployee") txtLead = rssearch("cLead") Else MsgBox "This Cell Number is not in Enquery", vbInformation, "SearchENQUERY" End If End Sub Private Sub Form_Load() connect cellularEntry Set rs = New Recordset rs.Open "Select * from enquery", con, adOpenDynamic, adLockOptimistic employeepros AddEmpID display marquee cmdSave.Enabled = False cmdCancel.Enabled = False frmMain.mnuEnquiry.Checked = True End Sub Public Sub genretedID() Dim strfinal As String Dim rsnew As Recordset Set rsnew = New Recordset On Error Resume Next

78

rsnew.Open "select * from enquery where dEnquerydate=#" & Date & "#", con, adOpenDynamic, adLockOptimistic rsnew.MoveFirst strstart = Right(rsnew("cEnqueryID"), 3) + 1 While Not rsnew.EOF strcheck = Right(rsnew("cEnqueryID"), 3) + 1 If strcheck > strstart Then strstart = Val(strcheck) End If rsnew.MoveNext Wend strfinal = strstart If strfinal <> 0 Then If Len(strfinal) = 1 Then strfinal = "00" & strfinal ElseIf Len(strfinal) = 2 Then strfinal = "0" & strfinal Else strfinal = "001" End If Else strfinal = "001" End If strdate = CStr(Day(Date)) If Len(strdate) = 1 Then strdate = "0" & strdate End If strmonth = CStr(Month(Date)) If Len(strmonth) = 1 Then strmonth = "0" & strmonth End If stryear = Right(Year(Date), 2) strcopid = strmonth & "-" & strdate & "-" & stryear & "-" & strfinal End Sub Public Sub enablebuttons() cmdFirst.Enabled = False cmdLast.Enabled = False cmdNext.Enabled = False cmdBack.Enabled = False cmdNew.Enabled = False cmdDelete.Enabled = False cmdModify.Enabled = False

79

cmdSave.Enabled = True cmdCancel.Enabled = True 'cmdSave.Default = True cmdSearch.Enabled = False txtEnquery.Enabled = False 'iadd = True End Sub Public Sub disablebuttons() cmdFirst.Enabled = True cmdLast.Enabled = True cmdNext.Enabled = True cmdBack.Enabled = True cmdNew.Enabled = True cmdDelete.Enabled = True cmdModify.Enabled = True cmdSave.Enabled = False cmdCancel.Enabled = False 'cmdNew.Default = True cmdSearch.Enabled = True Me.txtEnquery.Enabled = True End Sub Public Sub AddEmpID() While Not rsEmp.EOF cmbEmployeeId.AddItem Trim(rsEmp("cEmployeeID")) + "-" + Trim(rsEmp("cEmployeeName")) rsEmp.MoveNext Wend End Sub Private Sub Form_Unload(Cancel As Integer) frmMain.mnuEnquiry.Checked = False End Sub Private Sub Timer1_Timer() Dim count As Integer Dim num As Integer num = 1 count = count + 1 For count = 0 To 100 If Lblleft.Left < 3960 Then

80

Lblleft.Left = Lblleft.Left + num Else Lblleft.Visible = False lblright.Visible = True Lblleft.Left = 120 Timer1.Enabled = False Timer2.Enabled = True End If Next End Sub Private Sub Timer2_Timer() Dim count As Integer Dim num As Integer num = 1 count = count + 1 For count = 0 To 100 If lblright.Left > 120 Then lblright.Left = lblright.Left - num Else lblright.Visible = False Lblleft.Visible = True lblright.Left = 3960 Timer2.Enabled = False Timer1.Enabled = True End If Next End Sub Public Sub marquee() Lblleft.Caption = "Cell Enquiry" lblright.Caption = "Cell Enquiry" Lblcenter.Visible = False Timer2.Enabled = False lblright.Visible = False End Sub Public Sub checkcomplane() On Error Resume Next Set rscomp1 = New Recordset rscomp1.Open "Select * from Complane where cStatus='Comp'", con, adOpenDynamic, adLockOptimistic inum = 0

81

isum = 0 rscomp1.MoveFirst Do While Not rscomp1.EOF If rscomp1("iCellNumber") = Val(txtCell) Then inum = 1 Exit Do End If isum = isum + 1 rscomp1.MoveNext Loop End Sub Public Sub savedataforenquery() rs("iCellNumber") = txtCell rs("cEnqueryID") = txtEnquery rs("vProblem") = txtProblem rs("dEnquerydate") = cmbEnquiryDate rs("cEmployee") = cmbEmployeeId rs("cLead") = txtLead End Sub Public Sub display() On Error Resume Next txtCell = rs("iCellNumber") txtEnquery = rs("cEnqueryID") txtProblem = rs("vProblem") cmbEnquiryDate = rs("dEnquerydate") cmbEmployeeId = rs("cEmployee") txtLead = rs("cLead") End Sub Private Sub txtCell_KeyPress(KeyAscii As Integer) Dim strValid As String Dim strstart As Integer strValid = "0123456789" If KeyAscii > 26 Then If InStr(strValid, Chr(KeyAscii)) = 0 Then KeyAscii = 0 End If End If End Sub

82

5.

Complain Details Form

Coding Attached with this form Complain Details : Dim isearch As Integer Dim rs As Recordset Dim isum As Integer Dim rsBrand As Recordset Dim rschannel As Recordset Private Sub cmbBrand_Click() cmbModelid.Clear AddModel

83

cmbModelid = cmbModelid.List(0) End Sub Private Sub cmbchannel_Click() If iadd = True Then strstart = UCase(Trim(CmbChannel)) rschannel.MoveFirst Do While Not rschannel.EOF If strstart = Trim(UCase(rschannel("cChannel"))) Then If txtCell = "" Or Len(txtCell) = 4 Then If rschannel("istartnumber") <> "" Then txtCell = rschannel("iStartnumber") End If End If Exit Do Else End If rschannel.MoveNext Loop End If End Sub Private Sub cmdNew_Click() If caddvalue = 1 Then genretcompid txtComplaneId = strcopid txtName = "" txtCell = "" cmbComplaneId = Date rscomp.MoveLast rscomp.AddNew enablebuttons Else MsgBox "You have not permission to add a Record", vbInformation, "Adding record" End If End Sub Private Sub cmdNext_Click() rscomp.MoveNext

84

If rscomp.EOF = False Then display Else rscomp.MoveLast display cmdNext.Enabled = False cmdLast.Enabled = False End If cmdFirst.Enabled = True cmdBack.Enabled = True End Sub

Private Sub cmdSave_Click() Dim icheck As Integer Dim icellcheck As Integer icheck = 1 If Me.txtCell = "" And Me.txtComplane <> "" And Me.txtEmail = "" Then icheck = 0 MsgBox "Fields may be Impity fill all the fields", vbInformation, "SvingError" End If If icheck = 1 Then icellcheck = 0 rsCell.MoveFirst Do While Not rsCell.EOF If rsCell("iCellNumber") = txtCell Then icellcheck = 1 End If rsCell.MoveNext Loop

If icellcheck = 1 Then searckhforcomplane If isearch = 0 Then saveforcomplanes rscomp.Update disablebuttons Else MsgBox "there is already a complane for this cell Number", vbInformation, "SAVING Error"

85

rscomp.CancelUpdate checksearch disablebuttons End If Else creply = MsgBox("Tere is not Master record for this Cell number. Master must be Fiekld !! Do You want To fill Master", vbOKCancel + vbInformation, "MASTER Entry") If creply = vbOK Then Load frmColler frmColler.SetFocus Else rscomp.CancelUpdate rscomp.MoveFirst display disablebuttons End If End If End If End Sub

Private Sub cmdSearch_Click() searckhforcomplane If isearch = 1 Then rs.MoveFirst rs.Move isum txtComplaneId = rs("cComplaneId") cmbComplaneId = rs("dDateOfComlane") cmbEmployeeId = rs("cEmployeeId") txtCell = rs("iCellNumber") txtName = rs("cName") If Trim(LCase(rs("cStatus"))) = "comp" Then optComp.Value = True Else optEnqury.Value = True End If Else MsgBox "You are searching a wrong Complane", vbInformation, "SEARCH Complane" End If cmdFirst.Enabled = True cmdLast.Enabled = True cmdNext.Enabled = True

86

cmdBack.Enabled = True End Sub Private Sub Form_Load() connect Set rs = New Recordset Set rschannel = New Recordset rschannel.Open "select * from channel", con, adOpenDynamic, adLockOptimistic rs.Open "Select * from Complane where cStatus='Comp'", con, adOpenDynamic, adLockOptimistic Set rsBrand = New Recordset rsBrand.Open "select * from brand order by cBrand", con, adOpenDynamic, adLockOptimistic employeepros cellularEntry complanesprosq AddEmpID addChannel addBrand AddModel display marquee cmdSave.Enabled = False cmdCancel.Enabled = False frmMain.mnuComplane.Checked = True End Sub Public Sub saveforcomplanes() rscomp("cComplaneId") = txtComplaneId rscomp("cEmployeeId") = cmbEmployeeId rscomp("iCellNumber") = txtCell rscomp("cName") = txtName If optComp.Value = True Then rscomp("cStatus") = "Comp" Else rscomp("cStatus") = "Enqr" End If rscomp("cBand") = cmbBrand rscomp("cModelId") = cmbModelid rscomp("dPurchesDate") = cmbPerchegeDate rscomp("vPerchehesDetails") = txtperchese

87

rscomp("cEmployeeID") = cmbEmployeeId rscomp("cChannel") = CmbChannel rscomp("cEnquery") = txtComplane If CDate(cmbComplaneId) < Date Then rscomp("dDateOfComlane") = cmbComplaneId Else rscomp("dDateOfComlane") = Date End If rscomp("cemail") = txtEmail End Sub Public Sub display() Dim rssearch As New ADODB.Recordset Dim inum As Integer txtComplaneId = rscomp("cComplaneId") cmbComplaneId = rscomp("dDateOfComlane") cmbEmployeeId = rscomp("cEmployeeId") txtCell = rscomp("iCellNumber") txtName = rscomp("cName") If Trim(LCase(rscomp("cStatus"))) = "comp" Then optComp.Value = True Else optEnqury.Value = True End If cmbBrand = Trim(rscomp("cBand")) cmbModelid = Trim(rscomp("cModelId")) cmbPerchegeDate = rscomp("dPurchesDate") txtperchese = rscomp("vPerchehesDetails") cmbEmployeeId = Trim(rscomp("cEmployeeID")) CmbChannel = Trim(rscomp("cChannel")) txtComplane = rscomp("cEnquery") cmbCollDate = rscomp("dDateOfComlane") txtEmail = rscomp("cemail") rssearch.Open "select icellnumber from complane where icellnumber=" & txtCell, con, adOpenDynamic, adLockOptimistic inum = 0 rssearch.MoveFirst While Not rssearch.EOF inum = inum + 1 rssearch.MoveNext Wend txtnumber = inum rssearch.Close

88

End Sub

Private Sub Form_Unload(Cancel As Integer) frmMain.mnuComplane.Checked = False End Sub Private Sub Timer1_Timer() Dim count As Integer Dim num As Integer num = 1 count = count + 1 For count = 0 To 100 If Lblleft.Left < 3960 Then Lblleft.Left = Lblleft.Left + num Else Lblleft.Visible = False lblright.Visible = True Lblleft.Left = 120 Timer1.Enabled = False Timer2.Enabled = True End If Next End Sub Private Sub Timer2_Timer() Dim count As Integer Dim num As Integer num = 1 count = count + 1 For count = 0 To 100 If lblright.Left > 120 Then lblright.Left = lblright.Left - num Else lblright.Visible = False Lblleft.Visible = True lblright.Left = 3960 Timer2.Enabled = False Timer1.Enabled = True End If

89

Next End Sub Public Sub marquee() Lblleft.Caption = "Cell Enquiry" lblright.Caption = "Cell Enquiry" Lblcenter.Visible = False Timer2.Enabled = False lblright.Visible = False End Sub Private Sub cmdBack_Click() rscomp.MovePrevious If rscomp.BOF = False Then display Else rscomp.MoveFirst display cmdFirst.Enabled = False cmdBack.Enabled = False End If cmdNext.Enabled = True cmdLast.Enabled = True End Sub Private Sub CmdCancel_Click() disablebuttons rscomp.CancelUpdate rscomp.MoveFirst display End Sub Private Sub cmdDelete_Click() If idelvalue = 1 Then Dim strmsg As String strmsg = MsgBox("You want To delete the Record", vbYesNo + vbInformation, "Deleting Information") If strmsg = vbYes Then rscomp.Delete rscomp.MoveNext If rsCell.EOF = True Then rscomp.MoveLast Else

90

End If display End If Else MsgBox "You have not permission to Delete a Record", vbInformation, "Adding record" End If End Sub Private Sub cmdFirst_Click() rscomp.MoveFirst display cmdBack.Enabled = False cmdFirst.Enabled = False cmdLast.Enabled = True cmdNext.Enabled = True End Sub Private Sub cmdLast_Click() rscomp.MoveLast display cmdBack.Enabled = True cmdFirst.Enabled = True cmdLast.Enabled = False cmdNext.Enabled = False End Sub Private Sub cmdModify_Click() If cmodvalue = 1 Then enablebuttons Else MsgBox "You have not permission to Update a Record", vbInformation, "Adding record" End If End Sub Private Sub txtCell_KeyPress(KeyAscii As Integer) Dim strValid As String Dim strstart As Integer strValid = "0123456789" If KeyAscii > 26 Then

91

If InStr(strValid, Chr(KeyAscii)) = 0 Then KeyAscii = 0 End If End If If Len(txtCell) = 4 Then strstart = UCase(Trim(txtCell)) rschannel.MoveFirst Do While Not rschannel.EOF If strstart = Trim(UCase(rschannel("iStartnumber"))) Then CmbChannel = rschannel("cChannel") icellStart = 1 Exit Do Else txtEmail = "" End If rschannel.MoveNext Loop End If End Sub Private Sub txtCell_KeyUp(KeyCode As Integer, Shift As Integer) Dim strcell As String Dim strmach As Integer strcell = Trim(txtCell) strmach = 0 If Len(strcell) = 10 Then rsCell.MoveFirst Do While Not rsCell.EOF If strcell = CStr(rsCell("iCellNumber")) Then strmach = 1 Exit Do End If rsCell.MoveNext Loop End If If strmach = 1 Then txtName = rsCell("cName") End If End Sub Public Sub enablebuttons() cmdFirst.Enabled = False cmdLast.Enabled = False

92

cmdNext.Enabled = False cmdBack.Enabled = False cmdNew.Enabled = False cmdDelete.Enabled = False cmdModify.Enabled = False cmdSave.Enabled = True cmdCancel.Enabled = True cmdSearch.Enabled = False txtComplaneId.Enabled = False optComp.Value = True optEnqury.Enabled = False End Sub Public Sub disablebuttons() cmdFirst.Enabled = True cmdLast.Enabled = True cmdNext.Enabled = True cmdBack.Enabled = True cmdNew.Enabled = True cmdDelete.Enabled = True cmdModify.Enabled = True cmdSave.Enabled = False cmdCancel.Enabled = False cmdSearch.Enabled = True txtComplaneId.Enabled = True optEnqury.Enabled = True End Sub Public Sub AddEmpID() While Not rsEmp.EOF cmbEmployeeId.AddItem Trim(rsEmp("cEmployeeID")) + "-" + Trim(rsEmp("cEmployeeName")) rsEmp.MoveNext Wend End Sub

Public Sub searckhforcomplane() isearch = 0 isum = 0 On Error Resume Next rs.MoveFirst Do While Not rs.EOF If txtCell = rs("iCellNumber") Then

93

isearch = 1 Exit Do End If isum = isum + 1 rs.MoveNext Loop End Sub Public Sub checksearch() If isearch = 1 Then rs.MoveFirst rs.Move isum txtComplaneId = rs("cComplaneId") cmbComplaneId = rs("dDateOfComlane") cmbEmployeeId = rs("cEmployeeId") txtCell = rs("iCellNumber") txtName = rs("cName") If Trim(LCase(rs("cStatus"))) = "comp" Then optComp.Value = True Else optEnqury.Value = True End If End If End Sub Public Sub addChannel() Set rschannel = New Recordset rschannel.Open "select * from channel", con, adOpenDynamic, adLockOptimistic rschannel.MoveFirst While Not rschannel.EOF CmbChannel.AddItem Trim(rschannel("cChannel")) rschannel.MoveNext Wend CmbChannel.AddItem "Others" End Sub Public Sub addBrand() Dim strsearch As String Dim strcheck As String rsBrand.MoveFirst

94

cmbBrand.AddItem rsBrand("cbrand") strsearch = rsBrand("cbrand") While Not rsBrand.EOF strcheck = rsBrand("cbrand") If Trim(UCase(strsearch)) <> Trim(UCase(strcheck)) Then cmbBrand.AddItem rsBrand("cbrand") strsearch = strcheck End If rsBrand.MoveNext Wend cmbBrand.AddItem "Others" End Sub Public Sub AddModel() Dim str As String str = Trim(LCase(cmbBrand)) rsBrand.MoveFirst While Not rsBrand.EOF If Trim(LCase(rsBrand("cBrand"))) = str Then cmbModelid.AddItem Trim(rsBrand("cModelId")) End If rsBrand.MoveNext Wend cmbModelid.AddItem "Others" End Sub Private Sub txtCell_LostFocus() If IsNumeric(txtCell) <> True Then txtCell = "" txtCell.SetFocus End If If icellStart = 1 And Len(txtCell) = 10 Then txtCEmail = txtCell & rschannel("cemailend") End If End Sub

95

6.

Employee Details Form

Coding Attached with this form Employee Details : Dim imod As Integer Private Sub cmbBirthdate_Change() Dim ddate As String ddate = Val(Year(Date)) - Val(Year(cmbBirthdate)) txtAge = ddate End Sub Private Sub cmdBack_Click() rsEmp.MovePrevious If rsEmp.BOF = False Then display

96

Else rsEmp.MoveFirst display cmdFirst.Enabled = False cmdBack.Enabled = False End If cmdNext.Enabled = True cmdLast.Enabled = True End Sub Private Sub CmdCancel_Click() rsEmp.CancelUpdate rsEmp.MoveFirst display disablebuttons End Sub Private Sub cmdDelete_Click() If cdelvalue = 1 Then Dim strmsg As String strmsg = MsgBox("You want To delete the Record", vbYesNo + vbInformation, "Deleting Information") If strmsg = vbYes Then rsEmp.Delete rsEmp.MoveNext If rsEmp.EOF = True Then rsEmp.MoveLast Else End If display End If Else Else MsgBox "You have not permission to Delete a Record", vbInformation, "Adding record" End If End Sub Private Sub cmdFirst_Click() rsEmp.MoveFirst display

97

cmdBack.Enabled = False cmdFirst.Enabled = False cmdLast.Enabled = True cmdNext.Enabled = True End Sub Private Sub cmdLast_Click() rsEmp.MoveLast display cmdBack.Enabled = False cmdFirst.Enabled = False cmdLast.Enabled = True cmdNext.Enabled = True End Sub Private Sub cmdModify_Click() If cmodvalue = 1 Then enablebuttons imod = 1 Else MsgBox "You have not permission to Update a Record", vbInformation, "Adding record" End If End Sub Private Sub cmdNew_Click() If caddvalue = 1 Then Dim istart As String Dim strId As String Dim icheck As String For Each Control In Me If TypeOf Control Is TextBox Then Control.Text = "" End If Next txtLPhone = "" txtPPhone = "" txtLPhone.Mask = "[011]-###-####" txtPPhone.Mask = "[###]-###-####" rsEmp.MoveFirst istart = Right(rsEmp("cEmployeeID"), 3) + 1 While Not rsEmp.EOF icheck = Right(rsEmp("cEmployeeID"), 3) + 1

98

If icheck > istart Then istart = icheck End If rsEmp.MoveNext Wend 'MsgBox Len(istart) If Len(istart) = 1 Then strId = "E00" & istart ElseIf Len(istart) = 2 Then strId = "E0" & istart ElseIf istart = Val("") Then strId = "E001" End If txtemployId = strId cmbJoiningDate = Date rsEmp.MoveLast rsEmp.AddNew enablebuttons Else MsgBox "You have not permission to add a Record", vbInformation, "Adding record" End If End Sub Private Sub cmdNext_Click() rsEmp.MoveNext If rsEmp.EOF = False Then display Else rsEmp.MoveLast display cmdNext.Enabled = False cmdLast.Enabled = False End If cmdFirst.Enabled = True cmdBack.Enabled = True End Sub Private Sub cmdSave_Click() If txtName = "" Then

99

MsgBox "Emplyee Name must be type", vbInformation, "INCOMPITE DATA" ElseIf txtLAddress = "" Then MsgBox "Emplyee Local Address must be type", vbInformation, "INCOMPITE DATA" ElseIf txtLPhone = "" Then MsgBox "Emplyee Local Phone must be type", vbInformation, "INCOMPITE DATA" ElseIf txtPAddress = "" Then MsgBox "Emplyee Permanent Address must be type", vbInformation, "INCOMPITE DATA" ElseIf txtPPhone = "" Then MsgBox "Emplyee Permanent Phone must be type", vbInformation, "INCOMPITE DATA" ElseIf txtDesignation = "" Then MsgBox "Emplyee Designation must be type", vbInformation, "INCOMPITE DATA" ElseIf txtSalary = "" Then MsgBox "Emplyee Salary must be type", vbInformation, "INCOMPITE DATA" ElseIf txtAge = "" Then MsgBox "Emplyee Date of birth must be Selected", vbInformation, "INCOMPITE DATA" ElseIf txtEmail = "" Then txtEmail = "---" Else savedatafromrecordset rsEmp.Update disablebuttons imod = 0 End If End Sub Private Sub cmdSearch_Click() Dim strsearch As String Dim inum As Integer Dim isum As Integer strsearch = Trim(UCase(txtemployId)) inum = 0 isum = 0 rsEmp.MoveFirst Do While Not rsEmp.EOF If strsearch = Trim(UCase(rsEmp("cEmployeeID"))) Then inum = 1 Exit Do End If isum = isum + 1 rsEmp.MoveNext

100

Loop If inum = 1 Then rsEmp.MoveFirst rsEmp.Move isum display Else MsgBox "You are Searching a Wrong Employee", vbInformation, "Search" End If cmdFirst.Enabled = True cmdLast.Enabled = True cmdNext.Enabled = True cmdBack.Enabled = True End Sub Private Sub Form_Load() connect employeepros display marquee cmdSave.Enabled = False cmdCancel.Enabled = False frmMain.mnuEmployeeMaster.Checked = True End Sub Private Sub Form_Unload(Cancel As Integer) frmMain.mnuEmployeeMaster.Checked = False End Sub Private Sub Timer1_Timer() Dim count As Integer Dim num As Integer num = 1 count = count + 1 For count = 0 To 100 If Lblleft.Left < 8580 Then Lblleft.Left = Lblleft.Left + num Else Lblleft.Visible = False lblright.Visible = True Lblleft.Left = 120 Timer1.Enabled = False Timer2.Enabled = True End If

101

Next End Sub Private Sub Timer2_Timer() Dim count As Integer Dim num As Integer num = 1 count = count + 1 For count = 0 To 100 If lblright.Left > 120 Then lblright.Left = lblright.Left - num Else lblright.Visible = False Lblleft.Visible = True lblright.Left = 8580 Timer2.Enabled = False Timer1.Enabled = True End If Next End Sub Public Sub marquee() Lblleft.Caption = "CellulerMen" lblright.Caption = "CellulerMen" Lblcenter.Visible = False Timer2.Enabled = False lblright.Visible = False End Sub

Public Sub display() txtDesignation = rsEmp("vDegigNation") txtEmail = rsEmp("vEmail") txtemployId = rsEmp("cEmployeeID") txtLAddress = rsEmp("vLAddress") txtLPhone = rsEmp("cLPhone") txtName = rsEmp("cEmployeeName") txtPAddress = rsEmp("vPAddress") txtPPhone = rsEmp("cPPhone") txtSalary = rsEmp("mSalary") txtAge = rsEmp("iAge") cmbBirthdate = rsEmp("dDateOfBirth") cmbJoiningDate = rsEmp("dJoiningDate")

102

If Trim(UCase(rsEmp("cGender"))) = "M" Then optMale.Value = True Else optFemale.Value = True End If If Trim(UCase(rsEmp("cMaterielStatus"))) = "UN" Then optUnmarried.Value = True Else optMarried.Value = True End If End Sub Public Sub enablebuttons() cmdFirst.Enabled = False cmdLast.Enabled = False cmdNext.Enabled = False cmdBack.Enabled = False cmdNew.Enabled = False cmdDelete.Enabled = False cmdModify.Enabled = False cmdSave.Enabled = True cmdCancel.Enabled = True 'cmdSave.Default = True cmdSearch.Enabled = False txtemployId.Enabled = False txtAge.Enabled = False End Sub Public Sub disablebuttons() cmdFirst.Enabled = True cmdLast.Enabled = True cmdNext.Enabled = True cmdBack.Enabled = True cmdNew.Enabled = True cmdDelete.Enabled = True cmdModify.Enabled = True cmdSave.Enabled = False cmdCancel.Enabled = False 'cmdNew.Default = True cmdSearch.Enabled = True txtemployId.Enabled = True txtAge.Enabled = True End Sub

103

Public Sub savedatafromrecordset() rsEmp("vDegigNation") = txtDesignation & "" rsEmp("vEmail") = txtEmail & "" rsEmp("cEmployeeID") = txtemployId rsEmp("vLAddress") = txtLAddress & "" rsEmp("cLPhone") = txtLPhone rsEmp("cEmployeeName") = txtName rsEmp("vPAddress") = txtPAddress & "" rsEmp("cPPhone") = txtPPhone rsEmp("mSalary") = Val(txtSalary) rsEmp("iAge") = Val(txtAge) rsEmp("dDateOfBirth") = cmbBirthdate rsEmp("dJoiningDate") = cmbJoiningDate If optMale.Value = True Then rsEmp("cGender") = "M" Else rsEmp("cGender") = "F" End If If optUnmarried.Value = True Then rsEmp("cMaterielStatus") = "UN" Else rsEmp("cMaterielStatus") = "MR" End If End Sub Private Sub txtLPhone_KeyPress(KeyAscii As Integer) If imod = 1 Then txtLPhone.Mask = "" txtLPhone.Mask = "[011]-###-####" End If End Sub Private Sub txtPPhone_KeyPress(KeyAscii As Integer) If imod = 1 Then txtPPhone.Mask = "" txtPPhone.Mask = "[###]-###-####" End If End Sub Private Sub txtSalary_KeyPress(KeyAscii As Integer) Dim strValid As String

104

Dim strstart As Integer strValid = "0123456789" If KeyAscii > 26 Then If InStr(strValid, Chr(KeyAscii)) = 0 Then KeyAscii = 0 End If End If End Sub

105

7.

Create User Form

( User by Administrator )

Coding Attached with this form Create User : Dim rs As Recordset Private Sub CmdAdd_Click() Dim inum As Integer inum = 0 rs.MoveFirst Do While Not rs.EOF If Trim(LCase(rs(0))) = Trim(LCase(Txtuser)) Then inum = 1 MsgBox "This User All Ready Created", vbInformation, "Login" Txtuser = "" Txtuser.SetFocus Exit Do End If

106

rs.MoveNext Loop If inum = 0 Then If Trim(LCase(txtPassword)) = Trim(LCase(Me.Txtrepassword)) Then rs.MoveLast rs.AddNew CmdAdd.Enabled = False cmdCancel.Enabled = True cmdClose.Enabled = False cmdSave.Enabled = True cmdSave.Default = True Else MsgBox "Password No Mach", vbInformation, "PASSWORD" txtPassword = "" Txtrepassword = "" txtPassword.SetFocus End If End If End Sub Private Sub CmdCancel_Click() For Each Control In Me If TypeOf Control Is TextBox Then Control.Text = "" End If Next rs.CancelUpdate CmdAdd.Enabled = True cmdCancel.Enabled = False cmdClose.Enabled = True cmdSave.Enabled = False CmdAdd.Default = True End Sub Private Sub CmdClose_Click() Unload Me End Sub

Private Sub cmdSave_Click() For Each Control In Me If TypeOf Control Is TextBox Then

107

If Control = "" Then MsgBox "Data may be Impity fill all the data", vbInformation, "LOGIN" Else rs(0) = Txtuser rs(1) = txtPassword rs("dCreateDate") = Date rs.Update CmdAdd.Enabled = True cmdCancel.Enabled = False cmdClose.Enabled = True cmdSave.Enabled = False CmdAdd.Default = True End If End If Next End Sub Private Sub Form_Load() frmMain.mnuCreateusers.Checked = True cmdSave.Enabled = False cmdCancel.Enabled = False connect Set rs = New Recordset rs.Open "select * from users", con, adOpenDynamic, adLockOptimistic CmdAdd.Default = True marquee End Sub Private Sub Form_Unload(Cancel As Integer) frmMain.mnuCreateusers.Checked = False End Sub Private Sub Txtpassword_KeyPress(KeyAscii As Integer) If Len(txtPassword) > 20 Then MsgBox "Password shoud not be more then 20 charecter", vbInformation, "LENTH" txtPassword = "" Txtrepassword = "" txtPassword.SetFocus End If End Sub Private Sub Txtpassword_LostFocus() If Len(txtPassword) > 4 And Len(txtPassword) > 12 Then

108

MsgBox "Password shoud be more then four and less then 12 charecter", vbInformation, "LENTH" txtPassword = "" Txtrepassword = "" txtPassword.SetFocus End If End Sub Private Sub Txtrepassword_Change() If Len(Txtrepassword) > 20 Then MsgBox "Password shoud not be more then 20 charecter", vbInformation, "LENTH" txtPassword = "" Txtrepassword = "" txtPassword.SetFocus End If End Sub Private Sub Txtuser_KeyPress(KeyAscii As Integer) If Len(Txtuser) = 25 Then MsgBox "Login id can not be more then 25 charecter", vbInformation, "LENTH" Txtuser.SetFocus End If End Sub Private Sub Timer1_Timer() Dim count As Integer Dim num As Integer num = 1 count = count + 1 For count = 0 To 100 If Lblleft.Left < 2880 Then Lblleft.Left = Lblleft.Left + num Else Lblleft.Visible = False lblright.Visible = True Lblleft.Left = 120 Timer1.Enabled = False Timer2.Enabled = True End If Next End Sub Private Sub Timer2_Timer()

109

Dim count As Integer Dim num As Integer num = 1 count = count + 1 For count = 0 To 100 If lblright.Left > 120 Then lblright.Left = lblright.Left - num Else lblright.Visible = False Lblleft.Visible = True lblright.Left = 2880 Timer2.Enabled = False Timer1.Enabled = True End If Next End Sub Public Sub marquee() Lblleft.Caption = "Cell Enquiry" lblright.Caption = "Cell Enquiry" Lblcenter.Visible = False Timer2.Enabled = False lblright.Visible = False End Sub

110

8.

Delete User From

( Used by Administrator )

Coding Attached with this form Delete User :

Dim rs As Recordset Private Sub CmdCancel_Click() txtPassword = "" Cmblogin = Cmblogin.List(0) End Sub Private Sub cmdDelete_Click() Dim str As String rs.MoveFirst rs.Move Cmblogin.ListIndex

111

If Trim(UCase(txtPassword)) = Trim(UCase(rs("cpassword"))) Then If rs(0) <> "Administreter" Then str = MsgBox("Do you want to delete this User", vbYesNo + vbInformation, "DELETE") If str = vbYes Then rs.Delete rs.MoveFirst Cmblogin.RemoveItem Cmblogin.ListIndex txtPassword = "" End If Else MsgBox "Administreter can not Delete", vbInformation, "Administreter" End If Else MsgBox "Invalid Password ", vbInformation, "DELETE Users" txtPassword = "" txtPassword.SetFocus End If End Sub Private Sub Form_Load() connect Set rs = New Recordset rs.Open "select * from users ", con, adOpenDynamic, adLockOptimistic rs.MoveFirst While Not rs.EOF Cmblogin.AddItem Trim(rs(0)) rs.MoveNext Wend Cmblogin = Cmblogin.List(0) frmMain.mnudeleteuser.Checked = True marquee End Sub Private Sub Form_Unload(Cancel As Integer) frmMain.mnudeleteuser.Checked = False End Sub Private Sub Timer1_Timer() Dim count As Integer Dim num As Integer num = 1 count = count + 1

112

For count = 0 To 100 If Lblleft.Left < 4695 Then Lblleft.Left = Lblleft.Left + num Else Lblleft.Visible = False lblright.Visible = True Lblleft.Left = 120 Timer1.Enabled = False Timer2.Enabled = True End If Next End Sub Private Sub Timer2_Timer() Dim count As Integer Dim num As Integer num = 1 count = count + 1 For count = 0 To 100 If lblright.Left > 120 Then lblright.Left = lblright.Left - num Else lblright.Visible = False Lblleft.Visible = True lblright.Left = 4695 Timer2.Enabled = False Timer1.Enabled = True End If Next End Sub Public Sub marquee() Lblleft.Caption = "Cell Enquiry" lblright.Caption = "Cell Enquiry" Lblcenter.Visible = False Timer2.Enabled = False lblright.Visible = False End Sub

113

9.

Change Password Form

( Used by Administrator )

Coding Attached with this form Change Password :

Dim rs As Recordset Private Sub Cmblogin_Click() For Each Control In Me If TypeOf Control Is TextBox Then Control = "" End If Next End Sub Private Sub Cmdaply_Click()

114

Dim inum As Integer inum = 0 rs.MoveFirst rs.Move Cmblogin.ListIndex For Each Control In Me If TypeOf Control Is TextBox Then If Control.Text = "" Then MsgBox "Data may Empty chack all the text", vbInformation, "CHANGE PASSWORD" inum = 1 End If End If Next If inum = 0 Then If Trim(LCase(txtPwd)) = Trim(LCase(rs(1))) Then If Trim(LCase(TxtNewpws)) = Trim(LCase(Txtrepwd)) Then CmdOk.Enabled = True cmdCancel.Enabled = True CmdAply.Enabled = False CmdOk.Default = True Else MsgBox "Password no Mach", vbInformation, "PASSWORD" TxtNewpws = "" Txtrepwd = "" TxtNewpws.SetFocus End If Else MsgBox "Incorect Password", vbInformation, "PASSWORD" txtPwd = "" txtPwd.SetFocus End If End If End Sub Private Sub CmdCancel_Click() TxtNewpws = "" txtPwd = "" Txtrepwd = "" Cmblogin = Cmblogin.List(0) CmdOk.Enabled = False cmdCancel.Enabled = False CmdAply.Enabled = True rs.MoveFirst

115

End Sub Private Sub CmdOk_Click() rs.MoveFirst rs.Move Cmblogin.ListIndex rs(1) = TxtNewpws rs.Update CmdOk.Enabled = False cmdCancel.Enabled = False CmdAply.Enabled = True End Sub Private Sub Form_Load() connect frmMain.mnuchengepassword.Checked = True Set rs = New Recordset rs.Open "select * from users ", con, adOpenDynamic, adLockOptimistic filllogin CmdOk.Enabled = False cmdCancel.Enabled = False Cmblogin = Cmblogin.List(0) marquee End Sub Private Sub Form_Unload(Cancel As Integer) frmMain.mnuchengepassword.Checked = True End Sub Public Sub filllogin() rs.MoveFirst While Not rs.EOF Cmblogin.AddItem rs(0) rs.MoveNext Wend End Sub Private Sub Timer1_Timer() Dim count As Integer Dim num As Integer num = 1 count = count + 1 For count = 0 To 100 If Lblleft.Left < 5160 Then Lblleft.Left = Lblleft.Left + num

116

Else Lblleft.Visible = False lblright.Visible = True Lblleft.Left = 120 Timer1.Enabled = False Timer2.Enabled = True End If Next End Sub Private Sub Timer2_Timer() Dim count As Integer Dim num As Integer num = 1 count = count + 1 For count = 0 To 100 If lblright.Left > 120 Then lblright.Left = lblright.Left - num Else lblright.Visible = False Lblleft.Visible = True lblright.Left = 5160 Timer2.Enabled = False Timer1.Enabled = True End If Next End Sub Public Sub marquee() Lblleft.Caption = "Cell Enquiry" lblright.Caption = "Cell Enquiry" Lblcenter.Visible = False Timer2.Enabled = False lblright.Visible = False End Sub Private Sub TxtNewpws_KeyPress(KeyAscii As Integer) If Len(TxtNewpws) > 20 Then MsgBox "Password shoud not be more then 20 charecter", vbInformation, "LENTH" TxtNewpws = "" Txtrepwd = "" txtPassword.SetFocus End If

117

End Sub Private Sub Txtrepwd_KeyPress(KeyAscii As Integer) If Len(Txtrepwd) > 20 Then MsgBox "Password shoud not be more then 20 charecter", vbInformation, "LENTH" TxtNewpws = "" Txtrepwd = "" txtPassword.SetFocus End If End Sub

10.

User

Permissions Form

( Used by Administrator )

118

Coding Attached with this form User Permission :

Dim rs As Recordset Private Sub cmbLoginId_Click() rs.MoveFirst rs.Move cmbLoginId.ListIndex display End Sub Private Sub Cmdaply_Click() If cmbLoginId.ListIndex <> 0 Then CmdAply.Enabled = False CmdOk.Enabled = True cmdCancel.Enabled = True Else MsgBox "Administer Permission cant change", vbInformation, "ADMINISTRETER" End If

119

End Sub Private Sub CmdCancel_Click() rs.MoveFirst cmbLoginId.List (0) display End Sub Private Sub CmdClose_Click() Unload Me End Sub Private Sub CmdOk_Click() rs("cpassword") = txtPwd rs("dCreateDate") = cmbCeateDate If Checkadd.Value = Checked Then rs("cadd") = 1 Else rs("cadd") = 0 End If If Checkmod.Value = Checked Then rs("cmod") = 1 Else rs("cmod") = 0 End If

If Checkdel.Value = Checked Then rs("cdelete") = 1 Else rs("cdelete") = 0 End If If Checkdb.Value = Checked Then rs("cback") = 1 Else rs("cback") = 0 End If If Checkdbres.Value = Checked Then rs("crestore") = 1 Else rs("crestore") = 0 End If

120

rs.Update Me.CmdAply.Enabled = True CmdOk.Enabled = False cmdCancel.Enabled = False End Sub Private Sub Form_Load() frmMain.mnuUserPermition.Checked = True Set rs = New Recordset rs.Open "select * from users ", con, adOpenDynamic, adLockOptimistic rs.MoveFirst While Not rs.EOF cmbLoginId.AddItem Trim(rs(0)) rs.MoveNext Wend cmbLoginId = cmbLoginId.List(0) CmdOk.Enabled = False cmdCancel.Enabled = False marquee End Sub Private Sub Form_Unload(Cancel As Integer) frmMain.mnuUserPermition.Checked = False End Sub Private Sub Timer1_Timer() Dim count As Integer Dim num As Integer num = 1 count = count + 1 For count = 0 To 100 If Lblleft.Left < 6240 Then Lblleft.Left = Lblleft.Left + num Else Lblleft.Visible = False lblright.Visible = True Lblleft.Left = 120 Timer1.Enabled = False Timer2.Enabled = True End If Next End Sub

121

Private Sub Timer2_Timer() Dim count As Integer Dim num As Integer num = 1 count = count + 1 For count = 0 To 100 If lblright.Left > 120 Then lblright.Left = lblright.Left - num Else lblright.Visible = False Lblleft.Visible = True lblright.Left = 6240 Timer2.Enabled = False Timer1.Enabled = True End If Next End Sub Public Sub display() txtPwd = rs("cpassword") cmbCeateDate = rs("dCreateDate") If rs("cadd") = 1 Then Checkadd.Value = Checked Else Checkadd.Value = Unchecked End If If rs("cmod") = 1 Then Checkmod.Value = Checked Else Checkmod.Value = Unchecked End If If rs("cdelete") = 1 Then Checkdel.Value = Checked Else Checkdel.Value = Unchecked End If If rs("cback") = 1 Then Checkdb.Value = Checked Else Checkdb.Value = Unchecked End If If rs("crestore") = 1 Then Checkdbres.Value = Checked

122

Else Checkdbres.Value = Unchecked End If End Sub

123

11. Change Cell Number Form

(Used by Administrator )

Coding Attached with this form Change Cell Number :

Dim rs As New ADODB.Recordset Private Sub Cmdaply_Click() Dim inum As Integer inum = 0 If Len(txtCell) = 10 And Len(txtnew) = 10 Then rsCell.MoveFirst Do While Not rsCell.EOF If txtCell = rsCell("icellnumber") Then inum = 1 Exit Do

124

End If rsCell.MoveNext Loop Else MsgBox "This is not avalid Cell Number", vbInformation, "Cell Number" End If If inum = 1 Then rsCell("icellnumber") = txtnew CmdAply.Enabled = False CmdOk.Enabled = True cmdCancel.Enabled = True txtCell.Enabled = False txtnew.Enabled = False Else MsgBox "Record not found for this Cell number", vbInformation, "CELL Number" End If End Sub Private Sub CmdCancel_Click() rsCell.CancelUpdate txtCell = "" txtnew = "" txtCell.Enabled = True txtnew.Enabled = True cmdCancel.Enabled = False CmdOk.Enabled = False CmdAply.Enabled = True End Sub Private Sub CmdOk_Click() rsCell.Update rscomp.MoveFirst While Not rscomp.EOF If txtCell = rscomp("icellnumber") Then rscomp("icellnumber") = txtnew rscomp.Update End If rscomp.MoveNext Wend rs.MoveFirst While Not rs.EOF If txtCell = rs("icellnumber") Then rs("icellnumber") = txtnew

125

rs.Update End If rs.MoveNext Wend CmdAply.Enabled = True CmdOk.Enabled = False cmdCancel.Enabled = False txtnew.Enabled = True txtCell.Enabled = True End Sub Private Sub Form_Load() connect cellularEntry complanesprosq rs.Open "Select * from enquery", con, adOpenDynamic, adLockOptimistic CmdOk.Enabled = False cmdCancel.Enabled = False marquee End Sub Private Sub Timer1_Timer() Dim count As Integer Dim num As Integer num = 1 count = count + 1 For count = 0 To 100 If Lblleft.Left < 4440 Then Lblleft.Left = Lblleft.Left + num Else Lblleft.Visible = False lblright.Visible = True Lblleft.Left = 120 Timer1.Enabled = False Timer2.Enabled = True End If Next End Sub Private Sub Timer2_Timer() Dim count As Integer Dim num As Integer num = 1

126

count = count + 1 For count = 0 To 100 If lblright.Left > 120 Then lblright.Left = lblright.Left - num Else lblright.Visible = False Lblleft.Visible = True lblright.Left = 4440 Timer2.Enabled = False Timer1.Enabled = True End If Next End Sub Public Sub marquee() Lblleft.Caption = "Cell Enquiry" lblright.Caption = "Cell Enquiry" Lblcenter.Visible = False Timer2.Enabled = False lblright.Visible = False End Sub Private Sub txtCell_KeyPress(KeyAscii As Integer) Dim strValid As String Dim strstart As Integer strValid = "0123456789" If KeyAscii > 26 Then If InStr(strValid, Chr(KeyAscii)) = 0 Then KeyAscii = 0 End If End If End Sub Private Sub txtnew_KeyPress(KeyAscii As Integer) Dim strValid As String Dim strstart As Integer strValid = "0123456789" If KeyAscii > 26 Then If InStr(strValid, Chr(KeyAscii)) = 0 Then KeyAscii = 0 End If End If End Sub

127

12. Model Details Form

( Used by Administrator )

Coding Attached with this form Model Details :


Dim rschannel As Recordset Dim rsBrand As Recordset Private Sub cmbBrand_Click() cmbModelid.Clear AddModel cmbModelid = cmbModelid.List(0) End Sub Private Sub cmbchannel_Click() Dim strstart As String strstart = UCase(Trim(CmbChannel))

128

rschannel.MoveFirst Do While Not rschannel.EOF If strstart = Trim(UCase(rschannel("cChannel"))) Then If rschannel("istartnumber") <> "" Then txtStartno = rschannel("iStartnumber") End If If rschannel("cEmailend") <> "" Then txtEmailEnd = rschannel("cEmailend") End If Exit Do Else txtEmailEnd = "" txtStartno = "" End If rschannel.MoveNext Loop End Sub

Public Sub addChannel() rschannel.MoveFirst While Not rschannel.EOF CmbChannel.AddItem Trim(rschannel("cChannel")) rschannel.MoveNext Wend CmbChannel.AddItem "Others" End Sub Private Sub CmdAdd_Click() Dim i As Integer i=0 If cmbBrand <> "" And cmbModelid <> "" Then rsBrand.MoveFirst Do While Not rsBrand.EOF If Trim(UCase(cmbBrand)) = Trim(UCase(rsBrand("cbrand"))) And Trim(UCase(cmbModelid)) = Trim(UCase(rsBrand("cModelid"))) Then i=1 Exit Do End If rsBrand.MoveNext Loop If i = 0 Then rsBrand.MoveLast

129

rsBrand.AddNew rsBrand("cbrand") = cmbBrand rsBrand("cmodelid") = cmbModelid rsBrand.Update cmbBrand = "" cmbModelid = "" Else MsgBox "This Model is already intered", vbInformation, "MODEL" End If Else MsgBox "Data May Be Impity fill Both Brand and Model", vbInformation, "MODEL" End If End Sub Private Sub cmdAddc_Click() rschannel.MoveLast rschannel.AddNew rschannel("cEmailend") = txtEmailEnd rschannel("iStartnumber") = txtStartno rschannel("cChannel") = UCase(CmbChannel) rschannel.Update CmbChannel.AddItem CmbChannel End Sub Private Sub cmddelc_Click() Dim strmsg As String Dim i As Integer i = CmbChannel.ListIndex strmsg = MsgBox("You want To delete the Record", vbYesNo + vbInformation, "Deleting Information") If strmsg = vbYes Then rschannel.Delete If rschannel.EOF = True Then rschannel.MoveLast End If End If CmbChannel.RemoveItem i End Sub Private Sub cmdDelete_Click() Dim strmsg As String Dim i As Integer i=0

130

strmsg = MsgBox("You want To delete the Record", vbYesNo + vbInformation, "Deleting Information") If strmsg = vbYes Then rsBrand.MoveFirst Do While Not rsBrand.EOF If Trim(UCase(cmbBrand)) = Trim(UCase(rsBrand("cbrand"))) And Trim(UCase(cmbModelid)) = Trim(UCase(rsBrand("cmodelid"))) Then Exit Do End If i=i+1 rsBrand.MoveNext Loop rsBrand.MoveFirst rsBrand.Move i rsBrand.Delete If rsBrand.EOF = True Then rsBrand.MoveLast Else End If cmbModelid.RemoveItem cmbModelid.ListIndex cmbModelid = "" End If End Sub

Private Sub Form_Load() On Error Resume Next Unload frmMain.ActiveForm connect complanesprosq Set rsBrand = New Recordset rsBrand.Open "select * from brand order by cBrand", con, adOpenDynamic, adLockOptimistic Set rschannel = New Recordset rschannel.Open "select * from channel", con, adOpenDynamic, adLockOptimistic addBrand AddModel addChannel marquee frmMain.mnubrandchannel.Checked = True End Sub

131

Public Sub AddModel() Dim str As String str = Trim(LCase(cmbBrand)) rsBrand.MoveFirst While Not rsBrand.EOF If Trim(LCase(rsBrand("cBrand"))) = str Then cmbModelid.AddItem Trim(rsBrand("cModelId")) End If rsBrand.MoveNext Wend cmbModelid.AddItem "Others" End Sub Public Sub addBrand() Dim strsearch As String Dim strcheck As String rsBrand.MoveFirst cmbBrand.AddItem rsBrand("cbrand") strsearch = rsBrand("cbrand") While Not rsBrand.EOF strcheck = rsBrand("cbrand") If Trim(UCase(strsearch)) <> Trim(UCase(strcheck)) Then cmbBrand.AddItem rsBrand("cbrand") strsearch = strcheck End If rsBrand.MoveNext Wend cmbBrand.AddItem "Others" End Sub Private Sub Form_Unload(Cancel As Integer) frmMain.mnubrandchannel.Checked = False End Sub Private Sub Timer1_Timer() Dim count As Integer Dim num As Integer num = 1 count = count + 1 For count = 0 To 100 If Lblleft.Left < 4560 Then Lblleft.Left = Lblleft.Left + num Else

132

Lblleft.Visible = False lblright.Visible = True Lblleft.Left = 120 Timer1.Enabled = False Timer2.Enabled = True End If Next End Sub

Private Sub Timer2_Timer() Dim count As Integer Dim num As Integer num = 1 count = count + 1 For count = 0 To 100 If lblright.Left > 120 Then lblright.Left = lblright.Left - num Else lblright.Visible = False Lblleft.Visible = True lblright.Left = 4560 Timer2.Enabled = False Timer1.Enabled = True End If Next End Sub

133

Public Sub marquee() Lblleft.Caption = "Cell Enquiry" lblright.Caption = "Cell Enquiry" Lblcenter.Visible = False Timer2.Enabled = False lblright.Visible = False End Sub

134

13. Search Form

Coding Attached with this form Search :

Dim rs As Recordset Private Sub cmbEnqueryID_Click() rs.MoveFirst rs.Move cmbEnqueryId.ListIndex display1 rscomp.MoveFirst Do While Not rscomp.EOF If Trim(UCase(txtComplaneId)) = Trim(UCase(rscomp("cComplaneId"))) Then display2

135

Exit Do End If rscomp.MoveNext Loop End Sub Private Sub Form_Load() connect Set rs = New Recordset rs.Open "Select * from enquery", con, adOpenDynamic, adLockOptimistic cellularEntry complanesprosq marquee frmMain.mnuSearchdetails.Checked = True End Sub Private Sub Form_Unload(Cancel As Integer) frmMain.mnuSearchdetails.Checked = False End Sub Private Sub Timer1_Timer() Dim count As Integer Dim num As Integer num = 1 count = count + 1 For count = 0 To 100 If Lblleft.Left < 8680 Then Lblleft.Left = Lblleft.Left + num Else Lblleft.Visible = False lblright.Visible = True Lblleft.Left = 120 Timer1.Enabled = False Timer2.Enabled = True End If Next End Sub Private Sub Timer2_Timer() Dim count As Integer Dim num As Integer num = 1 count = count + 1

136

For count = 0 To 100 If lblright.Left > 120 Then lblright.Left = lblright.Left - num Else lblright.Visible = False Lblleft.Visible = True lblright.Left = 8680 Timer2.Enabled = False Timer1.Enabled = True End If Next End Sub Public Sub marquee() Lblleft.Caption = "Cell Enquiry" lblright.Caption = "Cell Enquiry" Lblcenter.Visible = False Timer2.Enabled = False lblright.Visible = False End Sub Public Sub display() txtCell = rsCell("iCellNumber") txtName = rsCell("cName") txtPhone = rsCell("cPhoneNumber") txtAddress = rsCell("vAddress") txtModelid = Trim(rsCell("cModelId")) End Sub Private Sub txtCell_KeyPress(KeyAscii As Integer) Dim strstart As Integer strValid = "0123456789" If KeyAscii > 26 Then If InStr(strValid, Chr(KeyAscii)) = 0 Then KeyAscii = 0 End If End If End Sub Private Sub txtCell_LostFocus() On Error Resume Next If Len(txtCell) = 10 Then rsCell.MoveFirst

137

Do While Not rsCell.EOF If txtCell = rsCell("iCellNumber") Then display Exit Do End If rsCell.MoveNext Loop rs.MoveFirst While Not rs.EOF If txtCell = rs("iCellNumber") Then cmbEnqueryId.AddItem rs("cEnqueryID") End If rs.MoveNext Wend cmbEnqueryId = cmbEnqueryId.List(0) End If End Sub

Public Sub display1() txtProblem = rs("vProblem") txtenqueryDate = rs("dEnquerydate") txtexcutive = rs("cEmployee") txtComplaneId = rs("cComplaneID") End Sub Public Sub display2() txtComplaneDate = rscomp("dDateOfComlane") txtComplanetaker = rscomp("cEmployeeId") End Sub

14. Help File

138

This Software/Application also containing Help file which help to user to handle all function provided by the application

139

15. Module

One Module Used in this application having few function those are used Globally by the Forms

Public rsCell As Recordset Public con As Connection Public rsEmp As Recordset Public rscomp As Recordset Public strcopid As String Public endfix As String Public strcheck As String Public rscomid As Recordset Public strdate As String Public strmonth As String Public stryear As String Public caddvalue As Integer Public cmodvalue As Integer Public cdelvalue As Integer Public cbacvalue As Integer Public cresvalue As Integer Public cadmvalue As Integer Public Sub cellularEntry() Set rsCell = New Recordset rsCell.Open "select * from coller", con, adOpenDynamic, adLockOptimistic End Sub Public Sub connect() Set con = New Connection con.Open "provider=SQLOLEDB.1;server=SUMIT;database=master;uid=sa;pwd=" End Sub

Public Sub employeepros() Set rsEmp = New Recordset rsEmp.Open "select * from Employement", con, adOpenDynamic, adLockOptimistic End Sub Public Sub complanesprosq() Set rscomp = New Recordset

140

rscomp.Open "select * from Complane", con, adOpenDynamic, adLockOptimistic End Sub Public Sub genretcompid() Set rscomid = New Recordset rscomid.Open "select * from Complane ", con, adOpenDynamic, adLockOptimistic rscomid.MoveFirst endfix = Right(rscomid("cComplaneId"), 3) + 1 While Not rscomid.EOF strcheck = Right(rscomid("cComplaneId"), 3) + 1 If Val(strcheck) > Val(endfix) Then endfix = strcheck End If rscomid.MoveNext Wend If Len(endfix) = 1 Then endfix = "00" & endfix ElseIf Len(endfix) = 2 Then endfix = "0" & endfix ElseIf endfix = "" Then endfix = "001" End If strdate = CStr(Day(Date)) If Len(strdate) = 1 Then strdate = "0" & strdate End If strmonth = CStr(Month(Date)) If Len(strmonth) = 1 Then strmonth = "0" & strmonth End If stryear = Right(Year(Date), 2) strcopid = strmonth & "-" & strdate & "-" & stryear & "-" & endfix End Sub

141

REPORTS

142

REPORTS
Master Report of all callers :-

143

Employee Master Details :-

144

Enquiry Report :-

145

E-mail Enquiry Report :

146

147

Complain Report :-

148

149

CHAPTER

7
CODE EFFICIENCY,CODE OPTIMIZATION AND EVALUATION

150

CODE EFFICIENCY
In an effort to maintain computational efficiency and to allow the eventual adaptation of the algorithm to face tracking application, intense optimization of the code has been performed. Although further development is in progress, the algorithm is currently fast and compact enough to run interactively on most generic platforms.

First, the sequential hierarchical search which proceeds from large scales to small scales. This allows a rapid convergence if the face is dominant in the image. Furthermore, the algorithm does not always flow through the complete loop. It stops as soon as one of the modules reports a failure and loops back to an earlier stage. For example, we do not search for a mouth if no eyes are found. In this case, no time is wasted in the mouth module.

Additionally, we utilized special programming techniques to reduce the run-time. For instance, wave propagation is used to generate the symmetry maps. This provides a computational efficiency that

makes the symmetry operator a practical tool. The 3D normalization algorithm is also extremely efficient and uses look-up tables and minimal calculations for increased speed.

The execution times are measure on an SGI Indy machine, which has a rating equivalent to that of a 1996 home personal computer. The efficiency of the code allows a face to be

151

found in an image in less than 1 second if it is the dominant structure. However, we loop through all objects in the scence in an attempt to find all possible faces. Thus, the algoruthms loop is traversed multiple times even though a face could have been detected in an earlier iteration of the loop.

OPTIMIZATION OF CODE
Optimization refers to increase in the throughput of the system with minimal use of effort and system resourses. It also includes faster response through better system design

practices including optimal utilization of code, normalized database structure and their use in the code.

152

The very first instance that stands for optimization of this application is the choice of the second alternative of the Feasibility study, that is, as specified earlier would prove to be most favourable and best possible for the progress in the working of the company.

The other criteria that ensure the optimization of this software application are enlisted as under :

Use of moduler design structure of application development. Use of Normalized Database Structures-Database optimization. Use of code modules extensively-code optimization. Use of minimum number of code lines for maximum processing of input data.

Allocating/de-allocating memory for the objects used in the code as and when required. Garbage collection Re-use of similar input forms/output reports wherever necessary to reduce the overall size of the application.

We find optimal solution of a project that is cose effective as well as time effective. Both are equally important for a project we divide the project into modules so that we can easily understand the project. And also it will take less time to solve the problems.

153

Modularity is the single attribute of software that allows a program to be intellectually manageable.

EVALUATION
Evaluation of Software :
One of the most different tasks in selecting software, once system requirements are known, is determining whether a particular software package fits the requirements.

The selection of software requires the same care used in the selection of hardware. Application requirements are compared with software features. Particular attention is paid to the flexibility of the software, its capacity, and the extent of audit and reliability features. And the after-purchase support and maintenance provided by the vendor must not be overlooked, since the purchaser is highly dependent on the vendor for continued support.

154

Legal assistance is advisable when contracting for software to ensure that the purchasing organization is fully protected and that it will have adequate software capability even if the vendor firm changes hands or goes out of business.

For software evaluation,following approaches have been discussed

Benchmarking
Benchmarking is nothing but a sample program specially designed to evaluate the comparative performance of hardware or software.

Experience of other users


Vendors generally gives a list of users who are satisfied with their work. But it is advisable to seek the opinion independently from the existing users whose configuartion and operational environment is closely indentical.

Report of independent research organization


Now-a-days many research organizations undertake project of evaluating the proprietary software offered by various software agencies. These evaluations are objectives and comprehensive in nature. They publish the report at regular interval. The prospective buyer of a software package can have faith in their evaluation.

155

CHAPTER

8
MODULES

156

MODULES DESCRIPTION
Main phases are covered in the application : Maintain the Caller Details Detail Maintain Complain Maintain Enquiry Details Maintain Employee Details Administrator

Maintain the Caller Details Detail


It maintains all the Information about Caller of an Enquiry. This form displays the Caller Personal Detail With his latest instrument Detail. The email Field of the Form is gated record of Channel Email Address. You modify the entire Field except Cell Number if you are a permitted User. The mobile number of the Caller is the Id of the Caller. You can change the Cell number of Caller to the help of change Cell Number Form but it can only possible for Administrator Log. Permitted User can also delete the Caller Record.

Maintain Complain

157

It maintains all the Complain of Caller of an Enquiry. This form displays the Caller Instrument detail and Complain of enquiry. Complain id of this field is auto generated. The auto number is date and 001 to 999.

Maintain Enquiry Details


It maintains all the Information about Enquiry after Enquiry Company working on it. It is necessary to maintain this record either problem is found or not. Otherwise product dos not accept other problem of that Cell number.

Maintain Employee Details


It maintains all the Information about Employee of the Enquiry Company It is necessary to maintain this record because it gives combo item for Employee

Administrator
Change Password: -This form use to change changes the user password. To change password of a user select login of user and

158

type password in password field. After this type new password and re password for checking new password and re password respectively. Click Apply to conform and after this click Ok button for change password.

Create User: -This form is use to create new users. Fill all fields and click Apply and Ok button. A new User is created.

Delete user: -This form use to delete a user select login id of Existing user and type the password and click delete button. When you click the Delete button a massage box is displayed if you click Ok button of massage box then User is deleted.

Change Cell Number: -This form is use to change the cell number of Caller. To change cell number Firstly type cell number and new cell number of a corresponding fields and click Apply and Ok button.

User Permission: -This form is use to giving permission to the users. To give permission Select the login id and check the permission and click apply

VALIDATION CHECKS
159

Validation refers to a different set of activities that ensure that the software that has been built is traceable to customer requirement.

Validation is to check that the product made is what was required or not

Validation testing provides final assurance that software meets all functional, Behavioral and performance requirements. Black Box Testing techniques are used exclusively during validation.

After each validation test case has been conducted, one of two possible conditions exists :

The function or performance characteristics conform to specification and are accepted. A deviation from specification is uncovered and a deficiency list is created. Deviation or error discovered at this stage in a project can rarely be corrected prior to scheduled completion. It is often necessary to negotiate with the customer to establish a method for resolving defiances.

160

CHAPTER

9
IMPLEMENTATION
161

& MAINTENANCE

TESTING
A systematic and wholly procedural plan for testing was adopted the procedure while implementing testing went in hand with preparing a unit test plan.

Test the modules thoroughly- cover all the access paths. Generate enough data to cover all the access paths arising from conditions. Test the modules by passing wrong data.

162

To test different access paths, look at the conditional statement. Enter some data in the test file, which would satisfy the condition and again test the script. Repeat this process many times. After each test , analyze the log file to ensure proper, understandable and useful messages are present in the log file. Test for locking by invoking multiple concurrent processes.

TESTING OBJECTIVES Testing is a process of executing a program with the intent of finding an error. A goal test case is one that has a probability of finding an as yet undiscovered error. A successful test is one that uncovers an as yet undiscovered error.

TESTING PRINCIPLE

All tests should be traceable to customer requirements. Test should be planned long before testing begins.

163

The testing should begin in the small and progress towards testing in the large. Exhaustive testing is not possible. To be most efficient, an independent third party should conduct testing.

CHARACTERS OF A GOOD TEST


A good test has a high probability of finding an error. A good test is not redundant. A good test should be best of breed.

A good test should be neither too simple nor too complicated.

TYPES OF TESTING

White box testing. Black box testing.

WHITE BOX TESTING :


White Box testing which is performed early in the testing process, is also called glass-box testing. Using white box testing , the software engineer can derive test cases that

164

1. Guarantee that all the independent paths within the module have been exercised at least once. 2. Exercise all logical decisions on their true and false sides.

3. Execute all loops at their boundaries and within their operational bounds. 4. Exercise internal data structure to assure their validity.

BLACK BOX TESTING

Black box testing to be applied during later stage of testing. Black box testing, focuses on the functional requirement of the software. Black box testing enables the software engineer to derive sets of input conditions that will fully exercise the functional requirement of a program. Black box testing enables to find error in the following categories:-

Incorrect or missing functions. Interface errors. Errors in the data structure or external database access. Performance errors. Initialization and termination errors

165

By applying Black box testing a set of test cases that satisfy the following criteria -- Test cases that reduce, by a count that is greater than one, the number of additional test case must be designed to achieve reasonable testing. Test cases that tell us something about the presence or absence of classes of errors, rather than associated only with the specific test at hand.

166

IMPLEMENTATION
We know that software requirement analysis should focus on what the software is to accomplish, rather than and on how processing will be implemented. However, the implementation view should not be model representing the current mode of operation, that is, existing or proposed allocation for all system elements. Actually the implementation means how we implement our project or making our project. Coding part is related to the implementation.

Implementation also includes that which implements you for making project and other main points are as follows :-

Training of users. Conversion of data. Solve problems related to application and other data forms. Create help full atmosphere

167

CHAPTER

10
SYSTEMS SECURITY MEASURES

168

SECURITY MEASURES TAKEN


System Security
Just when the computer age will arise is no longer a question is here but its impact is everywhere. Every system must provide built in feature for security and integrity, privacy and confidentiality. This determines the file structure, data structure and access procedure.

As far as our system is concerned from s/w point of view every data entry, updating, and deleting and transaction processes (forms) are protected from unauthorized user by using password. System ask for a password before opening the main form. If the given password is illegal it does not give permission to see the existing data as well as entering new data. Five consicutive login failures would lock the user at the database level. And user wise permission will give the extra security to the package. It means that user can use the package according to the permissions given by the administrator. So all the database are secured from unauthorized access.

CHAPTER
169

11
PERT & GANTT CHART

PERT CHART
170

There are some improtant boundary times that may be discerned from a PERT are as follows :

The earliest time that a task can begin when all preceding tasks are complete in the shortest time. The latest time for task initiation before the minimum project completion time is delayed.

The earliest finish the sum of the earliest start and the task duration. The latest finish the sum of the earlies added to task duration. The total float the amount of surplus time or leeway allowed in scheduling tasks so that the network critical path is maintained on schedule.

PERT CHART

Project Phases

Date

Activity

171

Feasibility Study System Analysis System Design Database Design Coding & Design System Integration System Testing System Implementation User Training Post-Implementation Review Total Days

14th june(7 Days) 21th June(9 Days) 30th June(5 Days) 5th July(4 Days) 10th July (30 Days) 10th August(10 Days) 20th August(20 Days) 9th Sept.(12 Days) 21th Sept.(10 Days) 1th Oct.(10 Days) 117 Days

A B C D E F G H I J

Start

C
9

5 0

D
4 5 30

F
20 1 12

10 0

G
172

10 07

Finish

GANTT CHART
The Gantt chart is the standard format for displaying a schedule graphically. It consists of a horizontal bar chart with time as the horizontal axis and either resources, jobs, or orders as the vertical axis. Individual operations are displayed as horizontal bars in the chart, indicating the time at which the job begins and ends. Many variations on the Gantt Chart exist to display additional kinds of information.

Gantt charts can be drawn physically on paper, but nowadays are usually implemented through computer software.

173

A Gantt chart is a horizontal bar chart developed as a production control tool in 1917 by Henry L.Gantt, an American engineer and social scientist. Frequently used in project management, a Gantt chart provide a graphical illustration of a schedule that help to plan, coordinate, and track specific tasks in a project. Gantt Charts may be simple versions created on graph paper or more complex automated versions created using project management applications such as Microsoft Project or Excel.

A Gantt chart is constructed with a horizontal axis representing the total time span of the project, broken down into increments (for example, days, weeks, or months) and a verticle axis representing the tasks that make up the project (for example, if the project is outfitting your computer with new software, the major tasks involved might be: conduct research, choose software, install software). Horizontal bars of varying length represent the sequences,timing, and time span for each task. Using the same example, you would put conduct research at the top of the vertical axis and draw a bar on the graph that represents the amount of time. You expect to spend on the research, and then enter the other tasks below the first one and representative bars at the points in time when you expect to undertake them. The bar spans may overlap, as for example, you may conduct research and choose software during the same time span. As the project progresses, secondary bar, arrowheads, or darkened bars

174

may be added to indicate completed tasks,or the portions of tasks that have been completed. A vertical line is used to represent the report date.

Gantt charts give a clear illustration of project status, but one problem with them is that they dont indicate task dependencies

you cannot tell how one task falling behind sechedule affects other tasks. The PERT CHART, another popular project management charting method, is designed to do this. Automate Gantt Chart store more information about tasks, such as the individuals assigned to specific tasks, and notes about the procedures. They also offer the benefit of being easy to change, which is helpful. Charts may be adjusted frequently to reflect the actual status of project task as; almost inevitably, they diverge from the original plan.

175

GANTT CHART
Time Taken
Jun 13, Jun 14, Jun 21, Jul. 10, Aug. 03 03 20, 03 03 03 Aug. 29, 03 Sep.01, 03 Sep. 09, 03 Sep. 16, 03 Oct. 01, 03

Star t
Analysis /Design

Codin g

Testing / Validation

Implementa tion

Finish

176

CHAPTER

12
FUTURE SCOPE OF THE PROJECT

177

SCOPE OF FUTURE APPLICATION

A future application of this system lies in the fact that the proposed system would remain relevant in the future. In case there be any modifications in the Enquiry System should easily modified. The Enquiry Management System is developed for a Client-Server based environment. In future if Agency wants to make all their transaction online it should be Possible. Easily converted, which is used as platform provider for Intranet application using Window 2000 Professional server.

Improvement sales and purchase of cell-phone will be introduced. Functions can be embodied for payments through checks, credit cards (and
barcode).

The programs compatibility can be increased for online transactions. Surely, we can upgrade the program to a complete utility
purchase & sale management software.

CHAPTER
178

13
BIBLIOGRAPHY

BIBLIOGRAPHY
Date, C. J. An Introduction to Database System, 5/e

179

Elmasri, Ramez & Navathe, Shamkant B. Fundamental Of Database System, 2/e Jalote, Pankaj An Integrated Approach To Software Engineering, 2/e Pressman, Roger S. Software Engineering a practitioners Approach, 4/e [ALB83] Albreeht, A. J., and J. E. Gaffney, Software Function, Source Lines of Code and Development Effort Prediction: A Software Science Validation, IEEE Trans. Software Engineering, November 1983. PP. 639 648 [BOE81] Boehm B., Software Engineering Economics, Prentice Hall 1981.

Peter Norton Visual Basic 6.0

Web-Site
www.microsft.com www.vbguru.com www.gurucode.com

180

S-ar putea să vă placă și