You are on page 1of 40

1.

INTRODUCTION

1.1 OVERVIEW OF THE PROJECT

The project entitled as “WOMEN’S APPAREL BOUTIQUE PROCESSING

SYSTEM” is developed by using VB.Net as front end SQL server as back End. The

main aim of this project is to computerize the boutique actives and to provide details

about the boutique, sales, customer correspondence activities and other relevant

activities of boutique which have been maintained manually.

This project is developed as user friendly software so that it meets the user needs at

any time. This system is windows application software which attempts to integrate all

departments and functions across an organization onto a single computer system that can

serve all those departments’ particular needs.

The objective of this project is to aid in the optimum processing of data. This is

intended to provide the basic for the design and development of a software product that will

encompass recording maintenance and reporting of data relating to the various stages of the

process.

MODULES
 Authentication Module

 Boutique Module

 Customer Module

 Order Module

 Boutique Outlet Module

 Reports

1
1.2 DESCRIPTION OF MODULES

1) Authentication Module
This module is used for authentication purpose. The user is allowed to view the
details only when the user id and the password are correct or validate.
2) Boutique Module
This module include the methodology of boutique product which includes

applying colors and designs etc. The number of products purchased in boutique per

day is indicated.

3) Customer Module
This module is used to maintain the details of customer such as personal

information. The unique identification number is maintained for each customer to

avoid redundant data.

4) Order Module
This module is to indicate the order details placed by the customer. The total

number of product ordered is maintained.

5) Boutique Outlet Module


This module is used to maintain the sales details of the product. This module is
for billing purpose. This includes the details like sales bill number, product code,
product name, customer id, date, rate, quantity and total.
6) Reports
The reports are generated as hardcopy for reference. The daily and monthly

reports are generated through this module.

2
1.3 SYSTEM SPECIFICATION
1.3.1 HARDWARE SPECIFICATION

Processor : Intel Core i3

RAM : 2 GB

Hard Disk : 300 GB

Clock Speed : 2.1 GHz

Monitor : Color Monitor

Printer : Laser Printer

Keyboard : Multi Media

Mouse : Optical Mouse

1.3.2 SOFTWARE SPECIFICATION

Technology : Microsoft Visual Studio 2010

Front end : VB.Net 2010

Back end : SQL Server 2008

1.4 SOFTWARE FEATURES

1.4.1 FRONT END

3
INTRODUCTION TO .NET

Microsoft .NET is a set of Microsoft software technologies for rapidly building and

integrating XML Web services, Microsoft Windows-based applications, and Web solutions.

The .NET Framework is a language-neutral platform for writing programs that can easily and

securely interoperate.

There’s no language barrier with .NET: there are numerous languages available to the

developer including Managed C++, C#, Visual Basic and Java Script. The .NET framework

provides the foundation for components to interact seamlessly, whether locally or remotely

on different platforms. It standardizes common data types and communications protocols so

that components created in different languages can easily interoperate.

The .NET Framework is a new computing platform that simplifies application

development in the highly distributed environment of the Internet.

 To provide a consistent object-oriented programming environment whether object

codes is stored and executed locally on Internet-distributed, or executed remotely.

 To provide a code-execution environment to minimizes software deployment and

guarantees safe execution of code.

 Eliminates the performance problems.

The common language runtime is the foundation of the .NET Framework. It manages

code at execution time, providing important services such as memory management, thread

management, and remoting and also ensures more security and robustness.

The concept of code management is a fundamental principle of the runtime. Code that

targets the runtime is known as managed code, while code that does not target the runtime is

known as unmanaged code.

It is a comprehensive, object-oriented collection of reusable types used to develop

applications ranging from traditional command-line or graphical user interface (GUI)

4
applications to applications based on the latest innovations provided by ASP.NET, such as

Web Forms and XML Web services.

The .NET Framework can be hosted by unmanaged components that load the

common language runtime into their processes and initiate the execution of managed code,

