You are on page 1of 75

Project report on project named,

Employee Time and Work Management System


(ETWMS)

Submitted in fulfillment of requirement for Bachelor of Science in Information Technology

Under the Guidance of, SHWETHA,


SENIOR FACULTY

Project Undertaken by, N. PANDU RANGA RAO.

Employee Time and Work Management System

Page 1 of 75

EMPLOYEE TIME AND WORK MANAGEMENT SYSTEM


PROJECT WORK SUBMITTED AS PARTIAL FULFILLMENT OF THE COURSEWORK FOR THE DEGREE OF B.SC (IT) OF KARNATAKA STATE OPEN UNIVERSITY, MYSORE. BY N. PANDU RANGA RAO ROLL NO 041850374 A STUDENT OF

RELIANCE COMPUTERS,
No.6, 5th Main, Yadavagiri, Behind Akashavani, Mysore-20

SC CODE - KA279
DECEMBER / 2005

Employee Time and Work Management System

Page 2 of 75

Authorised Study Centre

RELIANCE COMPUTERS
P R I V A T E L I M I T E D

Certificate
Certified that the project report entitled Employee Time and Work Management System submitted by N. Pandu Ranga Rao, with Roll No. 041850374 on December, 2005 is his own work and has been carried out under my supervision. It is recommended that the candidate may now be evaluated for his project work by the University. (STUDENT) Signature: Name Date Address : : : (STUDY CENTRE) Signature: (GUIDE) Signature / Date: Designation Organization : :

EXAMINERS: 1) Name : 2)

Date

: Seal of Study Centre

Employee Time and Work Management System

Page 3 of 75

ACKNOWLEDGEMENTS
No work of significance can be claimed as a result of individual effort and same holds true further for this project as well. The energy of many has contributed in no small measure in completion of this project. I express my sincere thanks to PRASHANTH HEBBAR, Center Manager, Reliance Computers for his constant encouragement, suggestions and timely guidance in the making of this project. I am highly indebted and thankful to my guide SHWETHA, Senior Faculty, Reliance Computers for her valuable suggestions and timely guidance in making this project. I again take this opportunity to express my deep gratitude to all my friends and lecturers who helped me in this project. I equally thank my family for extending their support in this project.

N. PANDU RANGA RAO.

Employee Time and Work Management System

Page 4 of 75

Contents
Topics 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. Synopsis System Requirements Advantages and uses of computerization A brief introduction to HTML and CSS About Internet Information Server (IIS) About Active Server Pages (ASP) About Microsoft Visual Basic 6.0 About Microsoft Access 2000 About Seagate Crystal Reports Project in detail Flow charts Screen views Future Scope Conclusion Bibliography Page No 6 7 8 9 12 15 25 41 46 48 53 60 73 74 75

Employee Time and Work Management System

Page 5 of 75

Synopsis
This project is aimed at the management of employees daily work in a software development firm. In a controlled environment, the firm needs to keep track of all the activities of employees. This allows the senior management to assess the work and efficiency of employee. The senior management can allot work online using this project, and each employee gets an idea of what should be done next. This project is aimed at getting the work done from the desk. Advantages of the project 1. Keeps track of employees daily works or tasks in a large firm, wherein, many people work together. 2. Keeps track of what the employee does and how much time he takes to finish the work. 3. Helps to convey problems faced by the employee, while working, to the senior management, efficiently. 4. It helps to avoid unnecessary problems between an employee and employers, senior management as it defines problem domain, clearly. 5. It provides an idea of what an employee does while he has no work assigned and gives an idea for project leader, who in turn allots him work. 6. If implemented in Internet, the employee can login and enter time log and problems from the branch office of the organization. 7. It combines staff and top-level management, thus, enabling timed work. 8. It helps to achieve one motive getting the work done from the desk.

Employee Time and Work Management System

Page 6 of 75

System Requirements
For any application program to run in a computer system, we need to check the processor type, amount of memory needed, amount of storage space needed etc. This is called as minimum system requirements, and must be fulfilled, before installing the software. Employee Time and Work Management System (ETWMS) is a client-sever application, where many computers involved. In order for the application to work, both the client and server should meet the following minimum requirements. They are, Server System: HARDWARE Intel Pentium III 750 MHz and above or equivalent. SVGA Monitor Storage: HDD: 10 G.B or above, Backup Device : CD/RW Keyboard & Mouse 256 MB RAM Printer (Dot Matrix, Inkjet, Laser) Operating System: Microsoft Windows NT Server Internet Information Server (IIS) Microsoft Access 2000 Seagate Crystal Report 4.6

SOFTWARE Client System: HARDWARE Intel Pentium II 250 MHz and above or equivalent. SVGA Colour Monitor Keyboard & Mouse 64 MB RAM Operating System: Microsoft Windows 98. Internet Explorer 5.0

SOFTWARE

Employee Time and Work Management System

Page 7 of 75

Advantages and uses of computerization


Before one looks into different aspects of computerization, he or she must know what a computer is. A Computer is an electro-mechanical device, which performs calculations automatically. A computer can run or execute a program with thousands of lines in few seconds. It can also perform additional tasks apart from calculations, i.e. printing on a paper etc. Some of the highlighted advantages of computerizing are, 1. Cost: The cost of computer hardware has been dropping at a significant rate with the consequent decline in the size of computer due to rapid increase in technology, causing the cost of software also to be automatically reduced. Hence, it gives an opportunity for an organization to apply computerization in all fields. 2. Accuracy: If human brain is compared with computers, there will be poor data process, slow and not completely accurate. They produce precise results and they are fast. Computers give error messages when it encounters errors, while computing. They are capable of calculating up to several digits. 3. Speed: The speed of the computer is very high. It is capable of carrying out several hundred million operations per second. Organizations are benefited by quick processing. 4. Provides Networking: Computers now a day communicate to other computer, just the same way as human-to-human interaction, via telephone. The use of latest networking technology, enable us to share resources such as, printer and other accessories of one computer with other computer, efficiently. With the introduction of WWW (World Wide Web) and the internet, information and resources can be shared not only locally, but, also globally across the world.
COMPUTER Calculation Oriented Mechanical Powerful Useful Technological Educational Resource

Employee Time and Work Management System

Page 8 of 75

An introduction to Hyper Text Markup Language and Cascading Style Sheets

A brief introduction to HTML and CSS

Hyper Text Markup Language (HTML) is the major language of the Internets World Wide Web (WWW). Web sites and web pages are written using HTML. Using WWW, one gets the ability to bring together text, pictures, sounds and links all in one place. HTML files are plain text files; so, that it can be viewed and edited using any computer system, may be Windows, Linux or even MAC. HTML documents are saved with an .HTM or .HTML extension. As soon as browser gets the HTML document, the browser looks for the tags that are placed in the document and displays text accordingly. HTML documents contain commands to interpret the text, so that it appears differently in the browser, also to display images. These commands in HTML are called as Tags. In HTML, proper words are enclosed within < and > to denote it as a Tag. Tags are placed inside HTML document itself along with the text. There are two kinds of tags, the starting tag and ending tag. The staring tag indicates the beginning of command and ending tag denotes the end of started command. The starting tags are the tags enclosed in < and >. However, the ending tag must be in the form of </tagname>. The starting tag must end with ending tag somewhere in the document. Otherwise it is applied till the end of the document. For example, if we use a tag to bold or darken the text, if we miss out the ending tag for bold text, then all text information placed from the bold tag will be displayed as bold text. It is not a good practice for a programmer using HTML to miss out the ending tags, because some browsers will display a blank page, instead of contents. An HTML page begins with <HTML> tag and ends with </HTML>. The html document has got two sections, namely, the head and body. The head section consists of provision for specifying the title of the document and various script tags and style tags for application with the body section. The body section contains major part of the document, which defines text and other information to be displayed.

Employee Time and Work Management System

Page 9 of 75

The Sample HTML document as follows,


