+ All Categories
Home > Technology > Appendices

Appendices

Date post: 19-May-2015
Category:
Upload: loisy28
View: 249 times
Download: 2 times
Share this document with a friend
Popular Tags:
40
53 APPENDICES
Transcript
Page 1: Appendices

53

APPENDICES

Page 2: Appendices

54

APPENDIX A

Gant Chart

Page 3: Appendices

55

Gantt Chart for 2nd Semester A.Y. 2010-2011

Office of the Treasurer of Municipal Government of Nasugbu, Batangas

Automated Billing System and Touch Screen Capable Inquiry System

Proponents: Thesis Adviser:

Mark Albert B. Iglesias Mrs. Lorissa Joanna E. BueanasEmmanuel T. SanchezMark Jayson O. Osian

Page 4: Appendices

56

Gantt Chart for 1st Semester A.Y. 2011-2012

Office of the Treasurer of Municipal Government of Nasugbu, Batangas

Automated Billing System and Touch Screen Capable Inquiry System

Proponents: Design Project Adviser:

Mark Albert B. Iglesias Mrs. Lorissa Joanna E. BueanasEmmanuel T. SanchezMark Jayson O. Osian

Page 5: Appendices

57

APPENDIX B

Questionnaires

Page 6: Appendices

58

Evaluation Form for Manual Process of Billing System

Name: ___________________________ Date: _____________Position: _________________________ Gender: ___________

Listed below are the criteria for Manual Billing System. Please rate each criteria by checking the column that your perception. 5 – Excellent 4 – Very Satisfactory3 – Satisfactory2 – Fair1 – Poor

Criteria5E

4VS

3S

2F

1P

1. Efficiency. The system performs properly.2. Reliability. The system meets its requirements.3. Security. The system is not accessible to unauthorized users.4. Accessibility. The system is easy to use and understand by users.5. Accuracy. The system gives correct response to the users.6. Flexibility. The system works properly at all time.

7. User-friendliness. The system is easy to understand.

8. Design. The system is presentable to the users.

9. Usability. The system is important and is definitely useful to the user.

Comments and Suggestions

Signature over Printed Name

Page 7: Appendices

59

Evaluation Form for Developed Automated Billing System with Inquiry System

Name: ___________________________ Date: _____________Position: _________________________ Gender: ___________

Listed below are the criteria for Manual Billing System. Please rate each criteria by checking the column that your perception. 5 – Excellent 4 – Very Satisfactory3 – Satisfactory2 – Fair1 – Poor

Criteria5E

4VS

3S

2F

1P

1. Efficiency. The system performs properly.2. Reliability. The system meets its requirements.3. Security. The system is not accessible to unauthorized users.4. Accessibility. The system is easy to use and understand by users.5. Accuracy. The system gives correct response to the users.6. Flexibility. The system works properly at all time.

7. User-friendliness. The system is easy to understand.

8. Design. The system is presentable to the users.

9. Usability. The system is important and is definitely useful to the user.

Comments and Suggestions

Signature over Printed Name

Page 8: Appendices

60

APPENDIX C

Screen Shots

Page 9: Appendices

61

This is the homepage of the program which shows the

information about the system.

This is the form for building permit where the

transaction for establishment is being process.

Page 10: Appendices

62

This page is for the form of cedula where the clients can

compute their salary to get the overall price of their cedula.

This form is for edit teller where only the administrator can

change and edit the user code and password of a teller.

Page 11: Appendices

63

This page is for Inquiry to view the persons who had a

balance.

This is the homepage for the Inquiry System where the

clients can choose either inquiry or cedula.

Page 12: Appendices

64

This is the login form of the system.

This is the main interface of the billing system where all the

transaction is being process and done.

Page 13: Appendices

65

APPENDIX D

Source Code

Page 14: Appendices

66

frmAcceptBuildingP.vb

Imports SystemImports System.DataImports system.Data.SqlClientImports CrystalDecisions.SharedImports CrystalDecisions.CrystalRe

ports.EnginePublic Class frmAcceptP Dim SQLcmd As New SqlCommand

Dim Amount As String Dim cusname As String Dim teller As String Dim collection As String Dim colDate As String Dim totalAmount As Integer Dim natureOfCol As String Dim pay(7) As String Dim nature(7) As String

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click With frmMain .Enabled = True Me.Close() End With With frmBirthC .Close() End With End Sub Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click Dim change As Integer If Val(txtCash.Text) < Val(lblAmount.Text) Or txtCash.Text = "" Or Not IsNumeric(txtCash.Text) Then MsgBox("Insufficient cash. Please enter valid fund!", vbCritical + vbOKOnly, "Payment") txtCash.Text = "" txtCash.Focus() Else change = Val(txtCash.Text) - Val(lblAmount.Text) 'Label3.Text = change + ".00" Dim a As String a = MsgBox("Please review the Information:" + vbCrLf + "Name: " + cusname + vbCrLf + "Amount: " + Amount + vbCrLf +

