Anda di halaman 1dari 39

CONTENTS

Pg.no.

1. Introduction 1

2. Design Principles & Explanation 3

2.1. Modules

2.2. Module Description

3. Project Dictionary 13

3.1. Dataflow Diagrams

3.2. E-R Diagrams

3.3. Data Dictionary

4. Forms & Reports 20

4.1. I/O Samples

5. Coding 26

6. Testing 34

7. Conclusion 37

8. Bibliography 38
Online Sales and Services of Hardware Management System

1. Introduction
This project is is mainly concerned with selling the all systems and servicing of
customers in both hardware and software problems. The company will require more
manpower to maintain financial transactions, sales transactions etc.
The main aim of this project is to automate the manual processing in the
stock maintenance, financial transactions, and employee transactions etc. If these are done
manually, it consumes large amount of time, scope for errors, and cost of maintenance is also
very high. So, in order to reduce all these disadvantages we developed a business application
for the concerned company. The application will generate reports for the order status and
service call status in order to place purchase orders and assigns duties to the employees for
attending the service call. Automation will helpful in maintaining the accounts accurate and
up-to-date.
The objective of this project is to automate the Computer Systems dealer
transactions as a whole. This application should eliminate the burden on accountant and
should also eliminate the delays and arithmetic errors more importantly. This application
should provide the following features to the users.
Planning employee responsibilities and specifying employee targets is no more
difficult. A faster way to produce employee performance reports and to maintain their daily
reports. Now formal communications between organization and customers is easy in the form
of automated document generations and printings. Maintaining daily expenses and generating
monthly reports is not a tedious job. Generating financial reports like pending bills, monthly
income and turn over is faster and automatic.
The main objective of this project is to automate the information processing of
hardware sales and servicing of an authorized dealer of ‘Zenith computers’. As business
volume increased it is difficult to process the information fast to serve the customers in good
manner. We aimed in developing this package to make the information processing easy and
fast.

2
Online Sales and Services of Hardware Management System

In the perspective of the user, the package must have an easily operable
graphical user interface. To satisfy the user, we aimed to give online support such as entry
wise help, form wise help and also off line help. Finally we want to design this package such
that anyone can use it without any manual training. The outcome of any business
application is a well-defined set of reports. We aimed to extract an useful set of reports by
processing the input data.
The objectives also include the following business requirements from the client.
Automated enquiry tracking sub system.
An efficient and fast quotation preparation.
A flexible order information processing.
An efficient ‘service request’ handling sub system.
An accurate financial sub system to handle income and expenses calculation and to generate
financial reports.
A good planner to serve the customers.

3
Online Sales and Services of Hardware Management System

2. Design Principles & Explanation


2.1. Modules:
Well-structured designs improve the maintainability of a system. A structured
system is one that is developed from the top down and modular, that is, broken down into
manageable components. In this project we modularized the system so that they have
minimal effect on each other.
2.2. Module Description
Sales Module:
This module is intended to implement all the transactions related to the sales of
computers. This involves different sub modules like enquiry tracking, quotation preparing
and order booking.
Servicing Module:
This module is designed such that to handle all the transactions related to service
calls. This module is sub divided into ‘AMC’ service calls handling and temporary service
calls handling sub systems.
Reports Module:
The reports module generates reports related to all the above modules. These
reports include financial reports, sales reports and servicing reports.
Reports:
The reports generated in project depict the up to date information about the current status of
various records. The various types of reports that will be generated in this project are as
mentioned below.
Sales Reports:
These reports give an important extract from the data, which will help to take decisions to
improve the sales. These reports are enquiry reports, quotation reports and order reports.
Servicing Reports:
These reports give the details of calls served according to given time period.
Using these reports one can plan their calls to attend in an easy manner.

4
Online Sales and Services of Hardware Management System

LITERATURE SURVEY
System study:
System analysis and design is an approach towards formalization the analysis and
design of information systems with the objective of improving the system performance by
automation.
In the process of planning a new system or to replace or improve the old system,
the through analysis of the existing system has to be done. So the system plans a very
important role in the process of system development.
Existing System
In the existing system the customer has to send an order, once the order is sanctioned
or denied it does not notify to the customers. Everything is in a printed form and
instantaneous input and retrieval of required information is a tedious job. Whenever a
particular customer’s information is to be known several records have to be searched.
All this consumes a lot of manual work and time. The space required to store the data
is also very much and it is a waste of both time and manpower. Therefore depending on the
requirements of the company.
Proposed System
In order to overcome the limitations of the existing system we have planned to
have a computerized Online Banking System which runs through the network of the Banks.
The main objective of Online Banking System is to minimize the customers time and effort
maximum extent and for maintaining details of the customers, his/her personal account
details and for fast processing of the business interaction and its approval which can be done
in a networking environment.
Salient Features Of Proposed System
1. Directed interaction between Customer and the Online Banking Application.
2. Customer can send the account details, view, checks the availability of all transactions.
3. Automatically the transaction request is stored the transaction table.
4. Admin can accept or deny the customer request.
5. Account detail database has to be updated by Authorized person.

