You are on page 1of 181

PROJECT REPORT ON ASSET MANAGEMENT SYSTEM OF GENERAL POWER PLANT IN VB .NET, MS SQL SEVER 2000 PROJECT CO-ORDINATED BY Mr.

Dindayal Mahto Submitted By ARUMITA KUMARI M.Sc. (IT) 4TH SEM Enrollment no: 071M3888 In the partial fulfillment of Requirements of the award of the degree of

Masters of Science in Information Technology

KUVEMPU UNIVERSITY SCHOOL OF COMPUTER AND INFORMATION SCIENCE

Project Report by: Arumita Kumari (071M3888)

ACKNOWLEDGEMENT
I am indebted to my parents for invaluable guidance extended by them during, the course of study; I express my sincere thanks to them. I have benefited a lot from the constructive criticism and suggestions given to me by my Project Guide Mr. Dindayal Mahto. The discussions with him have cleared many doubts and given me a clear understanding of the subject.I am also very much grateful to the teaching staff and all those persons who are directly or indirectly helped me in the streamline progression of the project. Thanks are also due to my dear ones with whoses advice and moral support has helped me in completing this project. Lastly I am thankful to the almighty father who has bestowed me with such a wonderful environment within which I exist.

Arumita Kumari MSc. (IT) 4th Sem


Enrollment No. 071M3888

Project Report by: Arumita Kumari (071M3888)

TABLE OF CONTENTS
S.No.
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. Introduction Objectives System Analysis Feasibility Study Software Engineering Paradigm Software Requirement Specification Software Requirement Hardware Requirement System Design Database Structure Coding Form Snapshots Optimization Of Code Validation Checks Maintenance System Security Measures Testing Techniques Cost Estimation Reports Gantt Chart Future Scope and Limitations Bibliography

DESCRIPTION
Acknowledgement Table Of Contents

Page No. 2 3 4 5 6 9 11 12 14 25 26 33 38 50 174 175 176 177 178 179 180 182 183 184

Project Report by: Arumita Kumari (071M3888)

INTRODUCTION
This assumed project is creation of application, which provides mapping of assets into computer , which are fixed or moveable. The system provides user friendly data entry screens to input the asset details which are already existing as well as the new details which are brought into the system. The system will be able to manage, track and analyze the assets with their original cost as well as the depreciation cost along with the years of depreciaton, thus enabling the valuation of the assets in the system. Software covers overall management of assets of power plant. The asset details are entered and an initial valuation is made based on its depreciation rate, year and the price. Then the Current Valuation is done with the current year price value for which the valuation needs to be done. Then the average of both valuations produces the actual asset value.Ensuring that all the existing asset details are entered into the system then the total valuation is calculated. The system also provides the housekeeping facility in terms of backup and restoration of the data.A help system is also provided to the user for ease and convenience to understand the functioning of the system. As far as possible the design has been made very comprehensive to reduce the complexity and users can very easily work with the interface without much of hesitation.

Project Report by: Arumita Kumari (071M3888)

OBJECTIVES
The application is focussed for General Thermal Power Plants which enhances the operational efficiency , labor and time consumption for maintenance and valuation of assets.

Persistent storage of asset details in the Database Print out various report Software will promote operation for generation, transmission and distribution of power plants Promotion and operation of flood controls Promotion and operation of irrigation Promotion and operation of control of soil erosion and forestations.

Project Report by: Arumita Kumari (071M3888)

SYSTEM ANALYSIS
The Analysis phase is the most crucial phase in a project because it helps developers to identify the functioning of the system. It also helps them to identify the interrelationships between the components of a system and the impact of changes to one of the components on the other parts of the system. In addition it reduces the amount of time required to construct the system. It involves studying a business area or application , leading to specifying the functionality of the new system.During this phase the analyst performs the following activities: Understanding the existing system Identify the problems in the existing system Identify the areas of automation Identify the goals and functional specification of new system.

IDENTIFICATION OF NEED:
Under this project , we have tried to develop the system which basically focuses on the management of the assets which are already existing in the system as well as those assets which are brought to the system..The manual maintenance of details will be very time taking and would not guarantee the integrity of data in completeness. For expression of need comes from the work in four areas: Perceiving a Problem The Existing system of the Power Plant maintains the details of all the machinery items in terms of assets of the System manually which is not very systematically implemented in the Plant.At the same time the details regarding the assets are required for
Project Report by: Arumita Kumari (071M3888) 6

many decision making purposes in the System. The Plant needs to maintain the existing assets as well as the assets which are brought into the system with all its required details. The asset value for any particular date is required and the comparison of the value with its original cost needs to be done for various purposes depending upon the requirement.Say if the Power Plant decides to disinvest in future then the total cost of the Plant would require the calculation of each and every asset of the existing system considering its current value, original value, depreciation cost and number of years passed by.Considering the Power Plant which is huge or large the Manual maintenance of these details was getting very cumbersome. The entry or the calculation of the assets might also lead to errors which may not maintain the integrity of the data and result in discrepancy of the data. Defining a Problem To take the advantage of the latest technology and to facilitate the employees to make online entry , transactions and calculations a new system needs to be developed for the Power Plant. The new system should allow to maintain the details of the assets in a proper hierarchial manner with all the relevant details.The initial valuation for all the asset should be done and even the current valuation should be done to get the current value of the asset.A provision for taking the backup and restore of the system should also provided as the means of security of data.Utilities should be provided for making of calculations of the asset details.In addition any more add ins required during the development can also be implemented.

Project Report by: Arumita Kumari (071M3888)

Relation of the Problem to the domain of the Computer A thorough study needs to be done for the existing system where the details were being maintained manually.The implementation of the entire system into the domain of the computer would require a back end to store all the details and a front end to provide user friendly graphical interface for the users to interact. The system should be simple to be understood by the users and implemented in a similar manner as it was there in the existing system with changes wherever required. The employees and the users should be trained to handle the software depending upon the priviledges assigned to them. Provision should be made to update the details when required by the administrator. Formalizing the Need The System should allow the details of the assets to be entered in a systematic manner. Categories of the assets should be made which is further subdivided into SubCategories and further into Items where the details are maintained with all relevant details of the particular Item. The Initial and Current Valuation of the Assets implementation can be done by automatic calculations and display of details required for the calculation. The Processing of the total valuation of all the asset details should be done in a click of the button ensuring that all the details are already entered prior to the calculation or else provision should be made to display the details of all those items for which the necessay details are not existing.

Project Report by: Arumita Kumari (071M3888)

PRELIMINARY INVESTIGATION:
The Preliminary Investigation was carried by a brief survey of the site area and understanding of the various aspects of the system.This involves the enhancement of the project into the next phase and recommend for further action to be taken.As the system also requires the calculation of the asset cost value which needs some standard format for calculation of the cost.Various methods are available for this purpose. As only one of the options could be used so we finalized on the option where the current value of asset is calculated considering the depreciation cost and the number of years of deprecitation. Same was calculated for its original cost and then the average of both the prices will result in the actual asset value. The objectives of the Phase: 1) Clear defination of the objective, scope and limitation of the project. 2) Determine the feasibility of computerization 3) Identify the likely benefits of the system.

FEASIBILITY STUDY:
The data collection that occurs during the preliminary investigation examines the system feasibility the likeligood that the system will be beneficial for the organization.

Project Report by: Arumita Kumari (071M3888)

1) TECHNICAL FEASIBILITY: This determines whether the system can be actually constructed to solve the problem. The technical feasibility involves the existence of necessary technology to do what is suggested, the scope of expansion of the system for development , the technical guarantee of accuracy , reliability and the data security. 2) OPERATIONAL FEASIBILITY: This defines the sufficient support for the project from the management . It is a measure of how people are able to work with the software and operate the functionalities. 3) ECONOMIC FEASIBILITY: This helps to estimate the the cost benefits from the system. These benefits may be tangible or intangible. Tangible benefits may include decreasing the salary cost . Intangible benefits may include increasing the quality of the goods produced . Tangible costs may be easily estimated.They include one time cost of the development of the project. The development cost includes the salaries of the programmers and the analyzing the price of the computer equipments and expenses of the raw materials. The economical feasibility raised by analysis during the preliminary investigation seeks estimates of: The cost conducted for full project investigation The cost of the hardware and the cost of the software for the class of the application being considered The benefits in the term of reducing the cost or the fewer costly errors.

SOFTWARE ENGINEERING PARADIGM:


Project Report by: Arumita Kumari (071M3888) 10

Under this process we select the tools, process and the method when any problem arises during the project development and this is also true for the software industries. Under this method we select good strategy for solving the problems. All the software development can be categorized as a problem solving loop in which four distinct steps are encountered. 1) Status Quo 2) Problem Defination 3) Technical Development 4) Solution Integration

PROBLEM DEFINATION

QUO

TECHNICAL DEFINATION

SOLUTION INTEGRATION

Status Quo represents the current state of affairs. Problem Defination identifies the specific problem to be solved. Technical Development solves the problem through the application of some technologies.
Project Report by: Arumita Kumari (071M3888) 11

Solution Integration delivers the result(documents, programs, data and new product) to those who request the solution in the first place. In short way you may say that it provides the complete solution of the problem which is arised during the software development .

SOFTWARE REQUIREMENT SPECIFICATION:


The software requirement specifications are developed during the culmination of the analysis task. The function and the performance allocated to the software for establishing a complete information description and representation of the system behavior and indictaion of the performance requirement defines a part of the system engineering. There are generally seven part of the software requirement specification: INTRODUCTION: states the goals and objectives of the software. The software serves for the management and maintenance of the assets in the system .All required details are recorded which can be even retrieved for certain decision systems to be implemented. INFORMATION DESCRIPTION: provides a details description of the problem that the software must solve.Information content, flow and the structure are documented FUNCTIONAL DESCRIPTION: a description of the each function required to solve the problem is presented . A processing narrative is provided for each function, design constraint are stated and justified.
Project Report by: Arumita Kumari (071M3888) 12

BEHAVIOR DESCRIPTION: examines the behavior and operation of the software as a consequence of the external event and the internally generated controlled characteristics. VALIDATION: most important and ironically most often neglected section of the software requirement specification . How do we recognize a successful implementation , limitation , performance and constraints of the system. BIBLIOGRAPHY and APPENDIX: includes all the reference to all the document related to the software. This also comprises of software documentation , technical references and the standards. The appendix includes the information that supplements the specifications.

Project Report by: Arumita Kumari (071M3888)

13

SOFTWARE REQUIREMENT
Visual Basic .NET as Front End MS SQL Server 2000 as Back End MS Windows 2000 Server MS Windows 2003 Server MS Windows NT Workstation 4.0

The .NET Initiative Microsoft has introduced the .NET initiative with the intention of bridging the gap in interoperability between applications. It aims at integrating various programming language and services. It is designed to make significant improvements in the reuse, code specialization, resource management, multi-language development, security, deployment and administration. The .NET initiative offers a complete suite for developing and deploying applications. This suite consists of .NET products, .NET services and the .NET Framework.
.NET

Products: Microsoft has already introduced Visual

Studio .NET, which is a tool for developing .NET application by using programming language such as Visual Basic, C# and Visual C++. .NET products use extensible Markup Language (XML) for describing and exchanging data between applications.

Project Report by: Arumita Kumari (071M3888)

14

XML is a markup language that enables you to store data in a structured format using meaningful tags. XML is a cross-platform, hardware and software independent markup language. XML allows computers to store data in a format that can be interpreted by any other computer system. Therefore, XML can be used to transfer structured data between heterogeneous systems. XML is used as a common data interchange format in a number of applications.
.NET services: .NET delivers software as web services. Therefore,

users can subscribe to a web service and use it as long as they need it, regardless of the hardware and software platform. Web service provides functionality that can be accessed by an application by using Internet standards such as HTTP and XML. Therefore, a web service can be accessed from any platform that has access to the Internet.
.NET Framework: It is the foundation on which you design,

develop and deploy application. Its consistent and simplified programming model makes it easier to build robust application. .NET framework is a collection of services and classes. It exists as a layer between .NET Framework encapsulates much of the basic functionality that was earlier built into various programming language, such as debugging and security services.

Introduction to VISUAL BASIC .NET: Visual Basic .NET is one of the languages that are directed towards meeting the objectives of the .NET initiative of creating distributed applications. It has inherited the capability of the rapid development from
Project Report by: Arumita Kumari (071M3888) 15

its earlier versions and strengthened considerably the implementation of the object-oriented features. Visual basic .NET is a powerful objectoriented language that provides features such as abstraction, inheritance and polymorphism. In addition, it provides many other features that did not exist in the earlier version, such as multithreading and structured exception handling. Features of VISUAL BASIC .NET Some of the key features introduced in Visual Basic .NET are as follows: Inheritance Constructors and destructors Overloading Overriding Structured exceptional handling Multithreading

Inheritance Inheritance is the ability of a class to derive its characteristics from an existing class. Using Visual Basic .NET, one can create class that provides the basic functionality so that other classes can inherit its members. The derived classes can further override the inherited properties and methods to provide new functionality. Visual Basic .NET provides the Inherits keyword to implement inheritance.

Project Report by: Arumita Kumari (071M3888)

16

Constructors and destructors Visual Basic .NET supports constructors and destructors. A constructor is a special type of method that is invoked when one creates a new instance of a class. A constructor is used to initialize the member of the class. A destructor, on the other hand, is invoked when an object is destroyed. A destructor releases the resources used by an object. Overloading Overloading enables method to be defined with the same name but different parameters. In other words, it allows you have multiple implementation of a method. In Visual Basic .NET, one can create multiple methods with the same name in a class provided their parameter list is different. Overriding Overriding is the capability of the derived class to override the characteristic of parent class. Visual Basic .NET has introduced the Overrides keyword for providing a new implementation of an inherited member in the derived class. The methods that can be overridden by the derived class needs to be marked as Overridable in the base class. Structured Exception Handling Exceptions are the errors that are generated at runtime as a result of an erroneous statement or condition or because of some unexpected behavior of the application. For the program to be able to handle such exceptions Visual Basic .NET supports structured exception handling that consists of

Project Report by: Arumita Kumari (071M3888)

17

protected blocks of code and filters for the possible exceptions that can be raised by the program. Multithreading Visual Basic .NET provides full support for creating multithreaded applications. Multithreading enables an application to contain one or more threads that can share the workload in an application by executing one at a time. Besides these key features, Visual Basic .NET provides support for a unique feature called background compilation. This features flags errors immediately as a developer types the code.

Project Report by: Arumita Kumari (071M3888)

18