<html> <head> <title>Welcome to HTML</title> </head> <body> <b>Hyper Text Mark up language</b> </body> </html> Welcome to HTML Hyper Text Mark up language

The HTML document can be edited using simple ASCII editors such as, Notepad or any html formatting tools such as Home site 4.5 or Microsoft Front Page Express which comes with the Microsoft Office. The Cascading Style Sheet is relatively a new technology, which predefines styles for the entire set of HTML documents. Here, one can define a style, which is applied to entire website uniformly. Style sheets apply some enhanced styles to the existing tags. For example, suppose a set of html documents contains a horizontal line at beginning of each document as <hr width=75%>. The modification of this tag will be difficult, if it is to be applied in all the N documents. Style sheets enable one to define the width outside html file as a style. The changes made to the style are applied to all N documents. The style rules are defined as follows, Selector {property: value} Where, selector is usually an HTML element or any name that must be used. Property is the property of the HTML element such font-name, font-size, etc. The value determines the how the selector will be presented. Multiple properties can be given for selector as, Selector {property-1: value; property-2: value} A general style can be defined as, .selector {property-1:value; property-2:value} The style sheets can be placed in .html files, using <style type=text/css> tag. The tag is placed in the head section of html document. Here, the defined style is applicable only to the document, where it is being defined.

Employee Time and Work Management System

Page 10 of 75

The global styles can be placed in a file with .CSS and can be linked to html documents using <link rel=StyleSheet href=filename.css>. The style can applied to a tag using class=stylename format. The major problem with style sheets is that, some older versions of browsers cannot interpret the style and displays the text and other things as per default settings. Due to this problem style sheets are not popularly used. But, with advent of new browsers and operating systems style sheets are slowly started gaining popularity.
Sample Style sheet definitions
<html> <head> <title>Cascading Style Sheets</title> <style type=text/css> p { color: white; background-color:black; font-family:verdana; } .note {color: black; background-color:white; font-family:verdana} </style> </head> Hello world <body> Hello Welcome <p>Hello world</p> <p class=note>Hello welcome</p> </body> </html>

The style sheets can be edited and viewed using any ASCII text editors such as Notepad. Top Style Lite is another style sheet editor program, meant for editing of style sheets.

Employee Time and Work Management System

Page 11 of 75

About Internet Information Server (IIS)


What is IIS, What one can do with IIS?
The Internet Information Server (IIS) is a web server from Microsoft, used for development and deployment of web applications. It is required for running Active Server Pages. It is fastest among web servers that are available. IIS runs as a Microsoft Transaction Component (MTS, which is COM+ in Windows 2000), which means it can share database connections and launch, control, participate in transactions. IIS is programmable. Given sufficient permissions one can access, modify IIS and its web sites with COM-compliant languages, including ASP scripts. We can also extend and customize IIS via Internet Server Application Programming Interface (ISAPI). The IIS comes free of cost with Microsoft Windows NT 4.0 Option Pack and Microsoft Windows 2000. Two less-capable versions of IIS are available as Peer Web Server (Microsoft Windows NT Workstation) and Personal Web Server (PWS, Microsoft Windows 95/98). Valuable features of IIS: IIS provides integrated security, IIS provides access to content IIS provides an interface to COM

IIS provides integrated security: In the internet, most sites allow anybody to access to the site. The exceptions are commercial sites, secured sites, where we need to pay monthly fee to access the sites. IIS lets an administrator to set up restrictions on a site by site basis. Because, IIS integrates with MTS, we can also use MTS role based security to limit access to COM components which is used in the application. IIS provides access to content: All Web servers can deliver the HTML contents, but, they differ widely in how they treat other types of content. Most servers add and modify Multi-purpose Internet Mail Extensions (MIME) types, but IIS directly integrates into windows registry. This means IIS knows how to handle common file types, such as text files, application initialization files, executable files, word document files, xml (Extended Markup Language) etc.
Employee Time and Work Management System Page 12 of 75

IIS provides an interface to COM: IIS exposes many of the servers configuration settings through IIS Admin objects. These objects are accessible from ASP and other programming languages. This means one can change configuration settings and handle virtual directories and web programmatically. IIS 4.0 and higher versions store these configurations settings in a special database called as metabase. Programmatic control of web server is extremely important for Integrated Development Environments (IDEs) such as Visual Studio, Home site, Front Page, Dream weaver etc. IIS also provides another easy to use management interface called MMC (Microsoft Management Console) for use outside of an IDE or programming language. IIS exposes a COM interface through a set of objects called IIS Admin objects. One can use these objects with ASP or other COM-compliant language to alter the metabase programmatically. Microsoft Management Console The Microsoft Management Console (MMC) is a program that lets one to control the most aspects of a Windows 2000 computer from a single common interface. The MMC is not solely a management tool. It consists of set of snap-in programs, which manages the actual work. Launching MMC: In NT 4.0, we can launch MMC by, Click Start Programs Windows NT 4.0 Option Pack Microsoft Internet Information Server Internet Service Manager In Windows 2000, we can launch MMC by, Click Start Settings Control Panel Administrative tools Internet Services Manager

Employee Time and Work Management System

Page 13 of 75

Virtual Directory Virtual Directory is a name associated with a physical directory. We cannot refer to a physical directory directly, from a server, because of security reasons. So, the concept of virtual directory came into existence. It is an illusion of physical directory that can be accessed from the web site. It acts as a pointer to a physical directory. The creation of virtual directories hides physical implementation of the web site from users. Creating a Virtual Directory: We can create a virtual Directory in IIS using the instructions below, Internet Information Services Expand Web sites tree structure Right click on Default web site Navigate New on the popup menu select the item New Virtual Directory . Now, create new virtual directory wizard will appear on the screen. The different stages of wizard are shown below.
Welcome Screen Virtual Directory Name

Select the Physical Directory to which the virtual directory should point

Set Access Permission for the virtual directory

After finish is clicked Virtual directory will be created. User can click Cancel if he feels

After the creation of virtual directory, we can view it using web browser such as Microsoft Internet Explorer as, http://website/VirtualDirectoryName/FolderName/Page.htm Example: http://www.google.com/news/contents/content.htm http://localhost/news/contents/show.asp

Employee Time and Work Management System

Page 14 of 75

About Active Server Pages (ASP)


A detailed look into Active Server Pages
Introduction to ASP: ASP was first announced by Microsoft in November, 1996 (code named "Denali") and introduced in March 1997 to manage HTTP 1.0 as a part of Microsoft's Internet Information Server version 3.0 (code named Gibraltar). ASP is a program that runs inside IIS. Program codes written in ASP are called Scripts. These scripts written will run on the server and returns HTML back to the client. An ASP file has an extension of .ASP, which can contain text, HTML, XML and scripts. When a browser requests the Server to do a specific task, it does the task, and outputs back the HTML back to the client. What can ASP do for you? It can dynamically edit, change or add any content of a Web page. It can respond to user queries or data submitted from HTML forms. It can access any data or databases and return the results to a browser. It can customize a web page to make it more useful for individual users. It provides security since your ASP code can not be viewed from the browser. Because, ASP files are returned as plain HTML, they can be viewed in any browser. The Basic Syntax for Active Server Pages An ASP file normally contains HTML tags, just like an HTML file. However, an ASP file can also contain server scripts, surrounded by the delimiters <% and %>. Server scripts are executed on the server, and can contain any expressions, statements, procedures, or operators valid for the scripting language you prefer to use. We can use many scripting languages in an ASP file. However, the default scripting language for ASP is VBScript. VBScript syntax is some what similar to the syntax used in BASIC (Beginners All purpose Symbolic Instruction Code) high level language, which was used in 1980s. ASP Objects:

Employee Time and Work Management System

Page 15 of 75