vbCrLf + "Change: " & change, vbInformation + vbOKCancel, "Review") If a = vbOK Then With frmReport .lblOr.Text = lblOr.Text End With If lblId.Text = "13" Then Call nature1() Call save() Call print() Else Call natures() Call save() Call print() Me.Close() End If

End If End If End Sub Private Sub frmAcceptP_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

If lblId.Text = "1" Then With frmBirthC cusname = .txtCust.Text teller = .lblName.Text Amount = .lblTotal.Text lblOr.Text = .lblOr.Text If Amount = 50 Then natureOfCol = "Birth Certificate" Else natureOfCol = "Birth Certificate for travel" End If collection = "15" 'Birth Certificate End With lblAmount.Text = Amount ElseIf lblId.Text = "2" Then With frmBurialP cusname = .txtCust.Text teller = .lblName.Text Amount = .lblTotal.Text lblOr.Text = .lblOr.Text natureOfCol = "Burial Permit" collection = "23" 'Burial Permit End With lblAmount.Text = Amount ElseIf lblId.Text = "3" Then With frmMarriageC cusname = .txtCust.Text

Page 15: Appendices

67

teller = .lblName.Text Amount = .lblTotal.Text lblOr.Text = .lblOr.Text natureOfCol = "Marriage Certificate" collection = "24" 'Marriage Certificate End With lblAmount.Text = Amount ElseIf lblId.Text = "4" Then With frmMarriageL cusname = .txtCust.Text teller = .lblName.Text Amount = .lblTotal.Text lblOr.Text = .lblOr.Text natureOfCol = "Marriage License" collection = "26" 'Marriage License End With lblAmount.Text = Amount ElseIf lblId.Text = "5" Then With frmMayorsC If .lblTotal.Text = "Php 0.00" Then .lblTotal.Text = "0.00" End If cusname = .txtCust.Text teller = .lblName.Text Amount = .lblTotal.Text lblOr.Text = .lblOr.Text natureOfCol = "Mayors Clearance" collection = "20" ' End With lblAmount.Text = Amount ElseIf lblId.Text = "6" Then With frmMedicalC cusname = .txtCust.Text teller = .lblName.Text Amount = .lblTotal.Text lblOr.Text = .lblOr.Text natureOfCol = "Medical Certificate" collection = "25" 'Medical Certificate End With lblAmount.Text = Amount ElseIf lblId.Text = "7" Then With frmTaxC cusname = .txtCust.Text teller = .lblName.Text Amount = .lblTotal.Text lblOr.Text = .lblOr.Text natureOfCol = "Tax Clearance" collection = "21" 'Tax Clearance End With lblAmount.Text = Amount ElseIf lblId.Text = "8" Then With frmTaxD

cusname = .txtCust.Text teller = .lblName.Text Amount = .lblTotal.Text lblOr.Text = .lblOr.Text natureOfCol = "Tax Declaration" collection = "18" 'Tax Declaration End With lblAmount.Text = Amount ElseIf lblId.Text = "9" Then With frmTransferF cusname = .txtCust.Text teller = .lblName.Text Amount = .lblTotal.Text lblOr.Text = .lblOr.Text natureOfCol = "Transfer Fee" collection = "27" 'Transfer Fee End With lblAmount.Text = Amount ElseIf lblId.Text = "10" Then With frmTransferT cusname = .txtCust.Text teller = .lblName.Text Amount = .lblTotal.Text lblOr.Text = .lblOr.Text natureOfCol = "Transfer Tax" collection = "28" 'Transfer Tax End With lblAmount.Text = Amount ElseIf lblId.Text = "11" Then With frmPoliceC cusname = .txtCust.Text teller = .lblName.Text Amount = .lblTotal.Text lblOr.Text = .lblOr.Text natureOfCol = "Police Clearance" collection = "17" 'Police Clearance End With lblAmount.Text = Amount ElseIf lblId.Text = "12" Then With frmLocationalC cusname = .txtCust.Text teller = .lblName.Text Amount = .lblTotal.Text lblOr.Text = .lblOr.Text natureOfCol = "Locational Clearance" collection = "22" 'Locational Clearance End With lblAmount.Text = Amount

ElseIf lblId.Text = "13" Then With frmBusinessP cusname = .txtCust.Text

Page 16: Appendices

68