Introduction to MS SQL Server 2000 The database has become an integral part of almost every humans life. Without it, many things we do would become very tedious, perhaps impossible tasks, banks, universities and libraries are three examples of database system. On the Internet, search engine, online shopping, and even the website naming convention (http://www) would be impossible without the use of database. A database that is implemented and interfaced on a computer is often termed a database server. One of the SQL (Structured Query Language) database currently on the market is MS SQL Server 2000. It is powerful RDBMS used under windows environment. As it supports the use of universal standards SQL, it is very easy for everyone to access the data from the database. These capability ranges across a number of topics, including the following: Ability to handle an unlimited number of simultaneous users. Capability of handling thousands of records. Fast Query Processing. Easy and efficient privileges system. Very powerful security system. Mixed mode authentication. Some basic features those are follows:
Declarative: Declarative database integrity guarantees that the data

in the database is with on a predefined set of rules. The data can be

Project Report by: Arumita Kumari (071M3888)

19

maintained reliably without nay programming. Database integrity is achieved through integrity constraints. Integrity constraints are rules that are applicable on the columns of the table, which prevents invalid data entry into tables. Integrity constraints can be enforced through Entity integrity and referential integrity. Entity integrity ensures that the data may be UNIQUE or take a default value or be limited to CHECK. Referential integrity is enforcing a parent child relationship between tables such that child records cannot be appended without a parent records cannot be deleted when the child record exists.
Triggers: Triggers are block of SQL code written by users for a

specific table. This code is triggered when any INSERT, UPDATE or DELETE operation is performed on the table. Triggers help in performing complex security checking and in performing related operation for an event (INSERT, UPDATE or DELETE).
Procedures: Procedures are SQL code compiled and stored in

the database; the procedures can be called into execution, useful for batch processing.
Security: It performs record locking or table locking when two

users are updating at the same data. The row locking is an automatic feature. File Structure

Project Report by: Arumita Kumari (071M3888)

20

Logical Structure: this is users view of the data. The user sees the data to exist in the form of two dimensional table or groups of tables. The tables are created in table space. So, a database is made up of one or more table spaces. When the database is created, the system table space is created. The system space contains the oracle data dictionary and system rollback segments.

Project Report by: Arumita Kumari (071M3888)

21

Physical Structure: SQL Server 2000 databases have three types of files: Primary data files The primary data file is the starting point of the database and points to the other files in the database. Every database has one primary data file. The recommended file name extension for primary data files is .mdf. Secondary data files Secondary data files comprise all of the data files other than the primary data file. Some databases may not have any secondary data files, while others have multiple secondary data files. The recommended file name extension for secondary data files is .ndf. Log files Log files hold all of the log information used to recover the database. There must be at least one log file for each database, although there can be more than one. The recommended file name extension for log files is .ldf. SQL Server 2000 does not enforce the .mdf, .ndf, and .ldf file name extensions, but these extensions are recommended to help identify the use of the file. SQL Server 2000 files have two names:

Logical_file_name is a name used to refer to the file in all TransactSQL statements.

Project Report by: Arumita Kumari (071M3888)

22

The logical file name must conform to the rules for SQL Server identifiers and must be unique to the database.

OS_file_name is the name of the physical file. It must follow the rules for Microsoft Windows NT or Microsoft Windows 98, and Microsoft Windows 95 file names.

Some Advanced features of SQL Server 2000 Internet Integration. The SQL Server 2000 database engine includes integrated XML support. It also has the scalability, availability, and security features required to operate as the data storage component of the largest Web sites. The SQL Server 2000 programming model is integrated with the Windows DNA architecture for developing Web applications, and SQL Server 2000 supports features such as English Query and the Microsoft Search Service to incorporate user-friendly queries and powerful search capabilities in Web applications. Scalability and Availability. The same database engine can be used across platforms ranging from laptop computers running Microsoft Windows 98 through large, multiprocessor servers running Microsoft Windows 2000 Data Center Edition. SQL Server 2000 Enterprise Edition supports features such as federated servers, indexed views, and large memory support that allow it to scale to the performance levels required by the largest Web sites.

Project Report by: Arumita Kumari (071M3888)

23

Additionally, when running at its default settings, SQL Server 2000 has features such as dynamic self-tuning that let it work effectively on laptops and desktops without burdening users with administrative tasks. SQL Server 2000 works with Windows NT and Windows 2000 fail over clustering to support immediate fail over to a backup server in continuous operation. SQL Server 2000 also introduces log shipping, which allows you to maintain a warm standby server in environments with lower availability requirements. Enterprise-Level Database Features. The SQL Server 2000 relational database engine supports the features required to support demanding data processing environments. The database engine protects data integrity while minimizing the overhead of managing thousands of users concurrently modifying the database. SQL Server 2000 distributed queries allow you to reference data from multiple sources as if it were a part of a SQL Server 2000 database, while at the same time, the distributed transaction support protects the integrity of any updates of the distributed data. Replication allows you to also maintain multiple copies of data, while ensuring that the separate copies remain synchronized. You can replicate a set of data to multiple, mobile, disconnected users, have them work autonomously, and then merge their modifications back to the publisher. Ease of installation, deployment, and use. SQL Server 2000 includes a set of administrative and development tools that improve upon the process of installing, deploying, managing, and using SQL Server across several sites. SQL Server 2000 also supports a
Project Report by: Arumita Kumari (071M3888) 24

standards-based programming model integrated with the Windows DNA, making the use of SQL Server databases and data warehouses a seamless part of building powerful and scalable systems. These features allow you to rapidly deliver SQL Server applications that customers can implement with a minimum of installation and administrative overhead. Data warehousing. SQL Server 2000 includes tools for extracting and analyzing summary data for online analytical processing. SQL Server also includes tools for visually designing databases and analyzing data using English-based questions. Windows NT Server, Operating System Windows 2000 Server, Windows 2003 Server, Windows NT Workstation 4.0 Database server MS SQL Server 2000 or MS SQL Server 7.0

HARDWARE REQUIREMENT
Hardware
Processor Ram (MB) Hard disk

Minimum
Pentium II 450 MHz 128 10 GB

Recommended
Pentium III 733 MHz 256 40 GB

Project Report by: Arumita Kumari (071M3888)

25

SYSTEM DESIGN
USECASE DIAGRAM FOR ENTRY OF ASSET DETAILS:

Enters the User ID and Password

Admin/User
USERMASTER

Validation for check Valid id and passwd

No Display Error Message Valid ?

Yes

OpenMDI Form

CATEGORY

Enter Master Category Details

Project Report by: Arumita Kumari (071M3888)

26

SUBCATEGORY

Enters subcategories under a Category

ITEM

Enters Item details for a subcategory under a category

APPLICATIONLOGIC

Details entered for calculating Valuation of all existing Items

Intial Valuation calculation for all existing Items for which applicationlogic exists

INTIALVALUATION

Project Report by: Arumita Kumari (071M3888)

27

USECASE DIAGRAM FOR ACTUAL VALUATION OF ASSET:

Select Transaction menu from MDI form

Admin
Under Transaction select Current Valuation

INITIALVALUATION Enter the Current Price and year for valuation of existing assets Updates the current yr & value

ITEM

Average of Initial & Current Valuation is calculated to get actual assetcost

ASSETCOST

Project Report by: Arumita Kumari (071M3888)

28

USECASEDIAGRAM FOR ASSETCLOSURE:

Selects the Asset Closure under Process Menu

Admin
Clicks the Process button

ITEM

Checks for the Items for which Valuation is not entered.

YES Display all ITEMS If Items found ?

NO B

Project Report by: Arumita Kumari (071M3888)

29

Progress Bar appears and then a message box confirming the processing is over.

Calculate the sum of the actual asset value for all items existing in the system

Display the total value calculated in textbox.

ASSETCLOSURE

Project Report by: Arumita Kumari (071M3888)

30

USECASE DIAGRAM FOR UPDATION OF DATA:

Selects the updation option from Menu

Admin
ITEM Updates Item details

Updates appliction logic details

APPLICATIONLOGIC

Project Report by: Arumita Kumari (071M3888)

31

ASSET ENTRY MODULE: The administrator or the user logs in to the system by entering a valid login id and password which is checked against the database. Once the user logs in successfully the MDI form opens with various menu options. For entry of the existing Asset details administrator starts with the entry of the Master Category details. Once the category is entered the Master SubCategories under it are entered into the database. For each category the Master Item details are entered with all the relevant details which are needed.The Application Logic deals with the entry of details needed for valuation of assets for every existing items in the system. Once all the above details are entered then InitialValuation is done for all the Items.

CURRENTVALUATION MODULE: The system provides the functionality for calculation of existing asset value so apart from Initial Valuation which deals with the calculation of the asset value considering the original price along with its depreciation rate and the number of years passed by. The similar kind of valuation is made for the asset with its current pricing for the year for which the Valuation needs to be performed.Then the average of all both the current value and initialvalue is taken out to get the actual value of the asset.While making calculation for the current year the current year and the current value is also updated in the Item table in order to keep the track of the Items for which the Valuation is not done as a security check.

Project Report by: Arumita Kumari (071M3888)

32

ASSETCLOSURE MODULE: This module gives the total value of the assets in the existing system in a click of the button and the data is recorded in the database for the current date.At the same time a check is made that the valuation prior to it has been done and stored in the database otherwise a list of items for which the valuation is still pending is displayed to the user and the entire closure process is rolled back.

DATABASE STRUCTURE
A database is really nothing more than hierarchy of increasingly complex data structure. In database, the acknowledged structure for holding blocks (or records) of information is called the table. These records, in turn are made of smallest object that more of these records that makes up the part of the database. In designing phase of the system various Table was used to store relevant information.

TABLE: CATEGORY FIELD DATA TYPE C_id char Cdesc char TABLE: SUBCATEGORY FIELD DATA TYPE Sc_id char C_id char Sdesc Char

SIZE 10 30

NULL ABLE NO YES

KEY PRIMARY

SIZE 10 10 30

NULL ABLE NO YES YES

KEY PRIMARY FOREIGN

Project Report by: Arumita Kumari (071M3888)

33

TABLE: ITEM FIELD I_code C_id Sc_id Price Model_no Yr Current_yr Current_value

DATA TYPE Char Char Char Int Char Char Char Int

SIZE 10 10 10 30 10 10

NULL ABLE NO YES YES NO NO NO NO NO

KEY PRIMARY FOREIGN FOREIGN

TABLE: APPLICATIONLOGIC FIELD DATA TYPE C_id Char Sc_id Char I_code Char Deprcrate Int Years Int Date Char TABLE: LOCATION FIELD DATA TYPE L_name Char Descrp Char TABLE: USER MASTER FIELD DATA TYPE U_id Char Upassword Char Ufname Char Designation Char TABLE: PURCHASEENTRY FIELD DATA TYPE I_code Char Sc_id Char C_id Char Cdate Char Cdateofservice Char

SIZE 10 10 10 15

NULL ABLE YES YES YES NO NO NO

KEY FOREIGN FOREIGN FOREIGN

SIZE 30 30

NULL ABLE NO NO

KEY

SIZE 10 30 30 30

NULL ABLE NO NO NO NO

KEY PRIMARY

SIZE 10 10 10 15 15

NULL ABLE YES YES YES NO NO

KEY FOREIGN FOREIGN FOREIGN

Project Report by: Arumita Kumari (071M3888)

34

Location Char Price Int TABLE: INITIALVALUATION FIELD DATA TYPE C_id Char Sc_id Char I_code Char Price Int Deprcrate Int Yrs Int Valuation Int

20 SIZE 10 10 10

NO NO NULL ABLE NO NO NO NO NO NO NO KEY

TABLE: ASSETCOST FIELD DATA TYPE I_code Char Idesc Char ModelNo Char IntialValuation Int Deprcrate Int No_yrs Int Currentprice Int Currentvaluation Int Assetvalue Int

SIZE 10 20 20

NULL ABLE NO NO NO NO NO NO NO NO NO

KEY

TABLE: ASSETCLOSURE FIELD DATA TYPE Iassetvalue Int Currentdate Datetime

SIZE

NULL ABLE NO NO

KEY Default constr

Project Report by: Arumita Kumari (071M3888)

35

FORM SNAPSHOTS

Project Report by: Arumita Kumari (071M3888)

36

LOGIN FORM

Project Report by: Arumita Kumari (071M3888)

37

MAIN MDI FORM

Project Report by: Arumita Kumari (071M3888)

38

CATEGORY MASTER

Project Report by: Arumita Kumari (071M3888)

39

SUBCATEGORY MASTER

Project Report by: Arumita Kumari (071M3888)

40

ITEM MASTER

Project Report by: Arumita Kumari (071M3888)

41

USER MASTER

Project Report by: Arumita Kumari (071M3888)

42

APPLICATION LOGIC

Project Report by: Arumita Kumari (071M3888)

43

INTIAL VALUATION

Project Report by: Arumita Kumari (071M3888)

44

CURRENT VALUATION

Project Report by: Arumita Kumari (071M3888)

45

ASSET CLOSURE

Project Report by: Arumita Kumari (071M3888)

46

ITEM MASTER UPDATE

APPLICATION LOGIC UPDATE

Project Report by: Arumita Kumari (071M3888)

47

HELP SYSTEM

Project Report by: Arumita Kumari (071M3888)

48

CODING
Login.vb:
Imports System.Data.OleDb Public Class Form1 Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Project Report by: Arumita Kumari (071M3888) 49

Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Panel1 = New System.Windows.Forms.Panel() Me.TextBox2 = New System.Windows.Forms.TextBox() Me.TextBox1 = New System.Windows.Forms.TextBox() Me.Label2 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.Button1 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Panel1.SuspendLayout() Me.SuspendLayout() ' 'Panel1 ' Me.Panel1.BackColor = System.Drawing.Color.Beige Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Panel1.Controls.AddRange(New System.Windows.Forms.Control() {Me.TextBox2, Me.TextBox1, Me.Label2, Me.Label1}) Me.Panel1.Location = New System.Drawing.Point(64, 48) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(320, 216) Me.Panel1.TabIndex = 0 ' 'TextBox2 ' Me.TextBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox2.Location = New System.Drawing.Point(152, 128) Me.TextBox2.Name = "TextBox2" Me.TextBox2.PasswordChar = Microsoft.VisualBasic.ChrW(42) Me.TextBox2.Size = New System.Drawing.Size(128, 26) Me.TextBox2.TabIndex = 7 Me.TextBox2.Text = "" ' 'TextBox1 ' Me.TextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox1.Location = New System.Drawing.Point(152, 56) Project Report by: Arumita Kumari (071M3888) 50

Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New System.Drawing.Size(128, 26) Me.TextBox1.TabIndex = 6 Me.TextBox1.Text = "" ' 'Label2 ' Me.Label2.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label2.Location = New System.Drawing.Point(16, 128) Me.Label2.Name = "Label2" Me.Label2.TabIndex = 5 Me.Label2.Text = "Password" ' 'Label1 ' Me.Label1.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label1.Location = New System.Drawing.Point(16, 55) Me.Label1.Name = "Label1" Me.Label1.TabIndex = 4 Me.Label1.Text = "UserName" ' 'Button1 ' Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button1.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button1.Location = New System.Drawing.Point(224, 280) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(75, 32) Me.Button1.TabIndex = 8 Me.Button1.Text = "Login" ' Project Report by: Arumita Kumari (071M3888) 51

'Button2 ' Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button2.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button2.Location = New System.Drawing.Point(312, 280) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(75, 32) Me.Button2.TabIndex = 9 Me.Button2.Text = "Reset" ' 'Form1 ' Me.AutoScaleBaseSize = New System.Drawing.Size(7, 19) Me.BackColor = System.Drawing.Color.Beige Me.ClientSize = New System.Drawing.Size(448, 341) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Panel1, Me.Button2, Me.Button1}) Me.Font = New System.Drawing.Font("Comic Sans MS", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.ForeColor = System.Drawing.Color.Navy Me.Name = "Form1" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Login Screen" Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.Panel1.ResumeLayout(False) Me.ResumeLayout(False) End Sub #End Region Dim con As OleDb.OleDbConnection Dim com As OleDb.OleDbCommand Dim dr As OleDb.OleDbDataReader Dim pass, pwd, str As String Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Project Report by: Arumita Kumari (071M3888) 52

con = New OleDb.OleDbConnection("provider=sqloledb;user id=sa;password=;database=project;server=(local)") End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click con.Open() pwd = TextBox2.Text str = "select upassword from usermaster where u_id='" & TextBox1.Text & "'" com = New OleDb.OleDbCommand(str, con) dr = com.ExecuteReader() If dr.Read() = True Then pass = dr.GetString(0) MsgBox(pass) If Trim(pwd) = Trim(pass) Then Me.Hide() Dim m1 As New Main() m1.Show() Else MsgBox("Invalid password ..Plz re-login !!") TextBox1.Text = "" TextBox2.Text = "" TextBox1.Focus() End If Else MsgBox("plz reenter the details") TextBox1.Text = "" TextBox2.Text = "" TextBox1.Focus() End If dr.Close() con.Close() End Sub End Class

Main.vb:
Public Class Main Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() Project Report by: Arumita Kumari (071M3888) 53

'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem4 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem5 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem6 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem7 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem8 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem9 As System.Windows.Forms.MenuItem Project Report by: Arumita Kumari (071M3888) 54

Friend WithEvents MenuItem10 System.Windows.Forms.MenuItem Friend WithEvents MenuItem12 System.Windows.Forms.MenuItem Friend WithEvents MenuItem14 System.Windows.Forms.MenuItem Friend WithEvents MenuItem15 System.Windows.Forms.MenuItem Friend WithEvents MenuItem16 System.Windows.Forms.MenuItem Friend WithEvents MenuItem17 System.Windows.Forms.MenuItem Friend WithEvents MenuItem18 System.Windows.Forms.MenuItem Friend WithEvents MenuItem19 System.Windows.Forms.MenuItem Friend WithEvents MenuItem20 System.Windows.Forms.MenuItem Friend WithEvents MenuItem21 System.Windows.Forms.MenuItem Friend WithEvents MenuItem22 System.Windows.Forms.MenuItem Friend WithEvents MenuItem23 System.Windows.Forms.MenuItem Friend WithEvents MenuItem24 System.Windows.Forms.MenuItem Friend WithEvents MenuItem25 System.Windows.Forms.MenuItem Friend WithEvents MenuItem26 System.Windows.Forms.MenuItem Friend WithEvents MenuItem27 System.Windows.Forms.MenuItem Friend WithEvents MenuItem28 System.Windows.Forms.MenuItem Friend WithEvents MenuItem29 System.Windows.Forms.MenuItem Friend WithEvents MenuItem30 System.Windows.Forms.MenuItem Friend WithEvents MenuItem31 System.Windows.Forms.MenuItem Friend WithEvents MenuItem32 System.Windows.Forms.MenuItem Friend WithEvents MenuItem33 System.Windows.Forms.MenuItem Friend WithEvents MenuItem34 System.Windows.Forms.MenuItem

As As As As As As As As As As As As As As As As As As As As As As As

Project Report by: Arumita Kumari (071M3888)

55

Friend WithEvents StatusBar1 As System.Windows.Forms.StatusBar Friend WithEvents StatusBarPanel1 As System.Windows.Forms.StatusBarPanel Friend WithEvents StatusBarPanel2 As System.Windows.Forms.StatusBarPanel Friend WithEvents StatusBarPanel3 As System.Windows.Forms.StatusBarPanel Friend WithEvents MenuItem13 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem11 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem35 As System.Windows.Forms.MenuItem <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.MainMenu1 = New System.Windows.Forms.MainMenu() Me.MenuItem1 = New System.Windows.Forms.MenuItem() Me.MenuItem2 = New System.Windows.Forms.MenuItem() Me.MenuItem3 = New System.Windows.Forms.MenuItem() Me.MenuItem4 = New System.Windows.Forms.MenuItem() Me.MenuItem5 = New System.Windows.Forms.MenuItem() Me.MenuItem6 = New System.Windows.Forms.MenuItem() Me.MenuItem7 = New System.Windows.Forms.MenuItem() Me.MenuItem8 = New System.Windows.Forms.MenuItem() Me.MenuItem9 = New System.Windows.Forms.MenuItem() Me.MenuItem10 = New System.Windows.Forms.MenuItem() Me.MenuItem12 = New System.Windows.Forms.MenuItem() Me.MenuItem13 = New System.Windows.Forms.MenuItem() Me.MenuItem14 = New System.Windows.Forms.MenuItem() Me.MenuItem15 = New System.Windows.Forms.MenuItem() Me.MenuItem16 = New System.Windows.Forms.MenuItem() Me.MenuItem11 = New System.Windows.Forms.MenuItem() Me.MenuItem17 = New System.Windows.Forms.MenuItem() Me.MenuItem18 = New System.Windows.Forms.MenuItem() Me.MenuItem19 = New System.Windows.Forms.MenuItem() Me.MenuItem20 = New System.Windows.Forms.MenuItem() Me.MenuItem21 = New System.Windows.Forms.MenuItem() Me.MenuItem22 = New System.Windows.Forms.MenuItem() Me.MenuItem23 = New System.Windows.Forms.MenuItem() Me.MenuItem24 = New System.Windows.Forms.MenuItem() Me.MenuItem25 = New System.Windows.Forms.MenuItem() Me.MenuItem26 = New System.Windows.Forms.MenuItem() Me.MenuItem27 = New System.Windows.Forms.MenuItem() Me.MenuItem28 = New System.Windows.Forms.MenuItem() Me.MenuItem29 = New System.Windows.Forms.MenuItem() Me.MenuItem30 = New System.Windows.Forms.MenuItem() Project Report by: Arumita Kumari (071M3888) 56

Me.MenuItem31 = New System.Windows.Forms.MenuItem() Me.MenuItem32 = New System.Windows.Forms.MenuItem() Me.MenuItem33 = New System.Windows.Forms.MenuItem() Me.MenuItem34 = New System.Windows.Forms.MenuItem() Me.StatusBar1 = New System.Windows.Forms.StatusBar() Me.StatusBarPanel1 = New System.Windows.Forms.StatusBarPanel() Me.StatusBarPanel2 = New System.Windows.Forms.StatusBarPanel() Me.StatusBarPanel3 = New System.Windows.Forms.StatusBarPanel() Me.MenuItem35 = New System.Windows.Forms.MenuItem() CType(Me.StatusBarPanel1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.StatusBarPanel2, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.StatusBarPanel3, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'MainMenu1 ' Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem10, Me.MenuItem14, Me.MenuItem16, Me.MenuItem17, Me.MenuItem26, Me.MenuItem29, Me.MenuItem32, Me.MenuItem33, Me.MenuItem34}) ' 'MenuItem1 ' Me.MenuItem1.Index = 0 Me.MenuItem1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem2, Me.MenuItem3, Me.MenuItem4, Me.MenuItem5, Me.MenuItem6, Me.MenuItem7, Me.MenuItem8, Me.MenuItem9}) Me.MenuItem1.Text = "&Master" ' 'MenuItem2 ' Me.MenuItem2.Index = 0 Me.MenuItem2.Text = "&Category" ' 'MenuItem3 ' Me.MenuItem3.Index = 1 Me.MenuItem3.Text = "&SubCategory" ' Project Report by: Arumita Kumari (071M3888) 57

'MenuItem4 ' Me.MenuItem4.Index = 2 Me.MenuItem4.Text = "&Item" ' 'MenuItem5 ' Me.MenuItem5.Index = 3 Me.MenuItem5.Text = "&UserMaster" ' 'MenuItem6 ' Me.MenuItem6.Index = 4 Me.MenuItem6.Text = "User&GroupMaster" ' 'MenuItem7 ' Me.MenuItem7.Index = 5 Me.MenuItem7.Text = "&LocationMaster" ' 'MenuItem8 ' Me.MenuItem8.Index = 6 Me.MenuItem8.Text = "&ApplicationLogic" ' 'MenuItem9 ' Me.MenuItem9.Index = 7 Me.MenuItem9.Text = "&InitialValuation" ' 'MenuItem10 ' Me.MenuItem10.Index = 1 Me.MenuItem10.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem12, Me.MenuItem13}) Me.MenuItem10.Text = "&Transaction" ' 'MenuItem12 ' Me.MenuItem12.Index = 0 Me.MenuItem12.Text = "&Purchase" ' 'MenuItem13 ' Me.MenuItem13.Index = 1 Me.MenuItem13.Text = "Current Valuation" Project Report by: Arumita Kumari (071M3888) 58