thereby creating a software environment that can exploit both managed and unmanaged

features. The .NET Framework not only provides several runtime hosts, but also supports the

development of third-party runtime hosts.

Internet Explorer is an example of an unmanaged application that hosts the runtime

(in the form of a MIME type extension). Using Internet Explorer to host the runtime to

enables embeds managed components or Windows Forms controls in HTML documents. The

common language runtime manages memory; thread execution, code execution, code safety

verification, compilation, and other system services these are all run on CLR.

Microsoft .NET supports not only language independence, but also language

integration. This means that it can inherit from classes, catch exceptions, and take advantage

of polymorphism across different languages. The .NET Framework makes this possible with

a specification called the Common Type System (CTS) that all .NET components must obey.

For example, everything in.NET is an object of a specific class that derives from the

root class called System. Object. The CTS supports the general concept of classes, interfaces,

delegates (which support call-backs), reference types, and value types.

Garbage Collection

Garbage Collection is another new feature in Visual Basic.NET. The .NET framework

monitors allocated resources, such as objects and variables. In addition, the .NET framework

automatically releases memory for reuse by destroying objects that are no longer in use. In

Visual Basic.NET, the garbage collector checks for the objects that are not currently in use by

5
applications. When the garbage collector comes across an object that is marked for garbage

collection, it releases the memory occupied by the object.

Overloading

Overloading is another feature in Visual Basic.NET. Overloading enables us to define

multiple procedures with the same name, where each procedure has a different set of

arguments. Besides using overloading for procedures, and use it for constructors and

properties in a class.

Multithreading

Visual Basic.NET also supports multithreading. An application that supports

multithreading can handle multiple tasks simultaneously, it can use multithreading to

decrease the time taken by an application to respond to user interaction. To decrease the time

taken by an application to respond to user interaction, it must ensure that a separate thread in

the application handles user interaction.

Structured Exception Handling

Visual Basic.NET supports structured handling, which enables to detect and remove

errors at runtime. In Visual Basic.NET, need to use Try…Catch…Finally statements to create

exception handlers. Using Try…Catch…Finally statements, it can create robust and effective

exception handlers to improve the performance of the application.

1.4.2 BACKEND SQL SERVER

SQL Server adds certain features including a master data management system

branded as Master Data Services, a central management of master data entities and

hierarchies. Also Multi Server Management, a centralized console to manage multiple SQL

Server 2008 instances and services including relational databases, Reporting Services,

Analysis Services & Integration Services.

6
SQL Server new features and enhancements include Always On SQL Server Failover

Cluster Instances and Availability Groups which provides a set of options to improve

database availability Contained Databases which simplify the moving of databases between

instances, new and modified Dynamic Management Views and Functions, programmability

enhancements including new spatial features, metadata discovery, sequence objects and the

Throw statement, performance enhancements such as Column Store Indexes as well as

improvements to On Line and partition level operations and security enhancements.

SQL Server 2008 also includes support for structured and semi-structured data,

including digital media formats for pictures, audio, video and other multimedia data. In

current versions, such multimedia data can be stored as BLOBs (binary large objects), but

they are generic bit streams. Intrinsic awareness of multimedia data will allow specialized

functions to be performed on them.

SQL Manager 2008 for SQL Server key features:

 Full support of SQL Server 2005

 New state-of-the-art graphical user interface

 Rapid database management and navigation

 Easy management of all SQL Server objects

7
2. SYSTEM STUDY

2.1 EXISTING SYSTEM


Existing system is a manual systems in which ledger are maintained for each

department of record information regarding purchases. The same information, which limited

entry, is again entered in separate payment file for each supplier. This process may take more

time and risky for the staff, who is the in charge of these activities. Thus the daily

transactions are entered in to corresponding master file and reports are taken manually by

verifying the ledger regarding purchase, payment and sale.

2.1.1 DRAWBACKS OF EXISTING SYSTEM

 Retrieval of information takes more time

 Redundancy will be more

 While entering the data manually, some data might miss out

