Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Software Development
For
Presented by
DSE Batch-32
Group III
1
ACKNOWLEDGEMENT
We are the students attending at the specialization course of Diploma in
Software Engineering. This is jointly sponsored by the National Management
Collage and Winner Computer Group in Botahtaung Township.
We particularly wish to respect all our teachers were teaching us from the
beginning of this course to now and here. Without their guidance, management
and encouragement, we havent been developed this Project. And we also thank
the manager, staffs and all of the people who have directly or indirectly took
interest to complete my project file.
2
Contents
Page
Chapter (1) INTRODUCTION 5
1.1 Introduction 6
1.2 Objectives 6
1.5 Feasibility 7
2.5 Normalization 19
2.5.1 Unnormalization 19
3
2.5.2 First Normalizaion 21
4.1 Conclusion 72
4
Chapter (1)
Introduction
5
1.1 Introduction
are changing to use computerized system instead of manual system. Our project title is Point
of Sale System of construction material shop. By using our software, users can analyze sales
records, and figure out how well all the items in the shop sell. Also, they can maintain and
1.2 Objectives
To review sales histories easily and quickly at anytime without losing data
records.
import histories are recorded and stored by using papers and files. So, it has many
problems such as duplicating data, leaving off data in recording and calculation errors.
As the manual system uses paper and files, they are unable to search or review
such records of files easily and quickly. Also, there may be lost of data records.
6
1.4 Proposed system
Let the users know in hand stocks and buying prices within a short time.
1.5 Feasibility
commercial benefits and operational costs. So, the expense of developing the system
We can also get intangible benefits. For example, we get the customers
When changing to the computerized system, most of the staffs are not well
trained in computers. So, we must provide paper training, explanation and user
manual to understand and able to use the computerized system efficiently. This can
make the staffs and manager more qualify and increase the standards of the work.
7
1.5.3 Technical Feasibility
Our computerized system is easy to use for some staffs and managers who
have experience and are expert. But we should train the staffs who can only work
manually.
In the manual system, duplicate data cant be searched easily, but it can be
Memory 1GB
8
1.7 Time Schedule
Task Duration June July August
Planning
Analysis
Design
Coding and
implemention
Testing
Documentation
9
Chapter (2)
System Analysis and Design
10
2.1 Context Diagram
11
12
13
2.3 Data Flow Diagram (Level-1)
14
15
16
17
2.4 Entity Relationship Diagram
18
2.5 Normalization
2.5.1 Unnormalization
ItemID
ItemName
ItemType
Price
Quantity
WarehouseNo
ItemTypeID
ItemTypeName
CustomerID
CustomerName
Phone
City
Township
Street
HomeNo
VoucherNo
SaleDate
CustomerID
ItemType
ItemName
Quantity
Price
Totalprice
OrderID
OrderDate
19
ItemID
ItemName
Quantity
Price
TotalPrice
OrderID
OrderDate
CustomerID
DeliveryDate
20
2.5.2 First Normalization
ItemID
ItemName
ItemType
Price
Quantity
WarehouseNo
ItemTypeID
ItemTypeName
CustomerID
CustomerName
Phone
City
Township
Street
HomeNo
VoucherNo
SaleDate
CustomerID
ItemType
ItemName
Quantity
Price
Totalprice
OrderID
OrderDate
ItemType
21
ItemID
ItemName
Quantity
Price
TotalPrice
OrderID
OrderDate
CustomerID
DeliveryDate
22
2.5.3 Second Normalization
Table : Item
ItemID
ItemTypeID
ItemName
Price
Quantity
WarehouseNo
Table :ItemType
ItemTypeID
ItemTypeName
Table : Customer
CustomerID
CustomerName
Phone
City
Township
Street
HomeNo
Table : Sale
VoucherID
SaleDate
CustomerID
23
ItemID
Quantity
Price
Amount
Table :SaleLine
VoucherID
TotalPrice
Table :OrderDetail
OrderID
ItemID
Quantity
Price
Amount
Table :OrderLine
OrderID
OrderedDate
CustomerID
DeliveryDate
TotalPrice
ConfirmDelivery
24
2.6 Data Table (Data Dictionary)
Table : Item
ItemName VarChar(25)
Price Number(9)
Quantity Number(5)
WarehouseNo Char(2)
Table: ItemType
ItemTypeName Char(25)
Table: Customer
CustomerName Varchar(25)
CustomerPhone Char(11)
CustomerStreet Char(20)
CustomerTownship Char(25)
CustomerCity Char(20)
CustomerHomeNo Char(4)
25
Table: Sale
SaleDate Date/time
Quantity Number(5)
Price Number(9)
Amount Number(9)
Table :SaleLine
TotalPrice Number(9)
Table: OrderDetail
Quantity Number(5)
Price Number(9)
Amount Number(9)
26
Table: OrderLine
OrderedDate Date/time
DeliveryDate Date/time
TotalPrice Number(9)
27
Chapter-3
Form Design and Implementation
28
3.1 Structure Chart
29
3.2 Pseudo Code
Login_Program
Open Login_Form
ELSE
IF UserName = THEN
ELSE
IF Password = THEN
ELSE
IF UserName = data_username
Display Main_Form
ELSE
ENDIF
ENDIF
ENDIF
ENDIF
END
30
Add_Items_Information
END
Add_Item_Type
END
Save_Sales_Information
END
Add_Customers_Information
END
31
Add_Order
SaveOrderInformation
END
32
3.3 Form Design & Coding
Login_Form
Main_Form
33
Sale_Form
Add_Order_Form
34
View_Order_Form
Edit_Order_Form
35
Order_Change_Form
Item_Form
36
Add_Item_Form
Edit_Item_Form
37
Item_Type_Form
Customer_Form
38
Add_Customer_Form
Edit_Customer_Form
39
Reports_Form
40
Login_Form
Main_Form
Public Class Main_Form
Dim ds As DataSet
Private Sub ItemsToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ItemsToolStripMenuItem.Click
Item_Form.ShowDialog()
End Sub
41
Private Sub CustomerToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
CustomerToolStripMenuItem.Click
Customer_Form.ShowDialog()
End Sub
42
Private Sub ReportToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
ReportToolStripMenuItem.Click
Report_Form.Show()
End Sub
End Class
Sale_Form
Imports System.Data
Imports System.Data.SqlClient
Public Class Sale_Form
Dim connection As New OleDb.OleDbConnection
Dim ds As DataSet
Dim dt As New DataTable
Dim dr As DataRow
Dim count As New Integer
Private Sub addBtn_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles addBtn.Click
If txtItemID.Text <> "" Then
Dim q As Integer
ds = SelectData("Select * from Item where Itemid='" & txtItemID.Text
& "'")
q = ds.Tables(0).Rows(0).Item(4)
If txtQuantity.Text > q Then
MessageBox.Show("Quantity is not enough")
ElseIf txtQuantity.Text = "" Then
Else
ds = SelectData("Select * from Item where Itemid='" &
txtItemID.Text & "'")
Dim itemquantity As Integer = ds.Tables(0).Rows(0).Item(4) -
txtQuantity.Text
SaveData("Update Item Set Quantity=" & itemquantity & " where
Itemid='" + txtItemID.Text + "'")
Dim amount, total As Long
Dim rowNum As Integer = DataGridView1.Rows.Add()
DataGridView1.Rows.Item(rowNum).Cells(0).Value =
txtItemID.Text
DataGridView1.Rows.Item(rowNum).Cells(1).Value =
txtItemType.Text
43
DataGridView1.Rows.Item(rowNum).Cells(2).Value =
txtItemName.Text
DataGridView1.Rows.Item(rowNum).Cells(3).Value =
txtQuantity.Text
DataGridView1.Rows.Item(rowNum).Cells(4).Value = txtPrice.Text
DataGridView1.Rows.Item(rowNum).Cells(5).Value =
txtAmount.Text
total = txtTotal.Text
amount = txtAmount.Text
total = total + amount
txtTotal.Text = total
txtItemID.Text = ""
txtItemType.Text = ""
txtItemName.Text = ""
txtPrice.Text = ""
txtQuantity.Text = ""
txtAmount.Text = ""
txtItemID.Focus()
txttotalitem.Text = txttotalitem.Text + 1
End If
End If
End Sub
End If
End Sub
quantity = txtQuantity.Text
Else
price = txtPrice.Text
total = price * quantity
txtAmount.Text = total
End If
End Sub
Else
Dim rowNum, total As Integer
rowNum = DataGridView1.CurrentRow.Index
Label15.Text = DataGridView1.Rows.Item(rowNum).Cells(0).Value
txtQuantity.Text = DataGridView1.Rows.Item(rowNum).Cells(3).Value
ds = SelectData("Select * from Item where Itemid='" + Label15.Text +
"'")
45
Dim itemquantity As Integer = ds.Tables(0).Rows(0).Item(4) +
txtQuantity.Text
SaveData("Update Item Set Quantity=" & itemquantity & " where
Itemid='" + Label15.Text + "'")
total = DataGridView1.Rows.Item(rowNum).Cells(5).Value
DataGridView1.Rows.RemoveAt(DataGridView1.CurrentRow.Index)
txtTotal.Text = txtTotal.Text - total
txttotalitem.Text = txttotalitem.Text - 1
txtQuantity.Text = ""
End If
End Sub
createtable()
ds = SelectData("Select * from Sale where Voucherid='" &
txtvoucher.Text & "'")
count = ds.Tables(0).Rows.Count
dt.Clear()
If count > 0 Then
For i As Int32 = 0 To count - 1
dr = dt.NewRow
With ds.Tables(0).Rows(i)
dr.Item(0) = .Item("VoucherID")
dr.Item(1) = .Item("SaleDate")
dr.Item(2) = .Item("ItemID")
dr.Item(3) = .Item("ItemTypeName")
dr.Item(4) = .Item("ItemName")
46
dr.Item(5) = .Item("Quantity")
dr.Item(6) = .Item("UnitPrice")
dr.Item(7) = .Item("Amount")
End With
dt.Rows.Add(dr)
Next
Else
MessageBox.Show("Search record not found")
End If
End Sub
Private Sub createtable()
dt.Columns.Clear()
dt.Columns.Add("Voucher ID")
dt.Columns.Add("Sale Date")
dt.Columns.Add("Item ID")
dt.Columns.Add("Item Type Name")
dt.Columns.Add("Item Name")
dt.Columns.Add("Quantity")
dt.Columns.Add("Unit Price")
dt.Columns.Add("Amount")
End Sub
Add_Order_Form
End Sub
49
Private Sub txtQuantity_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txtQuantity.TextChanged
Dim price, total As Long
Dim quantity As String
quantity = txtQuantity.Text
If txtQuantity.Text >= "A" And txtQuantity.Text <= "z" Then
MsgBox("Please enter quantity that must has numeric value")
txtQuantity.SelectAll()
txtQuantity.Focus()
Else
price = txtUnitPrice.Text
total = price * quantity
txtAmount.Text = total
End If
End Sub
Dim a As Integer
a = txttotalitem.Text
For i = 0 To a - 1
SaveData("Insert into OrderDetail values ('" & txtOrderID.Text & "',#"
& DateTimePicker1.Value & "#,'" &
DataGridView1.Rows.Item(i).Cells(0).Value & "','" &
DataGridView1.Rows.Item(i).Cells(1).Value & "','" &
DataGridView1.Rows.Item(i).Cells(2).Value & "'," &
DataGridView1.Rows.Item(i).Cells(3).Value & "," &
DataGridView1.Rows.Item(i).Cells(4).Value & ", " &
DataGridView1.Rows.Item(i).Cells(5).Value & ")")
Next i
50
SaveData("Insert into OrderLine values ('" & txtOrderID.Text & "','" &
txt_Cust_ID.Text & "','" & txt_Cust_Name.Text & "'," & txtTotal.Text & ",#"
& txtOrderDate.Text & "#,#" & DateTimePicker1.Value & "#,'Pending')")
ds = SelectData("Select * from OrderDetail where Orderid='" &
txtOrderID.Text & "'")
count = ds.Tables(0).Rows.Count
dt.Clear()
If count > 0 Then
For i As Int32 = 0 To count - 1
dr = dt.NewRow
With ds.Tables(0).Rows(i)
dr.Item(0) = .Item("Orderid")
dr.Item(1) = .Item("OrderDate")
dr.Item(2) = .Item("ItemID")
dr.Item(3) = .Item("ItemTypeName")
dr.Item(4) = .Item("ItemName")
dr.Item(5) = .Item("Quantity")
dr.Item(6) = .Item("UnitPrice")
dr.Item(7) = .Item("Amount")
End With
dt.Rows.Add(dr)
Next
Else
MessageBox.Show("Search record not found")
End If
Else
ds = SelectData("Select * from Item where Itemid='" & txtItemID.Text
& "'")
Dim itemquantity As Integer = ds.Tables(0).Rows(0).Item(4) -
txtQuantity.Text
SaveData("Update Item Set Quantity=" & itemquantity & " where
Itemid='" + txtItemID.Text + "'")
52
Dim amount, total As Long
total = txtTotal.Text
amount = txtAmount.Text
txtItemID.Text = ""
txtItemname.Text = ""
txtItemType.Text = ""
txtUnitPrice.Text = ""
txtQuantity.Text = ""
End Sub
53
Private Sub txttotalitem_TextChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles txttotalitem.TextChanged
If txttotalitem.Text = 0 And txt_Cust_Name.Text = "" Then
Print_Btn.Enabled = False
Else
Print_Btn.Enabled = True
End If
End Sub
End Class
View_Order_Form
Item_Form
Add_Item_Form
57
Edit_Item_Form
Item_Type_Form
Else
SaveData("Insert into ItemType values ('" & txtBox_ItemTypeID.Text
& "','" & txtBox_ItemTypeName.Text & "','" & TextBox1.Text & "')")
MessageBox.Show(" Saving Successfully")
txtBox_ItemTypeID.Text = AutoID("ItemTypeID", "ItemType")
fill_Item()
End If
End Sub
End Class
Customer_Form
60
Private Sub AddCustomerToolStripMenuItem_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
AddCustomerToolStripMenuItem.Click
Add_Cust_Form.ShowDialog()
End Sub
Add_Customer_Form
Edit_Customer_Form
63
txtBox_Township.Text =
Customer_Form.DataGridView1.Rows.Item(rowNum).Cells(4).Value
cboBox_City.Text =
Customer_Form.DataGridView1.Rows.Item(rowNum).Cells(5).Value
txtBox_HomeNum.Text =
Customer_Form.DataGridView1.Rows.Item(rowNum).Cells(6).Value
End Sub
Report_Form
End If
count = ds.Tables(0).Rows.Count
dt.Clear()
If count > 0 Then
For i As Int32 = 0 To count - 1
dr = dt.NewRow
With ds.Tables(0).Rows(i)
dr.Item(0) = .Item("VoucherID")
dr.Item(1) = .Item("SaleDate")
dr.Item(2) = .Item("ItemID")
dr.Item(3) = .Item("ItemTypeName")
dr.Item(4) = .Item("ItemName")
dr.Item(5) = .Item("Quantity")
dr.Item(6) = .Item("UnitPrice")
dr.Item(7) = .Item("Amount")
End With
dt.Rows.Add(dr)
Next
DataGridView1.Refresh()
DataGridView1.DataSource = dt
Else
MessageBox.Show("Search record not found")
66
End If
count = ds.Tables(0).Rows.Count
dt.Clear()
If count > 0 Then
For i As Int32 = 0 To count - 1
dr = dt.NewRow
With ds.Tables(0).Rows(i)
dr.Item(0) = .Item("VoucherID")
dr.Item(1) = .Item("SaleDate")
dr.Item(2) = .Item("ItemID")
dr.Item(3) = .Item("ItemTypeName")
dr.Item(4) = .Item("ItemName")
dr.Item(5) = .Item("Quantity")
dr.Item(6) = .Item("UnitPrice")
dr.Item(7) = .Item("Amount")
End With
dt.Rows.Add(dr)
Next
DataGridView1.Refresh()
DataGridView1.DataSource = dt
Else
MessageBox.Show("Search record not found")
End If
67
Dim objReport As New SaleReport
Dim DailyReport As New CrystalReport6
If dt.Rows.Count <> 0 Then
DailyReport.SetDataSource(dt)
objReport.CrystalReportViewer1.ReportSource = DailyReport
objReport.CrystalReportViewer1.Show()
objReport.ShowDialog()
End If
End If
ElseIf ComboBox1.Text = "Order Report" Then
If RadioButton2.Checked = True Then
createtable()
Dim d As Date
d = Format(DateTimePicker1.Value, "Short date")
ds = SelectData("Select * from OrderReport where OrderDate=#" & d
& "#")
count = ds.Tables(0).Rows.Count
dt.Clear()
If count > 0 Then
For i As Int32 = 0 To count - 1
dr = dt.NewRow
With ds.Tables(0).Rows(i)
dr.Item(0) = .Item("VoucherID")
dr.Item(1) = .Item("SaleDate")
dr.Item(2) = .Item("ItemID")
dr.Item(3) = .Item("ItemTypeName")
dr.Item(4) = .Item("ItemName")
dr.Item(5) = .Item("Quantity")
dr.Item(6) = .Item("UnitPrice")
dr.Item(7) = .Item("Amount")
End With
dt.Rows.Add(dr)
Next
DataGridView1.Refresh()
DataGridView1.DataSource = dt
Else
MessageBox.Show("Search record not found")
End If
68
Dim objReport As New SaleReport
Dim DailyReport As New CrystalReport7
If dt.Rows.Count <> 0 Then
DailyReport.SetDataSource(dt)
objReport.CrystalReportViewer1.ReportSource = DailyReport
objReport.CrystalReportViewer1.Show()
objReport.ShowDialog()
End If
count = ds.Tables(0).Rows.Count
dt.Clear()
If count > 0 Then
For i As Int32 = 0 To count - 1
dr = dt.NewRow
With ds.Tables(0).Rows(i)
dr.Item(0) = .Item("VoucherID")
dr.Item(1) = .Item("SaleDate")
dr.Item(2) = .Item("ItemID")
dr.Item(3) = .Item("ItemTypeName")
dr.Item(4) = .Item("ItemName")
dr.Item(5) = .Item("Quantity")
dr.Item(6) = .Item("UnitPrice")
dr.Item(7) = .Item("Amount")
End With
dt.Rows.Add(dr)
Next
DataGridView1.Refresh()
DataGridView1.DataSource = dt
Else
MessageBox.Show("Search record not found")
End If
Dim objReport As New SaleReport
Dim DailyReport As New CrystalReport8
If dt.Rows.Count <> 0 Then
DailyReport.SetDataSource(dt)
69
objReport.CrystalReportViewer1.ReportSource = DailyReport
objReport.CrystalReportViewer1.Show()
objReport.ShowDialog()
End If
ElseIf RadioButton3.Checked = True Then
createtable()
Dim y As Integer
y = DateTimePicker1.Value.Year
ds = SelectData("Select * from SaleReport where Year=" & y & "")
count = ds.Tables(0).Rows.Count
dt.Clear()
If count > 0 Then
For i As Int32 = 0 To count - 1
dr = dt.NewRow
With ds.Tables(0).Rows(i)
dr.Item(0) = .Item("VoucherID")
dr.Item(1) = .Item("SaleDate")
dr.Item(2) = .Item("ItemID")
dr.Item(3) = .Item("ItemTypeName")
dr.Item(4) = .Item("ItemName")
dr.Item(5) = .Item("Quantity")
dr.Item(6) = .Item("UnitPrice")
dr.Item(7) = .Item("Amount")
End With
dt.Rows.Add(dr)
Next
DataGridView1.Refresh()
DataGridView1.DataSource = dt
Else
MessageBox.Show("Search record not found")
End If
Dim objReport As New SaleReport
Dim DailyReport As New CrystalReport9
If dt.Rows.Count <> 0 Then
DailyReport.SetDataSource(dt)
objReport.CrystalReportViewer1.ReportSource = DailyReport
objReport.CrystalReportViewer1.Show()
objReport.ShowDialog()
End If
End If
End If
End Sub
End Class
70
Chapter (4)
Conclusion
71
4.1 Conclusion
By conclusion, using our computerized system can reduce time, paper works and
human power and serve quickly and efficiently. We believe that the system can be used easier
and more convenient. We will add some feature to our POS software system to get more
satisfaction.
72