' 'MenuItem14 ' Me.MenuItem14.Index = 2 Me.MenuItem14.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem15}) Me.MenuItem14.Text = "Process" ' 'MenuItem15 ' Me.MenuItem15.Index = 0 Me.MenuItem15.Text = "Asset&Closure" ' 'MenuItem16 ' Me.MenuItem16.Index = 3 Me.MenuItem16.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem11, Me.MenuItem35}) Me.MenuItem16.Text = "Update" ' 'MenuItem11 ' Me.MenuItem11.Index = 0 Me.MenuItem11.Text = "ApplicationLogic" ' 'MenuItem17 ' Me.MenuItem17.Index = 4 Me.MenuItem17.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem18, Me.MenuItem19, Me.MenuItem24, Me.MenuItem25}) Me.MenuItem17.Text = "Reports" ' 'MenuItem18 ' Me.MenuItem18.Index = 0 Me.MenuItem18.Text = "Asset Status" ' 'MenuItem19 ' Me.MenuItem19.Index = 1 Me.MenuItem19.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem20, Me.MenuItem21, Me.MenuItem22, Me.MenuItem23}) Me.MenuItem19.Text = "Master" ' Project Report by: Arumita Kumari (071M3888) 59

'MenuItem20 ' Me.MenuItem20.Index = 0 Me.MenuItem20.Text = "Category" ' 'MenuItem21 ' Me.MenuItem21.Index = 1 Me.MenuItem21.Text = "SubCategory" ' 'MenuItem22 ' Me.MenuItem22.Index = 2 Me.MenuItem22.Text = "Item" ' 'MenuItem23 ' Me.MenuItem23.Index = 3 Me.MenuItem23.Text = "UserGroup" ' 'MenuItem24 ' Me.MenuItem24.Index = 2 Me.MenuItem24.Text = "Purchase" ' 'MenuItem25 ' Me.MenuItem25.Index = 3 Me.MenuItem25.Text = "Future Prediction" ' 'MenuItem26 ' Me.MenuItem26.Index = 5 Me.MenuItem26.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem27, Me.MenuItem28}) Me.MenuItem26.Text = "&Utilities" ' 'MenuItem27 ' Me.MenuItem27.Index = 0 Me.MenuItem27.Text = "Calendar" ' 'MenuItem28 ' Me.MenuItem28.Index = 1 Me.MenuItem28.Text = "Calculator" Project Report by: Arumita Kumari (071M3888) 60

' 'MenuItem29 ' Me.MenuItem29.Index = 6 Me.MenuItem29.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem30, Me.MenuItem31}) Me.MenuItem29.Text = "HouseKeep" ' 'MenuItem30 ' Me.MenuItem30.Index = 0 Me.MenuItem30.Text = "Backup" ' 'MenuItem31 ' Me.MenuItem31.Index = 1 Me.MenuItem31.Text = "Restore" ' 'MenuItem32 ' Me.MenuItem32.Index = 7 Me.MenuItem32.Text = "AddIns" ' 'MenuItem33 ' Me.MenuItem33.Index = 8 Me.MenuItem33.Text = "Help" ' 'MenuItem34 ' Me.MenuItem34.Index = 9 Me.MenuItem34.Text = "E&xit" ' 'StatusBar1 ' Me.StatusBar1.Location = New System.Drawing.Point(0, 251) Me.StatusBar1.Name = "StatusBar1" Me.StatusBar1.Panels.AddRange(New System.Windows.Forms.StatusBarPanel() {Me.StatusBarPanel1, Me.StatusBarPanel2, Me.StatusBarPanel3}) Me.StatusBar1.Size = New System.Drawing.Size(648, 22) Me.StatusBar1.TabIndex = 1 Me.StatusBar1.Text = "StatusBar1" ' Project Report by: Arumita Kumari (071M3888) 61

'StatusBarPanel1 ' Me.StatusBarPanel1.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring Me.StatusBarPanel1.BorderStyle = System.Windows.Forms.StatusBarPanelBorderStyle.Raised Me.StatusBarPanel1.Text = "StatusBarPanel1" ' 'StatusBarPanel2 ' Me.StatusBarPanel2.BorderStyle = System.Windows.Forms.StatusBarPanelBorderStyle.Raised Me.StatusBarPanel2.Text = "StatusBarPanel2" ' 'StatusBarPanel3 ' Me.StatusBarPanel3.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Contents Me.StatusBarPanel3.BorderStyle = System.Windows.Forms.StatusBarPanelBorderStyle.Raised Me.StatusBarPanel3.Text = "StatusBarPanel3" Me.StatusBarPanel3.Width = 99 ' 'MenuItem35 ' Me.MenuItem35.Index = 1 Me.MenuItem35.Text = "Item" ' 'Main ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.ClientSize = New System.Drawing.Size(648, 273) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.StatusBar1}) Me.IsMdiContainer = True Me.Menu = Me.MainMenu1 Me.Name = "Main" Me.Text = "Main" Me.TransparencyKey = System.Drawing.Color.White Me.WindowState = System.Windows.Forms.FormWindowState.Maximized CType(Me.StatusBarPanel1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.StatusBarPanel2, System.ComponentModel.ISupportInitialize).EndInit()

Project Report by: Arumita Kumari (071M3888)

62

CType(Me.StatusBarPanel3, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) End Sub #End Region Dim con As OleDb.OleDbConnection Dim com1 As OleDb.OleDbCommand Dim com2 As OleDb.OleDbCommand Dim com3 As OleDb.OleDbCommand Dim dr As OleDb.OleDbDataReader Dim icode As String Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click Dim c1 As New Category() c1.MdiParent = Me c1.Show() End Sub Private Sub MenuItem34_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem34.Click End End Sub Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click Dim c1 As New SubCategory() c1.MdiParent = Me c1.Show() End Sub Private Sub MenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem4.Click Dim c1 As New Item() c1.MdiParent = Me c1.Show() End Sub Private Sub MenuItem5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem5.Click Dim c1 As New UserMaster() c1.MdiParent = Me c1.Show() Project Report by: Arumita Kumari (071M3888) 63

End Sub Private Sub MenuItem6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem6.Click Dim c1 As New UserGroupmaster() c1.MdiParent = Me c1.Show() End Sub Private Sub MenuItem7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem7.Click Dim c1 As New Location() c1.MdiParent = Me c1.Show() End Sub ' Private Sub MenuItem11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem11.Click ' Dim c1 As New AssetEntry() ' c1.MdiParent = Me ' c1.Show() 'End Sub Private Sub MenuItem8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem8.Click Dim c1 As New ApplicationLogic() c1.MdiParent = Me c1.Show() End Sub Private Sub MenuItem9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem9.Click Dim iv As New InitialValuation() iv.ShowDialog() End Sub Private Sub MenuItem12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem12.Click Dim pur As New Purchase() pur.Show() End Sub Project Report by: Arumita Kumari (071M3888) 64

Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' StatusBar1.ShowPanels = True 't1.Start() 'Call display() End Sub Sub display() 'While True ' StatusBarPanel3.Text = Now 'End While End Sub Private Sub MenuItem30_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem30.Click con = New OleDb.OleDbConnection("provider=sqloledb;user id=sa;password=;database=master;server=(local)") con.Open() icode = "select * from sysdevices where name='bk_project'" com1 = New OleDb.OleDbCommand(icode, con) dr = com1.ExecuteReader If dr.Read = False Then com2 = New OleDb.OleDbCommand("exec sp_addumpdevice 'disk','bk_project'," & "'d:\bk_project.dat'", con) dr.Close() com2.ExecuteNonQuery() End If com3 = New OleDb.OleDbCommand("BACKUP DATABASE PROJECT TO bk_project", con) com3.ExecuteNonQuery() con.Close() MessageBox.Show("Backup has been taken successfully", "Database Backup", MessageBoxButtons.OK) End Sub Private Sub MenuItem27_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem27.Click Dim cl As New Calendar() cl.MdiParent = Me cl.Show() Project Report by: Arumita Kumari (071M3888) 65

End Sub Private Sub MenuItem28_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem28.Click Shell("calc.exe") End Sub Private Sub MenuItem15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem15.Click Dim ac As New AssetClosure() ac.MdiParent = Me ac.Show() End Sub Private Sub MenuItem13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem13.Click Dim cr As New CurrentYear_Value() cr.MdiParent = Me cr.Show() End Sub Private Sub MenuItem20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem20.Click Dim crep As New Master_Cat_Report() crep.MdiParent = Me crep.Show() End Sub Private Sub MenuItem31_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem31.Click con = New OleDb.OleDbConnection("provider=sqloledb;persist security info=false;user id=sa;pwd=;Initial Catalog=master;Data Source=localhost") con.Open() com3 = New OleDb.OleDbCommand("restore database project from bk_project with replace", con) com3.ExecuteNonQuery() MsgBox("Restoration Successfully done") End Sub

Project Report by: Arumita Kumari (071M3888)

66

Private Sub MenuItem22_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem22.Click Dim itmrep As New Master_Item_report() itmrep.MdiParent = Me itmrep.Show() End Sub Private Sub MenuItem21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem21.Click Dim screp As New Master_subcat_rep() screp.MdiParent = Me screp.Show() End Sub Private Sub MenuItem24_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem24.Click Dim prep As New Purchase_item_rep() prep.MdiParent = Me prep.Show() End Sub Private Sub MenuItem18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem18.Click Dim assetrep As New AssetStatusRep() assetrep.Show() End Sub Private Sub MenuItem11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem11.Click Dim applog As New ApplicationLogic_Update() applog.MdiParent = Me applog.Show() End Sub Private Sub MenuItem35_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem35.Click Dim itm As New ItemUpdate() itm.MdiParent = Me itm.Show() End Sub End Class Project Report by: Arumita Kumari (071M3888) 67

Category.vb
Public Class Category Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Project Report by: Arumita Kumari (071M3888) 68

Friend WithEvents Button1 As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Panel1 = New System.Windows.Forms.Panel() Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.TextBox2 = New System.Windows.Forms.TextBox() Me.TextBox1 = New System.Windows.Forms.TextBox() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.Panel1.SuspendLayout() Me.SuspendLayout() ' 'Panel1 ' Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Panel1.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button3, Me.Button2, Me.Button1, Me.TextBox2, Me.TextBox1, Me.Label3, Me.Label2}) Me.Panel1.Location = New System.Drawing.Point(192, 120) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(416, 272) Me.Panel1.TabIndex = 0 ' 'Button3 ' Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button3.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button3.Location = New System.Drawing.Point(352, 232) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(56, 32) Me.Button3.TabIndex = 7 Me.Button3.Text = "Exit" ' 'Button2 '

Project Report by: Arumita Kumari (071M3888)

69

Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button2.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button2.Location = New System.Drawing.Point(272, 232) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(64, 32) Me.Button2.TabIndex = 6 Me.Button2.Text = "Reset" ' 'Button1 ' Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button1.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button1.Location = New System.Drawing.Point(184, 232) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(72, 32) Me.Button1.TabIndex = 5 Me.Button1.Text = "Save" ' 'TextBox2 ' Me.TextBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox2.Location = New System.Drawing.Point(200, 144) Me.TextBox2.Name = "TextBox2" Me.TextBox2.Size = New System.Drawing.Size(152, 20) Me.TextBox2.TabIndex = 3 Me.TextBox2.Text = "" ' 'TextBox1 ' Me.TextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox1.Location = New System.Drawing.Point(200, 64) Project Report by: Arumita Kumari (071M3888) 70

Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New System.Drawing.Size(152, 20) Me.TextBox1.TabIndex = 2 Me.TextBox1.Text = "" ' 'Label3 ' Me.Label3.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label3.Location = New System.Drawing.Point(32, 144) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(128, 32) Me.Label3.TabIndex = 1 Me.Label3.Text = "Description" ' 'Label2 ' Me.Label2.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label2.Location = New System.Drawing.Point(32, 64) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(128, 32) Me.Label2.TabIndex = 0 Me.Label2.Text = "Category ID" ' 'Label1 ' Me.Label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Label1.Font = New System.Drawing.Font("Georgia", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label1.Location = New System.Drawing.Point(288, 40) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(280, 48) Me.Label1.TabIndex = 1 Project Report by: Arumita Kumari (071M3888) 71

Me.Label1.Text = " Category Master" ' 'Category ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Beige Me.ClientSize = New System.Drawing.Size(624, 445) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Label1, Me.Panel1}) Me.Name = "Category" Me.Text = "Category" Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.Panel1.ResumeLayout(False) Me.ResumeLayout(False) End Sub #End Region Dim str As String Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Close() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) MsgBox("entered") Call connect() str = "insert into category (c_id,cdesc) values('" & TextBox1.Text & "'" & "," & "'" & TextBox2.Text & "')" com = New OleDb.OleDbCommand(str, con) com.ExecuteNonQuery() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) TextBox1.Text = "" TextBox2.Text = "" TextBox1.Focus() End Sub

Project Report by: Arumita Kumari (071M3888)

72

Private Sub Button3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Close() End Sub Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox1.Text = "" Then MsgBox("plz enter the category id") TextBox1.Focus() ElseIf TextBox2.Text = "" Then MsgBox("plz enter the description") Else Try Call connect() str = "insert into category (c_id,cdesc) values('" & TextBox1.Text & "'" & "," & "'" & TextBox2.Text & "')" com = New OleDb.OleDbCommand(str, con) com.ExecuteNonQuery() MsgBox("Data entered in Category master", MsgBoxStyle.OKOnly, "database updation") Catch ex As Exception MsgBox("ID already exists") TextBox1.Text = "" TextBox2.Text = "" TextBox1.Focus() Exit Sub End Try End If End Sub Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Text = "" TextBox2.Text = "" TextBox1.Focus() End Sub End Class

SubCategory.vb:
Public Class SubCategory

Project Report by: Arumita Kumari (071M3888)

73

Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Project Report by: Arumita Kumari (071M3888) 74

<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Label1 = New System.Windows.Forms.Label() Me.Panel1 = New System.Windows.Forms.Panel() Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.ComboBox1 = New System.Windows.Forms.ComboBox() Me.TextBox2 = New System.Windows.Forms.TextBox() Me.TextBox1 = New System.Windows.Forms.TextBox() Me.Label4 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Panel1.SuspendLayout() Me.SuspendLayout() ' 'Label1 ' Me.Label1.Font = New System.Drawing.Font("Georgia", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label1.Location = New System.Drawing.Point(280, 32) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(288, 56) Me.Label1.TabIndex = 0 Me.Label1.Text = " SubCategory Master" ' 'Panel1 ' Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Panel1.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button3, Me.Button2, Me.Button1, Me.ComboBox1, Me.TextBox2, Me.TextBox1, Me.Label4, Me.Label3, Me.Label2}) Me.Panel1.Location = New System.Drawing.Point(160, 120) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(432, 312) Me.Panel1.TabIndex = 1 ' 'Button3 '

Project Report by: Arumita Kumari (071M3888)

75

Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button3.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button3.Location = New System.Drawing.Point(360, 272) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(64, 32) Me.Button3.TabIndex = 8 Me.Button3.Text = "Exit" ' 'Button2 ' Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button2.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button2.Location = New System.Drawing.Point(288, 272) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(64, 32) Me.Button2.TabIndex = 7 Me.Button2.Text = "Reset" ' 'Button1 ' Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button1.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button1.Location = New System.Drawing.Point(200, 272) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(80, 32) Me.Button1.TabIndex = 6 Me.Button1.Text = "Save" ' 'ComboBox1 Project Report by: Arumita Kumari (071M3888) 76

' Me.ComboBox1.Location = New System.Drawing.Point(200, 168) Me.ComboBox1.Name = "ComboBox1" Me.ComboBox1.Size = New System.Drawing.Size(160, 21) Me.ComboBox1.TabIndex = 5 Me.ComboBox1.Text = "ComboBox1" ' 'TextBox2 ' Me.TextBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox2.Location = New System.Drawing.Point(200, 112) Me.TextBox2.Name = "TextBox2" Me.TextBox2.Size = New System.Drawing.Size(160, 20) Me.TextBox2.TabIndex = 4 Me.TextBox2.Text = "" ' 'TextBox1 ' Me.TextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox1.Location = New System.Drawing.Point(200, 48) Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New System.Drawing.Size(160, 20) Me.TextBox1.TabIndex = 3 Me.TextBox1.Text = "" ' 'Label4 ' Me.Label4.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label4.Location = New System.Drawing.Point(48, 168) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(136, 40) Me.Label4.TabIndex = 2 Me.Label4.Text = "CategoryID" ' 'Label3 '

Project Report by: Arumita Kumari (071M3888)

77

Me.Label3.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label3.Location = New System.Drawing.Point(48, 104) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(136, 40) Me.Label3.TabIndex = 1 Me.Label3.Text = "Description" ' 'Label2 ' Me.Label2.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label2.Location = New System.Drawing.Point(48, 40) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(136, 32) Me.Label2.TabIndex = 0 Me.Label2.Text = "SubCategoryID" ' 'SubCategory ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Beige Me.ClientSize = New System.Drawing.Size(648, 429) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Panel1, Me.Label1}) Me.Name = "SubCategory" Me.Text = "SubCategory" Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.Panel1.ResumeLayout(False) Me.ResumeLayout(False) End Sub #End Region Dim STR As String

Project Report by: Arumita Kumari (071M3888)

78

Private Sub SubCategory_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call connect() STR = "select c_id from category" com = New OleDb.OleDbCommand(Str, con) dr = com.ExecuteReader() ComboBox1.Text = "Select the category" While dr.Read() = True ComboBox1.Items.Add(dr.GetString(0)) End While con.Close() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Close() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Text = "" TextBox2.Text = "" ComboBox1.Text = "select a category" TextBox1.Focus() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox1.Text = "" Then MsgBox("Plz enter the subcategory id") TextBox1.Focus() ElseIf TextBox2.Text = "" Then MsgBox("plz enter the description") TextBox2.Focus() Else Try Call connect() STR = "insert into subcategory (sc_id,c_id,sdesc) values('" & TextBox1.Text & "'" & "," & "'" & ComboBox1.Text & "'," & "'" & TextBox2.Text & "')" com = New OleDb.OleDbCommand(STR, con) com.ExecuteNonQuery() con.Close() Catch ex As Exception Project Report by: Arumita Kumari (071M3888) 79

MsgBox("ID already exists") Exit Sub End Try End If End Sub End Class