In any other programming language, one must create an instance of the object, before using them. An object instance is a single copy of an object. The process of creating object instance is called as Object Instantiation. One do not need to instantiate some objects, before make using them, in ASP. These objects are called Intrinsic objects. There are seven intrinsic objects in ASP. They are, Response Object used to send requested information from the server, to the client. Request Object used to request some information from server, by the client. Server Object used to communicate with the server. Application Object used to store information (cache) about application. Session Object used to store information about a specific browser instance. ObjectContext Object used to initiate and control transactions and create new objects through Microsoft Transaction Server (MTS). ASPError Object used to obtain information about errors that occur while the ASP engine processes a script. Brief discussion on seven ASP objects: Response Object: As said above, a response object is used to give the response information from server to the client. It has several methods, properties and collections associated with it. One of the most popularly used method of Response object is Write method. It writes response on the browser window.

Employee Time and Work Management System

Page 16 of 75

Program using Response.write() method.


<html> <head> <title>This is an ASP file </title> </head> <body> <% Response.write(Hello World<br>First ASP Program) %> </body> </html> Hello World First ASP Program

Another way of writing responses is, <% = Num * 2 %> This is equal to <% Response.write (Num * 2) %> There are many other methods, properties and a collection (Cookies) for the response object, which are listed after this discussion. Request Object: As said above, a request object contains information about what data, the client sends to the server. It contains the actual data to be sent for processing in the server. The server accepts requested data from the client and processes it and sends back the response to client using response object. The request object contains five different collections of information. They are, 1. ClientCertificates Contains security information. 2. Cookies Contains cookie values sent by the browser. 3. Form Contains information, the user enters into input controls and information, the application has stored in form variables. 4. QueryString Contains information sent along with the URL 5. ServerVariables Contains information that the server automatically parses for each request. There are two methods by which, one can send data to server, using the request object. They are, By using URL, By using Form Variables. If one sends data by using URL method, then he has to create a form where form method set to Get. Or the data can be sent directly by typing data along with URL in the address bar of browser. For Example, if one sends data using this method, then the full URL looks as, http://www.google.com/Search/Search.asp?Page=1&Word=Pet%20Animals

Employee Time and Work Management System

Page 17 of 75

An Example of Get method:


<html> If Method=Get <body> <form name="FrmMsg" method="Get" action="Search.asp"> <input type="text" name="Word"> <input type="hidden" name="Page" value="1"> <input type="submit" name="Cmd" value="Submit"> The word is <%=Request.QueryString(Word) %> </form> </body> </html> Then use Request.QueryString

However, this method is not safe, because, any one can get information, through URLs, instead of filling the form. The second and safer method is to send information hidden, but, not through URLs. This method ensures that the form must be submitted, before, processing the request. User ID and Password are sent in this way. This method uses post in method part of form. An Example of Post method
If Method =Post <html> <body> <form name="FrmMsg" method="Post" action="Search.asp"> <input type="text" name="Word"> <input type="hidden" name="Page" value="1"> <input type="submit" name="Cmd" value="Submit"> The word is <%=Request.Form (Word) %> </form> Then use Request.Form </body> </html>

If one wants the output of the program in the new screen, then write the code The word is <%=Request.Form (Word) %> in different file and set action of form to that file. If one wants the output, in same screen, then write the code in same file. There is only one property and one method for Request object, which will be listed after this discussion.

Employee Time and Work Management System

Page 18 of 75

Application object: The use of the application object is to store the global values for Web applications. In a standard windows application, one can store the variable values that all modules can access and modify it. Such variables are called as global variables. The application object consists of a list of named v alues held in a collection called Contents. One can add a value to the collection with the default value property. Application.Value(Name) = Bill Alternatively, one can add a value to the collection, without specifying value property, by using, Application (Name) = Bill There is no property for application object. There are many methods, events which will be given in the list below. Server Object: The ASP server object gives high-level access to the server itself. One of the most powerful aspects of ASP is that it is extensible. One of the most popularly used method of Server object is, CreateObject method. Through the Server.CreateObject method, one can launch and use almost any COM objects. Microsoft delivers ASP with several different COM objects that one can use in applications. But, one can create own custom objects using Visual Basic and use it through Server.CreateObject method. The syntax of Server.CreateObject method is, Set ObjectVariable = Server.CreateObject(ProjectName.ClassName) Example: Set Con = Server.CreateObject(Adodb.Connection) Set Rs1 = Server.CreateObject(Adodb.Recordset) We use the CreateObject method, mostly, to create connection to the database and access it. The server object has a property and many methods. They are listed after this discussion.

Employee Time and Work Management System

Page 19 of 75

Session Object: The session object is used to store values that are associated with a single browser. An ASP session is specific to a given cookie. An ASP session begins at a browsers first request for any ASP pag e in a directory marked as an IIS application. The requested page doesnt have to be a specific page. It can be a file with .ASP extension in the applications virtual directory or any sub directory of that directory. The server then redirects the user to a file called Global.asa. The server generates a cookie header, and then runs the code, if it is present, in the Global.asa file. The server executes the Session_OnStart Event, which is, if present in the Global.asa file. The session variables are a collection of key-value pairs, just like the other ASP collections. Once specified the key, the session object stores or retrieves the associated value. To add a session variable one has to simply assign a value to a new key. That is, Session(NewKey) = Somevalue Example: Session(Name) = Bill The session object has got many properties, methods, events. One cannot store a Response or Request objects in a session variable. But, can store other objects. Example: Dim d Set d = Server.CreateObject(Scripting.Dictionary) d.Add name1, Bill Set Session(names) = d ObjectContext Object: This object is designed to handle transactions. This object appeared in IIS 4.0 not with IIS 3.0. If one uses IIS 3.0, the code containing this object, raises an error. The objectContext object has two significant purposes. It gives other components access to the transactional context. The second purpose is, as specified earlier, is to manage transactions. This object has two events, and to use them, the first line of ASP file should contain, <%@ Language=VBScript @TRANSACTION=REQUIRED> This creates transactional script. This line begins a transaction. When a transaction fails or succeeds, the ObjectContext object raises either the OnTransactionCommit or OnTransactionAbort event. One can define subroutines to handle these events by naming the subroutine with the names of the events.

Employee Time and Work Management System

Page 20 of 75

If the transaction succeeds the OnTransactionCommit is executed, otherwise, the OnTransactionAbort event is executed. The ObjectContext object has no properties. It has got two events, which were discussed. And also, two methods. ASPError Object: The ASPError object deals with errors generated during the execution of an ASP program. As said above, ASPError object is used to obtain information about errors that occur while the ASP engine processes a script. The error might be due to failure to write data to a write-protected file, etc. ASP handles these errors through this object and generates the error messages from it. The ASP object has properties, but, no methods, events, or collections. List of properties, methods, events, and collections

Response Object
Properties: ExpiresAbsoulte, Methods: Collections: Cookies. Example : Response.cookies(EmpId) = MyId Events: [No Events for the object] Buffer, CacheControl, CharSet, ContentType, Expires, IsClientConnected, Pics, Status. AddHeader, AppendToLog, BinaryWrite, Clear, End, Flush, Redirect, Write.

Request Object
Properties: TotalBytes. Methods: BinaryRead(count). Collections: Cookies, Example: <%=Requst.cookies(EmpId) %> ClientCertificates, Form, QueryString, ServerVariables. Events: [No Events for the object]

Employee Time and Work Management System

Page 21 of 75

Application Object
Properties: [No Properties for the object] Methods: Contents.Remove(key/Index), Contents.RemoveAll, Lock, Unlock. Collections: Contents, StaticObjects. ClientCertificates, Form, QueryString, ServerVariables. Events: Application_OnEnd, Application_OnStart() (must be defined in Global.asa file)

Server Object
Properties: ScriptTimeOut. Methods: CreateObject(ProgID), Execute(FileName), GetLastError, HTMLEncode(string), MapPath(path), Transfer(filename), URLEncode(string). Collections: [No Collections for the object] Events: [No Events for the object]

Session Object
Properties: CodePage, LCID, SessionID, Timeout. Methods: Abandon, Contents.Remove, Contents.RemoveAll. Collections: Contents, StaticObject. Events: Session_OnEnd(), Session_OnStart() (must be defined in Global.asa file)