2.2 PROPOSED SYSTEM

The proposed system is a computerized system developed using front end as VB.NET

and backend as SQL Server. In the proposed system, separate files are maintained for each

department and separate files for payment details. This helps the user to process payment

details very easily without verifying the purchase file every time. Thus, the new system is

very easy to operate and process all activities involved in the concern very quickly.

2.2.1 ADVANTAGES OF PROPOSED SYSTEM

 User-friendly interactive

system.

 It enables the user to get

information at any time by a single keystroke.

 It facilitates timely updating

process whenever initiated.

8
 It takes less time to process.

3. SYSTEM DESIGN AND DEVELOPMENT

System design is the process of defining the elements of a system such as the

architecture, modules and components, the different interfaces of those components and the

data that goes through that system. It is meant to satisfy specific needs and requirements of a

business or organization through the engineering of a coherent and well-running system.

They needed to be able to standardize their work into a formal discipline with proper

methods, especially for new fields. 

3.1 INPUT DESIGN

The input design comprises the forms through which the data can be entered. A form

is used to view and edit information in the database record by record .A form displays only

the information we want to see in the way we want to see it. Forms use the familiar controls

such as textboxes and checkboxes. This makes viewing and entering data easy. The form

view displays the whole design of the form.

This is most usually a person’s knowledge or skill level. For instance, a computer

programmer presented with a problem would utilize his or her knowledge of programming

languages to transform the state of the problem. This can be rectified easily by the input

design.

3.2 DATABASE DESIGN

A database is a collection of data about a specific topic. To build or modify the

structure of a table we work in the table design view. We can specify what kind of data will

be hold. To add, edit or analyses the data itself we work in tables datasheet view mode. A

query is a question that has to be asked the data. Access gathers data that answers the

9
question from one or more table. The data that make up the answer is either dataset (if you

edit it) or a snapshot (it cannot be edited).

3.2.1 TABLE DESIGN


1) Table Name: Boutique Details

Field Name Data Type Size Description


pid bigint 5 Product Identification Number
pname nvarchar 25 Name of Product
pdate date 10 Production Date
qty nvarchar 5 Quantity of the Product
price float 5 Price of the Product

Primary Key: pid

10
2) Table Name: Availability Details

Foreign Key: pid

Field Name Data Type Size Description


pid bigint 5 Product Identification Number
pname nvarchar 25 Name of Product
udate date 10 Updation Date
qty nvarchar 5 Quantity of the Product
price float 5 Price of the Product

11
3) Table Name: Customer Details

Primary Key: cid

Field Name Data Type Size Description

cid bigint 5 Customer Identification Number

cname nvarchar 25 Name of the Customer

addr nvarchar MAX Address

phno bigint 10 Phone number

rdate date 10 Date of Registration

4) Table Name: Boutique Outlet Details

Primary Key: bid

12
Foreign Key: cid, pid

Field Name Data Type Size Description

bid bigint 5 Bill Identification Number

cid bigint 5 Customer Identification Number

pid bigint 5 Product Identification Number

pname nvarchar 25 Name of the Product

qty float 5 Quantity of the Product

price float 5 Price of the Product

tot float 6 Total

bdate date 10 Billing date

5) Table Name: Order Details

Primary Key: oid

Foreign Key: cid, pid

Field Name Data Type Size Description

oid bigint 5 Order Identification Number

13
cid bigint 5 Customer Identification Number

pid bigint 5 Product Identification Number

pname nvarchar 25 Name of Product

qty nvarchar 5 Quantity of the Product

odate date 10 Ordered date

3.2.2 ENTTY RELATIONSHIP DIAGRAM

PID
CID
cname pname
rdate price
qty
View Availability
addr Customer
Details Details

udate
phno

Orders Admin Update

14
PID
OID
Monitor
pname
Order

qty
CID

cname odate code PID

price
Sales Boutique