Item.vb
Public Class Item Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Project Report by: Arumita Kumari (071M3888) 80

Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox Friend WithEvents ComboBox2 As System.Windows.Forms.ComboBox Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents Label6 As System.Windows.Forms.Label Friend WithEvents TextBox3 As System.Windows.Forms.TextBox Friend WithEvents Label7 As System.Windows.Forms.Label Friend WithEvents TextBox4 As System.Windows.Forms.TextBox Friend WithEvents Label8 As System.Windows.Forms.Label Friend WithEvents ComboBox3 As System.Windows.Forms.ComboBox <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Label1 = New System.Windows.Forms.Label() Me.Panel1 = New System.Windows.Forms.Panel() Me.ComboBox3 = New System.Windows.Forms.ComboBox() Me.Label8 = New System.Windows.Forms.Label() Me.TextBox4 = New System.Windows.Forms.TextBox() Me.Label7 = New System.Windows.Forms.Label() Me.TextBox3 = New System.Windows.Forms.TextBox() Me.Label6 = New System.Windows.Forms.Label() Me.TextBox2 = New System.Windows.Forms.TextBox() Me.Label5 = New System.Windows.Forms.Label() Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.ComboBox2 = New System.Windows.Forms.ComboBox() Me.ComboBox1 = New System.Windows.Forms.ComboBox() Me.TextBox1 = New System.Windows.Forms.TextBox() Me.Label4 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Panel1.SuspendLayout() Me.SuspendLayout() ' 'Label1 Project Report by: Arumita Kumari (071M3888) 81

' Me.Label1.Font = New System.Drawing.Font("Georgia", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label1.Location = New System.Drawing.Point(264, 16) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(296, 48) Me.Label1.TabIndex = 0 Me.Label1.Text = " Item Master" ' 'Panel1 ' Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Panel1.Controls.AddRange(New System.Windows.Forms.Control() {Me.ComboBox3, Me.Label8, Me.TextBox4, Me.Label7, Me.TextBox3, Me.Label6, Me.TextBox2, Me.Label5, Me.Button3, Me.Button2, Me.Button1, Me.ComboBox2, Me.ComboBox1, Me.TextBox1, Me.Label4, Me.Label3, Me.Label2}) Me.Panel1.Location = New System.Drawing.Point(152, 72) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(520, 408) Me.Panel1.TabIndex = 1 ' 'ComboBox3 ' Me.ComboBox3.Items.AddRange(New Object() {"1950", "1951", "1952", "1953", "1954", "1955", "1956", "1957", "1958", "1959", "1960", "1961", "1962", "1963", "1964", "1965", "1966", "1967", "1968", "1969", "1970", "1971", "1972", "1973", "1974", "1975", "1976", "1977", "1978", "1979", "1980", "1981", "1982", "1983", "1984", "1985", "1986", "1987", "1988", "1989", "1990", "1991", "1992", "1993", "1994", "1995", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020"}) Me.ComboBox3.Location = New System.Drawing.Point(216, 160) Me.ComboBox3.Name = "ComboBox3" Me.ComboBox3.Size = New System.Drawing.Size(88, 21) Me.ComboBox3.TabIndex = 15 Me.ComboBox3.Text = "ComboBox3" Project Report by: Arumita Kumari (071M3888) 82

' 'Label8 ' Me.Label8.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label8.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label8.Location = New System.Drawing.Point(40, 160) Me.Label8.Name = "Label8" Me.Label8.Size = New System.Drawing.Size(160, 32) Me.Label8.TabIndex = 14 Me.Label8.Text = "Year" ' 'TextBox4 ' Me.TextBox4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox4.Location = New System.Drawing.Point(216, 64) Me.TextBox4.Name = "TextBox4" Me.TextBox4.Size = New System.Drawing.Size(168, 20) Me.TextBox4.TabIndex = 13 Me.TextBox4.Text = "" ' 'Label7 ' Me.Label7.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label7.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label7.Location = New System.Drawing.Point(40, 64) Me.Label7.Name = "Label7" Me.Label7.Size = New System.Drawing.Size(152, 32) Me.Label7.TabIndex = 12 Me.Label7.Text = "Model Number" ' 'TextBox3 ' Me.TextBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox3.Location = New System.Drawing.Point(216, 312) Me.TextBox3.Name = "TextBox3" Project Report by: Arumita Kumari (071M3888) 83

Me.TextBox3.Size = New System.Drawing.Size(176, 20) Me.TextBox3.TabIndex = 11 Me.TextBox3.Text = "" ' 'Label6 ' Me.Label6.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label6.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label6.Location = New System.Drawing.Point(40, 312) Me.Label6.Name = "Label6" Me.Label6.Size = New System.Drawing.Size(128, 23) Me.Label6.TabIndex = 10 Me.Label6.Text = "Price" ' 'TextBox2 ' Me.TextBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox2.Location = New System.Drawing.Point(216, 120) Me.TextBox2.Name = "TextBox2" Me.TextBox2.Size = New System.Drawing.Size(168, 20) Me.TextBox2.TabIndex = 4 Me.TextBox2.Text = "" ' 'Label5 ' Me.Label5.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label5.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label5.Location = New System.Drawing.Point(40, 112) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(160, 32) Me.Label5.TabIndex = 9 Me.Label5.Text = "Description" ' 'Button3 ' Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat Project Report by: Arumita Kumari (071M3888) 84

Me.Button3.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button3.Location = New System.Drawing.Point(400, 368) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(64, 32) Me.Button3.TabIndex = 9 Me.Button3.Text = "Exit" ' 'Button2 ' Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button2.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button2.Location = New System.Drawing.Point(336, 368) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(56, 32) Me.Button2.TabIndex = 8 Me.Button2.Text = "Reset" ' 'Button1 ' Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button1.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button1.Location = New System.Drawing.Point(264, 368) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(64, 32) Me.Button1.TabIndex = 7 Me.Button1.Text = "Save" ' 'ComboBox2 '

Project Report by: Arumita Kumari (071M3888)

85

Me.ComboBox2.Location = New System.Drawing.Point(216, 264) Me.ComboBox2.Name = "ComboBox2" Me.ComboBox2.Size = New System.Drawing.Size(176, 21) Me.ComboBox2.TabIndex = 6 Me.ComboBox2.Text = "ComboBox2" ' 'ComboBox1 ' Me.ComboBox1.Location = New System.Drawing.Point(216, 216) Me.ComboBox1.Name = "ComboBox1" Me.ComboBox1.Size = New System.Drawing.Size(176, 21) Me.ComboBox1.TabIndex = 5 Me.ComboBox1.Text = "ComboBox1" ' 'TextBox1 ' Me.TextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox1.Location = New System.Drawing.Point(216, 24) Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New System.Drawing.Size(168, 20) Me.TextBox1.TabIndex = 3 Me.TextBox1.Text = "" ' 'Label4 ' Me.Label4.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label4.Location = New System.Drawing.Point(40, 264) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(152, 23) Me.Label4.TabIndex = 2 Me.Label4.Text = "Category ID" ' 'Label3 ' Me.Label3.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Project Report by: Arumita Kumari (071M3888)

86

Me.Label3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label3.Location = New System.Drawing.Point(40, 208) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(152, 23) Me.Label3.TabIndex = 1 Me.Label3.Text = "SubCategory ID" ' 'Label2 ' Me.Label2.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label2.Location = New System.Drawing.Point(40, 16) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(160, 32) Me.Label2.TabIndex = 0 Me.Label2.Text = "Item ID" ' 'Item ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Beige Me.ClientSize = New System.Drawing.Size(752, 541) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Panel1, Me.Label1}) Me.Name = "Item" Me.Text = "Item" Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.Panel1.ResumeLayout(False) Me.ResumeLayout(False) End Sub #End Region Dim str As String Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Close() End Sub

Project Report by: Arumita Kumari (071M3888)

87

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Text = "" TextBox2.Text = "" ComboBox1.Text = "Select subcategory id" ComboBox2.Text = "Select category id" TextBox1.Focus() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox1.Text = "" Then MsgBox("plz enter the Item ID") TextBox1.Focus() Else 'Try Call connect() str = "insert into item (i_code,c_id,sc_id,idesc,price,model_no,yr) values('" & TextBox1.Text & "'" & "," & "'" & RTrim(ComboBox2.Text) & "'," & "'" & RTrim(ComboBox1.Text) & "','" & TextBox2.Text & "'," & TextBox3.Text & ",'" & TextBox4.Text & "','" & ComboBox3.Text & "')" com = New OleDb.OleDbCommand(str, con) com.ExecuteNonQuery() MsgBox("Data entered in Item master ", MsgBoxStyle.Information, "datbase updations") con.Close() 'Catch ex As Exception ' MsgBox("Item ID alreday exists", MsgBoxStyle.Exclamation, "Error") ' TextBox1.Text = "" ' TextBox2.Text = "" 'TextBox1.Focus() 'Exit Sub 'End Try End If End Sub Private Sub Item_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call connect() str = "select sc_id from subcategory" com = New OleDb.OleDbCommand(Str, con) dr = com.ExecuteReader() ComboBox1.Text = "Select the subcategoryID" While dr.Read() = True ComboBox1.Items.Add(dr.GetString(0)) Project Report by: Arumita Kumari (071M3888) 88

End While con.Close() Call connect() str = "select distinct(c_id) from subcategory" com = New OleDb.OleDbCommand(str, con) dr = com.ExecuteReader() ComboBox2.Text = "Select the categoryID" While dr.Read() = True ComboBox2.Items.Add(dr.GetString(0)) End While con.Close() End Sub End Class

UserMaster.vb:
Public Class UserMaster Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer

Project Report by: Arumita Kumari (071M3888)

89

'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents Label6 As System.Windows.Forms.Label Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents TextBox3 As System.Windows.Forms.TextBox Friend WithEvents TextBox4 As System.Windows.Forms.TextBox Friend WithEvents TextBox5 As System.Windows.Forms.TextBox Friend WithEvents Label7 As System.Windows.Forms.Label Friend WithEvents TextBox6 As System.Windows.Forms.TextBox Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Label1 = New System.Windows.Forms.Label() Me.Panel1 = New System.Windows.Forms.Panel() Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.TextBox6 = New System.Windows.Forms.TextBox() Me.Label7 = New System.Windows.Forms.Label() Me.TextBox5 = New System.Windows.Forms.TextBox() Me.TextBox4 = New System.Windows.Forms.TextBox() Me.TextBox3 = New System.Windows.Forms.TextBox() Me.TextBox2 = New System.Windows.Forms.TextBox() Me.TextBox1 = New System.Windows.Forms.TextBox() Me.Label6 = New System.Windows.Forms.Label() Me.Label5 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Panel1.SuspendLayout() Project Report by: Arumita Kumari (071M3888) 90

Me.SuspendLayout() ' 'Label1 ' Me.Label1.Font = New System.Drawing.Font("Georgia", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label1.Location = New System.Drawing.Point(280, 24) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(280, 56) Me.Label1.TabIndex = 0 Me.Label1.Text = " User Master" ' 'Panel1 ' Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Panel1.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button3, Me.Button2, Me.Button1, Me.TextBox6, Me.Label7, Me.TextBox5, Me.TextBox4, Me.TextBox3, Me.TextBox2, Me.TextBox1, Me.Label6, Me.Label5, Me.Label4, Me.Label3, Me.Label2}) Me.Panel1.Location = New System.Drawing.Point(144, 96) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(512, 376) Me.Panel1.TabIndex = 1 ' 'Button3 ' Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button3.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button3.Location = New System.Drawing.Point(440, 336) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(64, 32) Me.Button3.TabIndex = 14 Me.Button3.Text = "Exit" ' Project Report by: Arumita Kumari (071M3888) 91

'Button2 ' Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button2.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button2.Location = New System.Drawing.Point(376, 336) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(56, 32) Me.Button2.TabIndex = 13 Me.Button2.Text = "Reset" ' 'Button1 ' Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button1.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button1.Location = New System.Drawing.Point(304, 336) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(64, 32) Me.Button1.TabIndex = 12 Me.Button1.Text = "Save" ' 'TextBox6 ' Me.TextBox6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox6.Location = New System.Drawing.Point(288, 264) Me.TextBox6.Name = "TextBox6" Me.TextBox6.Size = New System.Drawing.Size(152, 20) Me.TextBox6.TabIndex = 11 Me.TextBox6.Text = "" ' 'Label7 '

Project Report by: Arumita Kumari (071M3888)

92

Me.Label7.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label7.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label7.Location = New System.Drawing.Point(64, 264) Me.Label7.Name = "Label7" Me.Label7.Size = New System.Drawing.Size(112, 23) Me.Label7.TabIndex = 10 Me.Label7.Text = "Designation" ' 'TextBox5 ' Me.TextBox5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox5.Location = New System.Drawing.Point(288, 216) Me.TextBox5.Name = "TextBox5" Me.TextBox5.Size = New System.Drawing.Size(152, 20) Me.TextBox5.TabIndex = 9 Me.TextBox5.Text = "" ' 'TextBox4 ' Me.TextBox4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox4.Location = New System.Drawing.Point(288, 168) Me.TextBox4.Name = "TextBox4" Me.TextBox4.Size = New System.Drawing.Size(152, 20) Me.TextBox4.TabIndex = 8 Me.TextBox4.Text = "" ' 'TextBox3 ' Me.TextBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox3.Location = New System.Drawing.Point(288, 120) Me.TextBox3.Name = "TextBox3" Me.TextBox3.PasswordChar = Microsoft.VisualBasic.ChrW(42) Me.TextBox3.Size = New System.Drawing.Size(152, 20) Me.TextBox3.TabIndex = 7 Me.TextBox3.Text = "" ' Project Report by: Arumita Kumari (071M3888) 93

'TextBox2 ' Me.TextBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox2.Location = New System.Drawing.Point(288, 80) Me.TextBox2.Name = "TextBox2" Me.TextBox2.PasswordChar = Microsoft.VisualBasic.ChrW(42) Me.TextBox2.Size = New System.Drawing.Size(152, 20) Me.TextBox2.TabIndex = 6 Me.TextBox2.Text = "" ' 'TextBox1 ' Me.TextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox1.Location = New System.Drawing.Point(288, 32) Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New System.Drawing.Size(152, 20) Me.TextBox1.TabIndex = 5 Me.TextBox1.Text = "" ' 'Label6 ' Me.Label6.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label6.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label6.Location = New System.Drawing.Point(64, 216) Me.Label6.Name = "Label6" Me.Label6.Size = New System.Drawing.Size(112, 23) Me.Label6.TabIndex = 4 Me.Label6.Text = "LastName" ' 'Label5 ' Me.Label5.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label5.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label5.Location = New System.Drawing.Point(64, 168) Project Report by: Arumita Kumari (071M3888) 94

Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(112, 23) Me.Label5.TabIndex = 3 Me.Label5.Text = "FirstName" ' 'Label4 ' Me.Label4.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label4.Location = New System.Drawing.Point(64, 120) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(216, 23) Me.Label4.TabIndex = 2 Me.Label4.Text = "Confirm Password" ' 'Label3 ' Me.Label3.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label3.Location = New System.Drawing.Point(64, 80) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(112, 23) Me.Label3.TabIndex = 1 Me.Label3.Text = "Password" ' 'Label2 ' Me.Label2.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label2.Location = New System.Drawing.Point(64, 40) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(112, 23) Me.Label2.TabIndex = 0 Me.Label2.Text = "User ID" ' Project Report by: Arumita Kumari (071M3888) 95

'UserMaster ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Beige Me.ClientSize = New System.Drawing.Size(664, 501) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Panel1, Me.Label1}) Me.Name = "UserMaster" Me.Text = "UserMaster" Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.Panel1.ResumeLayout(False) Me.ResumeLayout(False) End Sub #End Region Dim str, userid As String Dim i As Integer Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Close() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox2.Text = "" TextBox3.Text = "" TextBox4.Text = "" TextBox5.Text = "" TextBox6.Text = "" TextBox2.Focus() End Sub Private Sub UserMaster_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim s1 As String Call connect() str = "select u_id from usermaster" com = New OleDb.OleDbCommand(Str, con) dr = com.ExecuteReader() While dr.Read() = True userid = dr.GetString(0) End While Project Report by: Arumita Kumari (071M3888) 96

s1 = CInt(Mid(userid, 2, 1)) If Len(s1) = 1 Then i = CInt(s1) i = i + 1 TextBox1.Text = "U" & i ElseIf Len(s1) = 2 Then i = CInt(s1) i = i + 1 TextBox1.Text = "U" & i ElseIf Len(s1) = 3 Then i = CInt(s1) MsgBox(i) TextBox1.Text = "U" & i End If TextBox1.Enabled = False TextBox2.Focus() con.Close() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox2.Text = "" Then MsgBox("plz enter the password") TextBox2.Focus() ElseIf TextBox3.Text = "" Then MsgBox("plz confirm ur password") TextBox3.Focus() ElseIf TextBox4.Text = "" Then MsgBox("plz enter the fname") TextBox4.Focus() ElseIf TextBox5.Text = "" Then MsgBox("plz enter the last name") TextBox5.Focus() ElseIf TextBox6.Text = "" Then MsgBox("plz enter the designation") TextBox6.Focus() Else If TextBox2.Text = TextBox3.Text Then Call connect() str = "insert into UserMaster (u_id,upassword,ufname,ulname,designation) values('" & TextBox1.Text & "'" & "," & "'" & TextBox3.Text & "','" & TextBox4.Text & "','" & TextBox5.Text & "','" & TextBox6.Text & "')" com = New OleDb.OleDbCommand(str, con) com.ExecuteNonQuery() Project Report by: Arumita Kumari (071M3888) 97

MsgBox("Details have been registered in usermaster ", MsgBoxStyle.Information, "database updates") con.Close() else MsgBox("Ur passwords do not match..plz renter", MsgBoxStyle.Exclamation, "Error") TextBox2.Text = "" TextBox3.Text = "" TextBox2.Focus() End If End If End Sub End Class

Location.vb:
Public Class Location Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer

Project Report by: Arumita Kumari (071M3888)

98

'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Label1 = New System.Windows.Forms.Label() Me.Panel1 = New System.Windows.Forms.Panel() Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.TextBox2 = New System.Windows.Forms.TextBox() Me.TextBox1 = New System.Windows.Forms.TextBox() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Panel1.SuspendLayout() Me.SuspendLayout() ' 'Label1 ' Me.Label1.Font = New System.Drawing.Font("Georgia", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label1.Location = New System.Drawing.Point(224, 32) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(320, 48) Me.Label1.TabIndex = 0 Me.Label1.Text = " Location Master" ' 'Panel1 ' Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Project Report by: Arumita Kumari (071M3888) 99

Me.Panel1.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button3, Me.Button2, Me.Button1, Me.TextBox2, Me.TextBox1, Me.Label3, Me.Label2}) Me.Panel1.Location = New System.Drawing.Point(120, 88) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(464, 320) Me.Panel1.TabIndex = 1 ' 'Button3 ' Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button3.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button3.Location = New System.Drawing.Point(376, 280) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(75, 32) Me.Button3.TabIndex = 8 Me.Button3.Text = "Exit" ' 'Button2 ' Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button2.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button2.Location = New System.Drawing.Point(288, 280) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(75, 32) Me.Button2.TabIndex = 7 Me.Button2.Text = "Reset" ' 'Button1 ' Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat

Project Report by: Arumita Kumari (071M3888)

100

