Date post: | 27-Oct-2014 |
Category: |
Documents |
Upload: | carmenlim07 |
View: | 124 times |
Download: | 0 times |
2012
IT404.NET – Advanced VB.NET
Project
INFORMATICS COMPUTER SCHOOL
DIT PROJECT
(IT404.NET – ADVANCED VB.NET)
< 2Rats for the Brats E-Commerce site >
Name/s: Lim, Ma. Carmen N.
Address: 37 Padua St. BFRV LPC, M.M.
Student No.: 0000 - 7999
Lecturer: Sir Rudrian Riener Pariñas
Center: 0535
Country: Republic of the Philippines
0535
- 00
00 –
799
9 (I-
DIT
)
1
2012
IT404.NET – Advanced VB.NET
Project
TABLE OF CONTENTS
CHAPTERI: Introduction
CHAPTER II: Analysis & Design
2.1 Description of Current System
2.2 Narrative and requirement specification for new system
2.3 Interface Design
2.4 Procedural Design
2.5 Input/ Output Screen Design
CHAPTER III: Development & Testing
3.1 Program Listing
3.2 ASP usage with complete Web Application
3.3 ADO usage with web application
3.4 Meaningful object names and standard naming convention -
3.6 Web Application Validation
3.7 Test Plan
3.8 Test Cases
3.9 Test Logs
CHAPTER IV: Implementation
4.1 User Manual
CHAPTER V: Conclusion
ACKNOWLEDGEMENTS
p 4
p 5
pp 6-8
pp 9-14
p 3
pp 15-23
pp 24-29
pp 30-35
pp 35-40
pp 41-42
pp 43-47
pp 49-62
p 63
p 48
pp 64-72
p 73
p 74
0535
- 00
00 –
799
9 (I-
DIT
)
2
2012
IT404.NET – Advanced VB.NET
Project
CHAPTERI: INTRODUCTION
A hobby shop named 2Rats for the Brats is a venture which devotes to
distributing anime and toy collectibles to every enthusiast nationwide. Initially, the
shop was founded years ago due to the owner’s fascination in collectible items in
general and wishes to share his passion to other hobbyists as well. Now that the
shop has gained enough visibility they have already established various shops in
distinct areas around the metro manila which are accessible to the mass majority. To
be precise, their merchandise is a multitude of mainly anime products, collector’s
item toys and other miscellaneous things such as comic books and trading cards.
The shop aims to be a mogul in their line of trade through marketing hard to
find or limited edition anime and toy products as well as common items which they
offer for a reasonable price.
Due to the shop’s dedication and long-term commitment in meeting their
customer’s demands they have gained much recognition and respect from a wide
crowd of shoppers.
Since 2rats for the Brats wishes to gratify their valued clients all the more,
they started an online storefront in multiply.com which makes their catalogue of
products easier to browse and purchased by buyers which they can interact with
anytime using the network medium.
0535
- 00
00 –
799
9 (I-
DIT
)
3
2012
IT404.NET – Advanced VB.NET
Project
CHAPTER II: ANALYSIS & DESIGN
2.1 Description of Current System
It has been made clear to readers that 2Rats for the Brats hobby shop
capitalizes on distributing anime and toy collectibles which aims to make it easier for
enthusiasts to fuel their interest.
Throughout the shops success they decided to satisfy more customers by
launching an ecommerce site in multiply.com, which is a web page that supports
merchants with their marketplace feature.
Having an online shop in multiply is beneficial but it was originally a blog site
which only focuses on content sharing and has less emphasis on marketing factor of
cyberspace. It lacks web tools such as order forms and shopping cart essential for
buyers to make purchases. They instead have to connect with their clients through
comment boxes, contact numbers and email so they can make negotiations.
Although having an online shop in multiply.com is manageable it is hard to
make the site’s design more attractive to buyers with their layout editing tools which
only provides drab web appearance templates.
2Rats for the brats would like to solve that issue and make it easier to make
transactions with their clients whilst making their storefront much presentable and
livelier to attract more buyers. They need not to be in despair, there is ASP.Net web
development language that applies the rules of Visual Basic.Net for their desired web
applications which can be implemented to a new badass storefront that will be design
using HTML (Hypertext Markup Language) and CSS (Cascading Style Sheets).
0535
- 00
00 –
799
9 (I-
DIT
)
4
2012
IT404.NET – Advanced VB.NET
Project
2.2 Narrative and requirement specification for new system
2Rats for the Brats Hobby shop has now subjected their ecommerce site
under reconstruction. They agreed to take the ASP.Net in Visual Basic.Net that
works with HTML (Hypertext Markup Language) and CSS (Cascading Style Sheets)
to materialize their desired web page.
To be able to begin the development phase of their exclusive E-commerce Website,
the programmer would have to procure certain system requirements.
Software Requirements
Microsoft Visual Studio 2008/ 2010 Express Edition (Freeware)
Xampp Control Installer (Freeware)
Mozilla Fire Fox 1 +
Hardware Requirements
Central Processing Unit
Hi-Res Monitor
keyboard
Mouse
PowerBox
USB Port/ CD Rom DVD Drive
Windows XP Home/ Professional Windows 7
Minimum Recommended Recommended
Pentium 233-megahertz
(MHz) processor
Pentium 300-megahertz
(MHz) processor
1 gigahertz (GHz) or faster 32-bit (x86) or 64-bit (x64)
processor
64 MB RAM 128 MB RAM 1 gigabyte (GB) RAM (32-bit) or 2 GB RAM (64-bit)
1.5 gigabytes (GB) HDD 1.5 gigabytes (GB) HDD 16 GB hard disk space (32-bit) or 20 GB (64-bit)
Super VGA (800 x 600) Super VGA (800 x 600)DirectX 9 graphics device with WDDM 1.0 or higher
driver
0535
- 00
00 –
799
9 (I-
DIT
)
5
2012
IT404.NET – Advanced VB.NET
Project
2.3 Interface Design
This section of the documentation will exhibit screen dumps specifically of
asp.net web applications than the HTML and CSS layout. Basically, the ‘design
view’ of the applications was expressed here. Since the web site is database-
dependent a data dictionary basing on MS Access 2003 will be attached together
with the screendumps.
Default.aspx (Main Page: Guest Book)
reg.aspx (Registration
Form)
0535
- 00
00 –
799
9 (I-
DIT
)
6
2012
IT404.NET – Advanced VB.NET
Project
0535
- 00
00 –
799
9 (I-
DIT
)
7
2012
IT404.NET – Advanced VB.NET
Project
login.aspx (User Log In Form)
prods.aspx (‘buy’ and ‘add to cart’ command buttons)
0535
- 00
00 –
799
9 (I-
DIT
)
8
2012
IT404.NET – Advanced VB.NET
Project
order.aspx (Registration Form)
ViewCart.aspx (View Shopping Cart Page)
0535
- 00
00 –
799
9 (I-
DIT
)
9
2012
IT404.NET – Advanced VB.NET
Project
2.4 Procedural Design
2.4.a Program Flowcharts
Default.aspx (Comment Box)
START
Enter a ChatID & Email Address then Type In a comment on the fields required.
txtChatID.Text = “”[email protected]=””
TERMINATE
Button Pressed?
Clear Button Pressed.
Send Button Pressed.
An OledbCommand will execute an SQL syntax which inserts the ChatID, Email, & Comment values into the GBuk table of DB.mdb of 2Rats Website.
Browse or EXIT 2Rats
Webpage?
YES
NO
0535
- 00
00 –
799
9 (I-
DIT
)
10
2012
IT404.NET – Advanced VB.NET
Project
reg.aspx (Registration Page)
START
Set a Username & Password then key in first name, middle initial, lastname, birthday, gender and email.
TERMINATE
Button Pressed?
An OledbCommand will execute an SQL syntax which inserts the Username, Password, Fullname, birthday, age, gender, email values into the SignUp table of DB.mdb of 2Rats Website. A message box will inform the user that registration was completed then redirects to login.aspx screen.
A:links or Close Window [x] button Pressed
Submit Button
A/11
B/10
0535
- 00
00 –
799
9 (I-
DIT
)
11
2012
IT404.NET – Advanced VB.NET
Project
login.aspx (User Login Page)
An OledbCommand will execute an SQL syntax which selects the Username, Password, from SignUp table of DB.mdb of 2Rats Website. Then redirects to Prods.aspx
Is username and Password correct?
YES
NOMsgBox(“Access Denied Register First”)Response.Redirect(“reg.aspx”)
B/9START
TERMINATE
Enter A Username & Password.
Button Pressed?
A/10
Log In Button
A:links or Close Window [x] button Pressed
C/12
0535
- 00
00 –
799
9 (I-
DIT
)
12
2012
IT404.NET – Advanced VB.NET
Project
Prods.aspx (Products Catalogue Page)
START
TERMINATE
Button Pressed?
Add To Cart Button
Buy Button
A:links or Close Window [x] button Pressed
Response.redirect(“order.aspx”)
An OledbCommand will execute an SQL syntax which Inserts a selected products code, name and price values INTO Cart table of DB.mdb of 2Rats Website.
C/11
D/13
E/12
0535
- 00
00 –
799
9 (I-
DIT
)
13
2012
IT404.NET – Advanced VB.NET
Project
order.aspx(Order Form Page)
START
TERMINATE
Button Pressed?
Supply personal information details particularly FirstName, LastName, Middle Initial, Home Address, Zip Code, & landline THEN Select an Item. From the product codes drop down list
An OledbCommand will execute an SQL syntax which selects a product code, product name and price values FROM Prods table of DB.mdb of 2Rats Website.
D/12
Select an Item. From the product codes drop down list
A:links or Close Window [x], Sign Out button Pressed
GO button pressed.
Product Name will be displayed to txtProdName.Text and Price will be displayed in txtPrice.Text.
Submit button pressed.
Enter a number Quantity after the Price textbox
Button Pressed?
ADD button pressed.
Button Pressed?
REMOVE button pressed.
An OledbCommand will execute an SQL syntax which INSERTS all data INTO Buy Items table of DB.mdb of 2Rats Website.
A
A
Orders are Taken Redirects to products
Are there blank fields in form?
YES
NO
Label3.Visible = True Label3.Text = "ALL FIELDS ARE REQUIRED!"
B
B
E/12
Items will be added into a Listbox then total price computes.
Items will be removed from a Listbox then total price computes.
A A
0535
- 00
00 –
799
9 (I-
DIT
)
14
2012
IT404.NET – Advanced VB.NET
Project
ViewCart.aspx (View My Cart Page)
START
TERMINATE
A:links, Signout or Close Window [x], Sign Out button Pressed
An OledbCommand will execute an SQL syntax will DELETE ITEMS FROM Cart table WHERE Username session matches in DB.mdb of 2Rats Website.
Button pressed?
Clear all button Pressed
0535
- 00
00 –
799
9 (I-
DIT
)
15
2012
IT404.NET – Advanced VB.NET
Project
2.5 Input Screen Design
Default.aspx (Comment Box)
Data Dictionary (MS Access 2002-2003)
XXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
SEND CLEAR
Chat ID:
E-Mail:
Comment:
0535
- 00
00 –
799
9 (I-
DIT
)
16
2012
IT404.NET – Advanced VB.NET
Project
reg.aspx (Registration Form)
Data Dictionary (MS Access 2002-2003)
XXXXXXXXXXXXXXXXXXXXXXSet a Username:
XXXXXXXXXXXXXXXXXXXXXXSet a Password:
AAAAAAAAAAAAAAAAAAAAFirst Name:
AMiddle Initial:
AAAAAAAAAAAAAAAAAAAALast Name:
AAAAAAAAA 99 9999Birthday:
Gender: MALE FEMALE
SUBMIT
0535
- 00
00 –
799
9 (I-
DIT
)
17
2012
IT404.NET – Advanced VB.NET
Project
login.aspx (Log In Form)
Data Dictionary (MS Access 2002-2003)
prods.aspx (Product Catalogue Page)
Data Dictionary (MS Access 2002-2003)
XXXXXXXXXXXXXXXXXXXXXXUsername:
XXXXXXXXXXXXXXXXXXXXXXPassword:
Log In
HTMLImg.jpg
Product Photo
Product Name: “ITEM NAME”
Product Code: P001
Price: 0000.00 Php
BUY ADD TO CART
0535
- 00
00 –
799
9 (I-
DIT
)
18
2012
IT404.NET – Advanced VB.NET
Project
order.aspx (Order Form)
Data Dictionary (MS Access 2002-2003)
AAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAA
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXAAAAAAAAAAAAAAAAA
9999999-9999
XXXX
XXXXXXXXXXXXXXXXXX
99.99 999
XXXXXXXXXXXXXXXXXXXXXX
99.99
99.99
0535
- 00
00 –
799
9 (I-
DIT
)
19
2012
IT404.NET – Advanced VB.NET
Project
ViewCart.aspx (View Shopping Cart)
Data Dictionary (MS Access 2002-2003)
Prod Code Item Name PriceClear All
0535
- 00
00 –
799
9 (I-
DIT
)
20
2012
IT404.NET – Advanced VB.NET
Project
2.6 Output Screen Design
Default.aspx (Guest Log)
Chat ID Comment
XXXXXXXXXXXXXXX “XXXXXXXXXXXXXXXXXXXXXX”
Data Dictionary (MS Access 2002-2003)
reg.aspx (Registration Form)
all data input in the registration form will be saved in Register table of DB.mdb file of
2Rats Webpage.
Response.Redirect to login.aspx
Data Dictionary (MS Access 2002-2003)
“Registration was successfully completed!!”
X
OK
0535
- 00
00 –
799
9 (I-
DIT
)
21
2012
IT404.NET – Advanced VB.NET
Project
login.aspx (User Log In Form)
If Username and Password is valid then…
Response.Redirect to prods.aspx
Else If Username and Password is invalid then..
Data Dictionary (MS Access 2002-2003)
prods.aspx (Add to Cart Button)
all data items in a specific product will be appended to Cart table of DB.mdb file of
2Rats for the Brats Website.
Data Dictionary (MS Access 2002-2003)
“Access Denied! Wrong authentication details or you must be registered first.
X
OK
“Access Denied! Wrong authentication details or you must be registered first.
X
OK
0535
- 00
00 –
799
9 (I-
DIT
)
22
2012
IT404.NET – Advanced VB.NET
Project
prods.aspx (Buy Button)
Response.Redirect to order.aspx
Order.aspx (Order Form)
Add Button
Remove Button
Submit Button
Data Dictionary (MS Access 2002-2003)
“Orders were been taken wait for response from 2Rats for the Brats Team.
X
OK
99.99XXXXXXXXXXXXXXXXXXXXXXXXXX
0535
- 00
00 –
799
9 (I-
DIT
)
23
2012
IT404.NET – Advanced VB.NET
Project
ViewCart.aspx (View Shopping Cart)
Selects items from Cart table of Db.mdb of 2Rats Website where session username
matches.
Data Dictionary (MS Access 2002-2003)
Prod Code Item Name Price
XXXX XXXXXXXXXXXXXXXXXX 99.99Clear All
0535
- 00
00 –
799
9 (I-
DIT
)
24
2012
IT404.NET – Advanced VB.NET
Project
CHAPTER III: DEVELOPMENT & TESTING
3.1 Program Listing
Default.aspx (Guest Book)
Imports System.Data.OleDbImports System.DataPartial Class _Default Inherits System.Web.UI.Page Dim cmd As New OleDbCommand Dim objcmd As New OleDbCommand Dim con As New OleDbConnection("Provider = Microsoft.JET.OLEDB.4.0; Data Source=C:\xampp\htdocs\2Rats\App_Data\DB.mdb") Protected Sub btnSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSend.Click If txtChatID.Text = "" Or txtEmail.Text = "" Or txtComment.Text = "" Then Label2.Visible = True Label2.Text = "All fields are required" Else Dim query1 As String query1 = "INSERT INTO Gbuk(NickName,Email,Comment) VALUES('" & txtChatID.Text & "','" & txtEmail.Text & "','" & txtComment.Text & "')" con.Open() cmd = New OleDbCommand(query1, con) cmd.ExecuteNonQuery() con.Close() Label1.Visible = True Label1.Text = "Your post will take a while to show up, come back later after a minute or so!" End If End Sub
Protected Sub btnCLR_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCLR.Click txtChatID.Text = "" txtEmail.Text = "[email protected]" txtComment.Text = "" End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load datagridView1() End Sub Sub datagridView1() Dim ds As New DataSet Dim dt As New DataTable ds.Tables.Add(dt)
Dim da As New OleDbDataAdapter
da = New OleDbDataAdapter("Select ChatID, Comment from Gbuk", con) 'da.Fill(dt) End SubEnd Class
0535
- 00
00 –
799
9 (I-
DIT
)
25
2012
IT404.NET – Advanced VB.NET
Project
reg.aspx (Registration Form)
Imports System.Data.OleDbImports System.Data
Partial Class reg Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load For index = 1 To 31 DDDLDay.Items.Add(index) Next
For index = 1950 To 1999 DDLYear.Items.Add(index) Next End Sub
Protected Sub btnSub_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSub.Click Dim bday As String = DDLMonth.SelectedValue + "" + DDDLDay.SelectedValue + "" + DDLYear.SelectedValue Dim a = Val(DDLYear.SelectedValue) Dim b As Double = 2012 Dim c = b - a Dim age As String = c
If txtUser.Text = "" Or txtPass.Text = "" Or txtFname.Text = "" Or txtMI.Text = "" Or txtSname.Text = "" Or DDLMonth.SelectedValue = "" Or DDDLDay.SelectedValue = "" Or DDLYear.SelectedValue = "" Or rbSex.Text = "" Or txtEadd.Text = "" Then lblWarn.Text = "All fields are required" Else Dim cmd As New OleDbCommand Dim con As New OleDbConnection("Provider = Microsoft.JET.OLEDB.4.0; Data Source=C:\xampp\htdocs\2Rats\App_Data\DB.mdb") Dim sql As String sql = "INSERT INTO Register(Uname, Pword, FullName, Birthday, Age, Gender, Email) VALUES('" & txtUser.Text & "','" & txtPass.Text & "','" & txtFname.Text & txtMI.Text & txtSname.Text & "','" & DDLMonth.SelectedValue & DDDLDay.SelectedValue & DDLYear.SelectedValue & "','" & age & "','" & rbSex.Text & "','" & txtEadd.Text & "')" con.Open() cmd = New OleDbCommand(sql, con) cmd.ExecuteNonQuery() con.Close() 'lblMSG1.Text = "Your age is: " 'lblMSG2.Text = Val(lblMSG1.Text) + c MsgBox("You have successfully registered.") Response.Redirect("login.aspx") End If
End Sub
End Class05
35 -
0000
– 7
999
(I-D
IT)
26
2012
IT404.NET – Advanced VB.NET
Project
login.aspx (User Log In Form)
Imports System.Data.OleDbImports System.DataPartial Class login Inherits System.Web.UI.Page Dim cmd As New OleDbCommand Dim con As New OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C:\xampp\htdocs\2Rats\App_Data\DB.mdb") Protected Sub btnLogIn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLogIn.Click
Dim query As String query = "SELECT * FROM Register WHERE Uname='" & txtUname.Text & "' AND Pword='" & txtPword.Text & "'"
cmd = New OleDbCommand(query, con)
con.Open() Dim reader As OleDbDataReader = cmd.ExecuteReader() Dim ctr As Integer Do While reader.Read() ctr = ctr + 1 Loop
If ctr = 1 Then
Session("Uname") = txtUname.Text
Response.Redirect("prods.aspx")
Else MsgBox("Access Denied! Please register First.") Response.Redirect("reg.aspx") End If con.Close() End SubEnd Class
0535
- 00
00 –
799
9 (I-
DIT
)
27
2012
IT404.NET – Advanced VB.NET
Project
prods.aspx (Products Catalogue Controls)
Imports System.Data.OleDbImports System.Data
Partial Class prods Inherits System.Web.UI.Page Dim cmd As New OleDbCommand Dim con As New OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C:\xampp\htdocs\2Rats\App_Data\DB.mdb") Protected Sub linkOut_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles linkOut.Click Session("Uname") = "" Response.Redirect("login.aspx") End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim cmd = New OleDbCommand("SELECT * FROM Register WHERE Uname = '" & Session("Uname") & "'", con)
con.Open()
Dim drx As OleDbDataReader = cmd.ExecuteReader()
While drx.Read()
lblname.Text = drx("Uname")
End While
If Session("Uname") = "" Then
Response.Redirect("login.aspx") con.Close() End If
End Sub
Protected Sub btnBuy_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnBuy.Click Response.Redirect("order.aspx") End Sub
Protected Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click
If Session("Uname") = lblname.Text Then Dim query As String = "INSERT INTO Cart(ProductID, Uname, ProductName, Price) VALUES('" & lblPcode.Text & "','" & lblname.Text & "','" & lblPname.Text & "','" & lblSP1.Text & "')" cmd = New OleDbCommand(query, con) 'con.Open() cmd.ExecuteNonQuery() con.Close() MsgBox("this item was added to your cart!") Else Response.Redirect("login.aspx") End If End Sub
Protected Sub btnBuy0_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnBuy0.Click Response.Redirect("order.aspx") End Sub
0535
- 00
00 –
799
9 (I-
DIT
)
28
2012
IT404.NET – Advanced VB.NET
Project
Order.aspx (Registration Form)
Imports System.Data.OleDbImports System.DataPartial Class order Inherits System.Web.UI.Page Dim cmd As New OleDbCommand Dim con As New OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C:\xampp\htdocs\2Rats\App_Data\DB.mdb")
Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click Session("Uname") = "" Response.Redirect("login.aspx") End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim cmd = New OleDbCommand("SELECT * FROM Register WHERE Uname = '" & Session("Uname") & "'", con)
con.Open()
Dim drx As OleDbDataReader = cmd.ExecuteReader()
While drx.Read()
Label2.Text = drx("Uname")
End While
If Session("Uname") = "" Then
Response.Redirect("login.aspx") con.Close() End If End Sub Protected Sub ddlCode_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlCode.SelectedIndexChanged End Sub Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click If txtFname.Text = "" Or txtLname.Text = "" Or txtMI.Text = "" Or txtHome.Text = "" Or txtHome2.Text = "" Or txtHome3.Text = "" Or txtZip.Text = "" Or txtTel.Text = "" Or txtMob.Text = "" Or txtEAdd.Text = "" Or ddlCode.SelectedValue = "" Or txtProdName.Text = "" Or txtPrice.Text = "" Or txtQTY.Text = "" Or rbMode.Text = "" Then Label3.Visible = True Label3.Text = "ALL FIELDS ARE REQUIRED!" Else Dim query1 As String query1 = "INSERT INTO BuyItems(FullName, MailAddress, Landline, Mobile, Email, ProductCode, ProductName, Total, PayMethod) VALUES('" & txtFname.Text & txtMI.Text & txtLname.Text & "','" & txtHome.Text & txtHome2.Text & txtHome3.Text & txtZip.Text & "','" & txtTel.Text & "','" & txtMob.Text & "','" & txtEAdd.Text & "','" & ddlCode.SelectedValue & "','" & txtProdName.Text & "','" & txtTotal.Text & "','" & rbMode.Text & "')" 'con.Open() cmd = New OleDbCommand(query1, con) cmd.ExecuteNonQuery() con.Close() MsgBox("Order Information Taken!") Response.Redirect("prods.aspx") End If End Sub
0535
- 00
00 –
799
9 (I-
DIT
)
29
2012
IT404.NET – Advanced VB.NET
Project
ViewCart.aspx (Registration Form)
Protected Sub btnGo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnGo.Click Dim query As String query = "SELECT * FROM Products WHERE PCode='" & ddlCode.SelectedValue & "'" cmd = New OleDbCommand(query, con) 'con.Open() Dim reader As OleDbDataReader = cmd.ExecuteReader() reader.Read() txtProdName.Text = reader("PName") txtPrice.Text = reader("Price") con.Close() End Sub
Protected Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click ListBox1.Items.Add(txtProdName.Text) ListBox2.Items.Add(txtPrice.Text) txtTotal.Text = Val(txtTotal.Text) + Val(txtPrice.Text) * Val(txtQTY.Text) End Sub
Protected Sub btnRMV_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnRMV.Click ListBox1.Items.Remove(txtProdName.Text) ListBox2.Items.Remove(txtPrice.Text) txtTotal.Text = Val(txtTotal.Text) - Val(txtPrice.Text) * Val(txtQTY.Text) End SubEnd Class
Imports System.Data.OleDbImports System.DataPartial Class ViewCart Inherits System.Web.UI.Page Dim cmd As New OleDbCommand Dim con As New OleDbConnection("Provider = Microsoft.Jet.OLEDB.4.0; Data Source = C:\xampp\htdocs\2Rats\App_Data\DB.mdb") Protected Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click Session("Uname") = "" Response.Redirect("login.aspx") End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim cmd = New OleDbCommand("SELECT * FROM Register WHERE Uname = '" & Session("Uname") & "'", con) con.Open() Dim drx As OleDbDataReader = cmd.ExecuteReader() While drx.Read() Label1.Text = drx("Uname") End While
If Session("Uname") = "" Then Response.Redirect("login.aspx") con.Close() End If datagridShow() End Sub Private Sub datagridShow() Dim ds As New DataSet Dim dt As New DataTable ds.Tables.Add(dt)
Dim da As New OleDbDataAdapter
da = New OleDbDataAdapter("Select * from Cart Where Uname = '" & Label1.Text & "'", con) da.Fill(dt) End Sub Protected Sub btnRMV_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnRMV.Click Dim sql As String sql = "DELETE From Cart Where UName ='" & Session("UName") & "'" cmd = New OleDbCommand(sql, con) cmd.ExecuteNonQuery() con.Close() End SubEnd Class 05
35 -
0000
– 7
999
(I-D
IT)
30
2012
IT404.NET – Advanced VB.NET
Project
3.2 ASP Usage with Complete Web Application
The preceding chapters had depicted the structure of our ASP.net Website
thoroughly. Now this phase of the document will demonstrate the usage of ASP.Net
visual basic codes in relation with its web application.
Default.aspx (Guest Book)
USAGE Web Application
Protected Sub btnSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSend.Click If txtChatID.Text = "" Or txtEmail.Text = "" Or txtComment.Text = "" Then Label2.Visible = True Label2.Text = "All fields are required" Else Dim query1 As String query1 = "INSERT INTO Gbuk(NickName,Email,Comment) VALUES('" & txtChatID.Text & "','" & txtEmail.Text & "','" & txtComment.Text & "')" con.Open() cmd = New OleDbCommand(query1, con) cmd.ExecuteNonQuery() con.Close() Label1.Visible = True Label1.Text = "Your post will take a while to show up, come back later after a minute or so!" End If End Sub
Protected Sub btnCLR_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnCLR.Click txtChatID.Text = "" txtEmail.Text = "[email protected]" txtComment.Text = "" End Sub
Class File Type: Code Behind.
Description: IF-ELSE statements were used to enforce a restriction that prohibits the
fields of the guestbook to be left blank.
0535
- 00
00 –
799
9 (I-
DIT
)
31
2012
IT404.NET – Advanced VB.NET
Project
0535
- 00
00 –
799
9 (I-
DIT
)
32
2012
IT404.NET – Advanced VB.NET
Project
reg.aspx (Registration Form)
USAGE Web Application
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load For index = 1 To 31 DDDLDay.Items.Add(index) Next
For index = 1950 To 1999 DDLYear.Items.Add(index) Next End Sub
Protected Sub btnSub_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSub.Click Dim bday As String = DDLMonth.SelectedValue + "" + DDDLDay.SelectedValue + "" + DDLYear.SelectedValue Dim a = Val(DDLYear.SelectedValue) Dim b As Double = 2012 Dim c = b - a Dim age As String = c
If txtUser.Text = "" Or txtPass.Text = "" Or txtFname.Text = "" Or txtMI.Text = "" Or txtSname.Text = "" Or DDLMonth.SelectedValue = "" Or DDDLDay.SelectedValue = "" Or DDLYear.SelectedValue = "" Or rbSex.Text = "" Or txtEadd.Text = "" Then lblWarn.Text = "All fields are required" Else Dim cmd As New OleDbCommand Dim con As New OleDbConnection("Provider = Microsoft.JET.OLEDB.4.0; Data Source=C:\xampp\htdocs\2Rats\App_Data\DB.mdb") Dim sql As String sql = "INSERT INTO Register(Uname, Pword, FullName, Birthday, Age, Gender, Email) VALUES('" & txtUser.Text & "','" & txtPass.Text & "','" & txtFname.Text & txtMI.Text & txtSname.Text & "','" & DDLMonth.SelectedValue & DDDLDay.SelectedValue & DDLYear.SelectedValue & "','" & age & "','" & rbSex.Text & "','" & txtEadd.Text & "')" con.Open() cmd = New OleDbCommand(sql, con) cmd.ExecuteNonQuery() con.Close() MsgBox("You have successfully registered.") Response.Redirect("login.aspx") End If End Sub
Class File Type: Code Behind.
Description: A variable has been declared to compute for the value of age in this
application then IF-ELSE statements were used to enforce a restriction that prohibits
the fields of the guestbook to be left blank. A message box prompts to the user that 0535
- 00
00 –
799
9 (I-
DIT
)
33
2012
IT404.NET – Advanced VB.NET
Project
they have registerd successfully.
login.aspx (User Log In Page)
USAGE Web Application
If ctr = 1 Then
Session("Uname") = txtUname.Text
Response.Redirect("prods.aspx")
ElseMsgBox("Access Denied! Please register First.")
Response.Redirect("reg.aspx")End If
Class File Type: Code Behind.
Description: IF-ELSE statements were used to enforce a restriction that filters the
correct username and password from the incorrect ones. It used response.redirect
codes to access the exclusive pages of 2Rats for the brats website.
0535
- 00
00 –
799
9 (I-
DIT
)
34
2012
IT404.NET – Advanced VB.NET
Project
0535
- 00
00 –
799
9 (I-
DIT
)
35
2012
IT404.NET – Advanced VB.NET
Project
prods.aspx (Product Catalogue)
USAGE Web Application
Protected Sub btnBuy_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnBuy.Click Response.Redirect("order.aspx") End Sub
Protected Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click
If Session("Uname") = lblname.Text Then Dim query As String = "INSERT INTO Cart(ProductID, Uname, ProductName, Price) VALUES('" & lblPcode.Text & "','" & lblname.Text & "','" & lblPname.Text & "','" & lblSP1.Text & "')" cmd = New OleDbCommand(query, con) 'con.Open() cmd.ExecuteNonQuery() con.Close() MsgBox("this item was added to your cart!") Else Response.Redirect("login.aspx") End If End Sub
Class File Type: Code Behind.
Description: a response.redirect code that leads to the order form page was employed
for the Buy button in the interface. If Else statements only allows users that are logged
in to add an item to the cart.
0535
- 00
00 –
799
9 (I-
DIT
)
36
2012
IT404.NET – Advanced VB.NET
Project
order.aspx (Order Form)
USAGE Web Application
Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click If txtFname.Text = "" Or txtLname.Text = "" Or txtMI.Text = "" Or txtHome.Text = "" Or txtHome2.Text = "" Or txtHome3.Text = "" Or txtZip.Text = "" Or txtTel.Text = "" Or txtMob.Text = "" Or txtEAdd.Text = "" Or ddlCode.SelectedValue = "" Or txtProdName.Text = "" Or txtPrice.Text = "" Or txtQTY.Text = "" Or rbMode.Text = "" Then Label3.Visible = True Label3.Text = "ALL FIELDS ARE REQUIRED!" Else Dim query1 As String query1 = "INSERT INTO BuyItems(FullName, MailAddress, Landline, Mobile, Email, ProductCode, ProductName, Total, PayMethod) VALUES('" & txtFname.Text & txtMI.Text & txtLname.Text & "','" & txtHome.Text & txtHome2.Text & txtHome3.Text & txtZip.Text & "','" & txtTel.Text & "','" & txtMob.Text & "','" & txtEAdd.Text & "','" & ddlCode.SelectedValue & "','" & txtProdName.Text & "','" & txtTotal.Text & "','" & rbMode.Text & "')" cmd = New OleDbCommand(query1, con) cmd.ExecuteNonQuery() con.Close() MsgBox("Order Information Taken!") Response.Redirect("prods.aspx") End If End Sub
Protected Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click ListBox1.Items.Add(txtProdName.Text) ListBox2.Items.Add(txtPrice.Text) txtTotal.Text = Val(txtTotal.Text) + Val(txtPrice.Text) * Val(txtQTY.Text) End Sub
Protected Sub btnRMV_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnRMV.Click ListBox1.Items.Remove(txtProdName.Text) ListBox2.Items.Remove(txtPrice.Text) txtTotal.Text = Val(txtTotal.Text) - Val(txtPrice.Text) * Val(txtQTY.Text) End Sub
Class File Type: Code Behind.
Description: IF-ELSE statements implements a restriction that prohibits the fields in
the order form to be left empty. Message Box informs the user that their orders have
already been received by the application. Items Add and Remove syntaxes were used
for the behavior of buttons in the ListBox of 2rats for the brats order form.
0535
- 00
00 –
799
9 (I-
DIT
)
37
2012
IT404.NET – Advanced VB.NET
Project
3.3 ADO Usage with Web Application
This portion of the documentation expresses how a database engine was used for
2Rats for the brats ecommerce site.
Default.aspx (Guest Book)
USAGE Web Application
Imports System.Data.OleDbImports System.DataDim cmd As New OleDbCommandDim objcmd As New OleDbCommandDim con As New OleDbConnection("Provider = Microsoft.JET.OLEDB.4.0; Data Source=C:\xampp\htdocs\2Rats\App_Data\DB.mdb")Dim query1 As String query1 = "INSERT INTO Gbuk(NickName,Email,Comment) VALUES('" & txtChatID.Text & "','" & txtEmail.Text & "','" & txtComment.Text & "')" con.Open() cmd = New OleDbCommand(query1, con) cmd.ExecuteNonQuery() con.Close()Dim ds As New DataSet Dim dt As New DataTable ds.Tables.Add(dt)
Dim da As New OleDbDataAdapter
da = New OleDbDataAdapter("Select ChatID, Comment from Gbuk", con)
Database Table Structure:
Table Name: GBuk
Class File Type: Code Behind.
Description: OleDb library has been imported for the coding of this web application
that is necessary to connect the program into a database. An ole db command was
declared to execute the sql query which inserts Guest Book data items into its
designated table.
0535
- 00
00 –
799
9 (I-
DIT
)
38
2012
IT404.NET – Advanced VB.NET
Project
reg.aspx (Registration Form)
USAGE Web Application
Imports System.Data.OleDbImports System.DataDim cmd As New OleDbCommandDim con As New OleDbConnection("Provider = Microsoft.JET.OLEDB.4.0; Data Source=C:\xampp\htdocs\2Rats\App_Data\DB.mdb")Dim sql As Stringsql = "INSERT INTO Register(Uname, Pword, FullName, Birthday, Age, Gender, Email) VALUES('" & txtUser.Text & "','" & txtPass.Text & "','" & txtFname.Text & txtMI.Text & txtSname.Text & "','" & DDLMonth.SelectedValue & DDDLDay.SelectedValue & DDLYear.SelectedValue & "','" & age & "','" & rbSex.Text & "','" & txtEadd.Text & "')"con.Open()cmd = New OleDbCommand(sql, con)cmd.ExecuteNonQuery()con.Close()
Database Table Structure:
Table Name: Register
Class File Type: Code Behind.
Description: OleDb library has been imported for the coding of this web application
that is necessary to connect the program into a database. An oledbCommand was
declared to execute the sql query which inserts Register data items into its designated
table.
0535
- 00
00 –
799
9 (I-
DIT
)
39
2012
IT404.NET – Advanced VB.NET
Project
0535
- 00
00 –
799
9 (I-
DIT
)
40
2012
IT404.NET – Advanced VB.NET
Project
login.aspx (User Log In Form)
USAGE Web Application
Imports System.DataDim cmd As New OleDbCommandDim con As New OleDbConnection("Provider = Microsoft.JET.OLEDB.4.0; Data Source=C:\xampp\htdocs\2Rats\App_Data\DB.mdb")Dim query As Stringquery = "SELECT * FROM Register WHERE Uname='" & txtUname.Text & "' AND Pword='" & txtPword.Text & "'"cmd = New OleDbCommand(query, con)con.Open() Dim reader As OleDbDataReader = cmd.ExecuteReader()Dim ctr As Integer Do While reader.Read() ctr = ctr + 1 Loop
If ctr = 1 Then Session("Uname") = txtUname.Text Response.Redirect("prods.aspx") Else MsgBox("Access Denied! Please register First.") Response.Redirect("reg.aspx") End If con.Close()
Database Table Structure:
Table Name: Register
Class File Type: Code Behind.
Description: OleDb library has been imported for the coding of this web application
that is necessary to connect the program into a database. An oledbCommand was
declared to execute the sql query which selects the username and password that
matches the data the user imputed into the log in form within the register table of
2Rats for the brats website.
0535
- 00
00 –
799
9 (I-
DIT
)
41
2012
IT404.NET – Advanced VB.NET
Project
prods.aspx (Products Catalogue)
USAGE Web Application
Imports System.DataDim cmd As New OleDbCommandDim con As New OleDbConnection("Provider = Microsoft.JET.OLEDB.4.0; Data Source=C:\xampp\htdocs\2Rats\App_Data\DB.mdb")Dim cmd = New OleDbCommand("SELECT * FROM Register WHERE Uname = '" & Session("Uname") & "'", con)con.Open()Dim drx As OleDbDataReader = cmd.ExecuteReader()
While drx.Read() lblname.Text = drx("Uname") End While
If Session("Uname") = "" Then Response.Redirect("login.aspx") con.Close() End IfIf Session("Uname") = lblname.Text Then Dim query As String = "INSERT INTO Cart(ProductID, Uname, ProductName, Price) VALUES('" & lblPcode.Text & "','" & lblname.Text & "','" & lblPname.Text & "','" & lblSP1.Text & "')" cmd = New OleDbCommand(query, con) cmd.ExecuteNonQuery()con.Close() Else Response.Redirect("login.aspx") End If
Database Table Structure:
Table Name: Products
Class File Type: Code Behind.
Description: OleDb library has been imported for the coding of this web application,
that is necessary to connect the program into a database. An oledbCommand was
declared to execute the sql query in ADD to cart button which inserts a product’s data
INTO cart table of DB.mdb of 2rats for the brats website.
0535
- 00
00 –
799
9 (I-
DIT
)
42
2012
IT404.NET – Advanced VB.NET
Project
order.aspx (Order Form)
USAGE Web Application
Imports System.DataDim cmd As New OleDbCommandDim con As New OleDbConnection("Provider = Microsoft.JET.OLEDB.4.0; Data Source=C:\xampp\htdocs\2Rats\App_Data\DB.mdb")Dim cmd = New OleDbCommand("SELECT * FROM Register WHERE Uname = '" & Session("Uname") & "'", con)
con.Open()
Dim drx As OleDbDataReader = cmd.ExecuteReader()
While drx.Read()Label2.Text = drx("Uname")End While
Dim query1 As String query1 = "INSERT INTO BuyItems(FullName, MailAddress, Landline, Mobile, Email, ProductCode, ProductName, Total, PayMethod) VALUES('" & txtFname.Text & txtMI.Text & txtLname.Text & "','" & txtHome.Text & txtHome2.Text & txtHome3.Text & txtZip.Text & "','" & txtTel.Text & "','" & txtMob.Text & "','" & txtEAdd.Text & "','" & ddlCode.SelectedValue & "','" & txtProdName.Text & "','" & txtTotal.Text & "','" & rbMode.Text & "')" 'con.Open() cmd = New OleDbCommand(query1, con) cmd.ExecuteNonQuery() con.Close() MsgBox("Order Information Taken!") Response.Redirect("prods.aspx") End IfDim query As String query = "SELECT * FROM Products WHERE PCode='" & ddlCode.SelectedValue & "'" cmd = New OleDbCommand(query, con) 'con.Open() Dim reader As OleDbDataReader = cmd.ExecuteReader() reader.Read() txtProdName.Text = reader("PName") txtPrice.Text = reader("Price") con.Close()
Database Table Structure:
Table Name: BuyItems
Class File Type: Code Behind.
Description: OleDb library has been imported for the coding of this web application,
that is necessary to connect the program into a database. An oledbCommand was
declared to execute the sql query to INSERT INTO & SELECT data items FROM
BuyItems table of DB.mdb of 2rats for the brats website.
0535
- 00
00 –
799
9 (I-
DIT
)
43
2012
IT404.NET – Advanced VB.NET
Project
ViewCart.aspx (View Shopping Cart)
USAGE Web Application
Imports System.DataDim cmd As New OleDbCommandDim con As New OleDbConnection("Provider = Microsoft.JET.OLEDB.4.0; Data Source=C:\xampp\htdocs\2Rats\App_Data\DB.mdb")Dim cmd = New OleDbCommand("SELECT * FROM Register WHERE Uname = '" & Session("Uname") & "'", con)
con.Open()
Dim drx As OleDbDataReader = cmd.ExecuteReader()
While drx.Read()Label2.Text = drx("Uname")End While
Dim ds As New DataSet Dim dt As New DataTable ds.Tables.Add(dt)
Dim da As New OleDbDataAdapter
da = New OleDbDataAdapter("Select * from Cart Where Uname = '" & Label1.Text & "'", con)da.Fill(dt)Dim sql As Stringsql = "DELETE From Cart Where UName ='" & Session("UName") & "'"cmd = New OleDbCommand(sql, con)cmd.ExecuteNonQuery()con.Close()
Database Table Structure:
Table Name: Cart
Class File Type: Code Behind.
Description: OleDb library has been imported for the coding of this web application,
that is necessary to connect the program into a database. An oledbCommand was
declared to execute the sql query to SELECT & DELETE data items FROM cart table
WHERE username matches UName column of DB.mdb of 2rats for the brats website.
0535
- 00
00 –
799
9 (I-
DIT
)
44
2012
IT404.NET – Advanced VB.NET
Project
3.4 Meaningful Object names and Standard Naming Convention
A list of variable names used is exhibited here complete with other specifications.
GuestBook (Default.aspx)Variable Name Object Description Caption Data Type
GridView1 DataGridView
Comments for the Guestbook in 2Rats for the
Brats is posted and displayed.
Data Driven
String
txtChatID TextBox This gets the Chat ID of a
guest.None String
txtEmail TextBoxThis gets the email of a guest.
None String
txtComment TextBox This is where messages are composed by the guests.
None String
btnSend ButtonThis publishes the messages
composed by the guestsSend Command
btnCLR ButtonThis clears the guestbook whenever a guest changes their mind.
Clear Command
Register (reg.aspx)
txtUser TextBoxThis is where the user must
declare a username.None String
txtPass TextBoxThis is where the user must declare a password.
NoneString
txtFname TextBoxThis is where the user inputs their first name.
NoneString
txtMI TextBox
This is where the user inputs their first name. This
is where the user inputs their middle initial.
None
String
txtSName TextBoxThis is where the user inputs their surname.
NoneString
DDLMonth DropDownListThis is where a user opts for
their birth month.None
String
DDDLDay DropDownListThis is where a user opts for
their birth date.None
String
DDLYear DropDownListThis is where a user opts for
their birth year.None
String
rbSex RadioButtonListThis is where a user opts for
their birth month.None
String
txtEadd TextBoxThis is where a inputs their
Email Address for newsletters.
None String
btnSub ButtonA command that validates the data given by the user in the registration form.
Submit Command
0535
- 00
00 –
799
9 (I-
DIT
)
45
2012
IT404.NET – Advanced VB.NET
Project
Log In Form (Default.aspx)Variable Name Object Description Caption Data Type
txtUName TextBox Where a registered user enters their Username None String
txtPword TextBox Where a registered user enters their password None String
btnLogIn Button This validates the authentication details of a registered user Log In Command
Products Catalogue (prods.aspx)
linkOut LinkButton A hyperlink which logs out the user from the web site. SignOut Command
btnBuy Button Will bring the user to the order form to make a purchase. Buy Command
btnAdd Button Will add an item into the user’s shopping cart.
Add to Cart
Command
View My Cart (ViewCart.aspx)
GridView1 DataGridView Populates a list of items in the user’s shopping cart
none String
btnRMV Button Nullifies the user’s online shopping carts.
Clear All String
Order Form(order.aspx)
txtFname TextBox Gets the first name of the buyer. NonetxtLname TextBox Gets the last name of the buyer None
txtMI TextBox Gets the middle initial of the buyer
None
txtHome TextBoxGets the first part of the home address of the user for mailing purposes.
None
txtHome2 TextBoxGets the second part of the home address of the user for mailing purposes.
None
txtHome3 TextBoxGets the third part of the home address of the user for mailing purposes.
None
txtZip TextBox Gets the zip code of the users postal address
None
txtTel TextBox Gets users telephone number NonetxtMob TextBox Gets the users mobile number NonetxtEAdd TextBox Gets the users email address NoneddlCode DropDownList Gets a the product code of the
purchase itemNone
btnGo Button Fetches product code data. GOtxtProdName TextBox Shows a product name. None
txtPrice TextBox Shows a products price. NonetxtQTY TextBox Gets the number of products
being ordered.None
btnAdd Button Adds an item into ListBox1 ADDbtnRMV Button Drops an item into ListBox1 REMOVE
ListBox1 ListBox Where product name is added or removed.
None
ListBox2 ListBox Where price is added or removed. NonetxtTotal TextBox Show the total costs of products
ordered.None
rbMode RadioButtonList Mode of payment options. NonebtnSubmit Button Validates the oreder details. Submit
0535
- 00
00 –
799
9 (I-
DIT
)
46
2012
IT404.NET – Advanced VB.NET
Project
3.5 Web application Validation
Guest Book (Default.aspx)
Chk No.
Data Name Input Type Uniqueness Length Range Process
1 txtChatID Chat ID
A guest will define his or
her username that only
consists of alphanumeric characters.
1 to Max and A to Z
The data accepted by this field will be chat nicknames for
the guest.
28
Limited to 28
alphanumeric
characters only.
Its data is captured by
an oledbcomm
and sql syntax and
inserted into GBuk table
in the DB.mdb file of 2Rats for
the Brats website
2 txtEmailEmail
Address
A guest will give up his or her username
which can only be upto
150 alpahnumeric characters.
An email address will be a captured by this
field.
150
Limited to 150 alpha numeric
characters
Its data is captured by
an oledbcomm
and sql syntax and
inserted into GBuk table
in the DB.mdb file of 2Rats for
the Brats website
3TxtComm
entComment
A guest will write a
message in this field.
This will get a sentence of paraghraph
which expresses a guests insights
or greetings.
500
Limited to upto 500 alphanum
eric characters
only.
Its data is captured by
an oledbcomm
and sql syntax and
inserted into GBuk table
in the DB.mdb file of 2Rats for
the Brats website
0535
- 00
00 –
799
9 (I-
DIT
)
47
2012
IT404.NET – Advanced VB.NET
Project
Register (Default.aspx)
Chk No.
Data Name Input Type Uniqueness Len Range Process
1 txtUser Username
A username is composed of at
least 20 alphanumeric characters.
This is where a user will set his
or her username.
20
Limited to 28 alphanumeric
characters only.
Its data is captured by an oledbcommand sql syntax and inserted into SignUp table in the DB.mdb file of 2Rats for the Brats website
2 txtPass Password
A password is composed of at
least 20 alphanumeric characters.
This is where a user will set his or her password
20Limited to 150 alpha numeric
characters
Its data is captured by an oledbcommand sql syntax and inserted into SignUp table in the DB.mdb file of 2Rats for the Brats website
3 txtFname First Name
A guest will give up his first name here using letters A to Z
only.
This acquires a user’s first
name.35
Limited to up to 35
alphabetical characters
only.
Its data is captured by an oledbcommand sql syntax and inserted into SignUp table in the DB.mdb file of 2Rats for the Brats website
4 txtMI Middle Initial
A guest will give up his middle initial
here using letters A to Z only.
This acquires a user’s middle
initial.2
Limited to up to 2
alphabetical characters
only.
Its data is captured by an oledbcommand sql syntax and inserted into SignUp table in the DB.mdb file of 2Rats for the Brats website
5 txtLname Last Name
A guest will give up his last name here using letters A to Z
only.
This acquires a user’s lastst
name.35
Limited to up to 35
alphabetical characters
only.
Its data is captured by an oledbcommand sql syntax and inserted into SignUp table in the DB.mdb file of 2Rats for the Brats website
6 DDLMonth Birth MonthWhere user will select his birth
month
This acquires a user’s birth
month.0
January to December
Only
Its data is captured by an oledbcommand sql syntax and inserted into SignUp table in the DB.mdb file of 2Rats for the Brats website
7 DDLDay Birth DateWhere user will
select his birth date
This acquires a user’s birth
date.0 1 to 31 only
Its data is captured by an oledbcommand sql syntax and inserted into SignUp table in the DB.mdb file of 2Rats for the Brats website
8 DDLYear Birth YearWhere user will
select his birth year
This acquires a user’s birth
year.0
1945 to 1999 only.
Its data is captured by an oledbcommand sql syntax and inserted into SignUp table in the DB.mdb file of 2Rats for the Brats website
9 rbSexSexual identity
Select male or female
This acquires a user’s sex.
0Male or
female only.
Its data is captured by an oledbcommand sql syntax and inserted into SignUp table in the DB.mdb file of 2Rats for the Brats website
10 txtEadd Email addressEmail address
format.
This acquires a user’s email
adress.150
Limited to up to 150
alphanumeric characters only with @
symbol.
Its data is captured by an oledbcommand sql syntax and inserted into SignUp table in the DB.mdb file of 2Rats for the Brats website
0535
- 00
00 –
799
9 (I-
DIT
)
48
2012
IT404.NET – Advanced VB.NET
Project
Order Form (Order.aspx)
Chk No.
Data Name Input Type Uniqueness Len Range Process
1 txtFname First Name
A guest will give up his first name here using letters A to Z
only.
This acquires a user’s first
name.35
Limited to up to 35
alphabetical characters
only.
Its data is captured by an oledbcommand sql syntax and inserted into BuyItems table in the DB.mdb file of 2Rats for the Brats website
2 txtLname Last Name
A guest will give up his last name here using letters A to Z
only.
This acquires a user’s lastst
name.35
Limited to up to 35
alphabetical characters
only.
Its data is captured by an oledbcommand sql syntax and inserted into BuyItems table in the DB.mdb file of 2Rats for the Brats website
3 txtMI Middle Initial
A guest will give up his middle initial
here using letters A to Z only.
This acquires a user’s middle
initial.2
Limited to up to 2
alphabetical characters
only.
Its data is captured by an oledbcommand sql syntax and inserted into BuyItems table in the DB.mdb file of 2Rats for the Brats website
4 txtHomeHome
address 1First part of a
mailing address
This acquires a user’s middle
initial.50
Limited to up to 150
alphanumeric characters
only.
Its data is captured by an oledbcommand sql syntax and inserted into BuyItems table in the DB.mdb file of 2Rats for the Brats website
5 txtHome2Home
address 2Second line of a mailing address
This acquires a user’s lastst
name.50
Limited to up to 150
alphanumeric characters
only.
Its data is captured by an oledbcommand sql syntax and inserted into BuyItems table in the DB.mdb file of 2Rats for the Brats website
6 txtHome3 CityCity for the mailing
address
This acquires a user’s birth
month.40
Limited to up to 40
alphabetical characters
only.
Its data is captured by an oledbcommand sql syntax and inserted into BuyItems table in the DB.mdb file of 2Rats for the Brats website
7 txtZip Zip CodeZipCode for mailing
address.
This acquires a user’s birth
date.5
Upto 5 numeric
characters only
Its data is captured by an oledbcommand sql syntax and inserted into BuyItems table in the DB.mdb file of 2Rats for the Brats website
8 txtTelTelephone
number
Where user will give up his
telephone number.
This acquires a user’s birth
year.7
Upto 7 numeric
characters only
Its data is captured by an oledbcommand sql syntax and inserted into BuyItems table in the DB.mdb file of 2Rats for the Brats website
9 txtMobSexual identity
Buyer’s mobile number
This acquires a user’s sex.
11
Upto 11 numeric
characters only
Its data is captured by an oledbcommand sql syntax and inserted into BuyItems table in the DB.mdb file of 2Rats for the Brats website
10 txtEAdd Email addressEmail address
format.
This acquires a user’s email
adress.150
Limited to up to 150
alphanumeric characters only with @
symbol.
Its data is captured by an oledbcommand sql syntax and inserted into BuyItems table in the DB.mdb file of 2Rats for the Brats website
0535
- 00
00 –
799
9 (I-
DIT
)
49
2012
IT404.NET – Advanced VB.NET
Project
Order Form (Order.aspx)
Chk No.
Data Name Input Type Uniqueness Len Range Process
11 ddlCode Product Code
A guest will give up his first name here using letters A to Z
only.
Is the product code of an item.
04
alphanumeric characters.
Its data is captured by an oledbcommand sql syntax and selects prodname and
price from Prods table in the DB.mdb file of 2Rats for the
Brats website
12 txtProdName Product Name
A guest will give up his last name here using letters A to Z
only.
This shows an items product
name.0 Default
Its data is retrieved by an oledbcommand sql syntax
and selected prodname and price from Prods table in the DB.mdb file of 2Rats for the
Brats website
13 txtPrice Price
A guest will give up his middle initial
here using letters A to Z only.
Shows a product item’s
price.0 Default
Its data is retrieved by an oledbcommand sql syntax
and selected prodname and price from Prods table in the DB.mdb file of 2Rats for the
Brats website
14 txtQTY Quantity
A guest will give up his middle initial
here using letters A to Z only.
Indicates how many items
were ordered.3
Upto 3 digits only.
Entered by the user then multiplies with a products
fixed price.
15 btnAdd Add Item
A guest will give up his last name here using letters A to Z
only.
Adds an item into the list box when pressed.
0 defaultPressed by the user to add
an item into ListBox1
16 btnRMV Remove ItemWhere user will select his birth
month
Drps an item from the list box when pressed.
0 DefaultPressed by the user to remove an item from
ListBox1
17ListBox1
Product Name List Box
Where user will select his birth date
Contains items from product
name text field.5 Default
Returns an item from the products name text box.
18ListBox2
Price List BoxWhere user will
select his birth year
Contains items from price text
field.0 Default
Returns an item from the price text box.
19 rbModeMode of Payment
Select male or female
Gets Mode of payement.
0GCash,
PayPal or BDO only.
Its data is captured by an oledbcommand sql syntax and inserted into BuyItems table in the DB.mdb file of 2Rats for the Brats website
20 txtTotal TotalEmail address
format.
Sums up the total costs of
items ordered.150
Sum total of all the product items costs is a double data with 2 decimal
places.
Its data is captured by an oledbcommand sql syntax and inserted into BuyItems table in the DB.mdb file of 2Rats for the Brats website
0535
- 00
00 –
799
9 (I-
DIT
)
50
2012
IT404.NET – Advanced VB.NET
Project
User Log In (login.aspx)
Chk No.
Data Name Input Type Uniqueness Length Range Process
1 txtUname Username
A username with 20 alphanumeric
characters is accepted here.
This will accept an authorized username
for somebody.20
Limited to 20 alpha numeric
characters
Its data is captured by an oledbcommand sql syntax and
selects a matching
username and password from register table in the DB.mdb file of 2Rats for the Brats website
2 txtPword Password
A password with 20 alphanumeric characters is
accepted here.
This will accept an authorized password
for somebody.20
Limited to 20 alpha numeric
characters
Its data is captured by an oledbcommand sql syntax and
selects a matching
username and password from register table in the DB.mdb file of 2Rats for the Brats website
3 btnLogIn Log In
A command that validates a users username and
password.
Submits a username and password for
verification.0 Default
Authenticate the username and
password entered by the
user.
View My Cart (ViewCart.aspx)
1 brnCLR Clear all
A command that erases all products
in the user’s shopping cart.
Nullifies items in a user’s shopping cart
0 DefaultDeletes all
product items in shopping cart.
0535
- 00
00 –
799
9 (I-
DIT
)
51
2012
IT404.NET – Advanced VB.NET
Project
3.6 Test Plan
2Rats for the Brats Ecommerce site is evidently designed through a complex of
HTML (Hypertext Markup Language) and CSS (Cascading Style Sheets) plus
ASP.Net which specializes in Visual Basic for the web applications. It will now need
to undergo a series of test cases to ensure its optimum performance and usability
with regards to the programming aspect of the website.
The website will be tested in a Physical and Logical manner which encompasses the
design and encryption aspect of the web applications used with regards to ASP.Net
Visual Basic. The subject of the testing will specific test data that is crucial for the
web sites functionality.
The testing procedure aims to:
Ensure that all web applications work in coordination with its interface.
That the ASP.net visual basic codes used to create web applications are error
free.
All database connections are working and responsive.
Detect whether there are malfunctions as soon as possible before presenting
the website.
Test Cases for 2Rats for the Brats Online shop will commence on the pages to
follow, read ahead.
0535
- 00
00 –
799
9 (I-
DIT
)
52
2012
IT404.NET – Advanced VB.NET
Project
3.7 Test Cases
Test Case No. 01
Objective
Checking if the comment box in the about page appends
data into the GBuk table of DB.mdb file of 2Rats Website
then publishes those data as a stream of comment in the
grid view.
Test Dataquery1 = "INSERT INTO Gbuk(NickName,Email,Comment) VALUES('" & txtChatID.Text & "','" & txtEmail.Text & "','" & txtComment.Text & "')"
da = New OleDbDataAdapter("Select ChatID, Comment from Gbuk", con
Expected Test Result
The visual basic asp.net codes for the guestbook of 2Rats
for the Brats website should work as expected.
Actual Result
Conclusion No sign of any errors.
0535
- 00
00 –
799
9 (I-
DIT
)
53
2012
IT404.NET – Advanced VB.NET
Project
Test Case No. 02
Objective
Checking if the registration form appends all items into its
designated table in the DB.mdb file of 2Rats for the brats
website.
Test Data
sql = "INSERT INTO Register(Uname, Pword, FullName, Birthday, Age, Gender, Email) VALUES('" & txtUser.Text & "','" & txtPass.Text & "','" & txtFname.Text & txtMI.Text & txtSname.Text & "','" & DDLMonth.SelectedValue & DDDLDay.SelectedValue & DDLYear.SelectedValue & "','" & age & "','" & rbSex.Text & "','" & txtEadd.Text & "')" con.Open() cmd = New OleDbCommand(sql, con) cmd.ExecuteNonQuery() con.Close() MsgBox("You have successfully registered.")
Expected Test Result
The visual basic asp.net codes for the registration form of
2Rats for the Brats website should be able to receive input
data and allow users to log into the web page immediately.
Actual Result
Conclusion No errors detected.
0535
- 00
00 –
799
9 (I-
DIT
)
54
2012
IT404.NET – Advanced VB.NET
Project
Test Case No. 03
Objective
Checking if the log in form validates username and password
of users then redirects to prods.aspx
Test Dataquery = "SELECT * FROM Register WHERE Uname='" & txtUname.Text & "' AND Pword='" & txtPword.Text & "'"cmd = New OleDbCommand(query, con)con.Open()
Expected Test Result
The visual basic asp.net codes for the User Log In form of
2Rats for the Brats website should be able to validate
authentication data and allow users to view the restricted
pages.
Actual Result
Conclusion Absolutely Error Free
0535
- 00
00 –
799
9 (I-
DIT
)
55
2012
IT404.NET – Advanced VB.NET
Project
Test Case No. 04
Objective
Checking if the log in form validates username and password
of users then redirects to prods.aspx
Test Dataquery = "SELECT * FROM Register WHERE Uname='" & txtUname.Text & "' AND Pword='" & txtPword.Text & "'"cmd = New OleDbCommand(query, con)con.Open()
Expected Test Result
The visual basic asp.net codes for the User Log In form of
2Rats for the Brats website should be able to validate
authentication data and allow users to view the restricted
pages.
Actual Result
Conclusion Absolutely Error Free
0535
- 00
00 –
799
9 (I-
DIT
)
56
2012
IT404.NET – Advanced VB.NET
Project
Test Case No. 05
Objective
Checking if the SignOut link button enables the user to log
off the website.
Test Data Session("Uname") = ""Response.Redirect("login.aspx")
Expected Test Result
The visual basic asp.net codes for the Sign Out link button of
2Rats for the Brats website should be able to enable the
user to log off and redirect to log in form.
Actual Result
Conclusion Absolutely Error Free
0535
- 00
00 –
799
9 (I-
DIT
)
57
2012
IT404.NET – Advanced VB.NET
Project
Test Case No. 06
Objective
Checking if the encryptions in the add to cart button really
appends products into the Cart table of the Db.mdb file of
2Rats for the Brats website.
Test Data
If Session("Uname") = lblname.Text ThenDim query As String = "INSERT INTO Cart(ProductID, Uname, ProductName, Price) VALUES('" & lblPcode.Text & "','" & lblname.Text & "','" & lblPname.Text & "','" & lblSP1.Text & "')"cmd = New OleDbCommand(query, con)cmd.ExecuteNonQuery()con.Close() MsgBox("this item was added to your cart!")ElseResponse.Redirect("login.aspx")End If
Expected Test Result
The visual basic asp.net codes for the Add to cart button of
2Rats for the Brats website should be able to append
product data into the Cart Table of the DB.mdb file of 2Rats
for the Brats website.
Actual Result
Conclusion No Errors Found
0535
- 00
00 –
799
9 (I-
DIT
)
58
2012
IT404.NET – Advanced VB.NET
Project
Test Case No. 08
Objective
Checking if the View Cart Items retain product items that had
been added to the cart by a particular user.
Test Datada = New OleDbDataAdapter("Select * from Cart Where Uname = '" & Label1.Text & "'", con) da.Fill(dt)
Expected Test Result
The View Cart datagrid should display items added to the
shopping cart by the particular user.
Actual Result
Conclusion No visible errors.
0535
- 00
00 –
799
9 (I-
DIT
)
59
2012
IT404.NET – Advanced VB.NET
Project
Test Case No. 09
Objective
Checking if the Clear All Button of the shopping cart gridview
removes all items in there of a specific user.
Test Datasql = "DELETE From Cart Where UName ='" & Session("UName") & "'" 'con.Open() cmd = New OleDbCommand(sql, con) cmd.ExecuteNonQuery() con.Close()
Expected Test Result
The View Cart datagrid should REMOVE all items added to
the shopping cart by the particular user.
Actual Result
Conclusion No visible errors.05
35 -
0000
– 7
999
(I-D
IT)
60
2012
IT404.NET – Advanced VB.NET
Project
Test Case No. 10
Objective
Checking if the items in the Order form of the 2Rats website
append into their designated table.
Test Data
query1 = "INSERT INTO BuyItems(FullName, MailAddress, Landline, Mobile, Email, ProductCode, ProductName, Total, PayMethod) VALUES('" & txtFname.Text & txtMI.Text & txtLname.Text & "','" & txtHome.Text & txtHome2.Text & txtHome3.Text & txtZip.Text & "','" & txtTel.Text & "','" & txtMob.Text & "','" & txtEAdd.Text & "','" & ddlCode.SelectedValue & "','" & txtProdName.Text & "','" & txtTotal.Text & "','" & rbMode.Text & "')"
Expected Test Result
All data inputs in the order form of the 2rats for the brats
website should append into the BuyItems table.
Actual Result
Conclusion No errors existing.
0535
- 00
00 –
799
9 (I-
DIT
)
61
2012
IT404.NET – Advanced VB.NET
Project
Test Case No.
11
Objective
Checking if the go button that fetches data basing on the value of
product code dropdown list retrieves its equivalent value into the
product name and price textbox.
Test Data query = "SELECT * FROM Products WHERE PCode='" & ddlCode.SelectedValue & "'"
Expected Test Result
The Go button should retrieve the product name and price data
basing on the product code drop down list
Actual Result
Conclusion No visible errors.
0535
- 00
00 –
799
9 (I-
DIT
)
62
2012
IT404.NET – Advanced VB.NET
Project
Test Case No. 12
Objective
Checking if the add items button inserts an item into the
products list box below.
Test Data ListBox1.Items.Add(txtProdName.Text)ListBox2.Items.Add(txtPrice.Text)
Expected Test ResultThe ADD button should induct an item into the list box below.
Actual Result
Conclusion No visible errors.
0535
- 00
00 –
799
9 (I-
DIT
)
63
2012
IT404.NET – Advanced VB.NET
Project
Test Case No. 13
Objective
Checking if the REMOVE button drops an item from the
products list box below.
Test Data ListBox1.Items.Remove(txtProdName.Text)ListBox2.Items.Remove(txtPrice.Text)
Expected Test ResultOne item in the products listbox should be removed.
Actual Result
Conclusion No visible errors.
0535
- 00
00 –
799
9 (I-
DIT
)
64
2012
IT404.NET – Advanced VB.NET
Project
Test Case No. 14
Objective
Checking if the Prices of the items compute for the total
amount of costs.
Test Data txtTotal.Text = Val(txtTotal.Text) + Val(txtPrice.Text) * Val(txtQTY.Text)
Expected Test ResultThe arithmetic for the total cost of items should compute.
Actual Result
Conclusion No visible errors.05
35 -
0000
– 7
999
(I-D
IT)
65
2012
IT404.NET – Advanced VB.NET
Project
Test Case No. 15
ObjectiveChecking if all images in the website load correctly
Test Data <img src=”PICTURE.jpg”></img>
Expected Test Result
All images should be visible in the 2rats for the brats
website.
Actual Result
Conclusion No visible errors.
0535
- 00
00 –
799
9 (I-
DIT
)
66
2012
IT404.NET – Advanced VB.NET
Project
3.8 Test Logs
PCSO Lottery Digits Generator Test Log
Project: IT404.Net
System: ASP.NET WebSite
Build:ASP.NET VB
Config: N/A
Tool: Visual Web Developer Express 2008
Event:N/A
Date: 2012.06.12
Time:2:21 -3:10 PM
Tester: Ma. Carmen Lim
Result:No Errors Detected
ResultsTest Script Version Result
Test Case: 1 Passed: Yes Failed: No Deferred: No Comment: Error-FreeTest Case: 2 Passed: Yes Failed: No Deferred: No Comment: Error-FreeTest Case: 3 Passed: Yes Failed: No Deferred: No Comment: Error-FreeTest Case: 4 Passed: Yes Failed: No Deferred: No Comment: Error-FreeTest Case: 5 Passed: Yes Failed: No Deferred: No Comment: Error-FreeTest Case: 6 Passed: Yes Failed: No Deferred: No Comment: Error-FreeTest Case: 7 Passed: Yes Failed: No Deferred: No Comment: Error-FreeTest Case: 8 Passed: Yes Failed: No Deferred: No Comment: Error-FreeTest Case: 9 Passed: Yes Failed: No Deferred: No Comment: Error-FreeTest Case: 10 Passed: Yes Failed: No Deferred: No Comment: Error-FreeTest Case: 11 Passed: Yes Failed: No Deferred: No Comment: Error-FreeTest Case: 12 Passed: Yes Failed: No Deferred: No Comment: Error-FreeTest Case: 13 Passed: Yes Failed: No Deferred: No Comment: Error-FreeTest Case: 14 Passed: Yes Failed: No Deferred: No Comment: Error-FreeTest Case: 15 Passed: Yes Failed: No Deferred: No Comment: Error-Free
MetricsMetric: LOC 456 Calculation: n/aMetric: LLOC 124 Calculation: n/aSignature: Ma. Carmen N. Lim Date: 2012.05.10
0535
- 00
00 –
799
9 (I-
DIT
)
67
2012
IT404.NET – Advanced VB.NET
Project
CHAPTER IV: IMPLEMENTATION
The 2Rats for the Brats ecommerce site has already surpassed the web
design and development phase and is now operational. It was constructed through
the use of HTML (Hypertext Markup Language), CSS (Cascading Style Sheets) and
ASP.Net in Visual Basic encryptions. At this stage it can already be utilized although
it hasn’t been launched in the World Wide Web yet.
Since the website hasn’t been published into the Web-o-sphere, this portion
of the documentation shall only demonstrate to the user on how the e-commerce site
will be facilitated through visual studio 2008.
NOTE: Certain systems requirements were met before this demonstration
was done. (see page 5 for the detail.)
The ecommerce site isn’t all that difficult to use, actually, the majority of our
society has already been familiarized with the internet. The internet is a very popular
communication medium nowadays and most human beings connect with each other
online so it’s likely that a user already has an idea on how to operate this website.
Using 2Rats for the brats is only a matter of surfing its web pages like
everyone does in social networks we shall start this web demonstration on flipping
through the next page.
0535
- 00
00 –
799
9 (I-
DIT
)
68
2012
IT404.NET – Advanced VB.NET
Project
2Rats for the brats is used in the same manner as one would browse a web site on
the internet, so each page of the ecommerce site will be demonstrated.
The Home Page
The home page acts as the
frontispiece of the
Ecommerce site. It welcomes
the user into the web space
and usually what captures
the attention of the users. It
also contains updates from
the administrator of the
website.
As the user scrolls down this page they
will come across a Guest Book where
they can leave a message that is
addressed to the web page.
To be able to take advantage of the
guestbook the user must give a chat
name of his liking then enter his email right after that type in a comment whichever
that he has in mind and hit send. A label on top of the guest book will notify the user
that his post will take a while to be published and he has to refresh the page after a
few minutes. The guestbook cannot be left blank or it won’t accept any data.
0535
- 00
00 –
799
9 (I-
DIT
)
69
2012
IT404.NET – Advanced VB.NET
Project
The About Page
There isn’t really
much to do in this
page for its sole
purpose is to only
describe to the user
the company profile
of 2Rats for the
brats website.
This page contains a descriptive about the Ecommerce site; the main goal of the
business and terms & conditions of which makes the users aware of the legal matters
and rules of the online shop’s trade.
Although there isn’t much activity in this page it is very crucial to inform the users on
how they should behave in the website.
0535
- 00
00 –
799
9 (I-
DIT
)
70
2012
IT404.NET – Advanced VB.NET
Project
The Products Page
Before anybody views this page they must be a member of the 2Rats for the Brats
Ecommerce site or else they are prohibited
from viewing the page since it asks for
login details initially.
When a user has
already Logged
into the products
page they will
immediately see a
catalogue of all the
anime and toy
items available in
2Rats for the brats
website.
All the user can do in this webpage is to canvas for items and opt whether to buy an
item? Or add it into a cart.
When the user adds an item into the cart a message box will indicate that it has
already been placed
inside a shopping
cart which can be
viewed clicking on
the upper right link of the page and there it goes.
0535
- 00
00 –
799
9 (I-
DIT
)
71
2012
IT404.NET – Advanced VB.NET
Project
Let’s say a user has added an item into a shopping cart at this point. They will be
able to view it into the view my cart page.
As depicted above, a spreadsheet like chart enlists all the items the specific user has
picked from the products catalogue that they would like to purchase. If a user
changes their mind they can completely renew their shopping cart contents by
clicking clear all button. That command will erase all
items in the cart as a result and the user can shop in the
products page once again to rearrange their wish list.
Alternatively, the user might wanna buy a product right
away in order to do so they will click the “Buy” button
within a specific item.
When they have done so, they will be redirected into the
order form of the ecommerce site
0535
- 00
00 –
799
9 (I-
DIT
)
72
2012
IT404.NET – Advanced VB.NET
Project
From the buy button the order form will look something like this:
The user must suffice all the
required fields in it.
The order form has a short
billing system so the user will
know how much money he or
she will need to spend.
To operate our billing system
one must select an item from
the product code dropdown
menu. Click GO button!
The product name and price
will be generated in their respective
text fields. Enter a quantity, this must
be an integer from 1 to a thousand.
When there is a quantity press ADD
button.
As you can see the item has been
inserted into the list box below then
computes for the total automatically. Press REMOVE button to reverse that move
anytime. When you add more items prices will continue to sum up.
Next, choose a gender. Then hit submit button a message box will appear saying
orders are taken and the user will be redirected into the products page again. 0535
- 00
00 –
799
9 (I-
DIT
)
73
2012
IT404.NET – Advanced VB.NET
Project
0535
- 00
00 –
799
9 (I-
DIT
)
74
2012
IT404.NET – Advanced VB.NET
Project
The Contact Page
Is only a simple and clean website which presents the contact details of 2 Rats for
the brats website to the users of whom we assume are customers.
The purpose of this site is to open a line of communication to the hobby shop’s
customers and enable them to reach the vendor through phone, mobile or email
instantly.
The user can directly email 2Rats for the Brats by clicking on their hyperlinked email
address. This action will open up Microsoft outlook and the user must know their way
from there. A typical user will only grab 2Rats for the Brats’ email address and
compose a message on either Google mail or Yahoo mail.
It is essential to the business to have an open communication with their buyers so
they will be able to able to make better deals with them via voice or texts.
0535
- 00
00 –
799
9 (I-
DIT
)
75
2012
IT404.NET – Advanced VB.NET
Project
0535
- 00
00 –
799
9 (I-
DIT
)
76
2012
IT404.NET – Advanced VB.NET
Project
The Registration Page
This page is
essential for
enabling a
user to
become a
valued
member of the
2Rats for the
Brats
Ecommerce
site. The user
will be required to provide important information demanded buy each of the text
fields, drop down menus and radio buttons.
The user must define the following details:
a Username and Password of their choice
First name
Middle Initial
Last Name
Date of birth
Gender
Email address
They will have to click submit at will, if a field is left blank a label will tell them.
0535
- 00
00 –
799
9 (I-
DIT
)
77
2012
IT404.NET – Advanced VB.NET
Project
The Log In Screen
The user must simply
enter a username and
password then click
Log In Button, if
authenticated the
user will be lead to
the products page
else they will be taken
to the registration
page.
This concludes the user manual phase of this documentation and it only needs to be
publicized to be able of genuine benefit to 2Rats for the brats Ecommerce site.
0535
- 00
00 –
799
9 (I-
DIT
)
78
2012
IT404.NET – Advanced VB.NET
Project
CHAPTER V: CONCLUSION
The documentation is at a close for parting remarks the author would like to express
that it was enjoyable making an Ecommerce site for 2Rats for the brats using her
knowledge in HTML (Hypertext Markup Language), CSS (Cascading Style Sheets)
and ASP.Net in visual basic.
It has been a bit challenging for her to actually try to integrate all those web
languages together without conflict but was able to solve the matter later on. She
stresses out that encoding and scripting web applications using ASP.net in visual
basic is a little bit unstable for starters. One must have a profound understanding of
HTML Hypertext Markup Language, Cascading Style Sheets and VB.Net before
anyone has the capability to use the ASP.Net web application language in visual
basic.
This web development codes are not for amateurs and this is definitely a must learn
buy Information Technology professionals to broaden their knowledge in building web
pages.
According to the author of this document, it is a breeze to encode in ASP.Net once
“you have gotten a hang of it” since it interoperates with external file due to its
application of visual basic concept which is Object Oriented.
The web developer can directly connect their webpage into MS Access database
which saves time trying to link to MySQL and other validations. Although, there is a
downside in using ASP.Net in visual basic since it will need a license from Microsoft
which will be pricey and needless expense.
0535
- 00
00 –
799
9 (I-
DIT
)
79
2012
IT404.NET – Advanced VB.NET
Project
ACKNOWLEDGEMENTS
Firstly, Special thanks to the almighty God who blessed me with the capability
to complete such tasks, my family and friends who encouraged and supported me in
my education through out.
Extending my credits to the hard work and dedication of the entire
management and staff of Informatics Filinvest Alabang meant for our quality
education.
My utmost gratitude to Sir Rudrian Riener Pariñas for ensuring we learn every
crucial lesson there is regarding ASP.NET correlating with websites.
0535
- 00
00 –
799
9 (I-
DIT
)
80