teller = .lblName.Text Amount = .lblTotal.Text lblOr.Text = .lblOr.Text natureOfCol = "Building Permit" collection = "2" 'Building Permit '********* *********' pay(0) = .txtPay1.Text pay(1) = .txtPay2.Text pay(2) = .txtPay3.Text pay(3) = .txtPay4.Text pay(4) = .txtPay5.Text pay(5) = .txtPay6.Text pay(6) = .txtPay7.Text pay(7) = .txtPay8.Text '********** *********' nature(0) = "Mayors Permit" nature(1) = "Sanitary Inspection Fee" nature(2) = "Police Clearance" nature(3) = "Fire Inspection Fee" nature(4) = "Business Name Plate" nature(5) = "Engineering Inspection Fee" nature(6) = "Garbage Fee" nature(7) = "Service Fee Health" End With lblAmount.Text = Amount End If

End Sub Public Sub natures() colDate = Now.Date Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "INSERT INTO tblDaily (natureOfCol,colDate,colAmount,transOr,transTeller)" & _ "VALUES ('" & collection & "','" & colDate & "','" & Amount & "','" & lblOr.Text & "','" & teller & "')" SQLcmd.ExecuteNonQuery() conn.Close() End If Catch ex As Exception MsgBox(ex.Message) End Try End Sub Public Sub nature1() colDate = Now.Date

Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "INSERT INTO tblDaily (natureOfCol,colDate,colAmount,transOr,transTeller)" & _ "VALUES ('" & collection & "','" & colDate & "','" & Amount & "','" & lblOr.Text & "','" & teller & "')" SQLcmd.ExecuteNonQuery() conn.Close() End If Catch ex As Exception MsgBox(ex.Message) End Try Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "INSERT INTO tblDaily (natureOfCol,colDate,colAmount,transOr,transTeller)" & _ "VALUES ('" & collection & "','" & colDate & "','" & Amount & "','" & lblOr.Text & "','" & teller & "')" SQLcmd.ExecuteNonQuery() conn.Close() End If Catch ex As Exception MsgBox(ex.Message) End Try Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "INSERT INTO tblDaily (natureOfCol,colDate,colAmount,transOr,transTeller)" & _ "VALUES ('" & collection & "','" & colDate & "','" & Amount & "','" & lblOr.Text & "','" & teller & "')" SQLcmd.ExecuteNonQuery() conn.Close() End If Catch ex As Exception

Page 17: Appendices

69

MsgBox(ex.Message) End Try Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "INSERT INTO tblDaily (natureOfCol,colDate,colAmount,transOr,transTeller)" & _ "VALUES ('" & collection & "','" & colDate & "','" & Amount & "','" & lblOr.Text & "','" & teller & "')" SQLcmd.ExecuteNonQuery() conn.Close() End If Catch ex As Exception MsgBox(ex.Message) End Try Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "INSERT INTO tblDaily (natureOfCol,colDate,colAmount,transOr,transTeller)" & _ "VALUES ('" & collection & "','" & colDate & "','" & Amount & "','" & lblOr.Text & "','" & teller & "')" SQLcmd.ExecuteNonQuery() conn.Close() End If Catch ex As Exception MsgBox(ex.Message) End Try Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "INSERT INTO tblDaily (natureOfCol,colDate,colAmount,transOr,transTeller)" & _ "VALUES ('" & collection & "','" & colDate & "','" & Amount & "','" & lblOr.Text & "','" & teller & "')" SQLcmd.ExecuteNonQuery() conn.Close()

End If Catch ex As Exception MsgBox(ex.Message) End Try Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "INSERT INTO tblDaily (natureOfCol,colDate,colAmount,transOr,transTeller)" & _ "VALUES ('" & collection & "','" & colDate & "','" & Amount & "','" & lblOr.Text & "','" & teller & "')" SQLcmd.ExecuteNonQuery() conn.Close() End If Catch ex As Exception MsgBox(ex.Message) End Try Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "INSERT INTO tblDaily (natureOfCol,colDate,colAmount,transOr,transTeller)" & _ "VALUES ('" & collection & "','" & colDate & "','" & Amount & "','" & lblOr.Text & "','" & teller & "')" SQLcmd.ExecuteNonQuery() conn.Close() End If Catch ex As Exception MsgBox(ex.Message) End Try End Sub

Public Sub save1() Dim amountInDigit As String Dim q As Integer q = lblOr.Text + 1 amountInDigit = NumberToString(Amount) Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn

Page 18: Appendices

70