qty pname
mdate

bdate
price

tot
Boutique Outlet
BID
PID
Qty
pname

CID

3.2.3 DATA FLOW DIAGRAM

Level 0

Password Login View Boutique


Admin
Process

15
Level 1

Register View Needs


Customer Availability

Order

Generate

Report

Level 2
View
Customer

Register
Gives
Customer Billing
Order
Profile Order
Detail
s
Generate
Bill

16
Customer
Details Bill
Details
Id, Pwd
View
Admin Product Update
Details

Status

Orders

Decrease
Stock
Purchase

Increase
Update Stock
Purchase Availability
Details Details

3.3 CODE DESIGN

The code in the system enables easy way of updating and identifying the items easily.

It normal practice that all the primary keys should have a codification scheme based on the

codification scheme the data can be allowed to enter. This increases the flexibility as user

cannot give any type of data which will affect the system performance.

A design code is a document that sets rules for the design of a new development in the

system design. It is a tool that can be used in the design and planning process, but goes

17
further and is more regulatory than other forms of guidance commonly used in the English

planning system over recent decades. It can be thought of as a process and document – and

therefore a mechanism – which operationalises design guidelines or standards which have

been established through a master plan process. The master plan or design framework is the

vision. It should be accompanied by a design rationale that explains the objectives, with the

design code providing instructions to the appropriate degree or precision of the more detailed

design work.

3.4 OUTPUT DESIGN

The report can ground records into many levels and compute totals and average by

checking values from many records at once. Also the report is attractive and distinctive

because we have control over the size and appearance of it. We can write and use module to

automate and customize the database in very sophisticated ways. The output is the desired

end state which the problem solving is being directed toward. If there are no challenges

involved and the situation can be easily solved then it is not so a problem so much as a

routine task.

4. SYSTEM TESTING AND IMPLEMENTATION


4.1 SYSTEM TESTING
Testing is a process of executing a program with the intent of finding an error. Testing

is a crucial element of software quality assurance and presents ultimate review of

specification, design and coding. System Testing is an important phase. Testing represents an

interesting anomaly for the software. Thus a series of testing are performed for the proposed

system before the system is ready for user acceptance testing. A good test case is one that has

18
a high probability of finding an as undiscovered error. A successful test is one that uncovers

an as undiscovered error.

The method of designing the program to produce the desired result is accomplished to

the section. Programs are written and tested by using sample data, if the output produces

good result was that the actual required output. All the facilities required for developing the

new system acquired and program preparation is started. Quality Assurance (QA) is an

important step in software engineering. It overlaps with all the phases of development right

from the requirement analysis. It quality requirement phase of the software system must be

clearly extracted during the requirement analysis and all the subsequent should be made

biased to that, so that the final testing will become trivial and less expensive.

1) Unit Testing

The first includes unit testing, where in each module is tested to provide its

correctness, validity and also determine any missing operations and to verify whether the

objectives have been met. Errors are noted down and corrected immediately. Unit testing is

the important and major part of the project. So errors are rectified easily in particular module

and program clarity is increased. In the project, entire system is divided into several modules

and is developed individually. So unit testing is conducted to individual modules.

2) Validation Testing

The final step involves validation and testing which determines which the software

functions as the user expected. Here also some modifications were. In the completion of the

project, it is satisfied fully by the end user.

3) Integration Testing

The second step includes Integration testing. It need not be the case, the software

whose modules when run individually and showing perfect results, will also show perfect

19
results when run as a whole. The individual modules are clipped under this major module and

tested again and verified the results. It is due to poor interfacing, which may results in data

being lost across an interface. A module can have inadvertent, adverse effect on any other or

on the global data structures, causing serious problems.

4.2 TEST CASE

A formal written test-case is characterized by a known input and by an expected

output, which is worked out before the test is executed. The known input should test a

precondition and the expected output should test a condition. For applications or systems

without formal requirements, test cases can be written based on the accepted normal