Employee Time and Work Management System

Page 22 of 75

ObjectContext Object
Properties: [No Properties for the object] Methods: SetAbort, SetComplete. Collections: [No Collections for the object] Events: OnTransactionAbort(), OnTransactionCommit().

ASPError Object
Properties: ASPCode, Number, Source, Category, File, Line, Column, Description, ASPDescription. Methods: [No methods for the object] Collections: [No Collections for the object] Events: [No Events for the object]

Introduction to VBScript Language: The language VBScript provides and reserves various keywords, logical structures, built-in functions and methods for common programming tasks. Keywords are reserved words in a programming language. They cannot be used with variable declarations. They are the part of the language. If one tries to use keywords as variable name or class names, Vbscript raises an error or produces unexpected results. Some of the keywords are, Set, New, If, While, Do, Class, Const, Dim, Date, Err, Loop, With, Exit, Sub, Execute, ExecuteGlobal, For, Next, Function, Then, Else, Randomize, ReDim, Rem, Option Explicit, Or, And, Not, Now, Null, On Error, Goto, Select, Case, etc. Variables, in general, are used to hold different values, temporarily, during the execution of program. VBScript has only one type of variable the Variant type. It can hold three kinds of values; they are, scalar values, arrays, and object pointers. VBScript assumes that any symbol that is not a keyword is a variable. VBScript can cause problems in case, if one mistypes the variable name. Suppose,

Employee Time and Work Management System

Page 23 of 75

If one creates a variable name as StudentName, and use later the variable name as SName, VBScript does not generate an error, instead, it creates a new variable SName and assigns the value to it. Thus, producing incorrect results, as one thinks that value of StudentName has been changed, but, it is not so here. So, one has to make use of explicit declaration. This can be done through the use of Option Explicit statement, which should be used in the first line of an ASP file. When one puts this statement, the compiler checks for variable declarations. If a variable is used without declaration, the compiler generates an error message. Logical Structures: The logical structure in a program specifies the conditions for execution of several statements. The logical structure lets one to execute the block of code, conditionally. In VBScript, there are two logical structures present. The logical structures are, If Then and Select Case Looping Structures: Very often, inside a program, one needs to perform an operation or a series of operations, many times. There are many looping structures exists in VBScript. They are, For Next, For Each Next, While Wend, Do While Loop. Some times, one needs to loop a pre -determined number of times. For these loop structures, it is better to use, For Next structure. Sometimes, one need check a condition before looping. In that case, it is better to use While Wend or a Do While Loop structure. Active Server Page is a server side scripting language. It executes the scripts written in a file, on the server and returns HTML page back to the client. ASP is used to create dynamic web pages. Once the client request goes to the server, the server processes the request and delivers results back to client. The new version of ASP is ASP.Net, which makes use of .NET Framework. The .NET Framework is a new computing platform that simplifies application development in the highly distributed environment of the Internet. ASP.Net will replace ASP, in the years to come.

Employee Time and Work Management System

Page 24 of 75

About Microsoft Visual Basic 6.0


A look into modern BASIC language
Introduction to Visual Basic: In around 1980s Microsoft introduced a programming langua ge called BASIC. It has a full form as Beginners All Purpose Symbolic Instruction Code. This language was easily understood by the programmers, very clearly. Thus, it became a popular programming language for developers. The introduction of C & C++ resulted in rapid conceptual changes in programming languages and operating systems. The ability to define a concept called objects and classes, resulted in creation of new platforms and technologies. This led to introduction of a newer operating system called Windows from Microsoft. However, Microsoft later, decided to reintroduce BASIC for its Windows operating system, which was a popular language in 1980s. This led to the development of flexible, new language called Visual Basic. The concept of Visual Basic was the integration of object and classes with features of BASIC. This means, one gets access to Visual Objects and also, can make use of syntax from the old language BASIC. What are Visual Objects? Visual Objects are nothing but, the objects that one can see. Example, a Window is a visual object. The area, in which we enter some text matter, is a visual object; likewise, there are many visual objects in windows. One can write code, by using these visual objects. One can modify visual object for including more features. A new Visual object can be created and used in Visual Basic. In Visual Basic terminology, these objects are called Components. These components have many properties. For example, the area in which one enters text, has many properties, and is called as Textbox. Like wise, Visual Basic, has got many components. They have methods and also events. Methods are, when called does a specific function. Events are those which occur, when some action takes place. Example, Textbox has got a Key Press event, which occurs, when the user presses a key inside the textbox.

Employee Time and Work Management System

Page 25 of 75

How to start Microsoft Visual Basic 6.0: A standard installation from the Microsoft Visual Studio 6.0 CD, will allow one to start Visual Basic 6.0, as follows, Click Start Programs Microsoft Visual Studio 6.0 Microsoft Visual Basic 6.0 When starting Visual Basic 6.0, it displays New Project dialog as,

The New Tab will allow one to select the new project. Already existing projects in the system can be selected by using Existing Tab. The Recent Tab will allow one to select the project, which one has recently accessed. Types of files that can be prepared using Visual Basic are, Standard EXE creates a standard executable file. ActiveX EXE creates an ActiveX executable file. ActiveX DLL creates an ActiveX DLL file. ActiveX Control creates an ActiveX control. Data Project creates a data project. DHTML Application creates a DHTML application. IIS Application creates an IIS Application.

Employee Time and Work Management System

Page 26 of 75

Most common items that are used in Microsoft Visual Basic 6.0 IDE: (IDE stands for Integrated Development Environment) Menu Bar

Consist of standard menu items

Tool Bar
Contains most frequently used commands

Code Window
Where, the actual code can be written, edited, modified.

Project Explorer
Lists all forms, modules, classes, and other documents related to this project

Form Window Tool Box

Where, visual design of window takes place.

Properties Window
Where, one can set the properties of components as well as properties of window i.e. form.

Where, one selects the component to be placed inside the form.

The Visual basic 6.0 IDE enables programmer to design, write, debug, compile, and run Visual Basic applications easily, without the need to install separately, the editor, compiler or debugger, linker, interpreter etc. in one program or the platform.

Employee Time and Work Management System

Page 27 of 75

What are the components Visual Basic displays when, it starts? The Visual Basic shows 20 components on its tool bar, by default, when it starts. They are called default components. The components are,

Picture Box Label Frame Check Box Combo Box Horizontal Scroll Bar Timer Dir List Box Shape Image Control OLE Control Text Box Command Button Option Button List Box Vertical Scroll Bar Drive List Box File List Box Line Data Control

However, one can add more components by right clicking on Tool Bar, which would display a menu, which consist of an item components Or Click project menu then selecting Components. Properties, methods, events used in the components: Each component has one or more properties associated with it. Properties are of two types, Design time properties and Runtime properties. Design time properties are those properties, when changed, causes change in the component or to the form in the design time itself. Some run time properties can be set at the design time itself, but, its effect can been seen only at the run time only. Some runtime properties are required to be set at run time only, through program code itself.

Employee Time and Work Management System

Page 28 of 75

Similarly, every component has one or more methods associated with it. The methods are used to perform some action using the component. For Example, there is method called show for each and every form. This method displays the form. A member function of a class in C++, is called as a Method in Visual Basic. Generally, methods have got some parameters to be sent. But, some does not require parameters to be sent. Every component has got some events associated with it. The events occur, when ones action causing changes to the component values at the runtime. The occurrence of the event, in turn looks for corresponding event handlers in the program. If one has written code in the event handler, the code executes, and an output is flashed back to the programmer. For Example, if one clicks on the form, i.e., window, click event occurs. If one has written a call to the function message box, in the click event handler, then a message box will be displayed to the user upon clicking on the form window. Sample Visual Basic Code:

Private Sub Form_Click() Msgbox Hello Welcome to visual basic, vbInformation,Hello End Sub