SQLcmd.CommandText = "INSERT INTO tblTempReceipt (orNumber,cusName,date,amountToPay,amountToPayDigit,payment,tellerName,natureOfCol)" & _ "VALUES ('" & lblOr.Text & "','" & cusname & "','" & colDate & "','" & pay(0) & "','" & amountInDigit & "','" & txtCash.Text & "','" & teller & "','" & nature(0) & "')" Dim SQLRead As SqlDataReader = SQLcmd.ExecuteReader End If conn.Close() Catch ex As Exception MsgBox(ex.Message) End Try Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "INSERT INTO tblTempReceipt (orNumber,cusName,date,amountToPay,amountToPayDigit,payment,tellerName,natureOfCol)" & _ "VALUES ('" & lblOr.Text & "','" & cusname & "','" & colDate & "','" & pay(1) & "','" & amountInDigit & "','" & txtCash.Text & "','" & teller & "','" & nature(1) & "')" Dim SQLRead As SqlDataReader = SQLcmd.ExecuteReader End If conn.Close() Catch ex As Exception MsgBox(ex.Message) End Try Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "INSERT INTO tblTempReceipt (orNumber,cusName,date,amountToPay,amountToPayDigit,payment,tellerName,natureOfCol)" & _ "VALUES ('" & lblOr.Text & "','" & cusname & "','" & colDate & "','" & pay(2) & "','" & amountInDigit & "','" & txtCash.Text & "','" & teller & "','" & nature(2) & "')"

Dim SQLRead As SqlDataReader = SQLcmd.ExecuteReader End If conn.Close() Catch ex As Exception MsgBox(ex.Message) End Try Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "INSERT INTO tblTempReceipt (orNumber,cusName,date,amountToPay,amountToPayDigit,payment,tellerName,natureOfCol)" & _ "VALUES ('" & lblOr.Text & "','" & cusname & "','" & colDate & "','" & pay(3) & "','" & amountInDigit & "','" & txtCash.Text & "','" & teller & "','" & nature(3) & "')" Dim SQLRead As SqlDataReader = SQLcmd.ExecuteReader End If conn.Close() Catch ex As Exception MsgBox(ex.Message) End Try Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "INSERT INTO tblTempReceipt (orNumber,cusName,date,amountToPay,amountToPayDigit,payment,tellerName,natureOfCol)" & _ "VALUES ('" & lblOr.Text & "','" & cusname & "','" & colDate & "','" & pay(4) & "','" & amountInDigit & "','" & txtCash.Text & "','" & teller & "','" & nature(4) & "')" Dim SQLRead As SqlDataReader = SQLcmd.ExecuteReader End If conn.Close() Catch ex As Exception MsgBox(ex.Message) End Try Call ConnectDatabase() Try

Page 19: Appendices

71

If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "INSERT INTO tblTempReceipt (orNumber,cusName,date,amountToPay,amountToPayDigit,payment,tellerName,natureOfCol)" & _ "VALUES ('" & lblOr.Text & "','" & cusname & "','" & colDate & "','" & pay(5) & "','" & amountInDigit & "','" & txtCash.Text & "','" & teller & "','" & nature(5) & "')" Dim SQLRead As SqlDataReader = SQLcmd.ExecuteReader End If conn.Close() Catch ex As Exception MsgBox(ex.Message) End Try Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "INSERT INTO tblTempReceipt (orNumber,cusName,date,amountToPay,amountToPayDigit,payment,tellerName,natureOfCol)" & _ "VALUES ('" & lblOr.Text & "','" & cusname & "','" & colDate & "','" & pay(6) & "','" & amountInDigit & "','" & txtCash.Text & "','" & teller & "','" & nature(6) & "')" Dim SQLRead As SqlDataReader = SQLcmd.ExecuteReader End If conn.Close() Catch ex As Exception MsgBox(ex.Message) End Try Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "INSERT INTO tblTempReceipt (orNumber,cusName,date,amountToPay,amountToPayDigit,payment,tellerName,natureOfCol)" & _ "VALUES ('" & lblOr.Text & "','" & cusname & "','" & colDate & "','" & pay(7) & "','"

& amountInDigit & "','" & txtCash.Text & "','" & teller & "','" & nature(7) & "')" Dim SQLRead As SqlDataReader = SQLcmd.ExecuteReader End If conn.Close() Catch ex As Exception MsgBox(ex.Message) End Try Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "UPDATE tblReceipt set orFrom = '" & q & "'" Dim SQLRead As SqlDataReader = SQLcmd.ExecuteReader End If conn.Close() Catch ex As Exception MsgBox(ex.Message) End Try End Sub Public Sub save() Dim amountInDigit As String Dim q As Integer q = lblOr.Text + 1 amountInDigit = NumberToString(Amount) Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "INSERT INTO tblTempReceipt (orNumber,cusName,date,amountToPay,amountToPayDigit,payment,tellerName,natureOfCol)" & _ "VALUES ('" & lblOr.Text & "','" & cusname & "','" & colDate & "','" & Amount & "','" & amountInDigit & "','" & Amount & "','" & teller & "','" & natureOfCol & "')" Dim SQLRead As SqlDataReader = SQLcmd.ExecuteReader End If conn.Close() Catch ex As Exception MsgBox(ex.Message) End Try Call ConnectDatabase() Try