operation of programs of a similar class. In some schools of testing, test cases are not written

at all but the activities and results are reported after the tests have been run.

4.3 SYSTEM IMPLEMENTATION

Thus the users are trained to operate the developed system. Both the hardware and

software securities are made to run the developed systems successfully in future.

Implementation is the process that actually yields the lowest-level system elements in the

system hierarchy.

System elements are made, bought, or reused. Production involves the hardware

fabrication processes of forming, removing, joining, and finishing, the software realization

processes of coding and testing, or the operational procedures development processes for

operators roles. It involves a production process, a manufacturing system which uses the

established technical and management processes may be required.

 Test the system with sample data

 Detection and Correction of errors

 Make the necessary changes in the system

 Check with the existing system

20
 Installment of Hardware and Software utilities

 Training and involvement of user personal

4.4 SYSTEM MAINTENANCE

The maintenance phase focuses on change that is associated with error correction,

adaptations required as the software's environment evolves, and changes due to enhancements

brought about by changing customer requirements. Even with the best quality assurance

activities is lightly that the customer will uncover defects in the software. Corrective

maintenance changes the software to correct defects. We may define maintenance by

describing four activities that are undertaken after a program is released for use:

 Corrective Maintenance

 Adaptive Maintenance

 Perfective Maintenance or Enhancement

 Preventive Maintenance or reengineering

Implementation is the carrying out, execution, or practice of a plan, a method, or any

design for doing something. As such, implementation is the action that must follow any

preliminary thinking in order for something to actually happen.

5. CONCLUSION

All the objectives that had been charted out in the initial phases were achieved

successfully. System satisfies all the requirements for which the company developed the

system. System has strong security.

We understand the importance of planning and designing as a part of Boutique

Processing System. The concept of peer-reviews helped to rectify the problems as and when

21
they occurred and also helped us to get some valuable suggestions that were incorporated by

us. Developing the project has helped us to gain some experienced on real time development

procedures.

To conclude, this project is very flexible and user-friendly. This project is developed

such that it can be executed in any system. Security is also maintained. This system is

protected from any unauthorized person to access the system. The software was tested thus

providing maximum load to the server and was found working fast and effective.

6. SCOPE FOR FUTURE ENHANCEMENT

It is desirable to aim for a system with a minimum cost subject to the condition that it

must satisfy the entire requirement. Reusable software reduces design, coding and testing cost

by amortizing effort over several designs. Reducing the amount of code also simplifies

understanding, which increases the likelihood that the code is correct. We follow up both

22
types of reusability: Sharing of newly written code within a project and reuse of previously

written code on new projects.

The user can easily manipulate prior knowledge can make use of the system

comfortably. The programming techniques involved in the coding of program provides scope

for expansion and implementation of changes that may be required in the future. This project

is flexible for future enhancement and can be adapted to changing user needs i.e., this is fully

user friendly. This system is having adequate security features for proper handling of the

system.

7. BIBLIOGRAPHY

BOOK REFERENCES

1. Gardiner, Eileen and Ronald G. Musto. "The Electronic Book." In Suarez, Michael

Felix, and H. R. Woudhuysen. The Oxford Companion to the Book. Oxford: Oxford

University Press, 2010, p. 164.

23
2.  "e-book". Oxford Dictionaries. April 2010. Oxford Dictionaries. April 2010. Oxford

University Press. (accessed September 2, 2010).

3. Damon Allison, Andy Olsen, and James Speer, Visual Basic .NET Class Design

Handbook: Coding Effective Classes’ Sep 5, 2003.

4. Roger S. Pressman, ‘Software Engineering: A Practioner’s Approach’, McGraw-Hill

International Edition, Fifth edition, 2001.

 WEB REFERENCES
1. http://www.w3schools.com/vb.net

2. http://www.w3schools.com/sqlserver/datacon/html

3. http://www.tizag.com/mysql/Tutorial/html