The syntax and semantics used in Visual Basic are same as that of VBScript. But, Visual Basic has got more built in functions and methods for the flexible use of its environment. While VBScript treats the declared variable as variant, meaning that a variable declared can hold any kind data, Visual Basic has got a special feature where in, one can declare a variable to hold specific data type. The variables can be declared using Dim statement as, Dim VariableName As DataType

Employee Time and Work Management System

Page 29 of 75

Data Types used in Visual basic:


Data Type Byte Integer Long Single Double Currency Decimal String (Fixed) String (Variable) Date Boolean Object Variant (numeric) Variant (Text) Storage 1 Byte 2 Bytes 4 Bytes 4 Bytes 8 Bytes 8 Bytes 14 Bytes Length of the string Length of the string + 10 Bytes 8 Bytes 2 Bytes 4 Bytes 16 Bytes Length + 22 Bytes

Rules for declaring a variable in Visual Basic 1. Variable name can be maximum of 255 characters 2. The variable name begin with a letter 3. The variable name should not contain blank spaces 4. The variable name must not be a reserved keyword Logical Structures: The logical structure in a program specifies the conditions for execution of several statements. The logical structure lets one to execute the block of code, conditionally. In VBScript, there are two logical structures present. The logical structures are, If Then and Select Case If Then structure: This structure defines the code to be executed, when the condition given in If clause becomes true.
Syntax:

If Cond-1 Then Statement 1 Else If Cond-2 Then Statement 2 Else Statement 3 End If End If

False

Cond-1 True

Cond-2 True Statement - 2

Statement - 1 False Statement - 3

Employee Time and Work Management System

Page 30 of 75

Select Case structure: It works like If structure, but, with a different structure. This structure takes less code. The Select Case Case End Sele ct statement selects a matching case from among many possible cases.
Syntax:

Select Case VariableForConditionCheck Case Cond-1 Statement 1 Case Cond-2 Statement 2 Case Else Statement 3 End Select

Looping Structures: Very often, inside a program, one needs to perform an operation or a series of operations, many times. There are many looping structures exists in VBScript. They are, For Next, For Each Next, While Wend, Do While Loop. Some times, one needs to loop a pre-determined number of times. For these loop structures, it is better to use, For Next structure. Sometimes, one need check a condition before looping. In that case, it is better to use While Wend or a Do While Loop structure. For Next Loop Structure: As mentioned above, the For Next loop, better be used in a situation, wherein, the looping must be done, for a predetermined number of times. The structure uses a control variable to control number of steps. The for loop starts its execution with the variable initialized to initial value, and loops till the variable equals the maximum value provided with the loop. For each iterations it increments or decrements the value provided in the step statement.
FOR VariableName = IntitalValue TO FinalValue STEP Value Statements [EXIT FOR] NEXT [VariableName] Examples: For I = 1 to 100 Debug.Print i Next I For I = 1 to 100 Step 5 Increment by 5. Debug.Print i Next I Decrementing: For I = 100 to 1 Step -1 Debug.Print i Next I

Employee Time and Work Management System

Page 31 of 75

While Wend Structure: According to MSDN, Executes a series of statements as long as a given condition is True. The initialization must be done in the previous line, before the loop starts. The loop continues as long as the condition becomes true.
Initialization WHILE Condition Statements WEND Example: I=0 While I < 100 Debug.print I I=I+1 WEnd

The Do Loop Structure: Repeats a block of statements while a condition is true or until a condition becomes true. The Do while structure is similar to While Wend Structure, except it continues its execution till condition becomes true.
DO {WHILE | UNTIL} condition statements EXIT DO statements LOOP Example: I=0 Do While I <> 100 Debug.Print I I=I+1 Loop

For Each Next structure: This structure is similar to For Next structure, except that it is being used handle the contents of array. This enables to access each element individually and manipulate on those elements which were selected.
FOR EACH Element IN Group | Collection | Array Statements [EXIT FOR] NEXT Element Example: For Each Item in MyCollection Debug.print Item Next

Employee Time and Work Management System

Page 32 of 75

The Exit For and Exit Do, enables one to come out of their respective loops, when the loop is under progress. This feature mostly used in searching the first element. For example, there are 10 elements in an array. One wants to find the find first element and break out of loop instead of going through all the elements. In such situations we use exit for and exit do statements. Arrays: An Array is a collection of similar elements, which holds data that belongs to a particular data type. In Visual Basic we can declare an array as, Dim Array_Name (Length) As Data_Type Where, Array_Name is the name of the array. Length defines the maximum number of elements which this array can accommodate. The Data_Type indicates the type of data, which the array can hold. For example, to declare an array of 10 integer elements, one has to write, Dim MyArray (10) As Integer For assigning the value 100 to 5th element within the array MyArray, write as, MyArray(5) = 100 For printing all elements of MyArray in the Debug window, one has to write, For I = 1 to 10 Debug.Print MyArray(i) Next Procedures and Functions: A procedure is a block of code that performs some operation. Anything, declared as Sub keyword is a procedure. Procedures do not return a value. A function is similar to procedure, except that, it returns a value to the calling procedure or function. Syntax of Sub: [Procedure definition] [Scope] Sub Procedure_Name (Arguments) Statements [Exit Sub] End Sub Syntax for calling the procedure: Call Procedure_Name (Arguments) Or, simply, Procedure_Name (Arguments)

Employee Time and Work Management System

Page 33 of 75

Where, Scope is either, private or public and includes optionally static. Procedure_Name is name of the procedure. Arguments are parameters, which is nothing but, the variables with their data types. Syntax of function: [Function definition] [Scope] Function Function_Name (Arguments) As Return_Data_Type Statements [Exit Function] Function_Name = Value_to_be_returned End Function Where, the scope is either of private or public and includes optionally the static. Function_Name is the name of the function. Arguments are parameters to the function, which is nothing but, the variables with their data types. Example of Procedure: All the events of various controls and forms are in the form of procedures. One can write their procedure and call the procedure when required in the program. Now, to add two numbers and assign the value to text box directly can use the below procedure. Public Sub Add() Text3.Text = Val(Text1.Text) + Val(Text2.Text) End Sub Private Sub Command1_Click() Call Add() End Sub Example of Function: The above program can be written using function as, Public Function Add(Num1 as Integer, Num2 As Integer) As Integer Add = Num1 + Num2 End Function Private Sub Command1_Click() Text3.Text = Add(Val(Text1.Text), Val(Text2.Text)) End Sub

Employee Time and Work Management System

Page 34 of 75

The Keyword Static optionally used, indicates that all variables declared inside a procedure are retained, even after the procedure goes out of scope. The Exit Sub and Exit Function are used for forceful exit from the sub and function. Control Array: It is a group of elements with same name for a particular control. One can create a control array by copying and pasting the control placed on the form. Visual Basic distinguishes each element in the control array, by using Index property of that object. Each element will have the same name. The control array is useful, when we have a similar task to be done. In code window, we get coding for control array as, Private Sub Command1_Click (Index as Integer) End sub Where, Command1 is the object name and click is the event, and Index is the index of object which the user has clicked. Menu Editor: To create a menu for the application, one uses the Menu Editor. To get in to the menu editor we use short cut keys Ctrl+E, while the Form window is open, during design time, Or from menu, by right clicking on the form, Or by selecting Menu Editor in the Tools menu.

Employee Time and Work Management System

Page 35 of 75

Menu Editor

Menus created using menu editor:

Menu Editor Options Caption: Allows you to enter the menu or command name that you want to appear on your menu bar or in a menu. If one want to create a separator bar in your menu, type a single hyphen (-) in the Caption box. To give the user, the keyboard access to a menu item, insert ampersand (&) before a letter. At run time, this letter is underlined (the ampersand is not visible), and the user can access the menu or command by pressing ALT and the letter. If you need an ampersand to show in the menu, put two consecutive ampersands in the caption. Name: Allows you to enter a control name for the menu item. A control name is an identifier used only to access the menu item in code; it doesn't appear in a menu.

Employee Time and Work Management System

Page 36 of 75