Page 20: Appendices

72

If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "UPDATE tblReceipt set orFrom = '" & q & "'" Dim SQLRead As SqlDataReader = SQLcmd.ExecuteReader End If conn.Close() Catch ex As Exception MsgBox(ex.Message) End Try End Sub

Sub print() Call ConnectDatabase()

Dim SQLcmd As String

SQLcmd = "SELECT * FROM tblTempReceipt WHERE orNumber = '" & lblOr.Text & "'"

Dim SQLAdapter As New SqlDataAdapter(SQLcmd, conn) Dim SQLSet As New DataSet

SQLAdapter.Fill(SQLSet, "tblTempReceipt WHERE orNumber = '" & lblOr.Text & "'")

Dim report As String = Application.StartupPath + "\receipt.rpt"

If Not IO.File.Exists(report) Then Throw (New Exception("Unable to locate report file:" & _ vbCrLf & report)) End If

Dim document As New ReportDocument

document.Load(report) document.SetDataSource(SQLSet.Tables("tblTempReceipt WHERE orNumber = '" & lblOr.Text & "'"))

With frmReport .rptViewer.ShowRefreshButton = False .rptViewer.ShowCloseButton = False

.rptViewer.ShowGroupTreeButton = False .rptViewer.ReportSource = document .Show() End With End Sub Private Function NumberToString(ByVal num_str As String, Optional ByVal use_us_group_names As Boolean = True) As String ' Get the appropiate group names. Dim groups() As String If use_us_group_names Then groups = New String() {"", "thousand", "million", "billion", "trillion", "quadrillion", "quintillion", "sextillion", "septillion", "octillion", "nonillion", "decillion", "undecillion", "duodecillion", "tredecillion", "quattuordecillion", "quindecillion", "sexdecillion", "septendecillion", "octodecillion", "novemdecillion", "vigintillion"} Else groups = New String() {"", "thousand", "million", "milliard", "billion", "1000 billion", "trillion", "1000 trillion", "quadrillion", "1000 quadrillion", "quintillion", "1000 quintillion", "sextillion", "1000 sextillion", "septillion", "1000 septillion", "octillion", "1000 octillion", "nonillion", "1000 nonillion", "decillion", "1000 decillion"} End If

' Clean the string a bit. ' Remove "$", ",", leading zeros, and ' anything after a decimal point. Const CURRENCY As String = "$" Const SEPARATOR As String = "," Const DECIMAL_POINT As String = "." num_str = num_str.Replace(CURRENCY, "").Replace(SEPARATOR, "") num_str = num_str.TrimStart(New Char() {"0"c}) Dim pos As Integer = num_str.IndexOf(DECIMAL_POINT) If pos = 0 Then Return "zero" ElseIf pos > 0 Then num_str = num_str.Substring(0, pos - 1) End If

' See how many groups there will be.

Page 21: Appendices

73

Dim num_groups As Integer = (num_str.Length + 2) \ 3

' Pad so length is a multiple of 3. num_str = num_str.PadLeft(num_groups * 3, " "c)

' Process the groups, largest first. Dim result As String = "" Dim group_num As Integer For group_num = num_groups - 1 To 0 Step -1 ' Get the next three digits. Dim group_str As String = num_str.Substring(0, 3) num_str = num_str.Substring(3) Dim group_value As Integer = CInt(group_str)

' Convert the group into words. If group_value > 0 Then If group_num >= groups.Length Then result &= GroupToWords(group_value) & _ " ?, " Else result &= GroupToWords(group_value) & _ " " & groups(group_num) & ", " End If End If Next group_num

' Remove the trailing ", ". If result.EndsWith(", ") Then result = result.Substring(0, result.Length - 2) End If

Return result.Trim() End Function

' Convert a number between 0 and 999 into words. Private Function GroupToWords(ByVal num As Integer) As String Static one_to_nineteen() As String = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eightteen", "nineteen"}

Static multiples_of_ten() As String = {"twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"}

' If the number is 0, return an empty string. If num = 0 Then Return ""

' Handle the hundreds digit. Dim digit As Integer Dim result As String = "" If num > 99 Then digit = num \ 100 num = num Mod 100 result = one_to_nineteen(digit) & " hundred" End If

' If num = 0, we have hundreds only. If num = 0 Then Return result.Trim()