5
Online Sales and Services of Hardware Management System

6. Validation and verifications are done in the system.


7. Admin search and view the details of a customer.
8. It is connected with the banking system.
9. Employee can instantaneously know the availability of the amounts.
10. The customer can easily check all the transactions up to particular day.
11. Requires less time for transactions and searching records.

System Analysis
The analysis is the process of understanding the system at a greater depth,
identifying the missing functions with an intention to improve it through better methods and
procedures. The requirement analysis is done in order to understand the problem, the
software system is to solve. Requirements analysis is on identifying what is needed from the
system, not how the system will achieve its goal.
The goal of requirement specification phase is to produce the software
requirements specification document (RAD). The person responsible for the requirements
analysis is often called the analyst.
In this phase we study the system and observe the problem of existing system and
think how to cover the problems (Problem Analysis). There are three major activities in this
phase are:
Feasibility Study:
Feasibility study is a test of system proposal according to its workability, impact
on the College, ability to meet user needs and effective use of resources. The objective of
feasibility study is not to solve the problem but acquire a sense of its scope.
Therefore, we performed two feasibility checking –
(i)Technical Feasibility
(ii)Economical Feasibility
Technical Feasibility
Technical feasibility analysis includes the resource availability of the College.
Considering the resources at Surana College the project is technically feasible. The hardware

6
Online Sales and Services of Hardware Management System

and software available in the organization is enough for the proper working of the system
going to be developed. So the new system is technically feasible.
Economical Feasibility
The aspects mainly verify whether the development is cost-effective. Here, the
cost includes development cost software/hardware cast of maintenance. In our proposed
system, the development cost is optimized. The maintenance cost of the proposed system will
be less compared to the present system. So the new system is economically feasible.
Software Selection:
The software we selected for our project is VB.NET, which provides a frame for using
different technology, like ASP.NET, AJAX.NET, C#.NET. we have used the ASP.NET
technology hare to write the code. Reason for choosing VB.NET is that, its suitable for coding
server side program and we can also add JavaScript in the source code for various validation.
VB.NET also provides some inbuilt tools for validating various fields in containing in a Form
which is to be filled by the user.
Data base technology has been described as one of the most rapidly growing areas of
computer and information science. It is know exaggeration to say that many thousands of
organizations have become critically dependent on the continued and successful operations of
a database system. Organization needs security, scalability, easy to install the software and
capable of storing huge amount of data so we selected SQL2000 as a backend.
Overview of .NET
Microsoft introduced the .NET with the intention of bridging the gap in
interoperability between applications. It aims at integrating various programming languages
and services. It is designed to make significant improvements in code reuse, code
specialization, resource management, multi-language development, security, deployment, and
administration. The .NET is a new development platform that helps in creating Web
applications very fast. It allows the developers to write their applications/programs in any of
the .NET languages with which they are most comfortable, as they can share their
applications /programs with those of their co-programmers, programming in another. Net
compatible language. This features refers to as cross-language development, is the primary
strength of the .NET platform.

7
Online Sales and Services of Hardware Management System

The languages supported by the .NET platform are called .NET languages. A few of
the common .NET languages are C#, Visual Basic.NET, Visual Java.NET. The .NET
platform is centered on two basic components. These are
Common Language Runtime (CLR)
Base Class Libraries (BCL)
Common Language Runtime (CLR)
A runtime is a component, which a computer must have, in order to execute programs
written in a particular programming language. The runtime component of a language
provides the basic features, needed by the programs written in that language to execute
successfully. When a program is executed it links to the runtime component of the language
in which it is written, to get the basic functionality it requires the CLR is similar to the Java
virtual machine. It provides the basic execution services and makes the .NET program written
in any of the .NET languages executable on the .NET platform. When a program is written
in .NET language is compiled, it produces
Metadata
Microsoft intermediate language
Base class library (BCL)
The .NET environment provides a base class library which can be used by all .NET
languages. In fact, the base class library provides the basic functionalities like console
input/output, text manipulation, mathematical function etc. to the various .NET languages.
The class library, the other main component of the .NET Framework, is a
comprehensive, object-oriented collection of reusable types that you can use to develop
applications ranging from traditional command-line or graphical user interface (GUI)
applications to applications based on the latest innovations provided by ASP.NET, such as
Web Forms and XML Web services.

8
Online Sales and Services of Hardware Management System

