Areindoc
Areindoc
Areindoc
2
2
INDEX
2
ACKNOWLEDGEMENT
I am also very thankful to the Ms. Jagruti Churi and other teachers of
our Department for their unprecedented support.
Last but not the least; I would like to thank all my friends who have
given me their support. Also, I would like o thank my parents for
believing my abilities
2
INTRODUCTION TO THE PROJECT
2
DESCRIPTION OF THE CURRENT SYSTEM
At Present, the staff carries out all the work manually. All the data
and records are stored manually in the files.
At the end of the day all the sales and purchase records entries are
made manually.
Big and large registers are maintained for every transaction. All the
details have to be maintained minutely and have to be taken care of
manual errors.
2
LIMITATION OF CURRENT SYSTEM
Sales and Purchase Details: Maintaining all the details like sales
and purchase is a very tedious job.
2
PROPOSED SYSTEM
2
ADVANTAGES OF PROPOSED SYSTEM
2
FEASIBILITY STUDY
2
Economical Feasibility:-
With consideration of the following factors the
proposed system economical feasible:
-Start-up Cost
-Salary of analyst and programmers
-Salary of operating System
-Cost of installation and maintenance
2
REQUIREMENTS
Hardware Requirements:
Software Requirements:
2
BACK END:
Advantages of SQL 2005
SQL-2000 is both a n easy to understand and comprehensive tool for
managing the data.
1. Vender Independence.
2. Portability across Computer System.
3. Relational foundation.
4. High-Level English like structure.
5. Programmatic Database Access.
6. Multiple views of data.
7. Complete database language.
8. Dynamic Data definition.
9. Client/Server architecture.
SQL also provides the Primary and foreign key concept which
Play a vital role during creation of database tables.
Primary key specifies that each values in a column of the table should be unique.
A column in on table whose values matches with the primary key in one table is
called as primary key.
2
FRONT END:
2
GNATT CHART
Analysis
Design
Coding
Implemen
tation
& test
2
EVENT TABLE
Class Diagram
2
CustomerDetails CustomerOrder Bill
Customername Orderid Orderid
Address 1 1..* Productid Date
Station 1. Quantity 1..* Vatamount
Phonenumber Amount Totalamount
Emailid Date Paidamt
Balamt
Add() , Add() , Add() ,
Update() Update() Update()
Delete(), Delete(), Delete(),
1..*
Search() Search() Search
1..*
StockUpdate ProductDetails PurchaseOrder
Productid Product Name Orderid
Productid
Quantity Product Brand Quantity
1 1 1..* 1.. Amount
Date
Customer
Update() Update() Update()
Delete(), Delete(),
Search() 1..*
Search()
1..*
SupplierDetails 1..
Suppliername
Address
Station
Phonenumber
Emailid
Add() ,
Update()
Delete(),
Search()
2
Customer
Customer
Regitration of Customer
Product Enquiry
Product Details
Supplier
Check Stock
Registraion of Supplier
Supplier
Update Stock details
Manager
Sequence Diagram
2
Customer Manager Supplier
Product Inquiry
Product details
Place Order
Order confirmation
Payment
Bill
Place Order
Order Confirmation
2
. New
Customer
Register Product details
Product
Inquiry Gives Order
Order
Processing
Gives
Order
Update Quantity
Order
Processing
Confirmation
NO
Yes
Bill
generation
. Check the
Stock Check the quantity less
Place the
Order
Update the
Stock
CRUD TABLE
2
Form\ Login Customer Supplier Product Product Stock Customer CustDetail Purchas Purch Bill
e
DBase details details Name Brand Update Order Order Details
Order
Login RD
frmCustomer CRU
details
frmSupplier CRU
details
frmStock CRU
update
frmBill CRUD
Database Relationship
2
Database Description
2
The database used SQL 2005 includes database tables for
manipulating information.
2
3) Table Name: - ProductName
7) Table Name: -
PurchaseOrder
Field Name Data Type Length Key
purchaseorderid int 50 PK
supplierid int 50 FK
amount int 50
date datetime
This table contains all the Order of the Purchaseorder
2
Field Name Data Type Length Key
purchaseorderid int 50 PK
productid int 50 FK
quantity int 50
rate int 50
This table contains all the Orderdetail of the Purchaseorder
2
11)Table Name: - cashdetails
2
2) Table Name: - MasterSupplier
2
Menu Tree
Bill Details
Customer
Stock
2
Report
Sales
Report
Purchase
Report
Screen Shot
Splash screen:
Login From:
2
Arein Mdiform:
2
Customerdetails:
2
SupplierDetails:
2
ProductDetails:
2
CustomerOrder:
2
PurchaseOrder:
2
StockUpdate:
2
Bill:
2
Sample Code:
2
LoginForm:
Public Class login
Dim sel As New DataView
Dim gridDataset As New DataSet
Dim f As New Functions
End Sub
End Class
Customerdetails:
2
Imports WindowsApplication1.areincomputer
Public Class customerdetail
Dim sel As New DataView
Dim gridDataset As New DataSet
Dim f As New Functions
Dim ser As Integer = 0
Dim id As New DataView
Private Sub BindGrid()
sel = f.selectData("*", "mastercustomer", "where status =1 order by
customerid")
dgvcustomer.DataSource = sel
Me.dgvcustomer.Columns.RemoveAt(6)
' Me.cbocustid.Enabled = False
Me.btndelete.Enabled = False
Me.btnupdate.Enabled = False
End Sub
Public Function checkBlank(ByVal contrl As Control) As Boolean
End Function
Public Sub changeColor(ByVal contrl As Control, ByVal col As Color)
contrl.BackColor = col
End Sub
Private Sub clear()
Me.txtcboid.Text = ""
Me.txtcboid.ReadOnly = True
Me.txtaddress.Text = ""
Me.cbostation.DataBindings.Clear()
'Me.cbostation.Text = "Select the catogories"
Me.txtemailid.Text = ""
Me.txtname.Text = ""
Me.txtphone.Text = ""
Me.txtsearchname.Text = ""
'Me.cbostation.Items.Clear()
Me.cbosearch.Text = "Select the catogories"
Me.btndelete.Enabled = False
Me.btnupdate.Enabled = False
Me.btnadd.Enabled = True
Me.btnsearch.Enabled = True
End Sub
2
Me.btnadd.BackColor = Color.Lavender
Me.btndelete.Enabled = False
Me.btnupdate.Enabled = False
Dim erMsg As String
Dim upck, cuid As Integer
'If (Me.cbostation.SelectedItem <> -1) Then
' MessageBox.Show("Please select the Station", "station error",
MessageBoxButtons.OK, MessageBoxIcon.Error)
'End If
'Me.checkBlank(txtaddress)
'Me.checkBlank(txtemailid)
'Me.checkBlank(txtname)
'Me.checkBlank(txtphone)
'Me.checkBlank(cbostation)
If (Me.checkBlank(txtaddress) = False Or Me.checkBlank(txtemailid) =
False Or Me.checkBlank(txtname) = False Or Me.checkBlank(txtphone) = False Or
Me.checkBlank(cbostation) = False) Then
upck = 1
End If
2
msgerr = f.validateData(Me.txtsearchname.Text, "isNumeric",
"Sorry,Only numbers are allow")
If (msgerr <> "") Then
MessageBox.Show(msgerr)
Me.txtsearchname.Text = ""
End If
End If
If (Me.cbosearch.SelectedIndex = 1) Then
Dim msgerr As String
msgerr = f.validateData(Me.txtsearchname.Text, "singleName",
"Sorry,Only character are allow")
If (msgerr <> "") Then
MessageBox.Show(msgerr)
Me.txtsearchname.Text = ""
End If
End If
If (Me.cbosearch.SelectedIndex = 2) Then
Dim msgerr As String
msgerr = f.validateData(Me.txtsearchname.Text, "singleName",
"Sorry,Only character are allow")
If (msgerr <> "") Then
MessageBox.Show(msgerr)
Me.txtsearchname.Text = ""
End If
End If
End If
End Sub
If (txtaddress.Text <> "" Or Me.txtemailid.Text <> "" Or txtname.Text <> ""
Or txtphone.Text <> "" Or cbostation.Text <> "") Then
Dim dub As New DataView
dub = f.selectData("*", "mastercustomer", "where customername='" &
Me.txtname.Text & "'and address='" & Me.txtaddress.Text & "'and station='" &
Me.cbostation.Text & "'and phonenumber='" & Me.txtphone.Text & "'and emailid
='" & Me.txtemailid.Text & "'")
If (dub.Count > 0) Then
upck = 1
MessageBox.Show("customer Information is already present .",
"Info", MessageBoxButtons.OK, MessageBoxIcon.Information)
Me.txtaddress.Text = ""
Me.cbostation.Text = ""
Me.txtemailid.Text = ""
Me.txtname.Text = ""
Me.txtphone.Text = ""
End If
Private Sub cbosearch_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles cbosearch.SelectedIndexChanged
Me.txtsearchname.Clear()
End Sub
End Class
CustomerOrder:
Public Class customer_order
2
Dim f As New Functions
Dim dat As DataView
Dim da As Date
Dim tqnt As Integer
tbname = "customerorder"
qur = "order by customerorder.orderid"
sel = f.selectData("*", tbname, qur)
Me.dgvorder.DataSource = sel
'Me.dgvorder.ForeColor = Color.Black
End Sub
Public Function checkBlank(ByVal contrl As Control) As Boolean
End Function
Private Sub bindpro()
Dim filed As String
Dim tabe As String
Dim quer As String
Dim sil As New DataView
filed =
"customerorder.orderid,customerdetailorder.productid,quantity,rate"
tabe = " customerorder,customerdetailorder"
quer = "where customerorder.orderid=customerdetailorder.orderid order
by customerorder.orderid"
sil = f.selectData(filed, tabe, quer)
End Sub
Private Sub btnproadd_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnproadd.Click
Dim amount As Long
Dim total As Long = 0
Dim qun As New DataView
Dim check, con As Integer
Dim bol As Integer = 1
2
If (Me.cboproductid.Text <> "" And Me.txtname.Text <> "" And
Me.txtbrand.Text <> "" And Me.txtqunty.Text <> "" And Me.txtrate.Text <> "")
Then
'check quantity
qun = f.selectData("quantity", "stockupdate", "where
productid=" & Me.cboproductid.Text)
If (qun.Count > 0) Then
check = qun.Item(0).Row.Item(0)
If ((Me.txtqunty.Text) < check) Then
'amount calculation
While (con < Me.lstproductid.Items.Count)
If (Me.cboproductid.Text =
Me.lstproductid.Items.Item(con)) Then
bol = 0
Me.cboproductid.Text = ""
Me.txtname.Text = ""
Me.txtqunty.Text = ""
Me.txtrate.Text = ""
Me.txtcmrate.Clear()
Me.txtstqn.Clear()
MessageBox.Show("The Product Entry is already
present", "Product Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
Else
bol = 1
End If
con += 1
End While
If (bol = 1) Then
If (Me.cboproductid.Text <> "" And Me.txtname.Text
<> "" And Me.txtbrand.Text <> "" And Me.txtqunty.Text <> "" And
Me.txtrate.Text <> "") Then
Me.lstproductid.Items.Add(Me.cboproductid.Text)
Me.lstproductname.Items.Add(Me.txtname.Text)
Me.lstproductbrand.Items.Add(Me.txtbrand.Text)
Me.lstproductquntity.Items.Add(Me.txtqunty.Text)
Me.lstproductrate.Items.Add(Me.txtrate.Text)
Me.clear1()
Me.txtrate.Text = ""
Me.txtqunty.Text = ""
Else
MessageBox.Show("Please Select the Id of
Product to be added")
End If
End If
2
MessageBox.Show("Quantity should be less than" &
check, "Quantity warning", MessageBoxButtons.OK, MessageBoxIcon.Warning)
Me.txtqunty.Clear()
Me.txtqunty.Focus()
End If
Else
MessageBox.Show("Sorry,No Quantity is available", "Error
Message", MessageBoxButtons.OK, MessageBoxIcon.Error)
Me.txtqunty.Text = ""
Me.txtrate.Text = ""
Me.cboproductid.Text = ""
End If
End If
'check of product in listbox
If (Me.lstproductid.Items.Count <> 0) Then
Me.btnremve.Enabled = True
End If
Me.btnproadd.Enabled = False
Else
2
de = f.selectData("*", "customerdetailorder", "where
orderid=" & Me.txtorderid.Text & "order by orderid")
Me.dgvprodetail.DataSource = de
Me.dgvprodetail.ForeColor = Color.Black
'update of amount
While (co < de.Count)
qn = de.Item(co).Row.Item(2)
rt += de.Item(co).Row.Item(3) * qn
co += 1
End While
Me.txtamount.Text = rt
f.updateData("customerorder", " amount=" &
Me.txtamount.Text, "where orderid=" & Me.txtorderid.Text)
str2 = MessageBox.Show("customerorder value Information is
updated.", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information)
bindgrid()
Me.lstproductname.Items.Clear()
Me.lstproductid.Items.Clear()
Me.lstproductquntity.Items.Clear()
Me.lstproductrate.Items.Clear()
Me.lstproductbrand.Items.Clear()
Me.txtqunty.Text = ""
Me.txtrate.Text = ""
Me.cboproductid.Text = ""
Me.txtname.Text = ""
Me.txtbrand.Text = ""
Me.btnproadd.Enabled = False
Else
MessageBox.Show("Quantity should be less than" & check,
"Quantity warning", MessageBoxButtons.OK, MessageBoxIcon.Warning)
Me.txtqunty.Clear()
Me.txtrate.Text = ""
Me.txtqunty.Focus()
Me.txtname.Text = ""
Me.txtbrand.Text = ""
End If
End If
End If
End Sub
Private Sub txtserch_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles txtserch.TextChanged
If (Me.cboserch.SelectedIndex <> -1) Then
If (Me.cboserch.SelectedIndex = 0 Or Me.cboserch.SelectedIndex =
1) Then Dim msgerr As String
msgerr = f.validateData(Me.txtserch.Text, "isNumeric",
"Sorry,Only numbers are allow")
If (msgerr <> "") Then
MessageBox.Show(msgerr)
Me.txtserch.Text = ""
End If
End If
End Sub
End Class
Reports:
2
2
2
2
ReportCode:
Sales Report:
Public Class salesreport
Inherits System.Windows.Forms.Form
Private Sub btnreport_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnreport.Click
If (dp1.Text < dp2.Text) Then
Dim ObjReportRpt As
CrystalDecisions.CrystalReports.Engine.ReportDocument = New
CrystalDecisions.CrystalReports.Engine.ReportDocument
Dim ObjReportViewer As reportviewer = New reportviewer
Try
Dim ds As New DataSet
Dim f As New Functions
ds =
f.selectGridData("orderid,customerorder.customerid,amount,mastercustomer.custo
mername,date", "customerorder,mastercustomer", "where date between'" &
Me.dp1.Text & "' and '" & Me.dp2.Text & "'and
mastercustomer.customerid=customerorder.customerid")
ObjReportRpt = New crystal2
ObjReportRpt.Database.Tables(0).SetDataSource(ds.Tables(0))
ObjReportViewer.CrystalReportViewer1.ReportSource =
ObjReportRpt
'ObjReportRpt.DataDefinition.FormulaFields("Name").Text = "'"
& Now.Date.ToString & "'"
ObjReportViewer.ShowInTaskbar = True
ObjReportViewer.Show()
ObjReportViewer.Focus()
Catch ex As Exception
End Try
Else
MessageBox.Show("Please enter the proper date,From date should be
less than To date")
End If
End Sub
End Class
2
Customer details:
Dim ObjReportRpt As CrystalDecisions.CrystalReports.Engine.ReportDocument =
New CrystalDecisions.CrystalReports.Engine.ReportDocument
Dim ObjReportViewer As reportviewer = New reportviewer
Try
Dim ds As New DataSet
Dim f As New Functions
ds = f.selectGridData("*", "mastercustomer", "where status=1")
ObjReportRpt = New Customer
ObjReportRpt.Database.Tables(0).SetDataSource(ds.Tables(0))
ObjReportViewer.CrystalReportViewer1.ReportSource = ObjReportRpt
'ObjReportRpt.DataDefinition.FormulaFields("Name").Text = "'" &
Now.Date.ToString & "'"
ObjReportViewer.ShowInTaskbar = True
ObjReportViewer.Show()
ObjReportViewer.Focus()
'ObjReportRpt = New report2
'ObjReportViewer.ReportViewerControl.ReportSource = ObjReportRpt
'ObjReportRpt.DataDefinition.FormulaFields("Name").Text = "'" &
Now.Date.ToString & "'"
'ObjReportViewer.ShowInTaskbar = True
'ObjReportViewer.Show()
'ObjReportViewer.Focus()
Catch ex As Exception
End Try
2
Implementation:
2
Future Scope:
Improvement in some form designing.
Billing processes.
2
Conclusion:
The project named as “Sales And Purchase” by now is familiar
to all. We had a great pleasure in developing this project. It is the
hard work and focus that had made this come out possible. It was a
great experience working with the “AreinComputers”.
2
Bibliography
Programming with Visual Basic 6.0
By, Francesco Balena.
2
2