' See if the rest is less than 20. If num < 20 Then ' Look up the correct name. result &= " " & one_to_nineteen(num) Else ' Handle the tens digit. digit = num \ 10 num = num Mod 10 result &= " " & multiples_of_ten(digit - 2)

' Handle the final digit. If num > 0 Then result &= " " & one_to_nineteen(num) End If End If

Return result.Trim() End FunctionEnd Class

frmLogin.vb

Imports SystemImports System.DataImports System.Data.SqlClientPublic Class frmLogin Dim SQLcmd As New SqlCommand Dim a As Boolean Dim status As String Dim tellerName As String

Page 22: Appendices

74

Private Sub frmLogin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Public Sub acc() Static note As Integer Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "SELECT * FROM tblTeller WHERE Usercode = '" & txtCode.Text & "' AND Password = '" & txtPass.Text & "'" Dim SQLread As SqlDataReader = SQLcmd.ExecuteReader While SQLread.Read() With frmMain .tsName.Text = SQLread("Name") .tsPosition.Text = SQLread("Position") .tsPositionT.Visible = True .tsUser.Visible = True End With tellerName = SQLread("Name") End While If SQLread.HasRows = 0 Then conn.Close() MsgBox("Username/Password is Incorrect!" + vbCrLf + vbCrLf + "You have " & 4 - note & " more attempts before being" + vbCrLf + "locked out of the system.", MsgBoxStyle.Critical + MsgBoxStyle.OkOnly, "Error") Label7.Visible = True note = note + 1 If note = 5 Then MsgBox("You have reached the maximum trial!" & vbCrLf & vbCrLf & "The System will be Locked and Terminated.", MsgBoxStyle.Exclamation + MsgBoxStyle.OkOnly, "Security Access") End End If txtPass.Text = "" txtCode.Text = "" Label5.Text = 5 - note txtCode.Focus() Else Call verify() If status = "Not Updated" Then

MsgBox("Your account is not yet verified.", vbCritical + vbOKOnly) frmMain.Show() frmMain.Enabled = False frmUpdateT.Show() frmUpdateT.BringToFront() Me.Close() Else With frmMain frmMain.Enabled = True .tsReady2.Text = "Ready" .Button3.ForeColor = Color.ForestGreen If lblPosition.Text = "Teller 1" Then With frmMain

.Panel3.Visible = True

.ToolStripButton5.Visible = False .Label2.Text = "Logout" .TransactionToolStripMenuItem1.Visible = True .Window5ToolStripMenuItem.Visible = False .Window6ToolStripMenuItem.Visible = False .ORNumberToolStripMenuItem1.Visible = False .ToolStripButton6.Visible = False .ToolStripButton8.Visible = True .AddTellerToolStripMenuItem1.Visible = False .LogoutToolStripMenuItem1.Visible = True .Button3.Visible = True

.UtilitiesToolStripMenuItem1.Visible = True .BackUpDatabaseToolStripMenuItem.Visible = False .ORNumberToolStripMenuItem1.Visible = False .AccountToolStripMenuItem.Visible = False .AddTellerToolStripMenuItem2.Visible = False

Page 23: Appendices

75

.EditTellerToolStripMenuItem1.Visible = False .EditAccountToolStripMenuItem.Visible = True

.Window4ToolStripMenuItem.Visible = False .Window5ToolStripMenuItem.Visible = False .Window6ToolStripMenuItem.Visible = False .birthC.Visible = False .marriageC.Visible = False .marriageL.Visible = False .mayorC.Visible = False .policeC.Visible = False .taxC.Visible = False .taxD.Visible = False .transferF.Visible = False .transferT.Visible = False .burialP.Visible = False .medicalC.Visible = False End With CreateObject("SAPI.SpVoice").Speak("Welcome, Teller 1") ElseIf lblPosition.Text = "Teller 2" Then With frmMain

.Panel2.Visible = True

.ToolStripButton5.Visible = False .Label2.Text = "Logout" .TransactionToolStripMenuItem1.Visible = True .Window4ToolStripMenuItem.Visible = False .Window6ToolStripMenuItem.Visible = False .ORNumberToolStripMenuItem1.Visible = False .Button4.Visible = True .Label3.Visible = True .Button5.Visible = True .Label4.Visible = True .Button6.Visible = True .Label5.Visible = True .Button7.Visible = True .Label6.Visible = True .Button8.Visible = True

.Label7.Visible = True .ToolStripButton6.Visible = False .ToolStripButton8.Visible = True .AddTellerToolStripMenuItem1.Visible = False .LogoutToolStripMenuItem1.Visible = True