Advantages of .NET:
1. Multiple Platform Support
2. Performance
3. Common Functionality
4. No More Language Functionality Debates
5. No more Asp-Imposed Limitations
6. Using Objects
7. Name Spaces
Visual Studio.NET:
Visual Studio .NET is the tool for rapidly building enterprise-scale ASP Web
applications and high performance desktop applications. Visual Studio includes component-
based development tools, such as Visual C#, Visual Basic, and Visual C++, as well as a
number of additional technologies to simplify team-based design, development, and
deployment of our solutions.
VB.NET is the result of a significant rebuild of VB for the Microsoft .NET
Framework. There are a number of changes that make VB.NET easier to use, more powerful
than VB.NET and give it the kind of access to system resources that in the past required the
use of languages like C++. One of the most important additions is object inheritance. In
VB.NET, all managed types derive from System. Object.
An important new language feature is garbage collection, which is administered by
the common Language Runtime & provides better memory management. The universal type
system allows for greater interoperability, also contributing to the enhanced power &
flexibility found in visual basic .NET. One of the best things about VB.NET is that it allows
VB.NET developers to do things that we couldn’t do before – things like inheritance &
structured error handling. Another long-awaited capability is the ability to write applications
that interact with the user via the command line. VB.NET makes this easy & with full .NET
functionality.

9
Online Sales and Services of Hardware Management System

Inheritance:
VB.NET supports inheritance by allowing you to define classes that serve as the basis
for derived classes. Derived classes inherit and can extend the properties and methods of the
base class. They can also override inherited methods with new implementations. All classes
created with VB.NET are inheritable by default. Because the forms you design are really
classes, you can use inheritance to define new forms based on existing ones.
Inheritance allows you to write and debug a class once, and then reuse that code over
and over as the basis of new classes. Inheritance also allows you to use inheritance-based
polymorphism, the ability to define classes that can be used interchangeably by client code at
run time, but with functionally different, yet identically named methods or properties.
Exception Handling:
VB.NET supports structured exception (error) handling, which allows the
program to detect and possibly recover from errors during execution. VB.NET uses an
enhanced version of the Try…Catch…Finally syntax already supported by other languages
such as C++. Structured exception handling combines a modern control structure (similar to
Select Case or While) with exceptions, protected blocks of code, and filters.
.NET project types:
Project Type Description
Used to create applications with a Windows Form based user
Windows Application interface.
Class Library Used to create class libraries for use in other applications.
Windows Control
Library Used to create controls to use in Windows-based applications.
Used to create applications with static or dynamic web pages as a
Web Application user interface.
Web Service Used to create Web Services to use from other applications.
Web Control Library Used to create controls to use in web applications
Console Application Used to create command line applications.
Windows Service Used to create services for Windows.

ASP.NET

10
Online Sales and Services of Hardware Management System
ASP.NET is an Upgrading Version of Asp 3.0. It is the hosting environment that
enables developers to use .NET Framework to target Web-based applications. It is a complete
architecture for developing Websites and Internet distributed object using managed code.
Comparison of ASP and ASP.NET
Multiple Languages
ASP has been a limited Scripting engine, notably VBScript and Jscript. The .NET
Framework inherently supports multiple languages, so we can use whichever we feel most
compatible with.
Object-oriented
ASP.NET is pure Object-oriented. But asp is not.
Advantages of ASP.NET
1. Make code easier.
2. Improve deployment, scalability, security and reliability.
3. Provides better support for different browsers and devices.
4. Enable a new breed of Web applications.
5. Improves the Session rate.
6. Pure Object-oriented.
Introduction to ASP.NET Server Controls
In addition to supporting standard HTML input controls, ASP.NET enables
developers to utilize richer custom controls on their pages. For example, the following
sample demonstrates how the <asp: ad rotator> control can be used to dynamically display
rotating ads on a page.
1. ASP.NET Web Forms provide an easy and powerful way to build dynamic Web UI.
2. ASP.NET Web Forms pages can target any browser client (there are no script library or
cookie requirements).
3. ASP.NET Web Forms pages provide syntax compatibility with existing ASP pages.
4. ASP.NET server controls provide an easy way to encapsulate common functionality.
4. ASP.NET ships with 45 built-in server controls. Developers can also use controls built
by third parties.
.
ADO versus ADO.NET