Me.Button1.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button1.Location = New System.Drawing.Point(200, 280) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(75, 32) Me.Button1.TabIndex = 6 Me.Button1.Text = "Save" ' 'TextBox2 ' Me.TextBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox2.Location = New System.Drawing.Point(224, 152) Me.TextBox2.Name = "TextBox2" Me.TextBox2.Size = New System.Drawing.Size(184, 20) Me.TextBox2.TabIndex = 5 Me.TextBox2.Text = "" ' 'TextBox1 ' Me.TextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox1.Location = New System.Drawing.Point(224, 80) Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New System.Drawing.Size(184, 20) Me.TextBox1.TabIndex = 4 Me.TextBox1.Text = "" ' 'Label3 ' Me.Label3.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label3.Location = New System.Drawing.Point(48, 152) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(136, 23) Me.Label3.TabIndex = 3 Me.Label3.Text = "Description" Project Report by: Arumita Kumari (071M3888) 101

' 'Label2 ' Me.Label2.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label2.Location = New System.Drawing.Point(48, 80) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(144, 23) Me.Label2.TabIndex = 2 Me.Label2.Text = "Location Name" ' 'Location ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Beige Me.ClientSize = New System.Drawing.Size(624, 437) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Panel1, Me.Label1}) Me.Name = "Location" Me.Text = "Location" Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.Panel1.ResumeLayout(False) Me.ResumeLayout(False) End Sub #End Region Dim str As String Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Close() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Text = "" TextBox2.Text = "" TextBox1.Focus() End Sub

Project Report by: Arumita Kumari (071M3888)

102

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox1.Text = "" Then MsgBox("plz enter the name") TextBox1.Focus() ElseIf TextBox2.Text = "" Then MsgBox("plz enter the description of location") TextBox2.Focus() Else Call connect() str = "insert into location (l_name,descrp) values('" & TextBox1.Text & "'" & "," & "'" & TextBox2.Text & "')" com = New OleDb.OleDbCommand(str, con) com.ExecuteNonQuery() MsgBox("Data entered in locationmaster ", MsgBoxStyle.Information, "datbase updations") con.Close() End If End Sub End Class

ApplicationLogic.vb:
Public Class ApplicationLogic Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() Project Report by: Arumita Kumari (071M3888) 103

End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents ComboBox2 As System.Windows.Forms.ComboBox Friend WithEvents ComboBox3 As System.Windows.Forms.ComboBox Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents TextBox3 As System.Windows.Forms.TextBox Friend WithEvents Label7 As System.Windows.Forms.Label Friend WithEvents TextBox4 As System.Windows.Forms.TextBox Friend WithEvents TextBox5 As System.Windows.Forms.TextBox Friend WithEvents Label10 As System.Windows.Forms.Label Friend WithEvents Label12 As System.Windows.Forms.Label Friend WithEvents ComboBox5 As System.Windows.Forms.ComboBox Friend WithEvents Label6 As System.Windows.Forms.Label <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Label1 = New System.Windows.Forms.Label() Me.Panel1 = New System.Windows.Forms.Panel() Me.Label6 = New System.Windows.Forms.Label() Me.TextBox5 = New System.Windows.Forms.TextBox() Me.TextBox4 = New System.Windows.Forms.TextBox() Me.Label7 = New System.Windows.Forms.Label() Me.TextBox3 = New System.Windows.Forms.TextBox() Me.TextBox1 = New System.Windows.Forms.TextBox() Project Report by: Arumita Kumari (071M3888) 104