.UtilitiesToolStripMenuItem1.Visible = True .BackUpDatabaseToolStripMenuItem.Visible = False .ORNumberToolStripMenuItem1.Visible = False .AccountToolStripMenuItem.Visible = False .AddTellerToolStripMenuItem2.Visible = False .EditTellerToolStripMenuItem1.Visible = False .EditAccountToolStripMenuItem.Visible = True

.Window4ToolStripMenuItem.Visible = False .Window5ToolStripMenuItem.Visible = False .Window6ToolStripMenuItem.Visible = False .Button3.Visible = True .businessP.Visible = False .lC.Visible = False .buildingP.Visible = False .marriageL.Visible = False .mayorC.Visible = False .transferF.Visible = False .transferT.Visible = False End With CreateObject("SAPI.SpVoice").Speak("Welcome, Teller 2") ElseIf lblPosition.Text = "Teller 3" Then With frmMain

.Panel4.Visible = True

.ToolStripButton5.Visible = False

Page 24: Appendices

76

.Label2.Text = "Logout" .TransactionToolStripMenuItem1.Visible = True .Window4ToolStripMenuItem.Visible = False .Window5ToolStripMenuItem.Visible = False .Window6ToolStripMenuItem.Visible = False .ORNumberToolStripMenuItem1.Visible = False .Button4.Visible = True .Label3.Visible = True .Button5.Visible = True .Label4.Visible = True .Button6.Visible = True .Label5.Visible = True .Button7.Visible = True .Label6.Visible = True .Button8.Visible = True .Label7.Visible = True .ToolStripButton6.Visible = False .ToolStripButton8.Visible = True .AddTellerToolStripMenuItem1.Visible = False .LogoutToolStripMenuItem1.Visible = True

.UtilitiesToolStripMenuItem1.Visible = True .BackUpDatabaseToolStripMenuItem.Visible = False .ORNumberToolStripMenuItem1.Visible = False .AccountToolStripMenuItem.Visible = False .AddTellerToolStripMenuItem2.Visible = False .EditTellerToolStripMenuItem1.Visible = False .EditAccountToolStripMenuItem.Visible = True

.Window4ToolStripMenuItem.Visible = False .Window5ToolStripMenuItem.Visible = False .Window6ToolStripMenuItem.Visible = False .marriageL.Visible = False

.mayorC.Visible = False .transferF.Visible = False .transferT.Visible = False .buildingP.Visible = False .businessP.Visible = False .lC.Visible = False End With CreateObject("SAPI.SpVoice").Speak("Welcome, Teller 3") ElseIf lblPosition.Text = "Administrator" Then With frmMain .ToolStripButton5.Visible = True .Label2.Text = "Logout" .UtilitiesToolStripMenuItem1.Visible = True .CollectionToolStripMenuItem1.Visible = True .TransactionToolStripMenuItem1.Visible = True .Window4ToolStripMenuItem.Visible = True .Window5ToolStripMenuItem.Visible = True .Button4.Visible = True .Label3.Visible = True .Button5.Visible = True .Label4.Visible = True .Button6.Visible = True .Label5.Visible = True .Button7.Visible = True .Label6.Visible = True .Button8.Visible = True .Label7.Visible = True .ToolStripButton6.Visible = False .ToolStripButton8.Visible = True .AddTellerToolStripMenuItem1.Visible = False .LogoutToolStripMenuItem1.Visible = True .Button3.Visible = True .birthC.Visible = False .marriageC.Visible = False .marriageL.Visible = False .mayorC.Visible = False .policeC.Visible = False .taxC.Visible = False .taxD.Visible = False

Page 25: Appendices

77

.transferF.Visible = False .transferT.Visible = False .burialP.Visible = False .medicalC.Visible = False .buildingP.Visible = False .businessP.Visible = False .lC.Visible = False .ORNumberToolStripMenuItem.Visible = True .EditAccountToolStripMenuItem.Visible = False .BackUpDatabaseToolStripMenuItem.Visible = True .ORNumberToolStripMenuItem1.Visible = True .AccountToolStripMenuItem.Visible = True .AddTellerToolStripMenuItem2.Visible = True .EditTellerToolStripMenuItem1.Visible = True CreateObject("SAPI.SpVoice").Speak("Welcome, Administrator") End With End If

End With Me.Close() note = 0 End If End If End If conn.Close() Catch ex As Exception MsgBox(ex.Message) End Try

End Sub Public Sub verify() conn.Close() Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "SELECT * FROM tblTeller where Usercode = '" & txtCode.Text & "'" Dim SQLread As SqlDataReader = SQLcmd.ExecuteReader While SQLread.Read()