11
Online Sales and Services of Hardware Management System
A Fundamental change from ADO to ADO.NET was the adaptation of XML for data
exchanges. XML is a text-based language, similar to Html that presents an efficient way of
representing data. This allows ADO.NET to reach exchange and persist data stores much
more easily than ADO. It also gives Ado.NET much better performance because XML data is
easily converted to and from any type of data. It does not require the complex conversions
that wasted processor time with classic ADO.
Another major change is the way ADO.NET interacts with Databases. ADO requires
“locking” of database resources and lengthy connections for its applications. But ADO.NET
doesn’t.
It uses disconnected datasets, which eliminates lengthy connections, and database
locks. This makes Ado.NET much more scalable because user isn’t in connection for
database resources.
Advantages of ADO.NET
1. More Scalable.
2. Better performance
Exchange and persist data stores much more easily.
Overview of SQL Server 2000
Each SQL Server installation has multiple databases. SQL Server has four system
databases (Master, Model, Tem band & Msdb) & one or more user databases. Some
organizations have different databases for each group in their organization & sometimes a
database used by a single application. Some organizations have only one user database,
containing all the data for their organization.
SQL Server is capable of handling thousands of users working in multiple databases
on the same server at the same time. SQL Server makes all databases on the server available
to all users that connect to the server, subjects to defined security permissions.
One of the main features of SQL Server user here in this project is that: SQL Mail
Feature allows notifying users when a particular change occurs in the database. SQL Mail
provides a mechanism to send & receive e-mail directly from SQL Server.
For example: when inventory falls below a certain threshold, a trigger can
automatically run SQL Mail to send an e-mail message to the purchasing department.

12
Online Sales and Services of Hardware Management System
Conversely, you can use e-mail as the input vehicle for data that is defined for a SQL
Server database. E-mail messages can be sent to mailbox set up for SQL Server, & a SQL
Mail task can check the mailbox set up for SQL Server, & a SQL Mail task can check the
mailbox regularly to automatically insert the data from the messages it finds and reply with a
confirmation message.
SQL Server feature:
Ease of installation, deployment and use
System Integration with Other server software
Scalability
Availability.
Enterprise-Level Database Feature.
Data warehousing.
Internet Integration
Structured Query Language
To work with data in a database, the user have to use a set of commands and
statements (language) defined by the DBMS software. Several different languages can be
used with relational databases; the most common is SQL. The American National Standards
Institute (ANSI) and the International Standards Organization (ISO) define software
standards, including standards for the SQL language. SQL Server 2000 supports the Entry
Level of SQL-92, the SQL standard published by ANSI and ISO in 1992. The dialect of SQL
supported by Microsoft SQL Server is called Transact-SQL (T-SQL). T-SQL is the primary
language used by Microsoft SQL Server applications.
HARDWARE & SOFTWARE REQUIREMENTS
Hardware Requirements:
The hardware requirements are specified below:
Processor : Intel Pentium IV, 1.2 GHz and Higher
RAM : 256 MB or above
Hard Disk : 1 GB or above

13
Online Sales and Services of Hardware Management System

Software Requirements:
Microsoft Windows 98, 2000, XP, 2003
Internet explorer 5.0 or Higher
Visual Studio .NET 2005, SQL Server 2000, Microsoft Office 2003
Input-Output Devices
Computer input and output devices for are described as follows.
• Output: Monitor
• Input: Keyboard and Mouse

3. Project Dictionary

3.1. Dataflow Diagrams:


A graphic tool used to describe and analyze the moment of data through a system –
manual or automated – including the processes, stores of data, and delays in the system. Data
flow diagrams are the central tools and the basis from which other components are
developed. The transformation of data from input to output, through processes, may be
described logically and independently of the physical components associated with the system.

H/W sales
and Service
Customer Information 14
Reports
System
Online Sales and Services of Hardware Management System

Service Request

Service Response

LEVEL 1 DFD

Reports

Data
Data Store

Custom
Service request

Response / Bill
Sales Order

Receipt
Item / Bill

Cash
er

Sales Service Financia


Process Process l Process
Service Data
Sales Data

1.0 2.0 3.0


Fin. Data

Sales Data Service Data Fin. Data

15
Online Sales and Services of Hardware Management System

Quotation Request
Enquiry Details Order data

Quotation Details
Customer
Enquiry Response Bill / Item

Quotation details
Enquiry
Enquiry Data

Quotation Orders
Tracking
Process 1.1 s Process Process
1.2 1.3

Order data
User_info Quot_info Porder_info

16
Online Sales and Services of Hardware Management System

Employee Details Daily Expenses

Spares Buy Data

Spares report
User
Receipt
Expenses report

Expenses
Spare Buy Data
Spares
Employee data

Employee
Maintenanc
pays Process buying
TA & DA

3.1 e Process
process 3.2
3.3

Emp_info TADA_info Spares store Expenses


Expenses

17
Online Sales and Services of Hardware Management System

3.2. Data Dictionary:


A data dictionary is a catalogue – a repository – of the elements in a system. As the name
suggests, these elements center on data the way they are structured to meet user requirements
and organization needs. In a data dictionary you will find a list of all the elements composing
the data flow through a system.
ORDER_INFO:
Name Type Constraints Description
ORD_NO Varchar(50) Primary key Order serial
CUST_ID Varchar2 (25) Foreign key Customer id
partids Number Foreign key Enquiry number
Order-date Number Foreign key Quotation number