4. http://www.visual-basic-tutorials.com/Tutorials/Strings/combining-strings-in-visual-

basic.html

5. http://www.tutorialspoint.com/vb.net/vb.net_overview.html

8. APPENDIX

A) SAMPLE SCREENS

24
Figure 1.1 Login form

25
Figure 1.2 Menu page

26
Figure 1.3 Product Details

27
Figure 1.4 Stock Details

28
Figure 1.5 Customer Bill

29
Figure 1.6 Customer Bill Report

30
Figure 1.7 Customer Details

31
Figure 1.8 Order Details

32
Figure 1.9 Sales Report

33
Figure 1.10 Stock Report

34
B) SAMPLE CODING

Imports System.Data
Imports System.Data.SqlClient
Public Class frmBuyer
Dim con As New SqlConnection
Dim cmd As New SqlCommand
Dim da As New SqlDataAdapter("select *from tblBuyerDetails", con)
Dim ds As New DataSet
Dim dbind As New BindingSource

Dim a As Integer = 0

Private Sub frmBuyer_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
LoadDatabase()
Load1()
clear()
End Sub
Private Sub LoadDatabase()
con.Close()
con.ConnectionString = "Data Source=.\SQLEXPRESS;Initial
Catalog=Geeva;Integrated Security=True"
con.Open()
End Sub
Public Sub Load1()
ClearGridView()
LoadDatabase()
da.Fill(ds, "tblBuyerDetails")
dbind.DataSource = ds
dbind.DataMember = ds.Tables(0).ToString()
DataGridView1.DataSource = dbind
End Sub
Private Sub ClearGridView()

35
For Each row As DataGridViewRow In DataGridView1.Rows
DataGridView1.Rows.Remove(row)
Next
End Sub