status = SQLread("status") End While conn.Close() End If Catch ex As Exception MsgBox(ex.Message) End Try conn.Close() End Sub Public Sub position() Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "SELECT * FROM tblTeller where Usercode = '" & txtCode.Text & "'" Dim SQLread As SqlDataReader = SQLcmd.ExecuteReader While SQLread.Read() lblPosition.Text = SQLread("Position") a = True End While conn.Close() End If Catch ex As Exception MsgBox(ex.Message) End Try End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Call acc() Dim a As String a = Now.ToLongTimeString With frmMain .Label10.Text = a End With End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click With frmMain .Enabled = True Me.Close() End With End Sub

Page 26: Appendices

78

Private Sub txtCode_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtCode.LostFocus Call position() If txtCode.Text = "" Then a = True End If If a = False Then MsgBox("Your a unathorized person !", vbCritical + vbOKOnly, "Login") txtCode.Text = "" txtCode.Focus() lblPosition.Text = "" End If a = False End Sub

Private Sub Label7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label7.Click frmForgotP.Show() Me.Hide() End Sub

End Class

frmOR.vb

Imports SystemImports System.DataImports System.Data.SqlClientPublic Class frmOR Dim SQLcmd As New SqlCommand Private Sub frmOR_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Public Sub ORnumber() conn.Close() Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "UPDATE tblReceipt set [orFrom] = '" & txtFrom.Text & "', [orTo] = '" & txtTo.Text & "' where orFrom2 = '" & 1 & "'" SQLcmd.ExecuteNonQuery() If Me.Text = "Edit OR" Then

MsgBox("O.R Number have been edited!", MsgBoxStyle.OkOnly + MsgBoxStyle.Information, "O.R Number") Else MsgBox("O.R Number have been added!", MsgBoxStyle.OkOnly + MsgBoxStyle.Information, "O.R Number") End If conn.Close() End If Catch ex As Exception MsgBox(ex.Message) End Try With frmMain .Enabled = True Me.Close() End With End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Val(txtFrom.Text) >= Val(txtTo.Text) Then MsgBox("Invalid action. OR To is less than OR From.", vbCritical + vbOKOnly, "Invalid Action") txtFrom.Text = "" txtTo.Text = "" txtFrom.Focus() Else Call compare() End If

End Sub Public Sub insert() Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "INSERT INTO tblReceipt (orFrom,orTo) VALUES ('" & txtFrom.Text & "','" & txtTo.Text & "')" MsgBox("O.R Number have been added!", MsgBoxStyle.OkOnly + MsgBoxStyle.Information, "O.R Number") SQLcmd.ExecuteNonQuery() conn.Close() End If Catch ex As Exception MsgBox(ex.Message)

Page 27: Appendices

79

End Try End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click With frmMain .Enabled = True Me.Close() End With End Sub Public Sub compare() Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "SELECT * FROM tblDaily where transOr = '" & txtFrom.Text & "'" Dim SQLread As SqlDataReader = SQLcmd.ExecuteReader If SQLread.HasRows = 0 Then Call ORnumber() Else MsgBox("Or number already exist.", vbCritical + vbOKOnly, "Or Number") txtFrom.Text = "" txtTo.Text = "" txtFrom.Focus() End If conn.Close() End If Catch ex As Exception MsgBox(ex.Message) End Try End Sub

Private Sub txtFrom_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtFrom.TextChanged txtFrom.Focus() End SubEnd Class

frmAddt.vb

Imports SystemImports System.DataImports System.Data.SqlClient

Public Class frmAddT Dim SQLcmd As New SqlCommand Private Sub frmAddT_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub Private Sub add() Call ConnectDatabase() Try If conn.State = ConnectionState.Open Then SQLcmd.Connection = conn SQLcmd.CommandText = "INSERT INTO tblTeller (Usercode,Password,Position,Name,Status)" & _ "VALUES ('" & txtUsercode.Text & "','" & txtPassword.Text & "','" & cmbTeller.Text & "','" & txtFull.Text & "','" & "Not Updated" & "')" Dim SQLRead As SqlDataReader = SQLcmd.ExecuteReader MsgBox("Teller Added", vbInformation + vbOKOnly, "Add Teller") End If conn.Close() Catch ex As Exception MsgBox(ex.Message) End Try End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If txtUsercode.Text = "" Or txtPassword.Text = "" Or cmbTeller.Text = "" Or txtFull.Text = "" Then MsgBox("Please input necessary inforamtion.", vbCritical + vbOKOnly, "Input") Else Call add() frmMain.Show() frmMain.Enabled = True Me.Close() End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click frmMain.Show() frmMain.Enabled = True

Page 28: Appendices

80

Me.Close()

End Sub

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

System.Windows.Forms.PaintEventArgs) Handles Panel1.Paint

End SubEnd Class


Recommended