n no-ofcomputers Number Order amount

CUSTOMER:
Name Type Constraints Description
CUS_ID Varchar2 (25) Primary key Customer id
CUST_NAME Varchar2 (25) Name
DESIG Varchar2 (25) Occupation
STREET Varchar2 (25) Street name
COLONY Varchar2 (25) Colony name
CITY Varchar2 (25) City name
PHONE Varchar2 (25) Phone number
E-MAIL Varchar2 (25) Email add

AMC:
Name Type Constraints Description
CUST_ID Varchar (50) Foreign key Customer id
TOTALCOMPUTERS Varchar(50) No.of computers

18
Online Sales and Services of Hardware Management System
REG_DATE Varchar(50) date

SERVICE_REQ:
Name Type Constraints Description
CUST_ID Varchar2 (25) CUSTOMER ID
PROBLEM Varchar2 (25) Problem
SYS_TYPE Varchar2 (25) SYSTEM TYPE
REG_DATE Varchar2 (25) REGISTRATION
DATE

SPAREPART:
Name Type Constraints Description
PART_ID Varchar2 (25) ID of spare
PART_NAME Varchar2 (25) NAME OF SPARE
BUY_DATE Varchar2 (25) Amount
NUM_OF_PARTS Varchar2 (25) TOTL SPARES
MOUNTPER
SINGLE Varchar2 (25) PER SINGLE
TOTAL Varchar2 (50) TOTAL AMOUNT
AMT_PAYED Varchar2 (50) AMOUNT PAYED

EMPLOYEE:
Name Type Constraints Description
EMP_ID Varchar2 (50) ID OF EMP
NAME Varchar2 (25) Primary key Name of service Eng.
ADDR Varchar2 (200) Address
PHONE Varchar2 (15) Phone number
SALARY Number Salary
QUALI Varchar2 (25) Qualification
EXPR Number Experience

19
Online Sales and Services of Hardware Management System

4. Forms & Reports

20
Online Sales and Services of Hardware Management System

21
Online Sales and Services of Hardware Management System

22
Online Sales and Services of Hardware Management System

23
Online Sales and Services of Hardware Management System

24
Online Sales and Services of Hardware Management System

25
Online Sales and Services of Hardware Management System

26
Online Sales and Services of Hardware Management System

5.Coding

