Post on 22-Dec-2015
1
ABSTRACT
ABSTRACT:
The project work “INFRASTRUCTURE MANAGEMENT SYSTEM” is
developed particularly for Construction Company using Visual Studio 2008 as the development
tool. It is used to manage a company details which is a very huge task. Through the considerable
amount of time used by the automated system, the end users day to day job of managing the
work will be reduced.
It window based application help for the construction company to calculate the
estimation cost of construction work and to maintain the site details, payment transaction details .
The system will take care of all the activities done in a company. Data storing is easier. Paper
work will be reduced and the user spends more time on monitoring the progress.
The system is user friendly and easy to use. All the important data’s will be stored in
the database and it avoids any miscalculation. This system is helpful to computerize the
scheduled events and also very helpful in calculating the bill without any miscalculation. The
reports can be checked depending on month/year.
2
1. INTRODUCTION
1.1 Project Overview
The project entitled “INFRASTRUCTURE MANAGEMENT SYSTEM” objective is
to manage a construction company by using Visual Studio 2008. In this project using the
modules are following
Administration
Employee
Customer
Inventory
Agents
Expanses
Metrials
Report Master
Details
Infrastructure management system is the overall planning, coordination, and control of a
project from beginning to completion. IMS is aimed at meeting a client's requirement in order
to produce a functionally and financially viable project
Admin has the authority to add all details. And he also has the right to edit or delete
employee information to/from the list. Admin provides a unique username and password for
each employee through which he can login and can work on this system. All the information’s
are being saved in the database.
3
1.2 Module Description
Administration Details
Login
This includes Administrator and User login. There will be a username and password to login into
the system to use all the facilities.
Add user
Adding new user process is used for registering the username and password details.
Delete user
Delete the user process for unwanted user information.
Employee Details
Employee’s information is maintained through this application. This module will help
in contacting Employees by retrieving details from database. It contains the following data
Salary Employee
Wage Employee
Edit Detail
Search Detail
4
Customer Details
Customer’s information is maintained through this application. This module will help in
contacting customers by retrieving details from database. It contains the following data
Customer Payment
Customer id
Amount
Date
Received balance
Customer Details
Customer id
Customer Name
Project amount
Advance Amount
Location
Advance Given date
Address
Phone Number
Inventory Details
In this module of Application will stores and maintains the details of the products
along with their description and quantity. It contains the following data
Inventory id
Item name
Quantity
Price
Other Expenses
Amount paid
5
Agent Details
Agent’s information is maintained through this application. This module will help in
contacting agent by retrieving details from database. It contains the following data
Agent id
Name
Place
Phone number
Expense Details
Expense information is maintained through this application. This module will help in
Expense details by retrieving details from database. It contains the following data
Vehicle
Office
Other
Metrials Details
Metrial’s information is maintained through this application. This module will help in
retrieving metrial details from database. It contains the following data
Metrial type
Item name
Quantity
Price
Amount paid
Purchasing date
6
Details Module
Vehicle’s and office information is maintained through this application. It contains the
following data
Vehicle details
Office details
7
8
SYSTEM STUDY
2. SYSTEM STUDY
System Analysis is a very critical activity while developing a Software Application.
System analysis is the interdisciplinary part of science, dealing with analysis of sets of
interacting entities, the systems, often prior to their automation as computer systems, and the
interactions within those systems. This field is closely related to operations research. It is also
“an explicit formal inquiry carried out to help someone, referred to as decision maker, identify
a better course of action and make better decisions than he/she might otherwise have made.
2.1 Existing System
As we know manual system are quite tedious, time consuming and less efficient and
accurate in comparison to the computerized system.
There are some disadvantages of the old system.
1. Time consuming
2. Less accurate
3. Less efficient
4. Lot of paper work
5. Slow data processing
Existing system require time to each activity and therefore it’s very slow.
2.2 Proposed System
The scope of this system is to provide user efficient working environment and more
output can be generated through this. This system provides user friendly interface
resulting in knowing each and every usability features of the system.
This system helps in tracking records so that past records can be verified through them
and one can make decisions based on the past records.
This system completes the work in a very less time resulting in less time consumption
and high level of efficiency.
9
Need of proposed system
Saves time while knowing all the details of person.
It provides full security.
It provides the fast access of the system.
2.3 Feasibility Study
The feasibility study is an important factor that analyses the capability of the project.
After the problem is clearly understood and solutions are proposed the next step is to conduct
the feasibility study, which is a part of system analyses as well as design process. The main
objective of the feasibility study is to determine whether the proposed system is feasible or not.
Technical feasibility
Economic feasibility
Operational feasibility
2.3.1 Technical Feasibility
Technical feasibility analyses make a comparison between level of technology available
and technology that is needed for the development of the project. The level of the technology is
determined by factors such as the software tools, machine environment, platform etc.
For this internal assessments project the resources required like system, and the browsers
available in the organization. So easily known the current project and assignments. Since all
the required resources all available in the centralized project/assignment tracking system, so
this project is technically feasible.
Front-end and back-end selection
10
An important issue for the development of a project is the selection of suitable front-end
and back-end. When we decided to develop the project we want through an extensive study to
determine the most suitable platform that suits the needs of the organization as well as helps in
developments of the project.
The feasibility study is an important factor that analyses the capability of the project.
After the problem is clearly understood and solutions are proposed the next step is to conduct
the feasibility study, which is a part of system analyses as well as design process.
Front-end selection
It must have a graphical user interface the at assists employee that are not form
IT background.
Scalability and extensibility.
Flexibility.
Robustness.
According to the organization requirement and the culture.
Back-end Selection
Multiple user support.
Efficient data handling.
Provide inherent features for security.
Efficient data retrieval and maintenance.
Stored procedures.
Popularity.
11
2.3.2 Economic Feasibility
Economic feasibility is a most important characteristic that has to be evaluated. This is
necessary to give the economic justification of the project. Since the needed hardware and
software could not be available in the entire place.
For this internal assessments project software and hardware are normally available in all
the computer systems like browser and the local server. Hence the risk of financial non-
feasibility does not exist. Thus it is found that benefits override the cost. Hence the system
economically feasible.
2.3.3 Operational Feasibility
The Operational feasibility of internal assessments is it satisfies user needs and easy to
navigate through the web site. Since the workload is also reduced like entering the seeds types
and current market prices is updated, and queries can be easily posted through the online for
the agricultural department convenience that the project is operationally feasible.
3. SYSTEM SPECIFICATION
12
System specification is key information for programming. Testing & implementing the
project. The specification should delineate the user requirements. They must reflect the actual
application to be handled by the system & include system Objectives, Flowcharts, Input/output
requirements, file structure & cost. The specification must also describe each aspect of the
system clearly, consistently completely.
3.1 Hardware Specification
Hardware : Pendium
Speed : 1.1GHz
RAM : 1GB
Hard Disk : 20 GB
3.2 Software Specification
Front End : Visual Studio 2008
Back End : SQL Server 2005
13
14
3. SYSTEM DESIGN AND DEVELOPMENT
3.1 FILE DESIGN:
Software design sits at the technical kernel of the software engineering process and is
applied regardless of the development paradigm and area of application. Design is the first step
in the development phase for any engineered product or system. The designer’s goal is to
produce a model or representation of an entity that will later be built. Beginning, once system
requirement have been specified and analyzed, system design is the first of the three technical
activities -design, code and test that is required to build and verify software.
The importance can be stated with a single word “Quality”. Design is the place where
quality is fostered in software development. Design provides us with representations of software
that can assess for quality. Design is the only way that we can accurately translate a customer’s
view into a finished software product or system. Software design serves as a foundation for all
the software engineering steps that follow. Without a strong design we risk building an unstable
system – one that will be difficult to test, one whose quality cannot be assessed until the last
stage.
During design, progressive refinement of data structure, program structure, and
procedural details are developed reviewed and documented. System design can be viewed from
either technical or project management perspective. From the technical point of view, design is
comprised of four activities – architectural design, data structure design, interface design and
procedural design.
15
3.2 INPUT DESIGN
Input design is a part of overall system design, which requires very careful attention. The
main objectives of input design are:
To produce a cost-effective method of input.
To achieve the highest possible level of accuracy.
To ensure that the input is acceptable to and understood by the user staff.
In this system input screens are designed very carefully so that no inaccurate data will
enter the database. The data is made as easy as possible. For simplifying the data entry many
facilities are given.
Each and every screen in this system is facilitated by many pushbuttons so that the
user can easily work with this system.
3.3 OUTPUT DESIGN
Outputs from computer systems are required primarily to communicate the results of
processing to users. They are also to provide a permanent hard copy of these results for later
consultation.
The various types of outputs are required by this system are given below:
External outputs, whose destination is outside the concern and which require special
attention because they, project the image of the concern.
Internal outputs, whose destination is within the concern and which require careful design
because they are the user’s main interface within the computer.
Operation outputs, whose use is purely within the computer department, E.g., program
listings, usage statistics etc,
16
Interactive outputs, which involves the user in communicating directly with the
computers.
3.4 DATABASE DESIGN
Database is an integrated collection of data and provides a centralized access to the data
and makes possible to treat data as a separate resource. Usually centralized data managing
software is called a Relational Database Management System (RDBMS). The most significant
different between RDBMS and other type of Data Management is the separation of data as seen
by the program and data as store of on the direct access storage device. This is the difference
between logical and physical data.
Data Dictionary:
The efficiency of an application developed using RDBMS mainly depend upon the
database tables, the fields in each table and the way the tables are opened using the contents in
them to retrieve the necessary information. Hence a careful selection of tables and their fields
are imperative.
17
3.5 SYSTEM DEVELOPMENT
Visual Studio 2008 Overview
In order to understand the application development process, it is helpful to understand
some of the key concepts upon which Visual Basic.NET 2008 is built. Because Visual
Basic.NET 2008 is a Windows development language, some familiarity with the Windows
environment is necessary. If you are new to Windows programming, you need to be aware of
some fundamental differences between programming for Windows versus other
environments.
Elements of the Integrated Development Environment
The working environment in Visual Basic.NET 2008 is often referred to as the integrated
development environment or IDE because it integrates many different functions such as
design, editing, compiling, and debugging within a common environment.
Standard EXE
A standard EXE project is a typical application. It creates a standard executable a file.
ActiveX EXE, ActiveX DLL
These types of projects are available with the Professional edition. ActiveX components
are basic code building components that don’t have a visible interface and that can add special
functionality to our applications.
Menu Bar
Displays the commands you use to work with Visual Basic.NET 2008. Besides the
standard File, Edit, View, Window, and Help menus, menus are provided to access functions
specific to programming such as Project, Format, or Debug.
18
Text box
Text boxes are the primary method for accepting input and displaying output in Visual
Basic. Text boxes never treat what a user type in as a number; this means that getting numeric
information to a Visual Basic program requires transforming a string of digits into a number.
Label box
Use labels to display information you don’t want the user to be able to change. Probably
the most common use is to identify a text box or other control by describing its contents.
Combo Box
Combo box contains a text box and a list box. This allows the user to select an item from
the drop down list box, or type in a selection in the text box.
Option Button
The control, which is a part of an option group, allows the user to select only one option
even if it displays multiple choices.
Command button
Usually user of the application he develops chooses a command button by moving the
mouse pointer to the button and clicking.
Image
Image control is used top display icons, bit maps, metal files.
DTPicker
The DateTimePicker control enables you to provide a formatted date field that allows
easy date selection. In addition, users can select a date from a dropdown calendar interface
similar to the Month View control.
19
Working with Forms
Visual Basic.NET 2008 has several different types of objects. The form is one of the
most basic object in which the application is developed form is window that contains
applications, code and has other objects placed on it to create the user interface.
Visual Basic.NET 2008 initially includes a default form, Form1 file in each new project.
You can change the form’s name and caption to identify the propose of the form. Every form
object has its own properties, events and methods associated with it.
Data Access Object
A data object is a collection classes that model the structure of a relational data base
system. They provide properties and methods and allow accomplishing all the operation to
manage such a system, including features for creating databases, defining tables, navigating
and querying database. Visual Basic.NET 2008 supports data access objects such as the DB
Engine.
Data Environment
Data environment designer is an interactive, powerful interface introduced in Visual
Basic.NET 2008 the data environment object can be used, much like a data control by binding
other control such as text box, label, check box to the designer
Data OLEDB
Data environment must include at least one connection object in it a connection object
represents a connection to a database that is used at the data source for the associated
commands like tables or queries.
Data Report
Data report utility introduced for the first time in Visual Basic.NET 2008 is used to
design reports. Data report designer is flexible report generator that can create banded
hierarchical report. In addition to creating printable report, the report can be exported HTML
or text file. This utility uses a graphic environment, which lets the developer easily design and
generate database reports.
20
SQL Server Overview
Microsoft SQL Server 2005 is a database platform for large-scale online transaction
processing (OLTP), data warehousing, and e-commerce applications. It is also a business
intelligence platform for data integration, analysis, and reporting solutions.
SQL Server 2005 introduces "studios" to help you with development and management
tasks. SQL Server Management Studio and Business Intelligence Development Studio. In
Management Studio, you develop and manage SQL Server Database Engine and notification
solutions, manage deployed Analysis Services solutions, manage and run Integration Services
packages, and manage report servers and Reporting Services reports and report models.
Features of SQL Server 2005
Database mirroring
Database mirroring is a new high-availability feature in SQL Server 2005. It's similar to
server clustering in that failover is achieved by the use of a stand-by server; the difference is
that the failover is at the database level rather than the server level. The primary database
continuously sends transaction logs to the backup database on a separate SQL Server instance.
A third SQL Server instance is then used as a witness database to monitor the interaction
between the primary and the mirror databases.
Database snapshots
A database snapshot is essentially an instant read-only copy of a database, and it is a
great candidate for any type of reporting solution for your company. In addition to being a
great reporting tool, you can revert control from your primary database to your snapshot
database in the event of an error. The only data loss would be from the point of creation of the
database snapshot to the event of failure.
CLR integration
With SQL Server 2005, you now have the ability to create custom .NET objects with the
database engine. For example, stored procedures, triggers, and functions can now be created
21
using familiar .NET languages such as VB and C#. Exposing this functionality gives you tools
that you never had access to before such as regular expressions.
Service Broker
This feature gives you the ability to create asynchronous, message-based applications in
the database entirely through TSQL. The database engine guarantees message delivery,
message order consistency, and handles message grouping. In addition, Service Broker gives
you the ability to send messages between different SQL Server instances. Server Broker is also
used in several other features in SQL Server 2005. For example, you can define Event
Nonfictions in the database to send a message to a Queue in the database when someone
attempts to alter a table structure, of if there is a string of login failures.
DDL triggers
In previous DDL triggers are defined at the server or database level and fire when DDL
statements occur. This gives you the ability to audit when new tables, stored procedures, or
logins are created.
Ranking functions
SQL Server 2005 provides you with the ability to rank result sets returned from the
database engine. This allows you to customize the manner in which result sets are returned, such
as creating customized paging functions for Web site data.
Row versioning-based isolation levels
This new database engine feature improves database read concurrency by reducing the
amount of locks being used in your database. There are two versions of this feature (both of
which must be enabled at the database level):
Read Committed Isolation Using Row Versioning is used at the individual statement
level, and guarantees that the data is consistent for the duration of the statement.
Snapshot Isolation is used at the transaction level, and guarantees that the data is
consistent for the duration of the transaction.
22
The database engine is able to guarantee the consistency through row versions stored in the
tempdb database. Using these techniques in the appropriate situations can significantly decrease
your database locking issues.
XML integration
SQL Server 2005 introduces the new XML data-type. You can store full XML documents
in this new data-type, and you can place validations on the well-formed documents in the
database.
Database Mail
Database Mail, the eventual successor to SQL Mail, is a greatly enhanced e-mail solution
available in the database engine. With Database Mail, there is no longer a dependency on
Microsoft Outlook or MAPI e-mail clients. Database Mail uses standard SMTP to send e-mail
messages. These messages may contain query results, attachments (which can be governed by
the DBA), and is fully cluster aware. In addition, the e-mail process runs outside of the database
engine space, which means that messages can continue to be queued even when the database
engine has stopped.
SQL Server Architecture
Microsoft SQL Server data is stored in databases. The data in a database is organized into
the logical components visible to users. A database is also physically implemented as two or
more files on disk.
When using a database, to work primarily with the logical components such as tables,
views, procedures, and users. The physical implementation of files is largely transparent.
Typically, only the database administrator needs to work with the physical implementation.
Each instance of SQL Server has four system databases (master, model, tempdb, and
msdb) and one or more user databases. Some organizations have only one user database,
23
containing all the data for their organization. Some organizations have different databases for
each group in their organization, and sometimes a database used by a single application.
24
25
IMPLEMENTATION AND TESTING
4. IMPLEMENTATION AND TESTING
4.1 Introduction
Testing is a process of executing a program with the interest of finding an error. A good
test is one that has a high probability of finding the yet undiscovered error. Testing should
systematically uncover different classes of error in a minimum amount of time with a
minimum amount of effort.
Two classes of inputs are provided to the test process:
A software configuration that includes a software requirement specification, a design
specification and code.
A test configuration that includes a test plan and procedure, any testing tools that are
to be used and test cases and their expected results.
4.2 Unit Testing
Unit testing is vital to the success of the system. It helps to identify and correct the error
of the system. In the system testing performance and acceptance standards are developed.
Testing of the proposed system was done at all stages of project development. After each
section of a module is completed, the completed system was undergone testing by giving
sample data inputs. Thus each module is ensured error free.
Input data for testing was obtained from the organization itself. Each module was found
to be free of errors. Testing was also done with data that are not accepted by the system.
Performance monitoring of the system was also done with different type of inputs.
26
4.3 Validation Testing
Data validation checking is done to see whether the corresponding entries made in
different tables are done correctly. Proper validation checks are done in case of insertion and
updating of tables, in order to see that no duplication of data has occurred. If any such case
arises proper warning message will be displayed.
In this project the validation testing is done in many forms, in the formers registration
form, we are validating username and password. Only the register person can access those
pages. Other persons cannot access the pages and display the error report as register for login.
Each user should enter with their username and the password and the username and password
should match with the database. This is the main validation testing done in this project.
Figure 5.3.1 Validating the fields
27
4.4 Integration Testing
The entire project is split into small programs each of these single programs gives a
frame of output. It was done to ensure that each part of the project works efficiently. Then these
programs where combined together where all the constructors were used. It gave a lot of problem
as not functioning in an integrated manner. Anyhow using all the testing techniques and
principles, those problems have been solved.
In the integration testing it has to be checked where all the forms and modules integrate
properly with each others.All the data input are stored and the reports to be generated are proper.
There are some situations where in one form data has to be stored in multiple tables. In this
integration testing, it has to be made clear that all such storage takes place properly.
4.5 Output Testing
After performing the validation testing, the next step is output testing of the proposed
system. Since the system cannot be useful if it does not produce the required output. Asking the
user about the format in which the system is required, test output displayed or generated by the
system under consideration. The output format is considered in two ways. One is on screen and
another one is printed format.
The output format on the screen is found to be correct as the format was designed in the
system phase according to the user’s needs. For the hardcopy, the output comes according to the
specification requested by the user. Here the testing does not result in any correction in the
system.
28
Figure 5.5.1 Validate the Output Testing
4.6 Sample test case report
This is the final step in testing. In this entire web site was tested as a whole with all the
forms, code & modules. This form of testing is popularly known as Black Box testing or
system testing.
The concept of the black box is used to represent a system that’s inside
working are not available for inspection. Proper validation checks are done in
case of case of insertion and updating of tables, in order to see that no
duplication of data has occurred.
Only the register person can access those pages. Other person cannot
access those pages and display the error report as register for login.
29
Unit Testing-Login Type
The following sample test case report contains the details of the administrator who login
in the account. The unit testing has to check about the username and password is valid or
invalid.
Figure 5.6.1 Verifying username and password is invalid
30
Validation Testing-Login Type
The following sample test case report contains the details of the administrator who login
in the account. The unit testing has to check about the username and password is valid or
invalid.
Administrator Enter Username and Password
Figure 5.6.2 Administrator Enter Username and Password
31
5. SYSTEM IMPLEMENTATION
5.1 System Implementation
System implementation involves testing the installed system, converting from old system
to new system and training the users. Implementation also includes all those activities that place
from old manual system to a new automated system.
Proper implementation is essential to provide a reliable system to meet the citizens and
registrar. After successful demonstration and incorporating the demo feedback, implementation
was draw up in consultation with the citizens. Implementation is a stage of the project when the
theoretical design is turned out in to a working system.
Thus it can be considered to be the most critical stage in achieving a successful new
system and in giving the user confidence that the new system will work and be effective.
Implementation is a stage of the project when the theoretical design is turned out in to a
working system. Thus it can be considered to be the most critical stage in achieving a successful
new system and in giving the user confidence that new system will work and be effective.
Debugging
Debugging is the process of detecting and correcting the syntax and logical errors in a
program. The syntax errors can be detected by the compiler. The diagnosis of logical errors is
complicated by the delay, which normally exists the occurrence of actual errors.
Conversion
Conversion means changing from one system to another. The objective is to put the
tested system in to operation while holding costs, risks and personnel irritation to a minimum.
32
Training
An analysis of user training focuses on two factors. User capabilities and the nature of the
system being installed. Users range from the native to the highly sophisticated.
Developmental research provides interesting insights in to how native users think about
new system. They approach it as concrete learners. The distinction between concrete and formal
learning says much about what from trainees in general.
Post implementation and maintenance
Every operational system requires periodic evaluation after implementation a post
implementation review measures the system’s performance against predefined requirements. It is
after the fact-after design and conversion is complete. It also provides information to determine
whether major design is necessary. Maintenance is the enigma of development. It holds the
software industry captive, trying up programming resources. Programmers spend more time
maintaining program then they do writing them.
5.2 Maintenance
Maintenance is the process of changing the software hat is already in operation in order
to prevent system failures, to improve the performance, and extended features. Maintenance
can be classified into
Adaptive maintenance
Perception maintenance
Preventive maintenance
Corrective maintenance
33
5.2.1 Adaptive Maintenance
It deals with adaptive application to change in the environment. It does not lead to
change into the system functionality, that is while this project may run in different
environments, so it should adaptive according to the operating system and the project
should run perfectly.
5.2.2 Perception Maintenance
Mainly deals with accommodating the user requirements. It also includes
activities to increase the system performance or enhance its user interface. The objective
of perspective maintenance is to prevent failures and optimize application maintenance.
5.2.3 Preventive Maintenance
Retentive maintenance concerns activities aimed at increasing the records
maintainability, reliability and availability such as updating the current market price
details, giving information about seeds and training details and creating accounts.
5.2.4 Corrective Maintenance
It deals with the repair or correction of bugs found. This project is designed to be
feasible and adaptive and the bugs found are corrected and maintained easily because of
the latest technology language used to create this project.
34
35
CONCLUSION
6. CONCLUSION AND FUTURE ENHANCEMENTS
6.1 Conclusion
The project is developed as “INFRASTRUCTURE MANAGEMENT SYSTEM” in
Visual Studio 2008 as front end and SQL SERVER 2005 as back end .This system provides
benefits that the project is reducing the bulk amount of paper work and time too.
It has been designed to achieve maximum efficiency and reduce the time taken to
handle the datas. It is designed to replace an existing manual record system thereby reducing
time taken for calculations and for storing data. The system is strong enough to withstand
regressive daily operations under conditions where the database is maintained and cleared over
a certain time of span.
The implementation of the system in the organization will considerably reduce data
entry, time and also provide readily calculated reports. There may be chances to miss paper in
existing system. But this electronically system is more efficient and secured. The admin has all
the rights to access the system. This is gives the data security, extensibility and maintainability.
This project is still under modification.
7.1 Future Enhancements
There is a wide scope for future development of the software. The world of
computer fields is not static it is always subject to change. The technology which is famous
today will become outdated very next day. As system exists as online it possible to conduct
auction wherever administrator being in journey.
The scope of the project includes that what all future enhancements can be done in
this system to make it more feasible to use. To keep abstract of technical improvements, the
36
system may be refinement. So it is not concluded. Yet it will improve with further
enhancements.
Databases for different products range and storage can be provided.
Multilingual support can be provided so that it can be understandable by the person of any
language.
More graphics can be added to make it more user-friendly and understandable.
It is essential to change the software when new software arrives with more advanced
feathers. So it is much necessary for further development. Further enhancements can be done in
an efficient manner with disruption to the system.
This project may also be enhanced in several ways as there is always room for improving
the functionality of the application. The future enhancements that would make the application
more professional.
37
7. REFERENCES
7.1 Reference Books
1. Visual Basic .NET and .NET Platform: An Advanced Guide by Andrew Troelsen.
2. The .VB.NET Languages: A Quick Translation Guide by Brain Bischof.
3. The complete Reference VB 6.0 by Phil Hanna Published by Tata McGraw-Hill
Publishing Company Limited.
4. Dynamic Web publishing second Edition Author Shelley Powers published by
techmedia.
5. Tod Golding, “Professional.NET Gentices”, Wiley Publishing, Inc, 2005.
6. The .VB.NET Languages: Mastering Guide by Brain pithic.
7. Lars Powers, Mike Snell,”Visual Studio 2008 Unleased”, Person Education, Inc, 2008.
8. Sherriff, Lucy "Real Software slams MS IsNot patent application". The Register
Retrieved 6 April 2009.
9. Joel Spolsky, How Microsoft Lost the API War, Joel on Software, 13 June 2013.
10. "Option Explicit and Option Strict in Visual Basic .NET and in Visual Basic" . Support.
Microsoft. 19 March 2008. Retrieved 22 August 2013.
38
7.2 Reference Websites
1. www.codeproject.com
2. www.msdn.micosoft.com
3. www.csharpcorner.com
4. www.dotnetspark.com
5. www.dotnetcurry.com
6. www.tatamcgrawhill.com
7. www.w3schools.com
8. www.visualwebdevloper.com
9. www.developervb.net
10. www.visualbasicsample.com
39
Table Design
A relational database consists of collection of variables, each of which is assigned a
unique name. A row in a table represents a relationship among a set of values. The global of the
database is to generate a set of relations, which allows sorting information without redundancy
and also allows us to store and retrieve information with ease.
The tables are organized as:
Table Name-Login Details
COLUMN NAME DATA TYPE DESCRIPTION
Login_Id nvarchar(50) Login id
Login_Password nvarchar(50) Login Password
Table Name-Employee salary Details
COLUMN NAME DATA TYPE DESCRIPTION
Emp_Sal_Id numeric(18, 0) Employee Salary id
Emp_Id numeric(18, 0) Employee id
Emp_Sal_Recived numeric(18, 3) Employee Salary received
Emp_Sal_Paid numeric(18, 3) Employee Salary paid
Emp_Sal_Add_Pay numeric(18, 3) Employee Salary add pay
Emp_Sal_Paid_Date Date time Employee Salary Paid date
Emp_Sal_Total numeric(18, 3) Employee Salary Total
40
Table Name-Customer Details
COLUMN NAME DATA TYPE DESCRIPTION
Cust_Id numeric(18, 0) Customer id
Cust_Name nvarchar(50) Customer Name
Cust_Type_Of_Work nvarchar(50) Customer type of work
Cust_Project_Amt numeric(18, 3) Customer project Amount
Cust_Advance_Amt numeric(18, 3) Customer Advance Amount
Cust_Advance_Date Datetime Customer Advance Date
Cust_Date_Completion Datetime Customer Location
Cust_Location nvarchar(50) Customer Location Local
Cust_Location_Local nvarchar(50) Customer Location Residence
Cust_Phone_Resi numeric(18, 0) Customer phone Number
Cust_Mobile numeric(18, 0) Customer mobile Number
Cust_Pin_Code numeric(18, 0) Customer pin code Number
Table Name-Customer payment Details
COLUMN NAME DATA TYPE DESCRIPTION
Custpay_Id numeric(18, 0) Customer Payment id
Cust_Id numeric(18, 0) Customer id
Custpay_Amt numeric(18, 3) Customer payment Amount
Custpay_Date Datetime Customer payment date
Emp_Id numeric(18, 0) Employee id
41
Table Name-Employee Details
COLUMN NAME DATA TYPE DESCRIPTION
Emp_Id numeric(18, 0) Employee id
Emp_Name nvarchar(50) Employee Name
Emp_Type_Of_Work nvarchar(50) Employee type of work
Emp_Qualification nvarchar(50) Employee Qualification
Emp_Gender nvarchar(50) Employee Gender
Emp_Doj nvarchar(50) Employee Date Of Join
Emp_Dob Datetime Employee Date Of Birth
Emp_Place Datetime Employee Place
Emp_Pin_Code nvarchar(50) Employee Pin code
Emp_Mobile numeric(18, 0) Employee Mobile Number
Emp_Salary numeric(18, 0) Employee Salary
Emp_Salary_Date Datetime Employee Salary Date
42
Table Name-Inventory Details
COLUMN NAME DATA TYPE DESCRIPTION
Invtry_Item_Id numeric(18, 0) Inventory Item id
Invtry_Item_Name nvarchar(50) Inventory Item Name
Invtry_Item_Qty numeric(18, 0) Inventory Item Quantity
Invtry_Item_Price numeric(18, 3) Inventory Item Price
Invtry_Item_Other_Exp numeric(18, 3) Inventory Item other expense
Invtry_Item_Amt_Paid numeric(18, 3) Inventory Item Amount Paid
Invtry_Item_Amt_Paid_Date Datetime Inventory amount paid date
Invtry_Item_Cust_Id numeric(18, 0) Inventory Item Customer id
Invtry_Item_Emp_Id numeric(18, 0) Inventory Item Employee Id
Invtry_Item_Agent_Id numeric(18, 0) Inventory Item Agent Id
Invtry_Item_Vehicle_No nvarchar(50) Inventory Item Vehicle No
Invtry_Item_Vehicle_Name nvarchar(50) Inventory Item Vehicle Name
Table Name-Agent Details
COLUMN NAME DATA TYPE DESCRIPTION
Agent_Id numeric(18, 0) Agent id
Agent_Name nvarchar(50) Agent Name
Agent_Place nvarchar(50) Agent Place
Agent_Phone_Resi numeric(18, 0) Agent Phone number
Agent_Phone_Mob numeric(18, 0) Agent Mobile Number
43
Table Name-Vehicle Details
COLUMN NAME DATA TYPE DESCRIPTION
Vehicle_Id numeric(18, 0) Vehicle id
Vehicle_Name nvarchar(50) Vehicle Name
Vehicle_No nvarchar(50) Vehicle Number
Vehicle_Model nvarchar(50) Vehicle Model
Vehicle_Cost numeric(18, 3) Vehicle Cost
Vehicle_Amt_Paid numeric(18, 3) Vehicle Amount Paid
Vehicle_Status nvarchar(50) Vehicle Status
Vehicle_Purchase_From nvarchar(50) Vehicle Purchase From
Vehicle_Date Datetime Vehicle Date
Vehicle_Emp_Id numeric(18, 0) Employee Id
Table Name-Office Details
COLUMN NAME DATA TYPE DESCRIPTION
Off_Id numeric(18, 0) Office Id
Off_Name nvarchar(50) Office Name
Off_Floor_No numeric(18, 0) Office Floor Number
Off_Build_Name nvarchar(50) Office Building Name
Off_Location nvarchar(50) Office Location
Off_District nvarchar(50) Office District
Off_Pin numeric(18, 0) Office pin code Number
44
Off_Phone numeric(18, 0) Office Phone Number
Off_No_Of_Room numeric(4, 0) Office Number Of Rooms
Off_No_Of_Compu numeric(4, 0) Office Number Of Computers
Off_No_Table numeric(4, 0) Office Number Of Tables
Off_No_Chair numeric(4, 0) Office Number Of Chairs
Off_No_Printer numeric(4, 0) Office Number Of Printer
Off_No_Scanner numeric(4, 0) Office Number Of Scanner
Off_No_Sofa numeric(4, 0) Office Number Of Sofa sets
45
DIGRAM:
VEHICLE DETAILS:
46
AGENT DETAILS
47
LOAD AGENT DETAILS:
48
LOGIN DETAILS:
49
INVENTORY DETAILS:
50
EMP DETAILS:
51
CUSTPAY MODE DETAILS:
52
CUST DETAILS:
53
CONTINGENCY DETAILS:
54
CONTINGENCY DETAILS:
55
56
57
58
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace CivilManager{ public partial class InventoryDetails : Form { SqlConnection conn = new SqlConnection("Data Source=ADMIN-PC\\SQLEXPRESS;Initial Catalog=CivilHelper;Integrated Security=True"); public InventoryDetails() { InitializeComponent(); }
private void TxtQuantity_KeyPress(object sender, KeyPressEventArgs e) { if (!char.IsNumber(e.KeyChar) && (e.KeyChar != (char)8) && (e.KeyChar != (char)46)) { e.Handled = true; } }
private void TxtPrice_KeyPress(object sender, KeyPressEventArgs e) { if (!char.IsNumber(e.KeyChar) && (e.KeyChar != (char)8) && (e.KeyChar != (char)46)) { e.Handled = true; } }
private void TxtOtherExpences_KeyPress(object sender, KeyPressEventArgs e) { if (!char.IsNumber(e.KeyChar) && (e.KeyChar != (char)8) && (e.KeyChar != (char)46)) { e.Handled = true; } }
private void TxtAmountPaid_KeyPress(object sender, KeyPressEventArgs e) { if (!char.IsNumber(e.KeyChar) && (e.KeyChar != (char)8) && (e.KeyChar != (char)46)) { e.Handled = true; } }
59
private void comboBoxItemName_KeyPress(object sender, KeyPressEventArgs e) { if ((e.KeyChar == (char)8)) { e.Handled = true; } }
private void comboBoxCustName_KeyPress(object sender, KeyPressEventArgs e) { if ((e.KeyChar == (char)8)) { e.Handled = true; } }
private void comboBoxEmployeeName_KeyPress(object sender, KeyPressEventArgs e) { if ((e.KeyChar == (char)8)) { e.Handled = true; } }
private void comboBoxAgentName_KeyPress(object sender, KeyPressEventArgs e) { if ((e.KeyChar == (char)8)) { e.Handled = true; } }
private void comboBoxVehicleName_KeyPress(object sender, KeyPressEventArgs e) { if ((e.KeyChar == (char)8)) { e.Handled = true; } }
private void buttonCancel_Click(object sender, EventArgs e) { this.Close(); }
private void buttonClear_Click(object sender, EventArgs e) { FieldClear(); } private void FieldClear() { TxtAmountPaid.Text = "";
60
TxtOtherExpences.Text = ""; TxtPrice.Text = ""; TxtQuantity.Text = ""; TxtVehicleNo.Text = ""; comboBoxAgentId.Text = "----Select Agent Id-------------"; comboBoxCustId.Text = "----Select Customer Id----------"; comboBoxEmployeeId.Text = "----Select Employ Id---------"; comboBoxItemName.Text = "-------Select Item Name-------"; comboBoxVehicleName.Text = "----Select Vehicle Name-------"; label8.Text = ""; label19.Text = ""; label16.Text = ""; } private void AutoGenerate() { try { Int64 InvtryId = 0; SqlDataReader dr; conn.Open(); SqlCommand cmd = new SqlCommand("SELECT max(IINVTRY_ITEM_ID) AS IINVTRY_ITEM_ID FROM TBL_INVENTORY_DETAILS",conn); dr = cmd.ExecuteReader(); if (dr.Read()) { if (dr["IINVTRY_ITEM_ID"] != DBNull.Value) { InvtryId = System.Convert.ToInt64(dr["IINVTRY_ITEM_ID"]); } } InvtryId = InvtryId + 1; TxtInventoryId.Text = InvtryId.ToString(); dr.Close(); conn.Close(); } catch (Exception err) { MessageBox.Show(err.Message.ToString()); } finally { if (conn.State == ConnectionState.Open) { conn.Close(); } } }
private void InventoryDetails_Load(object sender, EventArgs e) { dateTimePickerInventoryDate.Value = DateTime.Today; AutoGenerate(); CustIdToComboBox(); EmpIdToCombobox(); AgentIdToComboBox(); }
61
private void CustIdToComboBox() { try { SqlDataReader dr; conn.Open(); SqlCommand cmd = new SqlCommand("SELECT CUST_ID FROM TBL_CUST_DETAILS WHERE CUST_STATUS =1 ORDER BY CUST_ID DESC ", conn); dr = cmd.ExecuteReader(); while (dr.Read()) { comboBoxCustId.Items.Add(dr["CUST_ID"]); } dr.Close(); conn.Close(); } catch (Exception err) { MessageBox.Show(err.Message.ToString()); } finally { if (conn.State == ConnectionState.Open) { conn.Close(); } } } private void EmpIdToCombobox() { try { SqlDataReader dr; conn.Open(); SqlCommand cmd = new SqlCommand("SELECT EMP_ID FROM TBL_EMP_DETAILS", conn); dr = cmd.ExecuteReader(); while (dr.Read()) { comboBoxEmployeeId.Items.Add(dr["EMP_ID"]); } dr.Close(); conn.Close(); } catch (Exception err) { MessageBox.Show(err.Message.ToString()); } finally { if (conn.State == ConnectionState.Open) { conn.Close(); } } } private void AgentIdToComboBox()
62
{ try { SqlDataReader dr; conn.Open(); SqlCommand cmd = new SqlCommand("SELECT AGENT_ID FROM TBL_LOAD_AGENT_DETAILS", conn); dr = cmd.ExecuteReader(); while (dr.Read()) { comboBoxAgentId.Items.Add(dr["AGENT_ID"]); } dr.Close(); conn.Close(); } catch (Exception err) { MessageBox.Show(err.Message.ToString()); } finally { if (conn.State == ConnectionState.Open) { conn.Close(); } } } private void comboBoxEmployeeId_SelectedIndexChanged(object sender, EventArgs e) { try { SqlDataReader dr; conn.Open(); SqlCommand cmd = new SqlCommand("SELECT EMP_NAME FROM TBL_EMP_DETAILS WHERE EMP_ID ='" + comboBoxEmployeeId.SelectedItem + "'", conn); dr = cmd.ExecuteReader(); if (dr.Read()) { label19.Text = dr["EMP_NAME"].ToString(); } dr.Close(); conn.Close(); } catch (Exception err) { MessageBox.Show(err.Message.ToString()); } finally { if (conn.State == ConnectionState.Open) { conn.Close(); } }
63
}
private void comboBoxCustId_SelectedIndexChanged(object sender, EventArgs e) { try { SqlDataReader dr; conn.Open(); SqlCommand cmd = new SqlCommand("SELECT CUST_NAME FROM TBL_CUST_DETAILS WHERE CUST_ID ='" + comboBoxCustId.SelectedItem + "'", conn); dr = cmd.ExecuteReader(); if (dr.Read()) { label8.Text = dr["CUST_NAME"].ToString(); } dr.Close(); conn.Close(); } catch (Exception err) { MessageBox.Show(err.Message.ToString()); } finally { if (conn.State == ConnectionState.Open) { conn.Close(); } } }
private void comboBoxAgentId_SelectedIndexChanged(object sender, EventArgs e) { try { SqlDataReader dr; conn.Open(); SqlCommand cmd = new SqlCommand("SELECT AGENT_NAME FROM TBL_LOAD_AGENT_DETAILS WHERE AGENT_ID ='" + comboBoxAgentId.SelectedItem + "'", conn); dr = cmd.ExecuteReader(); if (dr.Read()) { label16.Text = dr["AGENT_NAME"].ToString(); } dr.Close(); conn.Close(); } catch (Exception err) { MessageBox.Show(err.Message.ToString()); } finally { if (conn.State == ConnectionState.Open)
64
{ conn.Close(); } } } private void CalculationTotal() { Double Amt = 0; Double Exp = 0; Double Total = 0; Double Qty = 0; string Temp; string Temp1; string Temp2; Temp = TxtOtherExpences.Text; Temp1 = TxtPrice.Text; Temp2 = TxtQuantity.Text; if (TxtOtherExpences.Text == "") { Temp = "0"; } if (TxtPrice.Text == "") { Temp1 = "0"; } if (TxtQuantity.Text == "") { Temp2 = "0"; } Qty = System.Convert.ToDouble(Temp2); Amt = System.Convert.ToDouble(Temp1); Exp = System.Convert.ToDouble(Temp); Total = ((Qty) * (Amt)) + Exp; labelDisplayTotal.Text = Total.ToString(); }
private void buttonSave_Click(object sender, EventArgs e) { try { if (TxtAmountPaid.Text == "" || TxtOtherExpences.Text == "" || TxtPrice.Text == "" || TxtQuantity.Text == "" || TxtVehicleNo.Text == "" || comboBoxAgentId.Text == "----Select Agent Id-------------" || comboBoxCustId.Text == "----Select Customer Id----------" || comboBoxEmployeeId.Text == "----Select Employ Id---------" || comboBoxItemName.Text == "-------Select Item Name-------" || comboBoxVehicleName.Text == "----Select Vehicle Name-------") { MessageBox.Show("Please Fill All Fields..!"); } else { conn.Open(); SqlCommand cmd = new SqlCommand("INSERT INTO TBL_INVENTORY_DETAILS VALUES(@IINVTRY_ITEM_ID,@INVTRY_ITEM_NAME,@INVTRY_ITEM_QTY,@INVTRY_ITEM_PRICE,@INVTRY_ITEM_OTHER_EXP,@INVTRY_ITEM_AMT_PAID,@INVTRY_ITEM_AMT_PAID_DATE,@INVTR
65
Y_ITEM_CUST_ID,@INVTRY_ITEM_EMP_ID,@INVTRY_ITEM_AGENT_ID,@INVTRY_ITEM_VEHICLE_NO,@INVTRY_ITEM_VEHICLE_NAME)", conn); cmd.Parameters.Clear(); cmd.Parameters.Add("@IINVTRY_ITEM_ID", SqlDbType.BigInt); cmd.Parameters["@IINVTRY_ITEM_ID"].Value = TxtInventoryId.Text; cmd.Parameters.Add("@INVTRY_ITEM_NAME", SqlDbType.NVarChar, 50); cmd.Parameters["@INVTRY_ITEM_NAME"].Value = comboBoxItemName.SelectedItem.ToString(); cmd.Parameters.Add("@INVTRY_ITEM_QTY", SqlDbType.BigInt); cmd.Parameters["@INVTRY_ITEM_QTY"].Value = TxtQuantity.Text; cmd.Parameters.Add("@INVTRY_ITEM_PRICE", SqlDbType.BigInt); cmd.Parameters["@INVTRY_ITEM_PRICE"].Value = TxtPrice.Text; cmd.Parameters.Add("@INVTRY_ITEM_OTHER_EXP", SqlDbType.BigInt); cmd.Parameters["@INVTRY_ITEM_OTHER_EXP"].Value = TxtOtherExpences.Text; cmd.Parameters.Add("@INVTRY_ITEM_AMT_PAID", SqlDbType.BigInt); cmd.Parameters["@INVTRY_ITEM_AMT_PAID"].Value = TxtAmountPaid.Text; cmd.Parameters.Add("@INVTRY_ITEM_AMT_PAID_DATE", SqlDbType.DateTime); cmd.Parameters["@INVTRY_ITEM_AMT_PAID_DATE"].Value = dateTimePickerInventoryDate.Value.ToString(); cmd.Parameters.Add("@INVTRY_ITEM_CUST_ID", SqlDbType.BigInt); cmd.Parameters["@INVTRY_ITEM_CUST_ID"].Value = comboBoxCustId.SelectedItem; cmd.Parameters.Add("@INVTRY_ITEM_EMP_ID", SqlDbType.BigInt); cmd.Parameters["@INVTRY_ITEM_EMP_ID"].Value = comboBoxEmployeeId.SelectedItem; cmd.Parameters.Add("@INVTRY_ITEM_AGENT_ID", SqlDbType.BigInt); cmd.Parameters["@INVTRY_ITEM_AGENT_ID"].Value = comboBoxAgentId.SelectedItem; cmd.Parameters.Add("@INVTRY_ITEM_VEHICLE_NO", SqlDbType.NVarChar, 50); cmd.Parameters["@INVTRY_ITEM_VEHICLE_NO"].Value = TxtVehicleNo.Text.ToUpper(); cmd.Parameters.Add("@INVTRY_ITEM_VEHICLE_NAME", SqlDbType.NVarChar, 50); cmd.Parameters["@INVTRY_ITEM_VEHICLE_NAME"].Value = comboBoxVehicleName.SelectedItem.ToString(); int Result = cmd.ExecuteNonQuery(); conn.Close(); if (Result > 0) { MessageBox.Show("Data Stored Sucussfully"); } AutoGenerate(); FieldClear();
66
} } catch (Exception err) { MessageBox.Show(err.Message.ToString()); } finally { if (conn.State == ConnectionState.Open) { conn.Close(); } } }
private void TxtOtherExpences_TextChanged(object sender, EventArgs e) { CalculationTotalFn(); CalculationTotal(); }
private void TxtQuantity_TextChanged(object sender, EventArgs e) { CalculationTotalFn(); CalculationTotal(); }
private void TxtPrice_TextChanged(object sender, EventArgs e) { CalculationTotalFn(); CalculationTotal(); } private void CalculationTotalFn() { Double Amt = 0; Double Exp = 0; Double Total = 0; Double Qty = 0; string Temp; string Temp1; string Temp2; Temp = TxtOtherExpences.Text; Temp1 = TxtPrice.Text; Temp2 = TxtQuantity.Text; if (TxtOtherExpences.Text == "") { Temp = "0"; } if (TxtPrice.Text == "") { Temp1 = "0"; } if (TxtQuantity.Text == "") { Temp2 = "0"; } Qty = System.Convert.ToDouble(Temp2);
67
Amt = System.Convert.ToDouble(Temp1); Exp = System.Convert.ToDouble(Temp); Total = ((Qty) * (Amt)) + Exp; string Temp3; Temp3 = TxtAmountPaid.Text; if (TxtAmountPaid.Text == "") { Temp3 = "0"; } Double Total1 = 0; Double Total2 = 0; Total1 = System.Convert.ToDouble(Temp3); Total2 = Total - Total1; if (System.Convert.ToDouble(Temp3) > Total) { MessageBox.Show("Paid Amount is Greater Than Total Amount..!"); labelDisplayBalance.Text = "Nil"; } else { labelDisplayBalance.Text = Total2.ToString(); }
}
private void TxtAmountPaid_TextChanged(object sender, EventArgs e) { CalculationTotalFn(); }
private void groupBox1_Enter(object sender, EventArgs e) {
} }}
68
69
70
71
72
73
74
75
76
77
78
79