Index: Allows you to assign a numeric value that determines the control's position within a control array. This position isn't related to the screen position. Shortcut: Allows you to select a shortcut key for each command. Help Context ID: Allows you to assign a unique numeric value for the context ID. This value is used to find the appropriate Help topic in the Help file identified by the Help File property. Negotiate Position: Allows you to select the menu's Negotiate Position property. This property determines whether and how the menu appears in a container form. Checked: Allows you to have a check mark appear initially at the left of a menu item. It is generally used to indicate whether a toggle option is turned on or off. Enabled: Allows you to select whether you want the menu item to respond to events, or clear if you want the item to be unavailable and appear dimmed. Visible: Allows you to have the menu item appear on the menu. Window List: Determines if the menu control contains a list of open MDI child forms in an MDI application. Right Arrow: Moves the selected menu down one level each time you click it. You can create up to four levels of submenus. Left Arrow: Moves the selected menu up one level each time you click it. You can create up to four levels of submenus. Up Arrow: Moves the selected menu item up one position within the same menu level each time you click it. Down Arrow: Moves the selected menu item down one position within the same menu level each time you click it. Menu List: A list box that displays a hierarchical list of menu items. Submenu items are indented to indicate their hierarchical position or level. Next: Moves selection to the next line.
Employee Time and Work Management System Page 37 of 75

Insert: Inserts a line in the list box above the currently selected line. Extra/Additional Components: There are additional components available, apart from standard components such as text box, command button etc. These are called additional components. There two kinds of components. They are Windows standard components and third party components. Windows standard components are developed by Microsoft. And third party components are developed by companies, other than Microsoft. One can find both components in the Components window. To insert a new component into your project select the component by marking the component as checked and select ok when finished. These components are provided with help files on their usage. However, some dont. If the component is not provided with help, the risk is high on their usage. So, one has to be extra careful, when using such components in the program. To get into the component window, one has to right click on tool box and select component Or select the Project menu and select component. Error Handling in Visual Basic: Though computers claim to be error free, they produce errors. An error caused in computer can produce some unwanted results and cause program crash. Such a crash in the program causes loss to the data, and thereby sometimes causing loss to organization and also to the life. So, a good programmer must be aware of errors that could be caused. He must set up error handling routine to handle error. Otherwise his program will crash, producing illegal operation. In Visual Basic there are many ways to check an error. Some built in functions such as ISNumeric etc. will check errors while user submits some input to the program. But, there is a flexible way to handle all types of errors. The statement On Error will do the job for us.

On Error Statement: It enables an error-handling routine and specifies the location of the routine within a procedure. It can also be used to disable an errorhandling routine. Syntax:

Employee Time and Work Management System

Page 38 of 75

On Error GoTo line On Error Resume Next On Error GoTo 0 There are 3 forms of On Error statement available. On Error Goto Line: This form enables the error-handling routine that starts at line specified in the required line argument. The line argument is any line label or line number. If a run-time error occurs, control branches to line, making the error handler active. The specified line must be in the same procedure as the On Error statement; otherwise, a compile-time error occurs. On Error Resume Next: This specifies that when an run-time error occurs, control goes to the statement immediately following the statement, where the error occurred, from where the execution of program continues. Use this form rather than On Error GoTo when accessing objects. On Error Goto 0 : Disables any enabled error handler in the current procedure. When an error occurs, On Error statement sets the information about the error in Err object. The default property of the Err object is Number. Because the default property can be represented by the object name Err, earlier code written using the Err function or Err statement doesn't have to be modified. When a run-time error occurs, the properties of the Err object are filled with information that uniquely identifies the error and information that can be used to handle it. To generate a run-time error in code, use the Raise method.

The Err object's properties are reset to zero or zero-length strings ("") after an Exit Sub, Exit Function, Exit Property or Resume Next statement within an errorhandling routine. Using any form of the Resume statement outside of an errorhandling routine will not reset the Err object's properties. The Clear method can be used to explicitly reset Err.

Employee Time and Work Management System

Page 39 of 75

Example: Let us think of a situation, where one trying access a text file called Data.txt which is not exists. The open statement used, which is meant to open files, will produce an error and the program crashes. Instead of crashing, it would be nice, if the program gives a error message as, Could Not find Data.txt, and then the program continues its execution. We can do that by writing the program as,
Private Command1_Click() Dim CRLF CRLF = chr(13) + Chr(10) On Error GoTo ErrHandler Error Handler Routine Text1.Text = Open Data.txt For Input As #1 Opens a file for reading, If exists, otherwise gives error. Do While Not EOF(1) Line Input #1, Buffer Text1.text= Text1.Text & Buffer & CRLF Loop Close #1 Exit Sub ErrHandler: Msgbox Err.Description, vbInformation, Err.Number Displays error Err.Clear Clears the Err object. End Sub

Visual Basic is a programming language for every programmer, starting from beginner to the expert. The language is not only object oriented in nature, but, is easier to understand and write.

Employee Time and Work Management System

Page 40 of 75

About Microsoft Access 2000


A brief look into databases
Introduction to Databases: A database is a collection of information stored permanently on the storage media such as Hard Disk or CD-ROMs, because, computers memory is too small and the contents get erased as soon as power turned off. To store permanently, some information, one uses Databases. Databases are used in various situations such as keeping a record of friends, registering employees job attendance, counting the number of students in a classroom and keeping a record of their grades. This means that we have been using databases in storing and retrieving information. Introduction to Microsoft Access Databases: Microsoft Access is a software product used for desktop database

applications. It comes along with Microsoft Office products, and can be installed, while installing Microsoft Office. The latest flavor for Office product is Microsoft Office 2003. Microsoft Access 2000 comes along with Microsoft Office 2000. How to Start Microsoft Access 2000: A standard installation from the Microsoft Office 2000 CD, will allow one to start Access 2000, as follows, Click Start Programs Microsoft Access Microsoft Access is equipped with wizards, everywhere, some of which are not even installed by default during program setup. Although wizards are mostly efficient, you should know what they are doing, because, more than once you will need to customize a behavior, which, they have configured. A classic example I know is that whenever you ask Microsoft Access to insert a US ZIP Code in a table, the filed is configured for a 5+4 format; most of the times, you dont need the last four digits, so you have to delete them manually.

Employee Time and Work Management System

Page 41 of 75

How to create a new database in Access 2000: In order to create a new database in Access 2000, click File and Select New Click on Blank Database. A File Dialog will appear, requesting the user to enter the file name of the new database. After one enters filename and clicks Create a blank database file will be created in one of the folders, which one selects. The program now, will points to the Tables and will have 3 options of creating a new table. A database file in Microsoft Access is stored with .mdb extension. A table is collection of rows and columns. Each row in a table is called as Record and the columns are called Fields of that table. The 3 options are Create Table in Design view, Create table by using wizard, and Create table by entering data. The 3rd option is least used. Most used option is the first option Create Table in Design view, where in, one can enter the names for fields and select properties of fields such as data type, maximum length of the data, the field can accommodate etc. After entering these values, click close button of the design view window. It will ask one to choose the table name, which will be Table1 by default. The table name which is blank will not be allowed. The Create table by using wizard will enable one to select fields from pre-defined templates. One can build or test his query to access the tables, by using the Queries tab. This tab displays 2 options. Create query in design view and Create query by using wizard. The first option lets one select tables and columns for display. The second option enables one to construct a query by using the step by step procedure. Although looking like a table, a query is a question one asks the database about available data, and the computer responds by displaying appropriate results. When creating a query, one has to tell the database what data is required, and what categories, does the database to isolate. One can use a query to define new fields based on existing ones. Therefore, there are various kinds of queries. One can write SQL statements in Query, try that it is working well and paste them to their application. This feature enables one to write or design complex queries, which includes multiple tables.

Employee Time and Work Management System

Page 42 of 75