Form1
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class adminloin : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Session["id"] = TextBox1.Text.ToString();
}
protected void Button1_Click(object sender, EventArgs e)
{
if (TextBox1.Text == "" || TextBox2.Text == "")
{
Label5.Text = "Enter the id and password";
}
else
{
Label5.Text = "";
SqlConnection con = new SqlConnection("Initial Catalog=phani;integrated
security=yes");
SqlCommand com = new SqlCommand("select * from admin", con);
con.Open();
SqlDataReader rd = com.ExecuteReader();
if (rd.Read())
{
if ((TextBox1.Text.Trim() == rd[0].ToString()) && (TextBox2.Text.Trim()
== rd[1].ToString()))
{
Response.Redirect("allinfo.aspx");
}
else
{
Label5.Text = "plz check the id and password";
}
}
con.Close();

}
Form2
public partial class changepassword : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

27
Online Sales and Services of Hardware Management System
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Initial Catalog=phani;integrated
security=yes");
int flag=0;
if(TextBox1.Text=="admin")
{

SqlCommand com = new SqlCommand("select * from admin", con);


con.Open();
SqlDataReader rd = com.ExecuteReader();
if (rd.Read())
{
if ((TextBox1.Text.Trim() == rd[0].ToString()) && (TextBox2.Text.Trim()
== rd[1].ToString()))
{
rd.Close();
SqlCommand com1 = new SqlCommand("update admin set
password='"+TextBox3.Text+"' where id='"+TextBox1.Text+"'" ,con);
com1.ExecuteNonQuery();
Label6.Text = "Your password succussfuly changed";
}
else
{
Label6.Text = "plz Check the id and password ";
}
}
}
else
{
SqlCommand com2 = new SqlCommand("select userid,password1 from
userinfo", con);
con.Open();
SqlDataReader rd1 = com2.ExecuteReader();
while (rd1.Read())
{
if ((TextBox1.Text.ToString() == rd1[0].ToString()) &&
(TextBox2.Text.ToString() == rd1[1].ToString()))
{
rd1.Close();
SqlCommand com3=new SqlCommand ("update userinfo set
password1='"+TextBox3.Text+"',password2='"+TextBox4.Text+"' where
userid='"+TextBox1.Text+"'",con);
com3.ExecuteNonQuery();
flag=1;
break;
}
}

if (flag == 1)
{
Label6.Text = "Your password succussfuly changed";
}
else
{
Label6.Text = "plz Check the id and password ";
}

28
Online Sales and Services of Hardware Management System
}
con.Close();
}
}

Form3
public partial class orderinfo : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Label7.Text = "";
TextBox2.Text= Session["custid"].ToString() ;
TextBox4.Text = DateTime.Today.ToShortDateString();
GridView1.Visible = false;
}

protected void Button2_Click1(object sender, EventArgs e)


{
int flag = 0;
Label7.Text = "";
SqlConnection con = new SqlConnection("initial Catalog=phani;integrated
security=yes");
SqlCommand com = new SqlCommand("select * from spinfo", con);
con.Open();
SqlDataReader dr = com.ExecuteReader();
String i = TextBox3.Text.ToString();

while (dr.Read())
{

if (i == dr[0].ToString())
{
dr.Close();
flag = 1;
break;

}
else
{
flag = 0;
}
}

if (flag == 1)
{
SqlCommand com1 = new SqlCommand("insert into orderinfo values('" +
TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" +
TextBox4.Text + "','" + TextBox5.Text + "')", con);
SqlDataAdapter ad = new SqlDataAdapter(com1);
com1.ExecuteNonQuery();
Label7.Text = "One record is added";
GridView1.Visible = false;
cler();
}
else
{
Label7.Text = "Invalied partid plz check";
}
con.Close();

29
Online Sales and Services of Hardware Management System
}
public void cler()
{
TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
TextBox4.Text = "";
TextBox5.Text = "";
//Label7.Text = "";
}
protected void Button1_Click(object sender, EventArgs e)
{

string cou = "";


int num;
string str;
//Label8.Text = "";
SqlConnection con = new SqlConnection("initial catalog=phani;integrated
security=yes");
SqlCommand com = new SqlCommand("select max(orname) from orderinfo",
con);
SqlCommand com1 = new SqlCommand("Select max(orname) from orderinfo",
con);
con.Open();
SqlDataAdapter ad = new SqlDataAdapter(com1);
cou = com1.ExecuteScalar().ToString();
SqlDataReader rd = com.ExecuteReader();
if (cou == "")
{
TextBox1.Text = "OR000" + "1";
}
else
{
if (rd.Read())
{
str = rd[0].ToString();
str = str.Substring(2, 4);
num = Int32.Parse(str.ToString());
if (num < 9)
{
num = num + 1;
TextBox1.Text = "OR000" + num.ToString().Trim();
}
else
{
str = str.Substring(2, 2);
num = Int32.Parse(str.ToString());
num = num + 1;
TextBox1.Text = "OR00" + num.ToString();
}
}
}
con.Close();
}
protected void TextBox5_TextChanged(object sender, EventArgs e)
{

30
Online Sales and Services of Hardware Management System
protected void LinkButton1_Click(object sender, EventArgs e)
{
// Panel3.Visible = false;
}
protected void Button3_Click(object sender, EventArgs e)
{
GridView1.Visible=true;
}
Form3
public partial class Salesinfo : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

TextBox4.Text = DateTime.Today.ToShortDateString();
TextBox8.Enabled = false;
//Label11.Text ="WELCOME:"+" "+Session["id"].ToString() ;
}
protected void Button2_Click(object sender, EventArgs e)
{
Label11.Text = "";
//int a, b, c;
//a = int.Parse(TextBox6.Text.ToString());
//b = int.Parse(TextBox7.Text.ToString());
//c = a * b;
//TextBox8.Text = c.ToString();
SqlConnection con = new SqlConnection("Initial Catalog=phani;integrated
security=yes");
con.Open();
SqlCommand com4 = new SqlCommand("select * from spinfo where partid='" +
TextBox5.Text + "'", con);
SqlDataReader rd = com4.ExecuteReader();
//string s=rd[3].ToString ();
if (rd.Read())
{
int n = int.Parse(rd[3].ToString ());
int n1=int.Parse (TextBox6.Text);

if (n<n1)
{
Label10.Text = "Sorry we have"+" "+rd[3].ToString()+" "+"Items plz
refill the spareparts";
}
else
{

SqlCommand com = new SqlCommand("insert into salseinfo values('" +


TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" +
TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "','" +
TextBox7.Text + "','" + TextBox8.Text + "')", con);

//amount
int a1, b1, c1;
int tot,tm,dm;
tm=int.Parse (TextBox8.Text);
dm=int.Parse(rd[5].ToString ());
tot=dm-tm;
//parts

31
Online Sales and Services of Hardware Management System
a1 = int.Parse(TextBox6.Text.ToString());
b1 = int.Parse(rd[3].ToString());
c1 = b1 - a1;
rd.Close();
SqlCommand com2 = new SqlCommand("update spinfo set noofparts='" +
c1.ToString() + "',tamount='" + tot.ToString() + "' where partid='" +
TextBox5.Text + "'", con);
com2.ExecuteNonQuery();
SqlCommand com3 = new SqlCommand("delete orderinfo where orname='" +
TextBox3.Text + "'", con);
com3.ExecuteNonQuery();
com.ExecuteNonQuery();
Label10.Text = "One record is added";
Response.Redirect("salesinfo.aspx");
}
rd.Close();
}
con.Close();
cler();
}

public void cler()


{
TextBox1.Text = "";
TextBox2.Text = "";
TextBox3.Text = "";
//TextBox4.Text = "";
TextBox5.Text = "";
TextBox6.Text = "";
TextBox7.Text = "";
TextBox8.Text = "";

}
protected void Button1_Click(object sender, EventArgs e)
{
cler();
string cou = "";
int num;
string str;
Label10.Text = "";
SqlConnection con = new SqlConnection("initial catalog=phani;integrated
security=yes");
SqlCommand com = new SqlCommand("select max(salid) from salseinfo",
con);
SqlCommand com1 = new SqlCommand("Select max(salid) from salseinfo",
con);
con.Open();
SqlDataAdapter ad = new SqlDataAdapter(com1);
cou = com1.ExecuteScalar().ToString();
SqlDataReader rd = com.ExecuteReader();
if (cou == "")
{
TextBox1.Text = "SA000" + "1";
}
else
{

32
Online Sales and Services of Hardware Management System
if (rd.Read())
{
str = rd[0].ToString();
str = str.Substring(2, 4);
num = Int32.Parse(str.ToString());
if (num < 9)
{
num = num + 1;
TextBox1.Text = "SA000" + num.ToString().Trim();
}
else
{
str = str.Substring(2, 2);
num = Int32.Parse(str.ToString());
num = num + 1;
TextBox1.Text = "SA00" + num.ToString();
}
}
}
con.Close();
}
protected void TextBox2_TextChanged(object sender, EventArgs e)
{
int flag = 0;
SqlConnection con = new SqlConnection("Initial Catalog=phani;integrated
security=yes");
con.Open();
SqlCommand com = new SqlCommand("select *from orderinfo where custid='"
+ TextBox2.Text + "'", con);
SqlDataReader rd = com.ExecuteReader();
while (rd.Read())
{
if (TextBox2.Text == rd[1].ToString())
{
rd.Close();
SqlCommand com1 = new SqlCommand("select partid,orderid,noofcom from
orderinfo where custid='" + TextBox2.Text + "'", con);
SqlDataAdapter ad = new SqlDataAdapter(com);
DataSet ds = new DataSet();
ad.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
flag = 1;
break;
}
else
{
flag = 0;
}
}
if (flag == 0)
{
Label10.Text = "The custmuer id does not exist in orderinformation";
}
else
{
Label10.Text = "select the any one productid and enter the specified
textfield";
}

33
Online Sales and Services of Hardware Management System
con.Close();

}
protected void TextBox3_TextChanged(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Initial Catalog=phani;integrated
security=yes");
con.Open();
SqlCommand com = new SqlCommand("select * from orderinfo where orname='"
+ TextBox3.Text + "'", con);
SqlDataReader rd = com.ExecuteReader();
//TextBox6.Text = rd[4].ToString();

if (rd.Read())
{
TextBox5.Text = rd[2].ToString();
TextBox6.Text = rd[4].ToString();
}
con.Close();
}
protected void Button3_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Initial Catalog=phani;integrated
security=yes");
con.Open();
SqlCommand com = new SqlCommand("select * from spinfo where partid='" +
TextBox5.Text + "'", con);
SqlDataReader rd = com.ExecuteReader();
//TextBox6.Text = rd[4].ToString();

if (rd.Read())
{
TextBox7.Text = rd[4].ToString();
int a, b, c;
a=int.Parse( TextBox6.Text.ToString());
b=int.Parse (TextBox7.Text.ToString ());
c=a*b;
TextBox8.Text =c.ToString ();
}
con.Close();
}
protected void Button5_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Initial Catalog=phani;integrated
security=yes");
con.Close();
SqlCommand com = new SqlCommand("delete bill", con);
try
{
com.ExecuteNonQuery();
}
catch (Exception)
{
Label10.Text = "No record is found";
}

con.Close();
}

34
Online Sales and Services of Hardware Management System

6. Testing
Introduction:
Test Design refers to understanding the sources of test cases, test coverage, how to
develop and document test cases, and how to build and maintain test data. There are 2
primary methods by which tests can be designed and they are:
Black Box Testing: Black-box test design treats the system as a literal "black-box", so it
doesn't explicitly use knowledge of the internal structure. It is usually described as focusing
on testing functional requirements. Synonyms for black box include: behavioral, functional,
opaque-box, and closed-box. -
White Box Testing: White-box test design allows one to peek inside the "box", and it
focuses specifically on using internal knowledge of the software to guide the selection of test
data. It is used to detect errors by means of execution-oriented test cases. Synonyms for
white-box include: structural, glass-box and clear-box.
While black box and white box are terms that are still in popular use, many people
prefer the terms "Behavioral" and "Structural". Behavioral test design is slightly different
from black-box test design because the use of internal knowledge isn't strictly forbidden, but
it's still discouraged. In practice, it hasn't proven useful to use a single test design method.
One has to use a mixture of different methods so that they aren't hindered by the limitations
of a particular one. Some call this "Gray-box" or "Translucent-box" test design, but others
wish we'd stop talking about boxes altogether.
GUI Testing
GUI is the abbreviation for Graphic User Interface. It is absolutely essential that any
application has to be user-friendly. The end user should be comfortable while using all the
components on screen and the components should also perform their functionality with
utmost clarity. Hence it becomes very essential to test the GUI components of any
application. GUI Testing can refer to just ensuring that the look-and-feel of the application is
acceptable to the user, or it can refer to testing the functionality of each and every component
involved.
The following is a set of guidelines to ensure effective GUI Testing and can be used
even as a checklist while testing a product / application.

35
Online Sales and Services of Hardware Management System
Testing Strategies:
Black box testing should make use of randomly generated inputs (only a test range
should be specified by the tester). Some of them are:
 To eliminate any guesswork by the tester as to the methods of the function
 Data outside of the specified input range should be tested to check the robustness
of the program
 Boundary cases should be tested (top and bottom of specified range) to make sure the
highest and lowest allowable inputs produce proper output
 Stress testing should be performed (try to overload the program with inputs to see
where it reaches its maximum capacity), especially with real time systems
 Crash testing should be performed to see what it takes to bring the system down
 Test monitoring tools should be used whenever possible to track which tests have
already been performed and the outputs of these tests to avoid repetition and to aid in the
software maintenance
 Other functional testing techniques include: transaction testing, syntax testing, domain
testing, logic testing, and state testing.
 Finite state machine models can be used as a guide to design functional tests
According to Bezier the following is a general order by which tests should be designed:
 Clean tests against requirements
 Additional structural tests for branch coverage as needed
 Additional tests for data-flow coverage as needed
 Domain tests not covered by the above
 Special techniques as appropriate--syntax, loop, state, etc.
 Any dirty tests not covered by the above
 After the development phase, the software needs to be tested for completeness,
correctness, reliability and maintainability. The testing phase involves testing of the system
using various test data.

36
Online Sales and Services of Hardware Management System

Unit Testing
The system is tested with a set of test cases for each module and the results are
compared against the expected output. The system is given the proper test data as input. It is
also known as module testing. Each individual module is tested with a set of test data and the
outputs of these modules are studied and verified.
Plan
Determine

Refine

Design

Implement

Execute

Check

Evaluate

Future Enhancements

This application package “Online sales and services of hardware management


System” is flexible enough and allows for future enhancements to meet changing user needs.
Addition of new modules can be easily implemented. The future holds a lot to offer to the
development and refinement of this project.
The important ones among them are:
Detailed level of user help
The application can have an automatic recovery of data if it is corrupted.
New operation can be easily incorporated in system development.
Backup of database can be takenBetter reporting tools at all levels.

37
Online Sales and Services of Hardware Management System

7. Conclusion

The project “Online sales and services of hardware management System”


is successfully completed in time with all deliverables meeting the requirements. The system
objectives were fulfillment with all the requirements specified by the analysis done were
completed satisfactorily.
The software will be launched for the internal use of Surana College. And it is
efficiently handled the complete process and is satisfied with performance of the system. The
project has been of great help to me in gaining valuable information on web application. It
has given me a great satisfaction in having designed an application that has importance on
real world.
The system is fully functional, easy to use with no user training or orientation
necessary. The screens are GUI based data entry screens and very interactive. Proper status
messages are displayed and hence easy for user to interact and understand.
Using the features of .NET (VB.NET, ASP.NET), the project proved to be successful
in performing complex diagnostics, route data between screens and generate required
responses. They were many tangible and intangible benefits in implementing the System.
Thus the project was successfully developed and completed using .NET and MS SQL Server
as the back end.

38
Online Sales and Services of Hardware Management System

8. Bibliography

Microsoft programming ASP.NET -By Esposito


MicrosoftASP.NET -By Nithinpande
SQL Server 7.0 programming -By John papa
-By Mathew shaptter

39

Anda mungkin juga menyukai