Private Sub btInsert_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btInsert.Click
LoadDatabase()
cmd.Parameters.Clear()
Try
cmd.Connection = con
cmd.CommandText = "spInsertBuyerDetails"
'cmd.Parameters.AddWithValue("@Bno", txtbuyerid.Text)
cmd.Parameters.AddWithValue("@Bname", txtBuyername.Text)
cmd.Parameters.AddWithValue("@Conno", txtcontact.Text)
cmd.Parameters.AddWithValue("@Email", txtmail.Text)
cmd.Parameters.AddWithValue("@Address", txtaddress.Text)
cmd.Parameters.AddWithValue("@Accname", txtaccname.Text)
cmd.Parameters.AddWithValue("@Accno", txtaccno.Text)
cmd.Parameters.AddWithValue("@Bankname", txtbankname.Text)
cmd.Parameters.AddWithValue("@Branchname", txtbranchname.Text)
cmd.ExecuteNonQuery()
MsgBox("Details of Buyer are Successfully Inserted", vbInformation, "Successfully
Inserted")
con.Close()
Catch ex As Exception
MsgBox("Details are not Inserted! Please Try Later", vbInformation, "Error In
Inserting Buyer Details")
End Try
ClearGridView()
Load1()
clear()
End Sub

36
Private Sub btClear_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btClear.Click
txtbuyerid.Clear()
txtBuyername.Clear()
txtcontact.Clear()
txtmail.Clear()
txtaddress.Clear()
txtaccname.Clear()
txtaccno.Clear()
txtbankname.Clear()
txtbranchname.Clear()

End Sub

Private Sub DataGridView1_SelectionChanged(ByVal sender As Object, ByVal e As


System.EventArgs) Handles DataGridView1.SelectionChanged
Try
Dim dgv As DataGridView = TryCast(sender, DataGridView)
If row IsNot Nothing Then
txtbuyerid.Text = row.Cells(0).Value.ToString()
txtBuyername.Text = row.Cells(1).Value.ToString()
txtcontact.Text = row.Cells(2).Value.ToString()
txtmail.Text = row.Cells(3).Value.ToString()
txtaddress.Text = row.Cells(4).Value.ToString()
txtaccname.Text = row.Cells(5).Value.ToString()
txtaccno.Text = row.Cells(6).Value.ToString()
txtbankname.Text = row.Cells(7).Value.ToString()
txtbranchname.Text = row.Cells(8).Value.ToString()

End If
End If
Catch ex As Exception
End Try
End Sub
37
Private Sub btUpdate_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btUpdate.Click
LoadDatabase()
Me.Refresh()
'Dim answer As Long
Try
cmd.Parameters.Clear()
'answer = MsgBox("Are you sure to Updating Data?", vbYesNo, "Updating Record")
'If (answer = vbYes) Then
cmd.Connection = con
cmd.CommandText = "spUpdateBuyerDetails"
'cmd.Parameters.Add("@ProductCode", SqlDbType.NVarChar).Value =
ttProductCode.Text

cmd.Parameters.AddWithValue("@Bname", txtBuyername.Text)
cmd.Parameters.AddWithValue("@Conno", txtcontact.Text)
cmd.Parameters.AddWithValue("@Email", txtmail.Text)
cmd.Parameters.AddWithValue("@Address", txtaddress.Text)
cmd.Parameters.AddWithValue("@Accname", txtaccname.Text)
cmd.Parameters.AddWithValue("@Accno", txtaccno.Text)
cmd.Parameters.AddWithValue("@Bankname", txtbankname.Text)
cmd.Parameters.AddWithValue("@Branchname", txtbranchname.Text)
cmd.Parameters.Add("@Bno", SqlDbType.NVarChar).Value = txtbuyerid.Text
cmd.ExecuteNonQuery()
MsgBox("Buyer Details Updated", vbInformation, "Succesfully Updated")
con.Close()
Load1()
Me.Refresh()
'Else
'txtSerialNo.Focus()
'End If
Catch ex As Exception

38
MsgBox("Unable to Update Record! Please Try Later", vbInformation, "Error in
Updating Record")
End Try
clear()
End Sub

Private Sub btDelete_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btDelete.Click
LoadDatabase()
Me.Refresh()
' Dim answer As Long
Try
cmd.Parameters.Clear()
'answer = MsgBox("Are you sure to Deleting Data?", vbYesNo, "Delete Record")
'If (answer = vbYes) Then
cmd.Connection = con
cmd.CommandText = "spDeleteBuyerDetails"
cmd.Parameters.Add("@Bno", SqlDbType.NVarChar).Value = txtbuyerid.Text
'cmd.Parameters.AddWithValue("@ProductCode", ttProductCode.Text)
cmd.ExecuteNonQuery()
MsgBox("Details Deleted", vbInformation, "Successfully Deleted")
ClearGridView()
Load1()
Me.Refresh()
'Else
' txtSerialNo.Focus()
'End If
Catch ex As Exception
MsgBox("Unable to Delete Record! Please Try Later", vbInformation, "Error in
Deleting")
End Try
clear()
End Sub

39
Private Sub txtBSearch_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles txtBSearch.KeyPress
Dim con As New SqlConnection
con = New SqlConnection()
con.ConnectionString = "Data Source=.\SQLEXPRESS;Initial
Catalog=Geeva;Integrated Security=True"
con.Open()
Dim da As New SqlDataAdapter("spSearchBuyerDetails", con)
da.SelectCommand.Parameters.Clear()
da.SelectCommand.CommandType = CommandType.StoredProcedure
da.SelectCommand.Parameters.AddWithValue("Bname", txtBSearch.Text)
Dim dt As New DataTable
da.Fill(dt)
DataGridView1.DataSource = dt
con.Close()
End Sub
Private Sub clear()
txtbuyerid.Clear()
txtBuyername.Clear()
txtcontact.Clear()
txtmail.Clear()
txtaddress.Clear()
txtaccname.Clear()
txtaccno.Clear()
txtbankname.Clear()
txtbranchname.Clear()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
MDIParent1.Show()
Me.Hide()
End Sub
End Class
40

You might also like