One can create programs directly using Microsoft Access. For such purposes, Forms, Reports, Pages, Macros, Modules are provided. Programs created using access are stand alone programs, uses script from Visual Basic. A form is a user friendly interface one provides to the users for easier data entry. Depending on ones creative and artistic ability, one can design forms interface to look better. As said above, forms are used, when programs are required to be prepared using Access itself. A report is the desired form of data you want to print. In other words, it is a way of telling the computer, Based on available data, this is what I would like you to print, and this is how I want it printed. Data Access Pages allow one to publish information on the Internet or on an Intranet, which enable one to share data with others. A macro is an action or a set of actions that you can create to help you to automate common tasks. A module is essentially a collection of declarations, statements, and procedures stored together as one named unit to organize your Microsoft Visual Basic code. Data types supported by Microsoft Access: Text: (Default) Text or combinations of text and numbers, as well as numbers that don't require calculations, such as phone numbers. Sizes up to 255 characters or the length set by the Field Size property, whichever is less are allowed. Microsoft Access does not reserve space for unused portions of a text field. Memo: Lengthy text or combinations of text and numbers. The total length allowed is Up to 65,535 characters. (If the Memo field is manipulated through DAO and only text and numbers [not binary data] will be stored in it, then the size of the Memo field is limited by the size of the database.) Number: Numeric data used in mathematical calculations. Total allowed length is 1, 2, 4, or 8 bytes (16 bytes if the Field Size property is set to Replication ID).

Employee Time and Work Management System

Page 43 of 75

Date/Time: Date and time values for the years 100 through 9999. Maximum size is 8 bytes. Currency: Currency values and numeric data used in mathematical calculations involving data with one to four decimal places. It is accurate to 15 digits on the left side of the decimal separator and 4 digits on the right side. Total length of currency field is 8 bytes. AutoNumber: It is a unique sequential (incremented by 1) number or random number, assigned by Microsoft Access, when ever a new record is added to a table. AutoNumber fields can't be updated. Its maximum length is 4 bytes (16 bytes if the Field Size property is set to Replication ID). Yes/No: Yes and No values and fields that contain only one of two values (Yes/No, True/False, or On/Off). It has length of 1 bit. OLE Object: An object (such as a Microsoft Excel spreadsheet, a Microsoft Word document, graphics, sounds, or other binary data) linked to or embedded in a Microsoft Access table. It allows a length of up to 1 gigabyte (limited by available disk space) (OLE: Object Linking Embedding) Hyperlink: It is the text or combinations of text and numbers stored as text and used as a hyperlink address. A hyperlink address can have up to three parts: 1. Text to display the text that appears in a field or control. 2. Address the path to a file (UNC path) or page (URL). 3. Sub address a location within the file or page. 4. Screen tip the text displayed as a tool tip. The easiest way to insert a hyperlink address in a field or control is to click Hyperlink on the Insert menu. Each part of the three parts of a Hyperlink data type can contain up to 2048 characters. Microsoft Access can be used to create the back end for Visual Basic applications. Other Databases includes Oracle and SQL Server can also be used for backend for Visual Basic applications.

Employee Time and Work Management System

Page 44 of 75

Data Sources (ODBC): One can use Data Sources through Open Database Connectivity (ODBC) to access data from a variety of database management system or software. For example, if you have a program that accesses data in a SQL database, Data Sources (ODBC) will let you use the same program to access data in a Visual FoxPro database. To do this, one must add software components called drivers to your system. Data Sources (ODBC) helps one to add and configure these drivers. Drivers are small system level programs, written to enable or disable various hardware and software components of the system. How to Create DSN (Data Source Name): In Windows 98 Systems: Click Start Control Panel Data Sources 32 Bit (ODBC) In Windows 2000, XP, and above Systems: Click Start Control Panel Administrative Tools Data Sources (ODBC) Then, a step wise wizard will guide wisely to create Data Source Names. You need to select appropriate driver for the database. Suppose, if Access is used to create the database, then select Microsoft Access driver, for the drivers. Then, one needs to give DSN Name and select the path of the database file. This will guide one to create Data Sources. One can optionally give description of DSN. The description may contain the short explanation, why the DSN is created, purpose of the DSN, date of creation etc.

Employee Time and Work Management System

Page 45 of 75

About Seagate Crystal Reports


A Detailed look into a report designer
Introduction to Crystal Reports Crystal report 4.6 is one of the third party tools that come with Visual Studio 6.0 CD. This software manages the printing functionality, similar to Microsoft Office. When used within the Visual Basic project, it delivers the same functionality as same as MS-Words print-preview, to the program. This program needs to be installed separately, as it is a third party software (Third Party software are programs which are prepared by companies other than Microsoft), which comes in the 3rd CD-ROM of Microsoft Visual Studio 6.0. How to Start Seagate Crystal Report 4.6: A standard installation from the Microsoft Visual Basic 6.0 CD, will allow one to start Crystal Report, as follows, Start Microsoft Visual Basic 6.0, Then, Click Add-Ins Report Designer If there is no Report Designer option appearing in Add -Ins menu, one must install the report designer as explained above. How to create a report in Crystal Report: The Crystal Report Designer comes with many kinds of report templates in the Report Expert. Choose a required template from the available list. The different templates that are available with the report expert are, Standard, One can create any kind of report using this option. Listing, Used to create the listing kind of report. All fields chosen are listed inside the report. Cross-Tab is a kind of report that present summarized data in a row versus column structure similar to that of a spreadsheet. Using Mailing Label, we can create mailing labels, which is used are used for printing mailing addresses, in a suitable format, which enable one to cut and stick these labels to postal covers. When we have more number of addresses to be mailed, we use this option.

Employee Time and Work Management System

Page 46 of 75

Important menu items that are used frequently in the reports: Insert Menu This menu has items that are used frequently while creating reports. They are, Database field used to insert a database field from the database tables. Text field Used for inserting text labels inside the report. Formula Field this field used, when one needs to insert some data such as calculating sum based on some fields. Special Field there are many special fields come under this section. They include, Page number, record number, group number, and print date etc. Line, Box draws lines and rectangular shaped boxes. When we install crystal report 4.6, crystal report setup installs an object in the system, which can be used in Visual Basic to provide printing functionality. In order to use the functionality, first, we need to design the report in report designer. After designing completes, we can access it, in Visual Basic, by including the file in the report file name property of crystal report component. The following code enables, Visual Basic to display a window similar to print preview of MS-Word application.
CrystalReport1.ReportFileName = App.Path & "\filename.rpt" CrystalReport1.Destination = 0 Prints report to a window. CrsytalReport1.SelectionFormula = {TableName.FiledName}= & Text1.text & Selection Formula enables filtering the data based on the condition given. CrystalReport1.Action = 1

Employee Time and Work Management System

Page 47 of 75

Project in detail
A Detailed Look into Employee Time and Work Management System
The project deals with three managerial activities for effective management of employees in an organization such as software development firm. The managerial activities are, Time Management: The time management deals with the entry of time logs. It also maintains a database of daily time logs of each employee. A time log consists of time of work completed, description of completed work. It enables to judge the efficiency of employee by the top-level management. Work Management: Work management deals with assigning or distributing various tasks to employees in an organization. In the organization, project managers assign work to the team leaders, who in turn, assign work to programmers. Likewise, CEO or MD of the company will assign work to both project managers and project leaders. Complaint Management: Complaint management deals with the problems faced by the employees or the senior level management in an organization. This enables the employee to register a complaint or problems such as Hard disk failures or memory problems, instead of go-tell approach. The service engineer will look into the complaint and takes necessary action to set right the problem. Time management, Work management, Complaint management.

Employee Time and Work Management System

Page 48 of 75

User Types: Administrator, Manager, Team Leader, Team member. Report Admin.