Me.ComboBox3 = New System.Windows.Forms.ComboBox() Me.ComboBox2 = New System.Windows.Forms.ComboBox() Me.Label4 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.Label10 = New System.Windows.Forms.Label() Me.Label12 = New System.Windows.Forms.Label() Me.ComboBox5 = New System.Windows.Forms.ComboBox() Me.Panel1.SuspendLayout() Me.SuspendLayout() ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.Beige Me.Label1.Font = New System.Drawing.Font("Georgia", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label1.Location = New System.Drawing.Point(232, 24) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(312, 48) Me.Label1.TabIndex = 0 Me.Label1.Text = " Application Logic" ' 'Panel1 ' Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Panel1.Controls.AddRange(New System.Windows.Forms.Control() {Me.Label6, Me.TextBox5, Me.TextBox4, Me.Label7, Me.TextBox3, Me.TextBox1, Me.ComboBox3, Me.ComboBox2, Me.Label4, Me.Label3, Me.Button3, Me.Button2, Me.Button1, Me.Label10, Me.Label12, Me.ComboBox5}) Me.Panel1.Location = New System.Drawing.Point(104, 112) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(552, 344) Me.Panel1.TabIndex = 1 ' 'Label6 '

Project Report by: Arumita Kumari (071M3888)

105

Me.Label6.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label6.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label6.Location = New System.Drawing.Point(368, 200) Me.Label6.Name = "Label6" Me.Label6.Size = New System.Drawing.Size(80, 23) Me.Label6.TabIndex = 14 Me.Label6.Text = "per Year" ' 'TextBox5 ' Me.TextBox5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox5.Font = New System.Drawing.Font("Comic Sans MS", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.TextBox5.Location = New System.Drawing.Point(392, 96) Me.TextBox5.Name = "TextBox5" Me.TextBox5.Size = New System.Drawing.Size(136, 26) Me.TextBox5.TabIndex = 13 Me.TextBox5.Text = "" ' 'TextBox4 ' Me.TextBox4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox4.Font = New System.Drawing.Font("Comic Sans MS", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.TextBox4.Location = New System.Drawing.Point(392, 40) Me.TextBox4.Name = "TextBox4" Me.TextBox4.Size = New System.Drawing.Size(136, 26) Me.TextBox4.TabIndex = 12 Me.TextBox4.Text = "" ' 'Label7 ' Me.Label7.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label7.ForeColor = System.Drawing.Color.DarkGoldenrod Project Report by: Arumita Kumari (071M3888) 106

Me.Label7.Location = New System.Drawing.Point(40, 248) Me.Label7.Name = "Label7" Me.Label7.Size = New System.Drawing.Size(144, 24) Me.Label7.TabIndex = 11 Me.Label7.Text = "Date" ' 'TextBox3 ' Me.TextBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox3.Location = New System.Drawing.Point(240, 248) Me.TextBox3.Name = "TextBox3" Me.TextBox3.Size = New System.Drawing.Size(128, 20) Me.TextBox3.TabIndex = 10 Me.TextBox3.Text = "" ' 'TextBox1 ' Me.TextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox1.Location = New System.Drawing.Point(240, 200) Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New System.Drawing.Size(128, 20) Me.TextBox1.TabIndex = 8 Me.TextBox1.Text = "" ' 'ComboBox3 ' Me.ComboBox3.Location = New System.Drawing.Point(240, 40) Me.ComboBox3.Name = "ComboBox3" Me.ComboBox3.Size = New System.Drawing.Size(128, 21) Me.ComboBox3.TabIndex = 7 Me.ComboBox3.Text = "ComboBox3" ' 'ComboBox2 ' Me.ComboBox2.Location = New System.Drawing.Point(240, 96) Me.ComboBox2.Name = "ComboBox2" Me.ComboBox2.Size = New System.Drawing.Size(128, 21) Me.ComboBox2.TabIndex = 6 Me.ComboBox2.Text = "ComboBox2" ' Project Report by: Arumita Kumari (071M3888) 107

'Label4 ' Me.Label4.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label4.Location = New System.Drawing.Point(48, 40) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(152, 23) Me.Label4.TabIndex = 2 Me.Label4.Text = "Item ID" ' 'Label3 ' Me.Label3.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label3.Location = New System.Drawing.Point(40, 96) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(152, 23) Me.Label3.TabIndex = 1 Me.Label3.Text = "SubCategory ID" ' 'Button3 ' Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button3.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button3.Location = New System.Drawing.Point(472, 304) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(75, 32) Me.Button3.TabIndex = 4 Me.Button3.Text = "Exit" ' 'Button2 '

Project Report by: Arumita Kumari (071M3888)

108

Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button2.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button2.Location = New System.Drawing.Point(392, 304) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(75, 32) Me.Button2.TabIndex = 3 Me.Button2.Text = "Reset" ' 'Button1 ' Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button1.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button1.Location = New System.Drawing.Point(312, 304) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(75, 32) Me.Button1.TabIndex = 2 Me.Button1.Text = "Save" ' 'Label10 ' Me.Label10.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label10.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label10.Location = New System.Drawing.Point(40, 200) Me.Label10.Name = "Label10" Me.Label10.Size = New System.Drawing.Size(168, 23) Me.Label10.TabIndex = 3 Me.Label10.Text = "Depreciation Rate" ' 'Label12 '

Project Report by: Arumita Kumari (071M3888)

109

Me.Label12.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label12.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label12.Location = New System.Drawing.Point(40, 144) Me.Label12.Name = "Label12" Me.Label12.Size = New System.Drawing.Size(152, 23) Me.Label12.TabIndex = 0 Me.Label12.Text = "Category ID" ' 'ComboBox5 ' Me.ComboBox5.Location = New System.Drawing.Point(240, 144) Me.ComboBox5.Name = "ComboBox5" Me.ComboBox5.Size = New System.Drawing.Size(128, 21) Me.ComboBox5.TabIndex = 5 Me.ComboBox5.Text = "ComboBox1" ' 'ApplicationLogic ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Beige Me.ClientSize = New System.Drawing.Size(704, 469) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Panel1, Me.Label1}) Me.Name = "ApplicationLogic" Me.Text = "ApplicationLogic" Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.Panel1.ResumeLayout(False) Me.ResumeLayout(False) End Sub #End Region Dim Str As String Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Close() End Sub

Project Report by: Arumita Kumari (071M3888)

110

Private Sub ApplicationLogic_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call connect() ComboBox3.Text = "None" Str = "select i_code from item" com = New OleDb.OleDbCommand(Str, con) dr = com.ExecuteReader() While dr.Read() = True ComboBox3.Items.Add(dr.GetString(0)) End While con.Close() End Sub

Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox2.SelectedIndexChanged Call connect() Try Str = "select sdesc from subcategory where sc_id='" & RTrim(ComboBox2.Text) & "'" com = New OleDb.OleDbCommand(Str, con) dr = com.ExecuteReader() While dr.Read() = True TextBox5.Text = dr.GetString(0) End While TextBox5.Enabled = False Catch ex As Exception MsgBox(ex.Message) End Try con.Close() End Sub Private Sub ComboBox2_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox2.Leave Call connect() Try Str = "select distinct(c_id) from item where i_code='" & RTrim(ComboBox3.Text) & "'" com = New OleDb.OleDbCommand(Str, con) dr = com.ExecuteReader() ComboBox5.Items.Clear() ComboBox5.Text = "none" While dr.Read() = True Project Report by: Arumita Kumari (071M3888) 111

ComboBox5.Items.Add(dr.GetString(0)) End While Catch ex As Exception MsgBox(ex.Message) End Try con.Close() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim icode As String If TextBox1.Text <> "" Then Call connect() icode = "select i_code from applicationlogic where i_code='" & RTrim(ComboBox3.Text) & "'" com = New OleDb.OleDbCommand(icode, con) dr = com.ExecuteReader() If dr.Read = True Then MsgBox("The Data already exists for this Item code") ComboBox3.Text = "None" TextBox4.Text = "" ComboBox2.Text = "None" TextBox5.Text = "" ComboBox5.Text = "None" TextBox1.Text = "" TextBox3.Text = "" con.Close() Else Call connect() Str = "insert into applicationlogic (c_id,sc_id,i_code,deprcrate,date) values('" & RTrim(ComboBox5.Text) & "'" & "," & "'" & RTrim(ComboBox2.Text) & "','" & RTrim(ComboBox3.Text) & "'," & TextBox1.Text & ",'" & TextBox3.Text & "')" com = New OleDb.OleDbCommand(Str, con) com.ExecuteNonQuery() MsgBox("Details have been registered in usermaster ", MsgBoxStyle.Information, "database updates") con.Close() End If Else MsgBox("Please enter the Depreciation Rate") TextBox1.Focus() End If Project Report by: Arumita Kumari (071M3888) 112

End Sub Private Sub ComboBox3_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox3.SelectedIndexChanged Call connect() Try Str = "select idesc from item where i_code='" & RTrim(ComboBox3.Text) & "'" com = New OleDb.OleDbCommand(Str, con) dr = com.ExecuteReader() While dr.Read() = True TextBox4.Text = dr.GetString(0) End While TextBox4.Enabled = False Catch ex As Exception MsgBox(ex.Message) End Try con.Close() End Sub Private Sub ComboBox3_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox3.Leave Call connect() Try Str = "select sc_id from item where i_code='" & RTrim(ComboBox3.Text) & "'" com = New OleDb.OleDbCommand(Str, con) dr = com.ExecuteReader() ComboBox2.Items.Clear() ComboBox2.Text = "none" While dr.Read() = True ComboBox2.Items.Add(dr.GetString(0)) End While TextBox4.Enabled = False Catch ex As Exception MsgBox(ex.Message) End Try con.Close() End Sub End Class

InitialValuation.vb:
Public Class InitialValuation Inherits System.Windows.Forms.Form

Project Report by: Arumita Kumari (071M3888)

113

#Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents ComboBox3 As System.Windows.Forms.ComboBox Friend WithEvents ComboBox2 As System.Windows.Forms.ComboBox Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox Friend WithEvents Label6 As System.Windows.Forms.Label Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Project Report by: Arumita Kumari (071M3888) 114

Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Label13 As System.Windows.Forms.Label Friend WithEvents Label14 As System.Windows.Forms.Label Friend WithEvents Label7 As System.Windows.Forms.Label Friend WithEvents TextBox3 As System.Windows.Forms.TextBox Friend WithEvents Button4 As System.Windows.Forms.Button Friend WithEvents Label8 As System.Windows.Forms.Label Friend WithEvents TextBox4 As System.Windows.Forms.TextBox Friend WithEvents Label10 As System.Windows.Forms.Label Friend WithEvents TextBox5 As System.Windows.Forms.TextBox Friend WithEvents Label9 As System.Windows.Forms.Label Friend WithEvents TextBox6 As System.Windows.Forms.TextBox <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Label1 = New System.Windows.Forms.Label() Me.Panel1 = New System.Windows.Forms.Panel() Me.TextBox6 = New System.Windows.Forms.TextBox() Me.Label9 = New System.Windows.Forms.Label() Me.TextBox5 = New System.Windows.Forms.TextBox() Me.Label10 = New System.Windows.Forms.Label() Me.TextBox4 = New System.Windows.Forms.TextBox() Me.Label8 = New System.Windows.Forms.Label() Me.Button4 = New System.Windows.Forms.Button() Me.TextBox3 = New System.Windows.Forms.TextBox() Me.Label7 = New System.Windows.Forms.Label() Me.TextBox2 = New System.Windows.Forms.TextBox() Me.TextBox1 = New System.Windows.Forms.TextBox() Me.ComboBox3 = New System.Windows.Forms.ComboBox() Me.ComboBox2 = New System.Windows.Forms.ComboBox() Me.ComboBox1 = New System.Windows.Forms.ComboBox() Me.Label6 = New System.Windows.Forms.Label() Me.Label5 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.Label13 = New System.Windows.Forms.Label() Me.Label14 = New System.Windows.Forms.Label() Project Report by: Arumita Kumari (071M3888) 115

Me.Panel1.SuspendLayout() Me.SuspendLayout() ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.FromArgb(CType(192, Byte), CType(192, Byte), CType(255, Byte)) Me.Label1.Font = New System.Drawing.Font("Comic Sans MS", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.Indigo Me.Label1.Location = New System.Drawing.Point(6, -72) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(312, 57) Me.Label1.TabIndex = 2 Me.Label1.Text = " Application Logic" ' 'Panel1 ' Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Panel1.Controls.AddRange(New System.Windows.Forms.Control() {Me.TextBox6, Me.Label9, Me.TextBox5, Me.Label10, Me.TextBox4, Me.Label8, Me.Button4, Me.TextBox3, Me.Label7, Me.TextBox2, Me.TextBox1, Me.ComboBox3, Me.ComboBox2, Me.ComboBox1, Me.Label6, Me.Label5, Me.Label4, Me.Label3, Me.Label2, Me.Button3, Me.Button2, Me.Button1, Me.Label13}) Me.Panel1.Location = New System.Drawing.Point(120, 88) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(616, 392) Me.Panel1.TabIndex = 3 ' 'TextBox6 ' Me.TextBox6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox6.Location = New System.Drawing.Point(512, 216) Me.TextBox6.Name = "TextBox6" Me.TextBox6.Size = New System.Drawing.Size(80, 20) Me.TextBox6.TabIndex = 18 Me.TextBox6.Text = "" ' Project Report by: Arumita Kumari (071M3888) 116

'Label9 ' Me.Label9.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label9.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label9.Location = New System.Drawing.Point(336, 216) Me.Label9.Name = "Label9" Me.Label9.Size = New System.Drawing.Size(168, 23) Me.Label9.TabIndex = 17 Me.Label9.Text = "Year of Valuation" ' 'TextBox5 ' Me.TextBox5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox5.Location = New System.Drawing.Point(512, 160) Me.TextBox5.Name = "TextBox5" Me.TextBox5.Size = New System.Drawing.Size(80, 20) Me.TextBox5.TabIndex = 16 Me.TextBox5.Text = "" ' 'Label10 ' Me.Label10.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label10.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label10.Location = New System.Drawing.Point(368, 160) Me.Label10.Name = "Label10" Me.Label10.Size = New System.Drawing.Size(64, 23) Me.Label10.TabIndex = 15 Me.Label10.Text = "Year" ' 'TextBox4 ' Me.TextBox4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox4.Location = New System.Drawing.Point(248, 160) Me.TextBox4.Name = "TextBox4" Me.TextBox4.Size = New System.Drawing.Size(96, 20) Project Report by: Arumita Kumari (071M3888) 117

Me.TextBox4.TabIndex = 14 Me.TextBox4.Text = "" ' 'Label8 ' Me.Label8.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label8.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label8.Location = New System.Drawing.Point(40, 168) Me.Label8.Name = "Label8" Me.Label8.Size = New System.Drawing.Size(144, 23) Me.Label8.TabIndex = 13 Me.Label8.Text = "Price" ' 'Button4 ' Me.Button4.BackColor = System.Drawing.Color.DarkGoldenrod Me.Button4.Font = New System.Drawing.Font("Georgia", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button4.ForeColor = System.Drawing.Color.Beige Me.Button4.Location = New System.Drawing.Point(376, 312) Me.Button4.Name = "Button4" Me.Button4.Size = New System.Drawing.Size(72, 24) Me.Button4.TabIndex = 12 Me.Button4.Text = "Calculate" ' 'TextBox3 ' Me.TextBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox3.Location = New System.Drawing.Point(248, 312) Me.TextBox3.Name = "TextBox3" Me.TextBox3.Size = New System.Drawing.Size(112, 20) Me.TextBox3.TabIndex = 11 Me.TextBox3.Text = "" ' 'Label7 '

Project Report by: Arumita Kumari (071M3888)

118

Me.Label7.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label7.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label7.Location = New System.Drawing.Point(40, 312) Me.Label7.Name = "Label7" Me.Label7.Size = New System.Drawing.Size(144, 23) Me.Label7.TabIndex = 10 Me.Label7.Text = "Valuation" ' 'TextBox2 ' Me.TextBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox2.Location = New System.Drawing.Point(512, 264) Me.TextBox2.Name = "TextBox2" Me.TextBox2.Size = New System.Drawing.Size(80, 20) Me.TextBox2.TabIndex = 9 Me.TextBox2.Text = "" ' 'TextBox1 ' Me.TextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox1.Location = New System.Drawing.Point(248, 208) Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New System.Drawing.Size(48, 20) Me.TextBox1.TabIndex = 8 Me.TextBox1.Text = "" ' 'ComboBox3 ' Me.ComboBox3.Location = New System.Drawing.Point(248, 32) Me.ComboBox3.Name = "ComboBox3" Me.ComboBox3.Size = New System.Drawing.Size(128, 21) Me.ComboBox3.TabIndex = 7 Me.ComboBox3.Text = "ComboBox3" ' 'ComboBox2 ' Me.ComboBox2.Location = New System.Drawing.Point(248, 80) Project Report by: Arumita Kumari (071M3888) 119

Me.ComboBox2.Name = "ComboBox2" Me.ComboBox2.Size = New System.Drawing.Size(128, 21) Me.ComboBox2.TabIndex = 6 Me.ComboBox2.Text = "ComboBox2" ' 'ComboBox1 ' Me.ComboBox1.Location = New System.Drawing.Point(248, 120) Me.ComboBox1.Name = "ComboBox1" Me.ComboBox1.Size = New System.Drawing.Size(128, 21) Me.ComboBox1.TabIndex = 5 Me.ComboBox1.Text = "ComboBox1" ' 'Label6 ' Me.Label6.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label6.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label6.Location = New System.Drawing.Point(344, 264) Me.Label6.Name = "Label6" Me.Label6.Size = New System.Drawing.Size(160, 23) Me.Label6.TabIndex = 4 Me.Label6.Text = "Number of Years" ' 'Label5 ' Me.Label5.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label5.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label5.Location = New System.Drawing.Point(40, 208) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(192, 23) Me.Label5.TabIndex = 3 Me.Label5.Text = "Depreciation Rate(%)" ' 'Label4 ' Me.Label4.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Project Report by: Arumita Kumari (071M3888) 120

Me.Label4.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label4.Location = New System.Drawing.Point(40, 32) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(144, 23) Me.Label4.TabIndex = 2 Me.Label4.Text = "Item ID" ' 'Label3 ' Me.Label3.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label3.Location = New System.Drawing.Point(40, 80) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(144, 23) Me.Label3.TabIndex = 1 Me.Label3.Text = "SubCategory ID" ' 'Label2 ' Me.Label2.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label2.Location = New System.Drawing.Point(40, 120) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(144, 23) Me.Label2.TabIndex = 0 Me.Label2.Text = "Category ID" ' 'Button3 ' Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button3.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.DarkGoldenrod

Project Report by: Arumita Kumari (071M3888)

121

Me.Button3.Location = New System.Drawing.Point(536, 352) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(75, 32) Me.Button3.TabIndex = 4 Me.Button3.Text = "Exit" ' 'Button2 ' Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button2.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button2.Location = New System.Drawing.Point(456, 352) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(75, 32) Me.Button2.TabIndex = 3 Me.Button2.Text = "Reset" ' 'Button1 ' Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button1.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button1.Location = New System.Drawing.Point(376, 352) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(75, 32) Me.Button1.TabIndex = 2 Me.Button1.Text = "Save" ' 'Label13 ' Me.Label13.Font = New System.Drawing.Font("Comic Sans MS", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label13.ForeColor = System.Drawing.Color.Indigo Me.Label13.Location = New System.Drawing.Point(40, 80) Project Report by: Arumita Kumari (071M3888) 122

Me.Label13.Name = "Label13" Me.Label13.Size = New System.Drawing.Size(144, 23) Me.Label13.TabIndex = 1 Me.Label13.Text = "SubCategory ID" ' 'Label14 ' Me.Label14.Font = New System.Drawing.Font("Georgia", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label14.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label14.Location = New System.Drawing.Point(264, 16) Me.Label14.Name = "Label14" Me.Label14.Size = New System.Drawing.Size(328, 40) Me.Label14.TabIndex = 4 Me.Label14.Text = " Initial Valuation" ' 'InitialValuation ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Beige Me.ClientSize = New System.Drawing.Size(792, 501) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Label14, Me.Label1, Me.Panel1}) Me.Name = "InitialValuation" Me.Text = "InitialValuation" Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.Panel1.ResumeLayout(False) Me.ResumeLayout(False) End Sub #End Region Dim Str As String Dim yrs As Integer Private Sub InitialValuation_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call connect() ComboBox1.Text = "None" Str = "select i_code from applicationlogic" com = New OleDb.OleDbCommand(Str, con) Project Report by: Arumita Kumari (071M3888) 123

dr = com.ExecuteReader() While dr.Read() = True ComboBox3.Items.Add(dr.GetString(0)) End While con.Close() End Sub Private Sub ComboBox2_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox2.Leave Call connect() Try Str = "select c_id from applicationlogic where i_code='" & RTrim(ComboBox3.Text) & "'" com = New OleDb.OleDbCommand(Str, con) dr = com.ExecuteReader() ComboBox1.Items.Clear() ComboBox1.Text = "none" While dr.Read() = True ComboBox1.Items.Add(dr.GetString(0)) End While Catch ex As Exception MsgBox(ex.Message) End Try con.Close() End Sub Private Sub ComboBox3_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox3.Leave Call connect() Try Str = "select sc_id from applicationlogic where i_code='" & RTrim(ComboBox3.Text) & "'" com = New OleDb.OleDbCommand(Str, con) dr = com.ExecuteReader() ComboBox2.Items.Clear() ComboBox2.Text = "none" While dr.Read() = True ComboBox2.Items.Add(dr.GetString(0)) End While Catch ex As Exception MsgBox(ex.Message) End Try con.Close() Dim i1, i2, i3 As Integer Project Report by: Arumita Kumari (071M3888) 124

Call connect() Try Str = "select price,yr from item where i_code='" & RTrim(ComboBox3.Text) & "'" com = New OleDb.OleDbCommand(Str, con) dr = com.ExecuteReader() While dr.Read() = True i1 = dr.GetInt32(0) TextBox4.Text = CStr(i1) TextBox5.Text = dr.GetString(1) End While Catch ex As Exception MsgBox(ex.Message) End Try con.Close() Call connect() Try Str = "select deprcrate from applicationlogic where i_code='" & RTrim(ComboBox3.Text) & "'" com = New OleDb.OleDbCommand(Str, con) dr = com.ExecuteReader() While dr.Read() = True i2 = dr.GetInt32(0) TextBox1.Text = CStr(i2) End While Catch ex As Exception MsgBox(ex.Message) End Try con.Close() End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim val, price, depr, yrs, x As Decimal Dim s As String price = CInt(TextBox4.Text) depr = CInt(TextBox1.Text) depr = depr * 0.01 'MsgBox(CStr(depr)) yrs = CInt(TextBox2.Text) x = (depr * price * yrs) 'MsgBox(CStr(x)) val = price - x s = CStr(val) TextBox3.Text = s TextBox3.Enabled = False Project Report by: Arumita Kumari (071M3888) 125

End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Close() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox4.Text = "" TextBox1.Text = "" TextBox2.Text = "" End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim icode As String Call connect() icode = "select i_code from initialvaluation where i_code='" & RTrim(ComboBox3.Text) & "'" com = New OleDb.OleDbCommand(icode, con) dr = com.ExecuteReader() If dr.Read = True Then MsgBox("The Data already exists for this Item code") con.Close() Else ' Call connect() ' Dim upstr As String ' upstr = "update item set current_yr='" & TextBox6.Text & "', current_value=" & CInt(TextBox3.Text) & " where i_code ='" & Trim(ComboBox3.Text) & "'" ' com = New OleDb.OleDbCommand(upstr, con) ' com.ExecuteNonQuery() ' con.Close() Call entry() End If End Sub Sub entry() Call connect() MsgBox(ComboBox1.Text) Str = "insert into initialvaluation (c_id,sc_id,i_code,price,deprcrate,yrs,valuation,item_year,v aluation_year) values('" & RTrim(ComboBox1.Text) & "'" & "," & "'" & RTrim(ComboBox2.Text) & "','" & RTrim(ComboBox3.Text) & "'," & TextBox4.Text & "," & Project Report by: Arumita Kumari (071M3888) 126

TextBox1.Text & "," & TextBox2.Text & "," & TextBox3.Text & ",'" & RTrim(TextBox5.Text) & "','" & RTrim(TextBox6.Text) & "')" com = New OleDb.OleDbCommand(Str, con) com.ExecuteNonQuery() MsgBox("Details have been registered in valuationmaster ", MsgBoxStyle.Information, "database updates") con.Close() End Sub Private Sub TextBox6_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox6.Leave If Val(TextBox6.Text) <> 0 Then yrs = CInt(TextBox6.Text) - CInt(TextBox5.Text) TextBox2.Text = CStr(yrs) Else MsgBox("Please enter the Year") TextBox6.Focus() End If End Sub End Class

Purchase.vb:
Public Class Purchase Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then Project Report by: Arumita Kumari (071M3888) 127

components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents TextBox7 As System.Windows.Forms.TextBox Friend WithEvents Label9 As System.Windows.Forms.Label Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox Friend WithEvents TextBox4 As System.Windows.Forms.TextBox Friend WithEvents TextBox3 As System.Windows.Forms.TextBox Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Label8 As System.Windows.Forms.Label Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label10 As System.Windows.Forms.Label Friend WithEvents TextBox8 As System.Windows.Forms.TextBox Friend WithEvents Label11 As System.Windows.Forms.Label Friend WithEvents ComboBox2 As System.Windows.Forms.ComboBox <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Label1 = New System.Windows.Forms.Label() Me.Panel1 = New System.Windows.Forms.Panel() Me.ComboBox2 = New System.Windows.Forms.ComboBox() Project Report by: Arumita Kumari (071M3888) 128

Me.Label11 = New System.Windows.Forms.Label() Me.TextBox8 = New System.Windows.Forms.TextBox() Me.Label10 = New System.Windows.Forms.Label() Me.TextBox7 = New System.Windows.Forms.TextBox() Me.Label9 = New System.Windows.Forms.Label() Me.ComboBox1 = New System.Windows.Forms.ComboBox() Me.TextBox4 = New System.Windows.Forms.TextBox() Me.TextBox3 = New System.Windows.Forms.TextBox() Me.TextBox2 = New System.Windows.Forms.TextBox() Me.TextBox1 = New System.Windows.Forms.TextBox() Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.Label8 = New System.Windows.Forms.Label() Me.Label5 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Panel1.SuspendLayout() Me.SuspendLayout() ' 'Label1 ' Me.Label1.Font = New System.Drawing.Font("Georgia", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label1.Location = New System.Drawing.Point(248, 24) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(328, 40) Me.Label1.TabIndex = 2 Me.Label1.Text = " Purchase Data Entry" ' 'Panel1 ' Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Panel1.Controls.AddRange(New System.Windows.Forms.Control() {Me.ComboBox2, Me.Label11, Me.TextBox8, Me.Label10, Me.TextBox7, Me.Label9, Me.ComboBox1, Me.TextBox4, Me.TextBox3, Me.TextBox2, Me.TextBox1, Me.Button3, Me.Button2, Me.Button1, Me.Label8, Me.Label5, Me.Label4, Me.Label3, Me.Label2}) Me.Panel1.Location = New System.Drawing.Point(88, 80) Project Report by: Arumita Kumari (071M3888) 129

Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(640, 416) Me.Panel1.TabIndex = 3 ' 'ComboBox2 ' Me.ComboBox2.Location = New System.Drawing.Point(296, 264) Me.ComboBox2.Name = "ComboBox2" Me.ComboBox2.Size = New System.Drawing.Size(144, 21) Me.ComboBox2.TabIndex = 22 Me.ComboBox2.Text = "ComboBox2" ' 'Label11 ' Me.Label11.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label11.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label11.Location = New System.Drawing.Point(80, 264) Me.Label11.Name = "Label11" Me.Label11.Size = New System.Drawing.Size(144, 32) Me.Label11.TabIndex = 21 Me.Label11.Text = "Location" ' 'TextBox8 ' Me.TextBox8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox8.Location = New System.Drawing.Point(296, 224) Me.TextBox8.Name = "TextBox8" Me.TextBox8.Size = New System.Drawing.Size(144, 20) Me.TextBox8.TabIndex = 20 Me.TextBox8.Text = "" ' 'Label10 ' Me.Label10.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label10.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label10.Location = New System.Drawing.Point(80, 224) Project Report by: Arumita Kumari (071M3888) 130

Me.Label10.Name = "Label10" Me.Label10.Size = New System.Drawing.Size(152, 32) Me.Label10.TabIndex = 19 Me.Label10.Text = "Date Of Service" ' 'TextBox7 ' Me.TextBox7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox7.Location = New System.Drawing.Point(296, 64) Me.TextBox7.Name = "TextBox7" Me.TextBox7.Size = New System.Drawing.Size(144, 20) Me.TextBox7.TabIndex = 18 Me.TextBox7.Text = "" ' 'Label9 ' Me.Label9.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label9.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label9.Location = New System.Drawing.Point(80, 64) Me.Label9.Name = "Label9" Me.Label9.Size = New System.Drawing.Size(144, 24) Me.Label9.TabIndex = 17 Me.Label9.Text = "Model Number" ' 'ComboBox1 ' Me.ComboBox1.Location = New System.Drawing.Point(296, 16) Me.ComboBox1.Name = "ComboBox1" Me.ComboBox1.Size = New System.Drawing.Size(144, 21) Me.ComboBox1.TabIndex = 14 Me.ComboBox1.Text = "ComboBox1" ' 'TextBox4 ' Me.TextBox4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox4.Location = New System.Drawing.Point(296, 304) Me.TextBox4.Name = "TextBox4" Me.TextBox4.Size = New System.Drawing.Size(144, 20) Project Report by: Arumita Kumari (071M3888) 131

Me.TextBox4.TabIndex = 13 Me.TextBox4.Text = "" ' 'TextBox3 ' Me.TextBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox3.Location = New System.Drawing.Point(296, 184) Me.TextBox3.Name = "TextBox3" Me.TextBox3.Size = New System.Drawing.Size(144, 20) Me.TextBox3.TabIndex = 12 Me.TextBox3.Text = "" ' 'TextBox2 ' Me.TextBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox2.Location = New System.Drawing.Point(296, 152) Me.TextBox2.Name = "TextBox2" Me.TextBox2.Size = New System.Drawing.Size(144, 20) Me.TextBox2.TabIndex = 11 Me.TextBox2.Text = "" ' 'TextBox1 ' Me.TextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox1.Location = New System.Drawing.Point(296, 104) Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New System.Drawing.Size(144, 20) Me.TextBox1.TabIndex = 10 Me.TextBox1.Text = "" ' 'Button3 ' Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button3.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button3.Location = New System.Drawing.Point(552, 368) Project Report by: Arumita Kumari (071M3888) 132

Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(75, 32) Me.Button3.TabIndex = 9 Me.Button3.Text = "Exit" ' 'Button2 ' Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button2.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button2.Location = New System.Drawing.Point(472, 368) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(75, 32) Me.Button2.TabIndex = 8 Me.Button2.Text = "Reset" ' 'Button1 ' Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button1.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button1.Location = New System.Drawing.Point(392, 368) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(75, 32) Me.Button1.TabIndex = 7 Me.Button1.Text = "Save" ' 'Label8 ' Me.Label8.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label8.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label8.Location = New System.Drawing.Point(80, 184) Me.Label8.Name = "Label8" Project Report by: Arumita Kumari (071M3888) 133

Me.Label8.Size = New System.Drawing.Size(176, 32) Me.Label8.TabIndex = 6 Me.Label8.Text = "Date Of Purchase" ' 'Label5 ' Me.Label5.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label5.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label5.Location = New System.Drawing.Point(80, 304) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(112, 24) Me.Label5.TabIndex = 3 Me.Label5.Text = "Price" ' 'Label4 ' Me.Label4.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label4.Location = New System.Drawing.Point(80, 144) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(112, 23) Me.Label4.TabIndex = 2 Me.Label4.Text = "Category ID" ' 'Label3 ' Me.Label3.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label3.Location = New System.Drawing.Point(80, 104) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(152, 24) Me.Label3.TabIndex = 1 Me.Label3.Text = "SubCategory ID" ' 'Label2 Project Report by: Arumita Kumari (071M3888) 134

' Me.Label2.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label2.Location = New System.Drawing.Point(80, 16) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(120, 32) Me.Label2.TabIndex = 0 Me.Label2.Text = "Item ID" ' 'Purchase ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Beige Me.ClientSize = New System.Drawing.Size(768, 565) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Label1, Me.Panel1}) Me.Name = "Purchase" Me.Text = "Purchase" Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.Panel1.ResumeLayout(False) Me.ResumeLayout(False) End Sub #End Region Dim Str, str1 As String Private Sub Purchase_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ComboBox1.Text = "None" Call connect() Str = "select i_code from item" com = New OleDb.OleDbCommand(Str, con) dr = com.ExecuteReader() While dr.Read() = True ComboBox1.Items.Add(dr.GetString(0)) End While con.Close() Call connect() ComboBox2.Text = "None" str1 = "select l_name from location" com = New OleDb.OleDbCommand(str1, con) Project Report by: Arumita Kumari (071M3888) 135

dr = com.ExecuteReader() While dr.Read() = True ComboBox2.Items.Add(dr.GetString(0)) End While con.Close() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Me.Close() End Sub Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged Call connect() Str = "select * from item where i_code='" & ComboBox1.Text & "'" com = New OleDb.OleDbCommand(Str, con) dr = com.ExecuteReader() While dr.Read() = True TextBox1.Text = dr.GetString(2) TextBox2.Text = dr.GetString(1) Dim i As Integer = dr.GetInt32(4) TextBox4.Text = CStr(i) TextBox7.Text = dr.GetString(5) End While TextBox1.Enabled = False TextBox2.Enabled = False TextBox4.Enabled = False TextBox7.Enabled = False con.Close() TextBox3.Focus() End Sub Private Sub TextBox5_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim icode As String Call connect()

Project Report by: Arumita Kumari (071M3888)

136

icode = "select i_code from purchase_entry where i_code='" & RTrim(ComboBox1.Text) & "'" com = New OleDb.OleDbCommand(icode, con) dr = com.ExecuteReader() If dr.Read = True Then MsgBox("The Data already exists for this Item code") ComboBox1.Text = "None" TextBox3.Focus() con.Close() Else Call connect() Str = "insert into purchase_entry (i_code,model_no,sc_id,c_id,cdate,cdateservice,location,pric e) values('" & RTrim(ComboBox1.Text) & "'" & "," & "'" & RTrim(TextBox7.Text) & "','" & RTrim(TextBox1.Text) & "','" & RTrim(TextBox2.Text) & "','" & RTrim(TextBox3.Text) & "','" & RTrim(TextBox8.Text) & "','" & RTrim(ComboBox2.Text) & "'," & RTrim(TextBox4.Text) & ")" com = New OleDb.OleDbCommand(Str, con) com.ExecuteNonQuery() MsgBox("Details have been registered in assetTable ", MsgBoxStyle.Information, "Existing Data Entry") con.Close() End If End Sub End Class

CurrentYear_Value.vb:
Public Class CurrentYear_Value Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub Project Report by: Arumita Kumari (071M3888) 137

'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents Label8 As System.Windows.Forms.Label Friend WithEvents TextBox4 As System.Windows.Forms.TextBox Friend WithEvents Label7 As System.Windows.Forms.Label Friend WithEvents TextBox3 As System.Windows.Forms.TextBox Friend WithEvents Label6 As System.Windows.Forms.Label Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents ComboBox4 As System.Windows.Forms.ComboBox Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents TextBox5 As System.Windows.Forms.TextBox Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents TextBox6 As System.Windows.Forms.TextBox Friend WithEvents Button4 As System.Windows.Forms.Button Friend WithEvents Label9 As System.Windows.Forms.Label Project Report by: Arumita Kumari (071M3888) 138

Friend WithEvents TextBox7 As System.Windows.Forms.TextBox Friend WithEvents Label10 As System.Windows.Forms.Label Friend WithEvents TextBox8 As System.Windows.Forms.TextBox Friend WithEvents Button5 As System.Windows.Forms.Button Friend WithEvents TextBox9 As System.Windows.Forms.TextBox <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Panel1 = New System.Windows.Forms.Panel() Me.TextBox9 = New System.Windows.Forms.TextBox() Me.Button5 = New System.Windows.Forms.Button() Me.TextBox8 = New System.Windows.Forms.TextBox() Me.Label10 = New System.Windows.Forms.Label() Me.TextBox7 = New System.Windows.Forms.TextBox() Me.Label9 = New System.Windows.Forms.Label() Me.Button4 = New System.Windows.Forms.Button() Me.TextBox6 = New System.Windows.Forms.TextBox() Me.Label4 = New System.Windows.Forms.Label() Me.TextBox5 = New System.Windows.Forms.TextBox() Me.Label3 = New System.Windows.Forms.Label() Me.TextBox1 = New System.Windows.Forms.TextBox() Me.ComboBox4 = New System.Windows.Forms.ComboBox() Me.Label8 = New System.Windows.Forms.Label() Me.TextBox4 = New System.Windows.Forms.TextBox() Me.Label7 = New System.Windows.Forms.Label() Me.TextBox3 = New System.Windows.Forms.TextBox() Me.Label6 = New System.Windows.Forms.Label() Me.TextBox2 = New System.Windows.Forms.TextBox() Me.Label5 = New System.Windows.Forms.Label() Me.Button3 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.Label2 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.Panel1.SuspendLayout() Me.SuspendLayout() ' 'Panel1 ' Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.Panel1.Controls.AddRange(New System.Windows.Forms.Control() {Me.TextBox9, Me.Button5, Me.TextBox8, Me.Label10, Me.TextBox7, Me.Label9, Me.Button4, Me.TextBox6, Me.Label4, Me.TextBox5, Me.Label3, Me.TextBox1, Project Report by: Arumita Kumari (071M3888) 139

Me.ComboBox4, Me.Label8, Me.TextBox4, Me.Label7, Me.TextBox3, Me.Label6, Me.TextBox2, Me.Label5, Me.Button3, Me.Button2, Me.Button1, Me.Label2}) Me.Panel1.Location = New System.Drawing.Point(48, 88) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(656, 400) Me.Panel1.TabIndex = 3 ' 'TextBox9 ' Me.TextBox9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox9.Location = New System.Drawing.Point(240, 280) Me.TextBox9.Name = "TextBox9" Me.TextBox9.Size = New System.Drawing.Size(96, 20) Me.TextBox9.TabIndex = 28 Me.TextBox9.Text = "" ' 'Button5 ' Me.Button5.BackColor = System.Drawing.Color.DarkGoldenrod Me.Button5.Font = New System.Drawing.Font("Georgia", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button5.ForeColor = System.Drawing.Color.Beige Me.Button5.Location = New System.Drawing.Point(32, 280) Me.Button5.Name = "Button5" Me.Button5.Size = New System.Drawing.Size(176, 24) Me.Button5.TabIndex = 27 Me.Button5.Text = "Current Valuation" ' 'TextBox8 ' Me.TextBox8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox8.Location = New System.Drawing.Point(544, 192) Me.TextBox8.Name = "TextBox8" Me.TextBox8.Size = New System.Drawing.Size(80, 20) Me.TextBox8.TabIndex = 26 Me.TextBox8.Text = "" ' 'Label10 Project Report by: Arumita Kumari (071M3888) 140

' Me.Label10.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label10.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label10.Location = New System.Drawing.Point(392, 192) Me.Label10.Name = "Label10" Me.Label10.Size = New System.Drawing.Size(120, 24) Me.Label10.TabIndex = 25 Me.Label10.Text = "@ No of yrs" ' 'TextBox7 ' Me.TextBox7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox7.Location = New System.Drawing.Point(544, 160) Me.TextBox7.Name = "TextBox7" Me.TextBox7.Size = New System.Drawing.Size(80, 20) Me.TextBox7.TabIndex = 24 Me.TextBox7.Text = "" ' 'Label9 ' Me.Label9.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label9.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label9.Location = New System.Drawing.Point(392, 160) Me.Label9.Name = "Label9" Me.Label9.Size = New System.Drawing.Size(120, 24) Me.Label9.TabIndex = 23 Me.Label9.Text = "@ Depr Rate" ' 'Button4 ' Me.Button4.BackColor = System.Drawing.Color.DarkGoldenrod Me.Button4.Font = New System.Drawing.Font("Georgia", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button4.ForeColor = System.Drawing.Color.Beige

Project Report by: Arumita Kumari (071M3888)

141

Me.Button4.Location = New System.Drawing.Point(368, 320) Me.Button4.Name = "Button4" Me.Button4.Size = New System.Drawing.Size(80, 24) Me.Button4.TabIndex = 22 Me.Button4.Text = "Calculate" ' 'TextBox6 ' Me.TextBox6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox6.Location = New System.Drawing.Point(240, 320) Me.TextBox6.Name = "TextBox6" Me.TextBox6.Size = New System.Drawing.Size(96, 20) Me.TextBox6.TabIndex = 21 Me.TextBox6.Text = "" ' 'Label4 ' Me.Label4.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label4.Location = New System.Drawing.Point(24, 320) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(208, 23) Me.Label4.TabIndex = 20 Me.Label4.Text = "Asset Value" ' 'TextBox5 ' Me.TextBox5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox5.Location = New System.Drawing.Point(544, 232) Me.TextBox5.Name = "TextBox5" Me.TextBox5.Size = New System.Drawing.Size(80, 20) Me.TextBox5.TabIndex = 19 Me.TextBox5.Text = "" ' 'Label3 '

Project Report by: Arumita Kumari (071M3888)

142

Me.Label3.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label3.Location = New System.Drawing.Point(24, 160) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(160, 24) Me.Label3.TabIndex = 18 Me.Label3.Text = "Initial Valuation" ' 'TextBox1 ' Me.TextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox1.Location = New System.Drawing.Point(240, 160) Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New System.Drawing.Size(96, 20) Me.TextBox1.TabIndex = 17 Me.TextBox1.Text = "" ' 'ComboBox4 ' Me.ComboBox4.Location = New System.Drawing.Point(240, 16) Me.ComboBox4.Name = "ComboBox4" Me.ComboBox4.Size = New System.Drawing.Size(121, 21) Me.ComboBox4.TabIndex = 16 Me.ComboBox4.Text = "ComboBox4" ' 'Label8 ' Me.Label8.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label8.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label8.Location = New System.Drawing.Point(336, 232) Me.Label8.Name = "Label8" Me.Label8.Size = New System.Drawing.Size(184, 32) Me.Label8.TabIndex = 14 Me.Label8.Text = " For Given Year" ' 'TextBox4 Project Report by: Arumita Kumari (071M3888) 143

' Me.TextBox4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox4.Location = New System.Drawing.Point(240, 64) Me.TextBox4.Name = "TextBox4" Me.TextBox4.Size = New System.Drawing.Size(168, 20) Me.TextBox4.TabIndex = 13 Me.TextBox4.Text = "" ' 'Label7 ' Me.Label7.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label7.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label7.Location = New System.Drawing.Point(24, 64) Me.Label7.Name = "Label7" Me.Label7.Size = New System.Drawing.Size(160, 32) Me.Label7.TabIndex = 12 Me.Label7.Text = "Description" ' 'TextBox3 ' Me.TextBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox3.Location = New System.Drawing.Point(240, 232) Me.TextBox3.Name = "TextBox3" Me.TextBox3.Size = New System.Drawing.Size(88, 20) Me.TextBox3.TabIndex = 11 Me.TextBox3.Text = "" ' 'Label6 ' Me.Label6.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label6.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label6.Location = New System.Drawing.Point(24, 232) Me.Label6.Name = "Label6" Me.Label6.Size = New System.Drawing.Size(208, 23) Me.Label6.TabIndex = 10 Project Report by: Arumita Kumari (071M3888) 144

Me.Label6.Text = "Current Price" ' 'TextBox2 ' Me.TextBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox2.Location = New System.Drawing.Point(240, 112) Me.TextBox2.Name = "TextBox2" Me.TextBox2.Size = New System.Drawing.Size(168, 20) Me.TextBox2.TabIndex = 4 Me.TextBox2.Text = "" ' 'Label5 ' Me.Label5.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label5.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label5.Location = New System.Drawing.Point(24, 112) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(168, 32) Me.Label5.TabIndex = 9 Me.Label5.Text = "Model No" ' 'Button3 ' Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button3.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button3.Location = New System.Drawing.Point(584, 360) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(64, 32) Me.Button3.TabIndex = 9 Me.Button3.Text = "Exit" ' 'Button2 ' Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat Project Report by: Arumita Kumari (071M3888) 145

Me.Button2.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button2.Location = New System.Drawing.Point(520, 360) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(56, 32) Me.Button2.TabIndex = 8 Me.Button2.Text = "Reset" ' 'Button1 ' Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button1.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button1.Location = New System.Drawing.Point(448, 360) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(64, 32) Me.Button1.TabIndex = 7 Me.Button1.Text = "Save" ' 'Label2 ' Me.Label2.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label2.Location = New System.Drawing.Point(24, 16) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(168, 32) Me.Label2.TabIndex = 0 Me.Label2.Text = "Item ID" ' 'Label1 ' Me.Label1.Font = New System.Drawing.Font("Georgia", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Project Report by: Arumita Kumari (071M3888) 146

Me.Label1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label1.Location = New System.Drawing.Point(184, 24) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(424, 48) Me.Label1.TabIndex = 2 Me.Label1.Text = " Current Year Value Entry" ' 'CurrentYear_Value ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Beige Me.ClientSize = New System.Drawing.Size(720, 541) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Panel1, Me.Label1}) Me.Name = "CurrentYear_Value" Me.Text = "CurrentYear_Value" Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.Panel1.ResumeLayout(False) Me.ResumeLayout(False) End Sub #End Region Dim str As String Private Sub CurrentYear_Value_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call connect() str = "select i_code from initialvaluation" com = New OleDb.OleDbCommand(Str, con) dr = com.ExecuteReader() ComboBox4.Text = "Select the ItemID" While dr.Read() = True ComboBox4.Items.Add(dr.GetString(0)) End While con.Close() End Sub Private Sub ComboBox4_Leave(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox4.Leave Call connect() Try

Project Report by: Arumita Kumari (071M3888)

147

str = "select idesc,model_no from item where i_code='" & RTrim(ComboBox4.Text) & "'" com = New OleDb.OleDbCommand(str, con) dr = com.ExecuteReader() While dr.Read() = True TextBox4.Text = dr.GetString(0) TextBox2.Text = dr.GetString(1) End While Catch ex As Exception MsgBox(ex.Message) End Try con.Close() Call connect() Try str = "select valuation from initialvaluation where i_code='" & RTrim(ComboBox4.Text) & "'" com = New OleDb.OleDbCommand(str, con) dr = com.ExecuteReader() If dr.Read() = False Then MsgBox("Initital Valuation not calculated for the ItemID selected") Else TextBox1.Text = CStr(dr.GetInt32(0)) TextBox1.Focus() End If Catch ex As Exception MsgBox(ex.Message) End Try con.Close() End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Dim average As Double average = CInt(TextBox1.Text) + CInt(TextBox9.Text) average = average / 2 TextBox6.Text = CStr(average) TextBox6.Enabled = False End Sub Sub currentval() Dim val, price, depr, yrs, x As Decimal Project Report by: Arumita Kumari (071M3888) 148

Dim s As String price = CInt(TextBox3.Text) depr = CInt(TextBox7.Text) depr = depr * 0.01 'MsgBox(CStr(depr)) yrs = CInt(TextBox8.Text) x = (depr * price * yrs) 'MsgBox(CStr(x)) val = price - x s = CStr(val) TextBox9.Text = s TextBox9.Enabled = False End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click If Val(TextBox3.Text) <> 0 Then Call currentval() Else MsgBox("Please enter the current price for valuation") TextBox3.Focus() End If End Sub

Private Sub TextBox1_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Enter Call connect() Try str = "select deprcrate,yrs,valuation_year from initialvaluation where i_code='" & RTrim(ComboBox4.Text) & "'" com = New OleDb.OleDbCommand(str, con) dr = com.ExecuteReader() While dr.Read() = TextBox7.Text TextBox8.Text TextBox5.Text End While Catch ex As Exception MsgBox(ex.Message) End Try con.Close() Project Report by: Arumita Kumari (071M3888) 149 True = CStr(dr.GetInt32(0)) = CStr(dr.GetInt32(1)) = dr.GetString(2)

End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Close() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Call connect() str = "update item set current_yr='" & RTrim(TextBox5.Text) & "',current_value =" & RTrim(CInt(TextBox3.Text)) & " where i_code='" & RTrim(ComboBox4.Text) & "'" com = New OleDb.OleDbCommand(str, con) com.ExecuteNonQuery() MsgBox("Details have been registered in Items ", MsgBoxStyle.Information, "database updates") con.Close() Call entry() End Sub Sub entry() Call connect() Dim icode As String icode = "select i_code from assetcost where i_code='" & RTrim(ComboBox4.Text) & "'" com = New OleDb.OleDbCommand(icode, con) dr = com.ExecuteReader() If dr.Read = True Then MsgBox("The Data already exists for this Item code") con.Close() Else Call connect() str = "insert into assetcost (i_code,idesc,ModelNo,initialvaluation,deprcrate,no_yrs,curr entprice,currentyear,currentvaluation,assetvalue) values('" & RTrim(ComboBox4.Text) & "'" & "," & "'" & RTrim(TextBox4.Text) & "','" & RTrim(TextBox2.Text) & "'," & TextBox1.Text & "," & TextBox7.Text & "," & TextBox8.Text & "," & TextBox3.Text & ",'" & RTrim(TextBox5.Text) & "'," & RTrim(TextBox9.Text) & "," & RTrim(TextBox6.Text) & ")" com = New OleDb.OleDbCommand(str, con) Project Report by: Arumita Kumari (071M3888) 150

com.ExecuteNonQuery() MsgBox("Details have been registered in valuationmaster ", MsgBoxStyle.Information, "database updates") End If con.Close() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click ComboBox4.Text = "None" TextBox4.Text = "" TextBox1.Text = "" TextBox2.Text = "" TextBox7.Text = "" TextBox8.Text = "" TextBox3.Text = "" TextBox9.Text = "" TextBox6.Text = "" End Sub End Class

AssetClosure.vb:
Public Class AssetClosure Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If Project Report by: Arumita Kumari (071M3888) 151

End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents ProgressBar1 As System.Windows.Forms.ProgressBar Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Button3 As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Panel1 = New System.Windows.Forms.Panel() Me.Label3 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.TextBox1 = New System.Windows.Forms.TextBox() Me.ProgressBar1 = New System.Windows.Forms.ProgressBar() Me.Button1 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button() Me.Label1 = New System.Windows.Forms.Label() Me.Button3 = New System.Windows.Forms.Button() Me.Panel1.SuspendLayout() Me.SuspendLayout() ' 'Panel1 ' Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.Panel1.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button3, Me.Label3, Me.Label2, Me.TextBox1, Me.ProgressBar1, Me.Button1, Me.Button2}) Me.Panel1.Location = New System.Drawing.Point(144, 88) Project Report by: Arumita Kumari (071M3888) 152

Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(504, 312) Me.Panel1.TabIndex = 0 ' 'Label3 ' Me.Label3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Label3.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label3.Location = New System.Drawing.Point(64, 232) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(96, 24) Me.Label3.TabIndex = 4 Me.Label3.Text = "Asset Value" ' 'Label2 ' Me.Label2.Font = New System.Drawing.Font("Georgia", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label2.Location = New System.Drawing.Point(8, 8) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(352, 24) Me.Label2.TabIndex = 3 Me.Label2.Text = "Click the Process buton to get the total valuation of assets:" ' 'TextBox1 ' Me.TextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox1.Location = New System.Drawing.Point(176, 232) Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New System.Drawing.Size(184, 20) Me.TextBox1.TabIndex = 2 Me.TextBox1.Text = "" ' 'ProgressBar1 ' Project Report by: Arumita Kumari (071M3888) 153

Me.ProgressBar1.Location = New System.Drawing.Point(32, 136) Me.ProgressBar1.Name = "ProgressBar1" Me.ProgressBar1.Size = New System.Drawing.Size(440, 24) Me.ProgressBar1.TabIndex = 1 ' 'Button1 ' Me.Button1.BackColor = System.Drawing.Color.DarkGoldenrod Me.Button1.Font = New System.Drawing.Font("Georgia", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.Beige Me.Button1.Location = New System.Drawing.Point(184, 64) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(152, 32) Me.Button1.TabIndex = 0 Me.Button1.Text = "Process" ' 'Button2 ' Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button2.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button2.Location = New System.Drawing.Point(408, 280) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(88, 24) Me.Button2.TabIndex = 2 Me.Button2.Text = "Exit" ' 'Label1 ' Me.Label1.Font = New System.Drawing.Font("Georgia", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label1.Location = New System.Drawing.Point(296, 24) Project Report by: Arumita Kumari (071M3888) 154

Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(240, 32) Me.Label1.TabIndex = 1 Me.Label1.Text = " Asset Closure" ' 'Button3 ' Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button3.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button3.Location = New System.Drawing.Point(312, 280) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(88, 24) Me.Button3.TabIndex = 5 Me.Button3.Text = "Save" ' 'AssetClosure ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Beige Me.ClientSize = New System.Drawing.Size(672, 437) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Label1, Me.Panel1}) Me.Name = "AssetClosure" Me.Text = "AssetClosure" Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.Panel1.ResumeLayout(False) Me.ResumeLayout(False) End Sub #End Region Dim i As Integer Dim str, ostr, insrt As String Dim flag As Integer = 0 Dim ch As Integer = 0 Dim t1 As New System.Threading.Thread(AddressOf disp) Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click t1.Start() Project Report by: Arumita Kumari (071M3888) 155

End Sub Sub disp() For i = 0 To 10 ProgressBar1.Show() ProgressBar1.PerformStep() t1.Sleep(1000) ProgressBar1.Refresh() Next MsgBox("Processing over") ProgressBar1.Hide() flag = 1 If flag = 1 Then Try Call check() If ch = 1 Then Call connect() str = "select sum(assetvalue) from assetcost " com = New OleDb.OleDbCommand(str, con) dr = com.ExecuteReader() If dr.Read() = False Then MsgBox("Initital Valuation not calculated for the ItemID selected") Else TextBox1.Text = CStr(dr.GetInt32(0)) Label3.Show() TextBox1.Show() End If Else MsgBox("Asset closure is incomplete!!") MsgBox(" Asset Valuation Pending for " & dr.GetString(0)) While dr.Read = True MsgBox(" Asset Valuation Pending for " & dr.GetString(0)) End While Close() End If Catch ex As Exception MsgBox(ex.Message) End Try con.Close() Project Report by: Arumita Kumari (071M3888) 156

End If End Sub Sub check() Call connect() ostr = "select i_code from item where current_yr is NULL" com = New OleDb.OleDbCommand(ostr, con) dr = com.ExecuteReader() If dr.Read = False Then ch = 1 End If con.Close() End Sub Private Sub AssetClosure_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ProgressBar1.Hide() Label3.Hide() TextBox1.Hide() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Close() End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Call connect() insrt = "insert into assetclosure (iassetvalue) values(" & RTrim(TextBox1.Text) & ")" com = New OleDb.OleDbCommand(str, con) com.ExecuteNonQuery() MsgBox("AssetValue stored in AssetClosure for the current date ", MsgBoxStyle.Information, "database updates") con.Close() End Sub End Class

ApplicationLogic_Update.vb:
Public Class ApplicationLogic_Update Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Project Report by: Arumita Kumari (071M3888) 157

Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox Friend WithEvents Label6 As System.Windows.Forms.Label Friend WithEvents Label7 As System.Windows.Forms.Label Friend WithEvents TextBox3 As System.Windows.Forms.TextBox Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents Label10 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Panel1 = New System.Windows.Forms.Panel() Project Report by: Arumita Kumari (071M3888) 158

Me.Button1 = New System.Windows.Forms.Button() Me.ComboBox1 = New System.Windows.Forms.ComboBox() Me.Label6 = New System.Windows.Forms.Label() Me.Label7 = New System.Windows.Forms.Label() Me.TextBox3 = New System.Windows.Forms.TextBox() Me.TextBox1 = New System.Windows.Forms.TextBox() Me.Label10 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.Button2 = New System.Windows.Forms.Button() Me.Panel1.SuspendLayout() Me.SuspendLayout() ' 'Panel1 ' Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Panel1.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button2, Me.Button1, Me.ComboBox1, Me.Label6, Me.Label7, Me.TextBox3, Me.TextBox1, Me.Label10, Me.Label4}) Me.Panel1.Location = New System.Drawing.Point(72, 104) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(584, 304) Me.Panel1.TabIndex = 0 ' 'Button1 ' Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button1.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button1.Location = New System.Drawing.Point(376, 264) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(96, 32) Me.Button1.TabIndex = 28 Me.Button1.Text = "Update" ' 'ComboBox1 ' Me.ComboBox1.Location = New System.Drawing.Point(304, 48) Project Report by: Arumita Kumari (071M3888) 159

Me.ComboBox1.Name = "ComboBox1" Me.ComboBox1.Size = New System.Drawing.Size(128, 21) Me.ComboBox1.TabIndex = 27 Me.ComboBox1.Text = "ComboBox1" ' 'Label6 ' Me.Label6.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label6.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label6.Location = New System.Drawing.Point(432, 88) Me.Label6.Name = "Label6" Me.Label6.Size = New System.Drawing.Size(80, 23) Me.Label6.TabIndex = 26 Me.Label6.Text = "per Year" ' 'Label7 ' Me.Label7.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label7.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label7.Location = New System.Drawing.Point(104, 136) Me.Label7.Name = "Label7" Me.Label7.Size = New System.Drawing.Size(144, 24) Me.Label7.TabIndex = 25 Me.Label7.Text = "Date" ' 'TextBox3 ' Me.TextBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox3.Location = New System.Drawing.Point(304, 136) Me.TextBox3.Name = "TextBox3" Me.TextBox3.Size = New System.Drawing.Size(128, 20) Me.TextBox3.TabIndex = 24 Me.TextBox3.Text = "" ' 'TextBox1 '

Project Report by: Arumita Kumari (071M3888)

160

Me.TextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox1.Location = New System.Drawing.Point(304, 88) Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New System.Drawing.Size(128, 20) Me.TextBox1.TabIndex = 23 Me.TextBox1.Text = "" ' 'Label10 ' Me.Label10.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label10.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label10.Location = New System.Drawing.Point(104, 88) Me.Label10.Name = "Label10" Me.Label10.Size = New System.Drawing.Size(168, 23) Me.Label10.TabIndex = 22 Me.Label10.Text = "Depreciation Rate" ' 'Label4 ' Me.Label4.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label4.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label4.Location = New System.Drawing.Point(104, 48) Me.Label4.Name = "Label4" Me.Label4.Size = New System.Drawing.Size(152, 23) Me.Label4.TabIndex = 21 Me.Label4.Text = "Item ID" ' 'Label1 ' Me.Label1.BackColor = System.Drawing.Color.Beige Me.Label1.Font = New System.Drawing.Font("Georgia", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label1.Location = New System.Drawing.Point(200, 32) Project Report by: Arumita Kumari (071M3888) 161

Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(368, 48) Me.Label1.TabIndex = 1 Me.Label1.Text = " Application Logic Update" ' 'Button2 ' Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button2.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button2.Location = New System.Drawing.Point(480, 264) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(96, 32) Me.Button2.TabIndex = 29 Me.Button2.Text = "Exit" ' 'ApplicationLogic_Update ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Beige Me.ClientSize = New System.Drawing.Size(688, 429) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Label1, Me.Panel1}) Me.Name = "ApplicationLogic_Update" Me.Text = "ApplicationLogic_Update" Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.Panel1.ResumeLayout(False) Me.ResumeLayout(False) End Sub #End Region Dim str, upd As String Private Sub ApplicationLogic_Update_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call connect() ComboBox1.Text = "None" str = "select i_code from applicationlogic" com = New OleDb.OleDbCommand(str, con) Project Report by: Arumita Kumari (071M3888) 162

dr = com.ExecuteReader() While dr.Read() = True ComboBox1.Items.Add(dr.GetString(0)) End While con.Close() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Call connect() upd = "update applicationlogic set deprcrate =" & CInt(Trim(TextBox1.Text)) & " where i_code='" & Trim(ComboBox1.Text) & "'" com = New OleDb.OleDbCommand(upd, con) com.ExecuteNonQuery() con.Close() MsgBox("Data successfully updated in ApplicationLogic") End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Close() End Sub End Class

ItemUpdate.vb:
Public Class ItemUpdate Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) Project Report by: Arumita Kumari (071M3888) 163

If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label7 As System.Windows.Forms.Label Friend WithEvents Label6 As System.Windows.Forms.Label Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents TextBox3 As System.Windows.Forms.TextBox Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Button1 As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Panel1 = New System.Windows.Forms.Panel() Me.Button3 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.TextBox3 = New System.Windows.Forms.TextBox() Me.TextBox2 = New System.Windows.Forms.TextBox() Me.TextBox1 = New System.Windows.Forms.TextBox() Me.ComboBox1 = New System.Windows.Forms.ComboBox() Me.Label3 = New System.Windows.Forms.Label() Me.Label7 = New System.Windows.Forms.Label() Me.Label6 = New System.Windows.Forms.Label() Me.Label5 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Project Report by: Arumita Kumari (071M3888) 164

Me.Panel1.SuspendLayout() Me.SuspendLayout() ' 'Panel1 ' Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D Me.Panel1.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button3, Me.Button1, Me.TextBox3, Me.TextBox2, Me.TextBox1, Me.ComboBox1, Me.Label3, Me.Label7, Me.Label6, Me.Label5, Me.Label2}) Me.Panel1.Location = New System.Drawing.Point(104, 152) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(600, 320) Me.Panel1.TabIndex = 0 ' 'Button3 ' Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button3.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button3.Location = New System.Drawing.Point(528, 280) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(64, 32) Me.Button3.TabIndex = 23 Me.Button3.Text = "Exit" ' 'Button1 ' Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button1.Font = New System.Drawing.Font("Georgia", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Button1.Location = New System.Drawing.Point(424, 280) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(88, 32) Me.Button1.TabIndex = 22 Project Report by: Arumita Kumari (071M3888) 165

Me.Button1.Text = "Update" ' 'TextBox3 ' Me.TextBox3.Location = New System.Drawing.Point(216, 192) Me.TextBox3.Name = "TextBox3" Me.TextBox3.Size = New System.Drawing.Size(160, 20) Me.TextBox3.TabIndex = 21 Me.TextBox3.Text = "" ' 'TextBox2 ' Me.TextBox2.Location = New System.Drawing.Point(216, 144) Me.TextBox2.Name = "TextBox2" Me.TextBox2.Size = New System.Drawing.Size(160, 20) Me.TextBox2.TabIndex = 20 Me.TextBox2.Text = "" ' 'TextBox1 ' Me.TextBox1.Location = New System.Drawing.Point(216, 88) Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New System.Drawing.Size(160, 20) Me.TextBox1.TabIndex = 19 Me.TextBox1.Text = "" ' 'ComboBox1 ' Me.ComboBox1.Location = New System.Drawing.Point(216, 32) Me.ComboBox1.Name = "ComboBox1" Me.ComboBox1.Size = New System.Drawing.Size(160, 21) Me.ComboBox1.TabIndex = 18 Me.ComboBox1.Text = "ComboBox1" ' 'Label3 ' Me.Label3.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label3.Location = New System.Drawing.Point(32, 200) Project Report by: Arumita Kumari (071M3888) 166

Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(128, 23) Me.Label3.TabIndex = 17 Me.Label3.Text = "Price" ' 'Label7 ' Me.Label7.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label7.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label7.Location = New System.Drawing.Point(32, 88) Me.Label7.Name = "Label7" Me.Label7.Size = New System.Drawing.Size(152, 32) Me.Label7.TabIndex = 16 Me.Label7.Text = "Model Number" ' 'Label6 ' Me.Label6.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label6.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label6.Location = New System.Drawing.Point(48, 384) Me.Label6.Name = "Label6" Me.Label6.Size = New System.Drawing.Size(128, 23) Me.Label6.TabIndex = 15 Me.Label6.Text = "Price" ' 'Label5 ' Me.Label5.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label5.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label5.Location = New System.Drawing.Point(32, 144) Me.Label5.Name = "Label5" Me.Label5.Size = New System.Drawing.Size(160, 32) Me.Label5.TabIndex = 14 Me.Label5.Text = "Description" ' Project Report by: Arumita Kumari (071M3888) 167

'Label2 ' Me.Label2.Font = New System.Drawing.Font("Georgia", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label2.Location = New System.Drawing.Point(32, 32) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(160, 32) Me.Label2.TabIndex = 13 Me.Label2.Text = "Item ID" ' 'Label1 ' Me.Label1.Font = New System.Drawing.Font("Georgia", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.ForeColor = System.Drawing.Color.DarkGoldenrod Me.Label1.Location = New System.Drawing.Point(232, 48) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(336, 48) Me.Label1.TabIndex = 1 Me.Label1.Text = " Item Master Update" ' 'ItemUpdate ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Beige Me.ClientSize = New System.Drawing.Size(720, 469) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Label1, Me.Panel1}) Me.Name = "ItemUpdate" Me.Text = "ItemUpdate" Me.WindowState = System.Windows.Forms.FormWindowState.Maximized Me.Panel1.ResumeLayout(False) Me.ResumeLayout(False) End Sub #End Region Dim str, upd As String Project Report by: Arumita Kumari (071M3888) 168

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Close() End Sub Private Sub ItemUpdate_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Call connect() ComboBox1.Text = "None" str = "select i_code from item" com = New OleDb.OleDbCommand(Str, con) dr = com.ExecuteReader() While dr.Read() = True ComboBox1.Items.Add(dr.GetString(0)) End While con.Close() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Call connect() upd = "update item set model_no='" & Trim(TextBox1.Text) & "', idesc='" & Trim(TextBox2.Text) & "', price = " & Trim(CInt(TextBox3.Text)) & " where i_code= '" & Trim(ComboBox1.Text) & "'" com = New OleDb.OleDbCommand(upd, con) com.ExecuteNonQuery() con.Close() MsgBox("Data successfully updated in ItemMaster") End Sub End Class

OPTIMIZATION OF CODE:
The optimization of code is achieved through a Module which includes the code for database connectivity .Almost every form requires the backend connectivity so instead of repeating the code again and again the module is called whenever needed.

Module Module1.vb Public con As OleDb.OleDbConnection

Project Report by: Arumita Kumari (071M3888)

169

Public com As OleDb.OleDbCommand Public dr As OleDb.OleDbDataReader Public Sub connect() con = New OleDb.OleDbConnection("provider=sqloledb;user id=sa;password=;database=project;server=(local)") con.Open() End Sub

End Module

VALIDATION CHECKS
Software testing is one element of a broader topic that is often referred to as verification and validation. Verification refers to the set of the activities that ensure that the software correctly implements a specific functionality.Validation refers to a different set of activity that ensures that the software has been built is traceable to customer. Following Validations have been incorporated in the modules:

Project Report by: Arumita Kumari (071M3888)

170

The login id and password entered by the user in login form is been validated against the database. Relevant messages are displayed when user supplies an incorrect value. The blank entries are checked for each textboxes wherever required to ensure that user mandatorily enters the input before the data gets saved into the database. On entry of subcategory it is ensured that the category which user selects comes from Master category table and duplicated entries are being checked and not saved to the database avoiding redundancy of the data. On entry of Item details it is ensured that the category and subcategory comes from the respective master table and duplicate entries are avoided into the database. Application Logic is entered for only those items which are existing in master Item table. Initial Valuation is done for only those items for which the Application Logic is stored. Current Valuation is done for only those items for which the InitialValuation is stored. On saving the details of CurrentYear Valuation the current year and current value calculated is updated in the master Item table to ensure that the details for all the items are existing before the actual AssetClosure is made. During AssetClosure the details for all the existing Items are checked before calculating the total and in case certain items valuation are still pending the list is displayed to the user and closure is rolled back.

Project Report by: Arumita Kumari (071M3888)

171

Maintenance
The last phase of the software development cycle is maintenance, which is actually the implementation of the post implementation evaluation plan.When the Asset Management System is installed , it may be used for a long period.The maintenance can be classified as corrective, adaptative or perfect. Corrective maintenance means repairing , processing or performance failures or making alterations because of previously ill defined problems. Adaptation maintenance means changing the program functions. Sometimes for enchancing the performance or modifying the programs according to systems additional or changing needs are included in perfect maintenance. The maintenance process covers a wide range of activities including correction of coding and design errors later discovered updating documentation and test data and upgradation of certain modules. Many activities , which we classify as maintenance , actually fall under enhancemens. It means adding, modifying, or re-developing the code to support changes in the system specification.We have to keep it up with changing needs and operational requirements. If we want to reduce the need for maintenance of the system while making it possible to carry on with essential tasks more efficiently are as follows: We have to define the systems requirement more accurately during the system development.
Project Report by: Arumita Kumari (071M3888) 172

We have to prepare system documentation in a better way. We should use more effective ways for designing processing logic of each module. We should make better use of existing tools and techniques. We should manage the systems engineering process effectively.

SYSTEM SECURITY MEASURES:


FRONT END: Only Valid Users are allowed to access the system for security of details in the system. Users who are not valid are not allowed to enter the system and error message is displayed to the user to recheck the login details. A BackUp and Restore system has been implemented for taking the backup of the data and restore it when required in case of loss of the data.

BACK END: SQL Server 2000 as a RDBMS provides security in terms of Locking.By default it implements Pessimistic locking which ensures that when the system is being accessed by multiple users simultanously only one user at a time can perform the transaction to ensure the security and integrity of the existing data.

TESTING TECHNIQUES:

Project Report by: Arumita Kumari (071M3888)

173

A strategy for the software testing integrates software test case design methods into a well planned series of the steps that results in the success. UNIT TESTING: It focuses verification effort on the smallest unit of software design Software component or the module. INTEGRATION TESTING: It is a systematic technique for constructing the program structure while at the same time conducting the test to uncover errors associated with interfacing. VALIDATION TESTING: At the culmination of integration testing , software is completely assembled as a package . Validation is success when the software function in a manner that can be reasonably expected by the customer. Software Testing is achieved through a series of black box testing that demonstrate conformity with requirements.For eg- On Valuation of assets the calculated values are checked for the valid values or else the required error message is displayed to the user and the transaction is rolled back.

COST ESTIMATION:
It is based on the lifecycle of the software where the cost is estimated from the beginning till the end of the project.Any project goes through six steps ie Analysis / Design / Code / Test / Support Before we start with the project, the requirements are communicated to several users which is towards the satisfaction of needs specified while analysis.About 10% of all expenses on the project are only expense on
Project Report by: Arumita Kumari (071M3888) 174

it.Once the data is gathered the Design of the Project is prepared which contributes 40% of the all expenses.The designing must be in a machine readable form which involves the code generation. This covers 30% of whole expense.Once the code has been generated the testing phase begins.This contributes about 7% of the total expense during project development.Software may go through certain modifiction once it is delivered to the customer.This requires approximately 3% of the expense.

REPORTS

Project Report by: Arumita Kumari (071M3888)

175

Project Report by: Arumita Kumari (071M3888)

176

Project Report by: Arumita Kumari (071M3888)

177

GANTT CHART:
A bar chart, which is also known as Gant Chart is the simplest form of formal project management . The Gant Chart is almost exclusively used for scheduling purpose and there for controls the time dimension.It is a project control technique that can be used for several purpose including scheduling , budgeting and resource planning.A Gant Chart is a bar chart where each bar represents the activity scheduling during the project development.

June1,05

July 1,05

August 1, 05

September 20,05

S T A R T

DESIGN BUILDING SCANNER BUILDING PARSER BUILD CODE GENERATOR WRITE MANUAL INTEGRATION & TESTING FINISH

Project Report by: Arumita Kumari (071M3888)

178

FUTURE SCOPE AND FURTHER ENHANCEMENT OF THE PROJECT:


The software shall be used for asset management system that means total assets information values, depreciation cost etc. will be required for the management of the system. In future with this asset value we can develop a big decision making system from which we can get the following: Removal of Asset Auction of Asset Total cost estimation of assets in future years Individual Users to be restricted to access separate modules of the software system.

LIMITATIONS:
The Current Price for the assets existing should be known to perform valuation. The individual users of the system should be granted permissions to specific module of the program depending upon the access.

Project Report by: Arumita Kumari (071M3888)

179

BIBLIOGRAPHY
SQL Server 2000 by Wrox Publication. SQL Server 7.0 Handbook - by Ken England Black Book www.vbcity.com .NET Insight for VB Developers by Matthew MacDonald

Project Report by: Arumita Kumari (071M3888)

180

Project Report by: Arumita Kumari (071M3888)

181

You might also like