Administrator: This user can Create/modify/delete new user. He plays an important role in the security with in the organization. This user type is assigned to the Managing Director and top level officials in the company. He can assign work to Manager Type of user. In case of urgency, he can assign work to project leaders also. This user can view the activity log of overall employees. Manager: As the name suggests, this user type is for managers of various department. He can communicate and assign works to project leader. He must also enter his hourly work completed in the time log. Team Leader: This user type is assigned for various project leaders. This user can assign work to team members. He can view various activities of a user. He can add a user to his project group by using the option Map user to user group. Public message sent by him will reach all users of his group. He must also enter daily time log. Team member: This user type is composed of lower level management. And they include programmers, designers, testers, etc. They can communicate with project leaders, Project Managers. They have to check the work assigned and mark against the work they complete. They should also enter daily time log. This user is restricted from accessing the time log of other employees, other than his. Report Admin: This user deals with generation and printing of daily time log entries. Super user can also do the task of report generation.

Employee Time and Work Management System

Page 49 of 75

Roles and Task details for each user type Common Roles and Tasks: (ASP) Change Password Edit User Options Show User Admin: (ASP) Define company name Create employee Manage employees Define task Assign tasks to members Manage tasks Ask task report View my own tasks Enter my time log Manage complaints Register my complaint Manager: (ASP) Define task Assign tasks to members Manage tasks Ask task report View my own tasks Enter my time log Manage complaints Register my complaint Team Leader: (ASP) Create team Manage members Define task Assign tasks to members Manage tasks Ask task report View my own tasks Enter my time log Manage complaints Register my complaint Team member: (ASP) View my own tasks Enter time log Register my complaint Report Admin: (VB) Print employees Print tasks Print complaints Print time logs Change Photo Reset logout errors (ASP): View my own tasks Enter time log Register my complaint

Employee Time and Work Management System

Page 50 of 75

The screens consist of, the following information: Login: This screen enable employee to login. It consist of Employee Id, Password text boxes and Submit, Clear and Close buttons. Create user: Employee Name, Designation, Department, Address, Contact Numbers, Type of Employee, Employee Id, Password, known skill set, Submit & Clear. List of all newly created users during this session. This list consists of Employee Id, Employee Name, and Type of Employee. The more. Section displays detailed list for individual employee. It contains left out details in the list of employee). The list is applied to all delete and listing operation. Time Log: Date, From Time, To Time, activity carried, Details about the activity, Department work, No work, Deputation work, Department work consist of list box which enables user to Select a department in which he worked for. The department default is from creating user form. If No work is true, then the higher authorities can assign the new work to the employee. If the employee is on deputation from one department to another, then he can set this flag to true, which in turn displays the details of deputation completed. work in which he enters the details of work

Employee Time and Work Management System

Page 51 of 75

Activities: This section will assign various tasks to employees. If no work flag is set, then higher authorities can assign the work. It should display the list of, Employee Id, whos No work flag is true. Employee Name, Designation, Known skill set, Department. When an employee is selected, his tasks will be assigned and No work flag is set to false. Complaint: This section will enable an employee to enter his/her complaint. This consists of Level of complaint, Subject, Description of complaint. The Level of complaint determines priority of the complaint. Any employee can register his compliant to Administrators, Managers, and Team Leaders only. The Report Admin is the only employee type who can log in to the ETWMS Control. He is authorized to change the photo and delete time logs entered. The ETWMS control panel program resides in the server and will not be accessible to clients. This enables more security for the database which includes time logs of different employees and different dates.

Employee Time and Work Management System

Page 52 of 75

A diagram showing how the program works


Starting of Program: START

Flow Charts

Open Internet Explorer

In Address bar,
If program resides on same system, type as http://localhost/etwms/ Else http://ServerIPAddress/etwms/ Example: http://192.168.1.26/etwms/

Test for Errors


Like read only database file etc.

Errors found

No errors found

Display error message Employee ID and password

STOP

Check for correct Employee ID and password

No matching found

Matching found Display Roles and Tasks Menu and Employee type along with Employee ID

Display not found message

STOP A

Employee Time and Work Management System

Page 53 of 75

After user logged in successfully:

A E W

Display menu items


1. 2. 3. 4. 5. Tasks Complaints Time Logs Report Logout

Wrong choice

Choice ?

Check for choice 2 3

5 4

Display logout message

C B D

STOP

Define task
Task Name Priority Dead line Description

Save Task

Employee Time and Work Management System

Page 54 of 75

Assign Tasks:

Assign task to members

Select a task

Is any employee ID selected ?

No

Store Employee IDs against Task selected

Employee Time and Work Management System

Page 55 of 75

Complaints:

Register Complaint
Complaint Priority Description Date Registered

Save complaint along with current Emp. ID

Employee Time and Work Management System

Page 56 of 75

Complaints:

View my complaints

Select complaint and extract employee id Yes Are there any more complaints ? No

Is Emp. Id selected = My Emp. ID ?

No

Yes Mark it for Display

Display all selected complaints

Employee Time and Work Management System

Page 57 of 75

New time log:

Enter time log

Select a date

Select and modify the time log entries

Yes

Is there any entries found on the selected date ?

No

New Time log

Employee Time and Work Management System

Page 58 of 75

Reports:

Reports

Task

Which ?

Time log

Select an employee

Complaint

Select from and to date

Select an employee
(who registered the complaint or whom it was registered to)

Display the report accordingly if the condition matches else display error message

Employee Time and Work Management System

Page 59 of 75

Views of some screens in the project Login Screen

Screen Views

Employee Time and Work Management System

Page 60 of 75

Typical Recover password wizard in ETWMS:

Employee Time and Work Management System

Page 61 of 75

Main Screen

Employee Time and Work Management System

Page 62 of 75

Sample of Listings in ETWMS

Employee Time and Work Management System

Page 63 of 75

Sample Data Entry Screen in ETWMS

Employee Time and Work Management System

Page 64 of 75

\Sample help screen in ETWMS

Employee Time and Work Management System

Page 65 of 75

My Details screen in ETWMS

Employee Time and Work Management System

Page 66 of 75

Login Screen for ETWMS Control Panel

Employee Time and Work Management System

Page 67 of 75

ETWMS Control Panel Main Screen

Employee Time and Work Management System

Page 68 of 75

ETWMS Control Panel Change Photo Screen

Employee Time and Work Management System

Page 69 of 75

Report Prompt Screen in ETWMS Control Panel

Employee Time and Work Management System

Page 70 of 75

Print Complaints Dialog in ETWMS:

Employee Time and Work Management System

Page 71 of 75

Report window in ETWMS Control Panel

Employee Time and Work Management System

Page 72 of 75

How one can improve this software in coming up versions

Future Scope

Any software or any product has got a scope for further development. For much efficient working of this software, one can include assessment reports. Generating salary bills can be included with this software. One can include a super admin option who manages the employees of type administrator. Graphical representation of time logs entered can be prepared, by looking into time log entries, such as how many employees are working efficiently and how many are not. Leave note management can be included in this program. Suppose if, the employee wants a leave on particular day, then he can apply through leave note management program. The Print task and Print Complaint are now available only in the server system. One can develop this program in such a way that client-server interactions for reports are also available. This project was designed to run only in Internet Explorer. One can develop it for running in browsers other than Internet Explorer.

Employee Time and Work Management System

Page 73 of 75

Everything began has to end one day


This project was developed for running in Microsoft Windows client-server environment. The server stores all data and holds programs related to this project. This project is just at initial development level and can be further developed, in the coming years.

Conclusion

Employee Time and Work Management System

Page 74 of 75

List of books and materials referred


1. Mastering Active Server Pages 3 A. Russell Jones B.P.B. Publications. 2. Visual Basic 4 Programming Explorer Peter Aitken Comdex. 3. Learn ASP in 21 days SAMS Series. 4. MSDN Library Microsoft Corporation msdn.microsoft.com. 5. An Introduction to HTML - Dave Site www.davesite.com. 6. Visual Basic Code Reference www.vbcode.com. 7. W3 Schools - www.w3schools.com 8. Adobe Photoshop help. 9. Macromedia Dream weaver MX help. 10. Crystal Report help Seagate Crystal Report 4.6.

Bibliography

Employee Time and Work Management System

Page 75 of 75

You might also like