SlideShare a Scribd company logo
1 of 27
53




APPENDICES
54




APPENDIX A

Gant Chart
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. Bueanas
Emmanuel T. Sanchez
Mark Jayson O. Osian
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. Bueanas
Emmanuel T. Sanchez
Mark Jayson O. Osian
57




APPENDIX B

Questionnaires
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 Satisfactory
3 – Satisfactory
2 – Fair
1 – Poor

                                                                  5     4    3      2    1
                            Criteria
                                                                  E    VS    S      F    P
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
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 Satisfactory
3 – Satisfactory
2 – Fair
1 – Poor

                                                                  5     4    3      2    1
                            Criteria
                                                                  E    VS    S      F    P
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
60




APPENDIX C

Screen Shots
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.
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.
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.
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.
65




APPENDIX D

Source Code
66




frmAcceptBuildingP.vb                             vbCrLf + "Change: " & change, vbInformation +
                                                  vbOKCancel, "Review")
Imports System                                          If a = vbOK Then
Imports System.Data                                        With frmReport
Imports system.Data.SqlClient                                 .lblOr.Text = lblOr.Text
Imports CrystalDecisions.Shared                            End With
Imports CrystalDecisions.CrystalRe                         If lblId.Text = "13" Then
         ports.Engine                                         Call nature1()
Public Class frmAcceptP                                       Call save()
  Dim SQLcmd As New SqlCommand                                Call print()
                                                           Else
  Dim Amount As String                                        Call natures()
  Dim cusname As String                                       Call save()
  Dim teller As String                                        Call print()
  Dim collection As String                                    Me.Close()
  Dim colDate As String                                    End If
  Dim totalAmount As Integer
  Dim natureOfCol As String                              End If
  Dim pay(7) As String                                 End If
  Dim nature(7) As String                           End Sub
                                                    Private Sub frmAcceptP_Load(ByVal sender
   Private Sub Button2_Click(ByVal sender As      As System.Object, ByVal e As
System.Object, ByVal e As System.EventArgs)       System.EventArgs) Handles MyBase.Load
Handles btnCancel.Click
     With frmMain                                      If lblId.Text = "1" Then
        .Enabled = True                                   With frmBirthC
        Me.Close()                                           cusname = .txtCust.Text
     End With                                                teller = .lblName.Text
     With frmBirthC                                          Amount = .lblTotal.Text
        .Close()                                             lblOr.Text = .lblOr.Text
     End With                                                If Amount = 50 Then
   End Sub                                                      natureOfCol = "Birth Certificate"
   Private Sub btnPrint_Click(ByVal sender As                Else
System.Object, ByVal e As System.EventArgs)                     natureOfCol = "Birth Certificate for
Handles btnPrint.Click                            travel"
     Dim change As Integer                                   End If
     If Val(txtCash.Text) < Val(lblAmount.Text)              collection = "15" 'Birth Certificate
Or txtCash.Text = "" Or Not                               End With
IsNumeric(txtCash.Text) Then                              lblAmount.Text = Amount
        MsgBox("Insufficient cash. Please enter        ElseIf lblId.Text = "2" Then
valid fund!", vbCritical + vbOKOnly,                      With frmBurialP
"Payment")                                                   cusname = .txtCust.Text
        txtCash.Text = ""                                    teller = .lblName.Text
        txtCash.Focus()                                      Amount = .lblTotal.Text
     Else                                                    lblOr.Text = .lblOr.Text
        change = Val(txtCash.Text) -                         natureOfCol = "Burial Permit"
Val(lblAmount.Text)                                          collection = "23" 'Burial Permit
        'Label3.Text = change + ".00"                     End With
        Dim a As String                                   lblAmount.Text = Amount
        a = MsgBox("Please review the                  ElseIf lblId.Text = "3" Then
Information:" + vbCrLf + "Name: " + cusname +             With frmMarriageC
vbCrLf + "Amount: " + Amount + vbCrLf +                      cusname = .txtCust.Text
                                                             teller = .lblName.Text
67




     Amount = .lblTotal.Text                        Amount = .lblTotal.Text
     lblOr.Text = .lblOr.Text                       lblOr.Text = .lblOr.Text
     natureOfCol = "Marriage Certificate"           natureOfCol = "Tax Declaration"
     collection = "24" 'Marriage Certificate        collection = "18" 'Tax Declaration
  End With                                       End With
  lblAmount.Text = Amount                        lblAmount.Text = Amount
ElseIf lblId.Text = "4" Then                   ElseIf lblId.Text = "9" Then
  With frmMarriageL                              With frmTransferF
     cusname = .txtCust.Text                        cusname = .txtCust.Text
     teller = .lblName.Text                         teller = .lblName.Text
     Amount = .lblTotal.Text                        Amount = .lblTotal.Text
     lblOr.Text = .lblOr.Text                       lblOr.Text = .lblOr.Text
     natureOfCol = "Marriage License"               natureOfCol = "Transfer Fee"
     collection = "26" 'Marriage License            collection = "27" 'Transfer Fee
  End With                                       End With
  lblAmount.Text = Amount                        lblAmount.Text = Amount
ElseIf lblId.Text = "5" Then                   ElseIf lblId.Text = "10" Then
  With frmMayorsC                                With frmTransferT
     If .lblTotal.Text = "Php 0.00" Then            cusname = .txtCust.Text
        .lblTotal.Text = "0.00"                     teller = .lblName.Text
     End If                                         Amount = .lblTotal.Text
     cusname = .txtCust.Text                        lblOr.Text = .lblOr.Text
     teller = .lblName.Text                         natureOfCol = "Transfer Tax"
     Amount = .lblTotal.Text                        collection = "28" 'Transfer Tax
     lblOr.Text = .lblOr.Text                    End With
     natureOfCol = "Mayors Clearance"            lblAmount.Text = Amount
     collection = "20" '                       ElseIf lblId.Text = "11" Then
  End With                                       With frmPoliceC
  lblAmount.Text = Amount                           cusname = .txtCust.Text
ElseIf lblId.Text = "6" Then                        teller = .lblName.Text
  With frmMedicalC                                  Amount = .lblTotal.Text
     cusname = .txtCust.Text                        lblOr.Text = .lblOr.Text
     teller = .lblName.Text                         natureOfCol = "Police Clearance"
     Amount = .lblTotal.Text                        collection = "17" 'Police Clearance
     lblOr.Text = .lblOr.Text                    End With
     natureOfCol = "Medical Certificate"         lblAmount.Text = Amount
     collection = "25" 'Medical Certificate    ElseIf lblId.Text = "12" Then
  End With                                       With frmLocationalC
  lblAmount.Text = Amount                           cusname = .txtCust.Text
ElseIf lblId.Text = "7" Then                        teller = .lblName.Text
  With frmTaxC                                      Amount = .lblTotal.Text
     cusname = .txtCust.Text                        lblOr.Text = .lblOr.Text
     teller = .lblName.Text                         natureOfCol = "Locational Clearance"
     Amount = .lblTotal.Text                        collection = "22" 'Locational Clearance
     lblOr.Text = .lblOr.Text                    End With
     natureOfCol = "Tax Clearance"               lblAmount.Text = Amount
     collection = "21" 'Tax Clearance
  End With                                     ElseIf lblId.Text = "13" Then
  lblAmount.Text = Amount                        With frmBusinessP
ElseIf lblId.Text = "8" Then                        cusname = .txtCust.Text
  With frmTaxD                                      teller = .lblName.Text
     cusname = .txtCust.Text                        Amount = .lblTotal.Text
     teller = .lblName.Text                         lblOr.Text = .lblOr.Text
68




           natureOfCol = "Building Permit"                     SQLcmd.Connection = conn
           collection = "2" 'Building Permit                   SQLcmd.CommandText = "INSERT
           '********* *********'                   INTO tblDaily
           pay(0) = .txtPay1.Text                  (natureOfCol,colDate,colAmount,transOr,transT
           pay(1) = .txtPay2.Text                  eller)" & _
           pay(2) = .txtPay3.Text                              "VALUES ('" & collection & "','" &
           pay(3) = .txtPay4.Text                  colDate & "','" & Amount & "','" & lblOr.Text &
           pay(4) = .txtPay5.Text                  "','" & teller & "')"
           pay(5) = .txtPay6.Text                              SQLcmd.ExecuteNonQuery()
           pay(6) = .txtPay7.Text                              conn.Close()
           pay(7) = .txtPay8.Text                           End If
           '********** *********'                        Catch ex As Exception
           nature(0) = "Mayors Permit"                      MsgBox(ex.Message)
           nature(1) = "Sanitary Inspection Fee"         End Try
           nature(2) = "Police Clearance"                Call ConnectDatabase()
           nature(3) = "Fire Inspection Fee"             Try
           nature(4) = "Business Name Plate"                If conn.State = ConnectionState.Open
           nature(5) = "Engineering Inspection     Then
Fee"                                                           SQLcmd.Connection = conn
            nature(6) = "Garbage Fee"                          SQLcmd.CommandText = "INSERT
            nature(7) = "Service Fee Health"       INTO tblDaily
         End With                                  (natureOfCol,colDate,colAmount,transOr,transT
         lblAmount.Text = Amount                   eller)" & _
       End If                                                  "VALUES ('" & collection & "','" &
                                                   colDate & "','" & Amount & "','" & lblOr.Text &
    End Sub                                        "','" & teller & "')"
    Public Sub natures()                                       SQLcmd.ExecuteNonQuery()
      colDate = Now.Date                                       conn.Close()
      Call ConnectDatabase()                                End If
      Try                                                Catch ex As Exception
         If conn.State = ConnectionState.Open               MsgBox(ex.Message)
Then                                                     End Try
            SQLcmd.Connection = conn                     Call ConnectDatabase()
            SQLcmd.CommandText = "INSERT                 Try
INTO tblDaily                                               If conn.State = ConnectionState.Open
(natureOfCol,colDate,colAmount,transOr,transT      Then
eller)" & _                                                    SQLcmd.Connection = conn
            "VALUES ('" & collection & "','" &                 SQLcmd.CommandText = "INSERT
colDate & "','" & Amount & "','" & lblOr.Text &    INTO tblDaily
"','" & teller & "')"                              (natureOfCol,colDate,colAmount,transOr,transT
            SQLcmd.ExecuteNonQuery()               eller)" & _
            conn.Close()                                       "VALUES ('" & collection & "','" &
         End If                                    colDate & "','" & Amount & "','" & lblOr.Text &
      Catch ex As Exception                        "','" & teller & "')"
         MsgBox(ex.Message)                                    SQLcmd.ExecuteNonQuery()
      End Try                                                  conn.Close()
    End Sub                                                 End If
    Public Sub nature1()                                 Catch ex As Exception
      colDate = Now.Date                                    MsgBox(ex.Message)
      Call ConnectDatabase()                             End Try
      Try                                                Call ConnectDatabase()
         If conn.State = ConnectionState.Open            Try
Then
69




       If conn.State = ConnectionState.Open             Try
Then                                                       If conn.State = ConnectionState.Open
            SQLcmd.Connection = conn              Then
            SQLcmd.CommandText = "INSERT                      SQLcmd.Connection = conn
INTO tblDaily                                                 SQLcmd.CommandText = "INSERT
(natureOfCol,colDate,colAmount,transOr,transT     INTO tblDaily
eller)" & _                                       (natureOfCol,colDate,colAmount,transOr,transT
            "VALUES ('" & collection & "','" &    eller)" & _
colDate & "','" & Amount & "','" & lblOr.Text &               "VALUES ('" & collection & "','" &
"','" & teller & "')"                             colDate & "','" & Amount & "','" & lblOr.Text &
            SQLcmd.ExecuteNonQuery()              "','" & teller & "')"
            conn.Close()                                      SQLcmd.ExecuteNonQuery()
         End If                                               conn.Close()
      Catch ex As Exception                                End If
         MsgBox(ex.Message)                             Catch ex As Exception
      End Try                                              MsgBox(ex.Message)
      Call ConnectDatabase()                            End Try
      Try                                               Call ConnectDatabase()
         If conn.State = ConnectionState.Open           Try
Then                                                       If conn.State = ConnectionState.Open
            SQLcmd.Connection = conn              Then
            SQLcmd.CommandText = "INSERT                      SQLcmd.Connection = conn
INTO tblDaily                                                 SQLcmd.CommandText = "INSERT
(natureOfCol,colDate,colAmount,transOr,transT     INTO tblDaily
eller)" & _                                       (natureOfCol,colDate,colAmount,transOr,transT
            "VALUES ('" & collection & "','" &    eller)" & _
colDate & "','" & Amount & "','" & lblOr.Text &               "VALUES ('" & collection & "','" &
"','" & teller & "')"                             colDate & "','" & Amount & "','" & lblOr.Text &
            SQLcmd.ExecuteNonQuery()              "','" & teller & "')"
            conn.Close()                                      SQLcmd.ExecuteNonQuery()
         End If                                               conn.Close()
      Catch ex As Exception                                End If
         MsgBox(ex.Message)                             Catch ex As Exception
      End Try                                              MsgBox(ex.Message)
      Call ConnectDatabase()                            End Try
      Try                                             End Sub
         If conn.State = ConnectionState.Open
Then                                                 Public Sub save1()
            SQLcmd.Connection = conn                   Dim amountInDigit As String
            SQLcmd.CommandText = "INSERT               Dim q As Integer
INTO tblDaily                                          q = lblOr.Text + 1
(natureOfCol,colDate,colAmount,transOr,transT          amountInDigit = NumberToString(Amount)
eller)" & _                                            Call ConnectDatabase()
            "VALUES ('" & collection & "','" &         Try
colDate & "','" & Amount & "','" & lblOr.Text &           If conn.State = ConnectionState.Open
"','" & teller & "')"                             Then
            SQLcmd.ExecuteNonQuery()                         SQLcmd.Connection = conn
            conn.Close()                                     SQLcmd.CommandText = "INSERT
         End If                                   INTO tblTempReceipt
      Catch ex As Exception                       (orNumber,cusName,date,amountToPay,amount
         MsgBox(ex.Message)                       ToPayDigit,payment,tellerName,natureOfCol)"
      End Try                                     &_
      Call ConnectDatabase()
70




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




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




      MsgBox(ex.Message)                                If use_us_group_names Then
    End Try                                                groups = New String() {"", "thousand",
  End Sub                                        "million", "billion", "trillion", "quadrillion",
                                                 "quintillion", "sextillion", "septillion",
  Sub print()                                    "octillion", "nonillion", "decillion",
    Call ConnectDatabase()                       "undecillion", "duodecillion", "tredecillion",
                                                 "quattuordecillion", "quindecillion",
     Dim SQLcmd As String                        "sexdecillion", "septendecillion",
                                                 "octodecillion", "novemdecillion",
     SQLcmd = "SELECT * FROM                     "vigintillion"}
tblTempReceipt WHERE orNumber = '" &                    Else
lblOr.Text & "'"                                           groups = New String() {"", "thousand",
                                                 "million", "milliard", "billion", "1000 billion",
                                                 "trillion", "1000 trillion", "quadrillion", "1000
    Dim SQLAdapter As New                        quadrillion", "quintillion", "1000 quintillion",
SqlDataAdapter(SQLcmd, conn)                     "sextillion", "1000 sextillion", "septillion", "1000
    Dim SQLSet As New DataSet                    septillion", "octillion", "1000 octillion",
                                                 "nonillion", "1000 nonillion", "decillion", "1000
   SQLAdapter.Fill(SQLSet, "tblTempReceipt       decillion"}
WHERE orNumber = '" & lblOr.Text & "'")                 End If

    Dim report As String =                            ' Clean the string a bit.
Application.StartupPath + "receipt.rpt"              ' Remove "$", ",", leading zeros, and
                                                      ' anything after a decimal point.
     If Not IO.File.Exists(report) Then               Const CURRENCY As String = "$"
        Throw (New Exception("Unable to locate        Const SEPARATOR As String = ","
report file:" & _                                     Const DECIMAL_POINT As String = "."
          vbCrLf & report))                           num_str = num_str.Replace(CURRENCY,
     End If                                      "").Replace(SEPARATOR, "")
                                                      num_str = num_str.TrimStart(New Char()
     Dim document As New ReportDocument          {"0"c})
                                                      Dim pos As Integer =
     document.Load(report)                       num_str.IndexOf(DECIMAL_POINT)
                                                      If pos = 0 Then
document.SetDataSource(SQLSet.Tables("tblTe              Return "zero"
mpReceipt WHERE orNumber = '" & lblOr.Text            ElseIf pos > 0 Then
& "'"))                                                  num_str = num_str.Substring(0, pos - 1)
                                                      End If
     With frmReport
        .rptViewer.ShowRefreshButton = False         ' See how many groups there will be.
        .rptViewer.ShowCloseButton = False           Dim num_groups As Integer =
        .rptViewer.ShowGroupTreeButton =         (num_str.Length + 2)  3
False
        .rptViewer.ReportSource = document             ' Pad so length is a multiple of 3.
        .Show()                                        num_str = num_str.PadLeft(num_groups *
     End With                                    3, " "c)
   End Sub
   Private Function NumberToString(ByVal              ' Process the groups, largest first.
num_str As String, Optional ByVal                     Dim result As String = ""
use_us_group_names As Boolean = True) As              Dim group_num As Integer
String                                                For group_num = num_groups - 1 To 0 Step
     ' Get the appropiate group names.           -1
     Dim groups() As String                             ' Get the next three digits.
73




       Dim group_str As String =                            End If
num_str.Substring(0, 3)
       num_str = num_str.Substring(3)                       ' If num = 0, we have hundreds only.
       Dim group_value As Integer =                         If num = 0 Then Return result.Trim()
CInt(group_str)
                                                            ' See if the rest is less than 20.
      ' Convert the group into words.                       If num < 20 Then
      If group_value > 0 Then                                  ' Look up the correct name.
         If group_num >= groups.Length Then                    result &= " " & one_to_nineteen(num)
            result &=                                       Else
GroupToWords(group_value) & _                                  ' Handle the tens digit.
               " ?, "                                          digit = num  10
         Else                                                  num = num Mod 10
            result &=                                          result &= " " & multiples_of_ten(digit -
GroupToWords(group_value) & _                          2)
               " " & groups(group_num) & ", "
         End If                                               ' Handle the final digit.
      End If                                                  If num > 0 Then
    Next group_num                                               result &= " " & one_to_nineteen(num)
                                                              End If
       ' Remove the trailing ", ".                          End If
       If result.EndsWith(", ") Then
          result = result.Substring(0, result.Length       Return result.Trim()
- 2)                                                     End Function
       End If                                          End Class

    Return result.Trim()                               frmLogin.vb
  End Function
                                                       Imports System
   ' Convert a number between 0 and 999 into           Imports System.Data
words.                                                 Imports System.Data.SqlClient
   Private Function GroupToWords(ByVal num             Public Class frmLogin
As Integer) As String                                     Dim SQLcmd As New SqlCommand
      Static one_to_nineteen() As String =                Dim a As Boolean
{"zero", "one", "two", "three", "four", "five",           Dim status As String
"six", "seven", "eight", "nine", "ten", "eleven",         Dim tellerName As String
"twelve", "thirteen", "fourteen", "fifteen",              Private Sub frmLogin_Load(ByVal sender As
"sixteen", "seventeen", "eightteen", "nineteen"}       System.Object, ByVal e As System.EventArgs)
      Static multiples_of_ten() As String =            Handles MyBase.Load
{"twenty", "thirty", "forty", "fifty", "sixty",           End Sub
"seventy", "eighty", "ninety"}                            Public Sub acc()
                                                            Static note As Integer
       ' If the number is 0, return an empty string.        Call ConnectDatabase()
       If num = 0 Then Return ""                            Try
                                                               If conn.State = ConnectionState.Open
    ' Handle the hundreds digit.                       Then
    Dim digit As Integer                                          SQLcmd.Connection = conn
    Dim result As String = ""                                     SQLcmd.CommandText = "SELECT *
    If num > 99 Then                                   FROM tblTeller WHERE Usercode = '" &
       digit = num  100                               txtCode.Text & "' AND Password = '" &
       num = num Mod 100                               txtPass.Text & "'"
       result = one_to_nineteen(digit) & "                        Dim SQLread As SqlDataReader =
hundred"                                               SQLcmd.ExecuteReader
74




           While SQLread.Read()
              With frmMain                                                  .Panel3.Visible = True
                 .tsName.Text =
SQLread("Name")                                                             .ToolStripButton5.Visible
                 .tsPosition.Text =                    = False
SQLread("Position")                                                         .Label2.Text = "Logout"
                 .tsPositionT.Visible = True
                 .tsUser.Visible = True                .TransactionToolStripMenuItem1.Visible = True
              End With
              tellerName = SQLread("Name")             .Window5ToolStripMenuItem.Visible = False
           End While
           If SQLread.HasRows = 0 Then                 .Window6ToolStripMenuItem.Visible = False
              conn.Close()
              MsgBox("Username/Password is             .ORNumberToolStripMenuItem1.Visible = False
Incorrect!" + vbCrLf + vbCrLf + "You have " &                            .ToolStripButton6.Visible
4 - note & " more attempts before being" +             = False
vbCrLf + "locked out of the system.",                                    .ToolStripButton8.Visible
MsgBoxStyle.Critical + MsgBoxStyle.OkOnly,             = True
"Error")
              Label7.Visible = True                    .AddTellerToolStripMenuItem1.Visible = False
              note = note + 1
              If note = 5 Then                         .LogoutToolStripMenuItem1.Visible = True
                 MsgBox("You have reached the                             .Button3.Visible = True
maximum trial!" & vbCrLf & vbCrLf & "The
System will be Locked and Terminated.",
MsgBoxStyle.Exclamation +                              .UtilitiesToolStripMenuItem1.Visible = True
MsgBoxStyle.OkOnly, "Security Access")
                 End                                   .BackUpDatabaseToolStripMenuItem.Visible =
              End If                                   False
              txtPass.Text = ""
              txtCode.Text = ""                        .ORNumberToolStripMenuItem1.Visible = False
              Label5.Text = 5 - note
              txtCode.Focus()                          .AccountToolStripMenuItem.Visible = False
           Else
              Call verify()                            .AddTellerToolStripMenuItem2.Visible = False
              If status = "Not Updated" Then
                 MsgBox("Your account is not yet       .EditTellerToolStripMenuItem1.Visible = False
verified.", vbCritical + vbOKOnly)
                 frmMain.Show()                        .EditAccountToolStripMenuItem.Visible = True
                 frmMain.Enabled = False
                 frmUpdateT.Show()
                 frmUpdateT.BringToFront()             .Window4ToolStripMenuItem.Visible = False
                 Me.Close()
              Else                                     .Window5ToolStripMenuItem.Visible = False
                 With frmMain
                    frmMain.Enabled = True             .Window6ToolStripMenuItem.Visible = False
                    .tsReady2.Text = "Ready"                             .birthC.Visible = False
                    .Button3.ForeColor =                                 .marriageC.Visible = False
Color.ForestGreen                                                        .marriageL.Visible = False
                    If lblPosition.Text = "Teller 1"                     .mayorC.Visible = False
Then                                                                     .policeC.Visible = False
                       With frmMain                                      .taxC.Visible = False
                                                                         .taxD.Visible = False
75




                     .transferF.Visible = False
                     .transferT.Visible = False   .AddTellerToolStripMenuItem2.Visible = False
                     .burialP.Visible = False
                     .medicalC.Visible = False    .EditTellerToolStripMenuItem1.Visible = False
                   End With
                                                  .EditAccountToolStripMenuItem.Visible = True
CreateObject("SAPI.SpVoice").Speak("Welcom
e, Teller 1")
                ElseIf lblPosition.Text =         .Window4ToolStripMenuItem.Visible = False
"Teller 2" Then
                  With frmMain                    .Window5ToolStripMenuItem.Visible = False

                     .Panel2.Visible = True       .Window6ToolStripMenuItem.Visible = False
                                                                     .Button3.Visible = True
                     .ToolStripButton5.Visible                       .businessP.Visible = False
= False                                                              .lC.Visible = False
                     .Label2.Text = "Logout"                         .buildingP.Visible = False
                                                                     .marriageL.Visible = False
.TransactionToolStripMenuItem1.Visible = True                        .mayorC.Visible = False
                                                                     .transferF.Visible = False
.Window4ToolStripMenuItem.Visible = False                            .transferT.Visible = False
                                                                   End With
.Window6ToolStripMenuItem.Visible = False
                                                  CreateObject("SAPI.SpVoice").Speak("Welcom
.ORNumberToolStripMenuItem1.Visible = False       e, Teller 2")
                  .Button4.Visible = True                         ElseIf lblPosition.Text =
                  .Label3.Visible = True          "Teller 3" Then
                  .Button5.Visible = True                           With frmMain
                  .Label4.Visible = True
                  .Button6.Visible = True                              .Panel4.Visible = True
                  .Label5.Visible = True
                  .Button7.Visible = True
                  .Label6.Visible = True                               .ToolStripButton5.Visible
                  .Button8.Visible = True         = False
                  .Label7.Visible = True                               .Label2.Text = "Logout"
                  .ToolStripButton6.Visible
= False                                           .TransactionToolStripMenuItem1.Visible = True
                  .ToolStripButton8.Visible
= True                                            .Window4ToolStripMenuItem.Visible = False

.AddTellerToolStripMenuItem1.Visible = False      .Window5ToolStripMenuItem.Visible = False

.LogoutToolStripMenuItem1.Visible = True          .Window6ToolStripMenuItem.Visible = False

                                                  .ORNumberToolStripMenuItem1.Visible = False
.UtilitiesToolStripMenuItem1.Visible = True                         .Button4.Visible = True
                                                                    .Label3.Visible = True
.BackUpDatabaseToolStripMenuItem.Visible =                          .Button5.Visible = True
False                                                               .Label4.Visible = True
                                                                    .Button6.Visible = True
.ORNumberToolStripMenuItem1.Visible = False                         .Label5.Visible = True
                                                                    .Button7.Visible = True
.AccountToolStripMenuItem.Visible = False                           .Label6.Visible = True
76




                     .Button8.Visible = True
                     .Label7.Visible = True       .CollectionToolStripMenuItem1.Visible = True
                     .ToolStripButton6.Visible
= False                                           .TransactionToolStripMenuItem1.Visible = True
                     .ToolStripButton8.Visible
= True                                            .Window4ToolStripMenuItem.Visible = True

.AddTellerToolStripMenuItem1.Visible = False      .Window5ToolStripMenuItem.Visible = True
                                                                    .Button4.Visible = True
.LogoutToolStripMenuItem1.Visible = True                            .Label3.Visible = True
                                                                    .Button5.Visible = True
                                                                    .Label4.Visible = True
.UtilitiesToolStripMenuItem1.Visible = True                         .Button6.Visible = True
                                                                    .Label5.Visible = True
.BackUpDatabaseToolStripMenuItem.Visible =                          .Button7.Visible = True
False                                                               .Label6.Visible = True
                                                                    .Button8.Visible = True
.ORNumberToolStripMenuItem1.Visible = False                         .Label7.Visible = True
                                                                    .ToolStripButton6.Visible
.AccountToolStripMenuItem.Visible = False         = False
                                                                    .ToolStripButton8.Visible
.AddTellerToolStripMenuItem2.Visible = False      = True

.EditTellerToolStripMenuItem1.Visible = False     .AddTellerToolStripMenuItem1.Visible = False

.EditAccountToolStripMenuItem.Visible = True      .LogoutToolStripMenuItem1.Visible = True
                                                                     .Button3.Visible = True
                                                                     .birthC.Visible = False
.Window4ToolStripMenuItem.Visible = False                            .marriageC.Visible = False
                                                                     .marriageL.Visible = False
.Window5ToolStripMenuItem.Visible = False                            .mayorC.Visible = False
                                                                     .policeC.Visible = False
.Window6ToolStripMenuItem.Visible = False                            .taxC.Visible = False
                   .marriageL.Visible = False                        .taxD.Visible = False
                   .mayorC.Visible = False                           .transferF.Visible = False
                   .transferF.Visible = False                        .transferT.Visible = False
                   .transferT.Visible = False                        .burialP.Visible = False
                   .buildingP.Visible = False                        .medicalC.Visible = False
                   .businessP.Visible = False                        .buildingP.Visible = False
                   .lC.Visible = False                               .businessP.Visible = False
                 End With                                            .lC.Visible = False

CreateObject("SAPI.SpVoice").Speak("Welcom        .ORNumberToolStripMenuItem.Visible = True
e, Teller 3")
                 ElseIf lblPosition.Text =        .EditAccountToolStripMenuItem.Visible = False
"Administrator" Then
                   With frmMain                   .BackUpDatabaseToolStripMenuItem.Visible =
                      .ToolStripButton5.Visible   True
= True
                      .Label2.Text = "Logout"     .ORNumberToolStripMenuItem1.Visible = True

.UtilitiesToolStripMenuItem1.Visible = True       .AccountToolStripMenuItem.Visible = True
77




                                                         Dim SQLread As SqlDataReader =
.AddTellerToolStripMenuItem2.Visible = True    SQLcmd.ExecuteReader
                                                         While SQLread.Read()
.EditTellerToolStripMenuItem1.Visible = True               lblPosition.Text =
                                               SQLread("Position")
CreateObject("SAPI.SpVoice").Speak("Welcom                 a = True
e, Administrator")                                       End While
                   End With                              conn.Close()
                 End If                                End If
                                                    Catch ex As Exception
             End With                                  MsgBox(ex.Message)
             Me.Close()                             End Try
             note = 0                            End Sub
           End If                                Private Sub Button1_Click(ByVal sender As
        End If                                 System.Object, ByVal e As System.EventArgs)
      End If                                   Handles Button1.Click
      conn.Close()                                  Call acc()
    Catch ex As Exception                           Dim a As String
      MsgBox(ex.Message)                            a = Now.ToLongTimeString
    End Try                                         With frmMain
                                                       .Label10.Text = a
   End Sub                                          End With
   Public Sub verify()                           End Sub
     conn.Close()                                Private Sub Button2_Click(ByVal sender As
     Call ConnectDatabase()                    System.Object, ByVal e As System.EventArgs)
     Try                                       Handles Button2.Click
        If conn.State = ConnectionState.Open        With frmMain
Then                                                   .Enabled = True
           SQLcmd.Connection = conn                    Me.Close()
           SQLcmd.CommandText = "SELECT *           End With
FROM tblTeller where Usercode = '" &             End Sub
txtCode.Text & "'"
           Dim SQLread As SqlDataReader =        Private Sub txtCode_LostFocus(ByVal sender
SQLcmd.ExecuteReader                           As Object, ByVal e As System.EventArgs)
           While SQLread.Read()                Handles txtCode.LostFocus
             status = SQLread("status")            Call position()
           End While                               If txtCode.Text = "" Then
           conn.Close()                               a = True
        End If                                     End If
     Catch ex As Exception                         If a = False Then
        MsgBox(ex.Message)                            MsgBox("Your a unathorized person !",
     End Try                                   vbCritical + vbOKOnly, "Login")
     conn.Close()                                     txtCode.Text = ""
   End Sub                                            txtCode.Focus()
   Public Sub position()                              lblPosition.Text = ""
     Call ConnectDatabase()                        End If
     Try                                           a = False
        If conn.State = ConnectionState.Open     End Sub
Then
           SQLcmd.Connection = conn              Private Sub Label7_Click(ByVal sender As
           SQLcmd.CommandText = "SELECT *      System.Object, ByVal e As System.EventArgs)
FROM tblTeller where Usercode = '" &           Handles Label7.Click
txtCode.Text & "'"                                  frmForgotP.Show()
78




    Me.Hide()                                            If Val(txtFrom.Text) >= Val(txtTo.Text)
  End Sub                                           Then
                                                            MsgBox("Invalid action. OR To is less
End Class                                           than OR From.", vbCritical + vbOKOnly,
                                                    "Invalid Action")
frmOR.vb                                                    txtFrom.Text = ""
                                                            txtTo.Text = ""
Imports System                                              txtFrom.Focus()
Imports System.Data                                      Else
Imports System.Data.SqlClient                               Call compare()
Public Class frmOR                                       End If
  Dim SQLcmd As New SqlCommand
  Private Sub frmOR_Load(ByVal sender As               End Sub
System.Object, ByVal e As System.EventArgs)            Public Sub insert()
Handles MyBase.Load                                      Call ConnectDatabase()
                                                         Try
   End Sub                                                  If conn.State = ConnectionState.Open
   Public Sub ORnumber()                            Then
     conn.Close()                                              SQLcmd.Connection = conn
     Call ConnectDatabase()                                    SQLcmd.CommandText = "INSERT
     Try                                            INTO tblReceipt (orFrom,orTo) VALUES ('" &
        If conn.State = ConnectionState.Open        txtFrom.Text & "','" & txtTo.Text & "')"
Then                                                           MsgBox("O.R Number have been
           SQLcmd.Connection = conn                 added!", MsgBoxStyle.OkOnly +
           SQLcmd.CommandText = "UPDATE             MsgBoxStyle.Information, "O.R Number")
tblReceipt set [orFrom] = '" & txtFrom.Text & "',              SQLcmd.ExecuteNonQuery()
[orTo] = '" & txtTo.Text & "' where orFrom2 = '"               conn.Close()
& 1 & "'"                                                   End If
           SQLcmd.ExecuteNonQuery()                      Catch ex As Exception
           If Me.Text = "Edit OR" Then                      MsgBox(ex.Message)
              MsgBox("O.R Number have been               End Try
edited!", MsgBoxStyle.OkOnly +                         End Sub
MsgBoxStyle.Information, "O.R Number")
           Else                                        Private Sub Button2_Click(ByVal sender As
              MsgBox("O.R Number have been          System.Object, ByVal e As System.EventArgs)
added!", MsgBoxStyle.OkOnly +                       Handles Button2.Click
MsgBoxStyle.Information, "O.R Number")                   With frmMain
           End If                                           .Enabled = True
           conn.Close()                                     Me.Close()
        End If                                           End With
     Catch ex As Exception                             End Sub
        MsgBox(ex.Message)                             Public Sub compare()
     End Try                                             Call ConnectDatabase()
     With frmMain                                        Try
        .Enabled = True                                     If conn.State = ConnectionState.Open
        Me.Close()                                  Then
     End With                                                  SQLcmd.Connection = conn
   End Sub                                                     SQLcmd.CommandText = "SELECT *
                                                    FROM tblDaily where transOr = '" &
  Private Sub Button1_Click(ByVal sender As         txtFrom.Text & "'"
System.Object, ByVal e As System.EventArgs)                    Dim SQLread As SqlDataReader =
Handles Button1.Click                               SQLcmd.ExecuteReader
                                                               If SQLread.HasRows = 0 Then
79




             Call ORnumber()                      cmbTeller.Text & "','" & txtFull.Text & "','" &
          Else                                    "Not Updated" & "')"
             MsgBox("Or number already exist.",            Dim SQLRead As SqlDataReader =
vbCritical + vbOKOnly, "Or Number")               SQLcmd.ExecuteReader
             txtFrom.Text = ""                             MsgBox("Teller Added",
             txtTo.Text = ""                      vbInformation + vbOKOnly, "Add Teller")
             txtFrom.Focus()                             End If
          End If                                         conn.Close()
          conn.Close()                                 Catch ex As Exception
       End If                                            MsgBox(ex.Message)
    Catch ex As Exception                              End Try
       MsgBox(ex.Message)                           End Sub
    End Try
  End Sub                                            Private Sub Button1_Click(ByVal sender As
                                                  System.Object, ByVal e As System.EventArgs)
   Private Sub txtFrom_TextChanged(ByVal          Handles Button1.Click
sender As System.Object, ByVal e As                    If txtUsercode.Text = "" Or
System.EventArgs) Handles                         txtPassword.Text = "" Or cmbTeller.Text = "" Or
txtFrom.TextChanged                               txtFull.Text = "" Then
     txtFrom.Focus()                                      MsgBox("Please input necessary
   End Sub                                        inforamtion.", vbCritical + vbOKOnly, "Input")
End Class                                              Else
                                                          Call add()
                                                          frmMain.Show()
frmAddt.vb                                                frmMain.Enabled = True
                                                          Me.Close()
Imports System                                         End If
Imports System.Data                                  End Sub
Imports System.Data.SqlClient
Public Class frmAddT                                Private Sub Button2_Click(ByVal sender As
  Dim SQLcmd As New SqlCommand                    System.Object, ByVal e As System.EventArgs)
  Private Sub frmAddT_Load(ByVal sender As        Handles Button2.Click
System.Object, ByVal e As System.EventArgs)            frmMain.Show()
Handles MyBase.Load                                    frmMain.Enabled = True
                                                       Me.Close()
    End Sub
    Private Sub add()                               End Sub
      Call ConnectDatabase()
      Try                                           Private Sub Panel1_Paint(ByVal sender As
         If conn.State = ConnectionState.Open     System.Object, ByVal e As
Then                                              System.Windows.Forms.PaintEventArgs)
            SQLcmd.Connection = conn              Handles Panel1.Paint
            SQLcmd.CommandText = "INSERT
INTO tblTeller                                      End Sub
(Usercode,Password,Position,Name,Status)" & _     End Class
            "VALUES ('" & txtUsercode.Text &
"','" & txtPassword.Text & "','" &

More Related Content

Similar to Appendices

Kakfa summit london 2019 - the art of the event-streaming app
Kakfa summit london 2019 - the art of the event-streaming appKakfa summit london 2019 - the art of the event-streaming app
Kakfa summit london 2019 - the art of the event-streaming appNeil Avery
 
Micro services from scratch - Part 1
Micro services from scratch - Part 1Micro services from scratch - Part 1
Micro services from scratch - Part 1Azrul MADISA
 
Programming in Java: Control Flow
Programming in Java: Control FlowProgramming in Java: Control Flow
Programming in Java: Control FlowMartin Chapman
 
Software fundamentals
Software fundamentalsSoftware fundamentals
Software fundamentalsSusan Winters
 
The art of the event streaming application: streams, stream processors and sc...
The art of the event streaming application: streams, stream processors and sc...The art of the event streaming application: streams, stream processors and sc...
The art of the event streaming application: streams, stream processors and sc...confluent
 
Kafka summit SF 2019 - the art of the event-streaming app
Kafka summit SF 2019 - the art of the event-streaming appKafka summit SF 2019 - the art of the event-streaming app
Kafka summit SF 2019 - the art of the event-streaming appNeil Avery
 
Maintaining Your Code Clint Eastwood Style
Maintaining Your Code Clint Eastwood StyleMaintaining Your Code Clint Eastwood Style
Maintaining Your Code Clint Eastwood StyleRebecca Wirfs-Brock
 
Declarative presentations UIKonf
Declarative presentations UIKonfDeclarative presentations UIKonf
Declarative presentations UIKonfNataliya Patsovska
 
Software Architectures, Week 4 - Message-based Architectures, Message Bus
Software Architectures, Week 4 - Message-based Architectures, Message BusSoftware Architectures, Week 4 - Message-based Architectures, Message Bus
Software Architectures, Week 4 - Message-based Architectures, Message BusAngelos Kapsimanis
 
Clean Code: Chapter 3 Function
Clean Code: Chapter 3 FunctionClean Code: Chapter 3 Function
Clean Code: Chapter 3 FunctionKent Huang
 
White Paper On ConCurrency For PCMS Application Architecture
White Paper On ConCurrency For PCMS Application ArchitectureWhite Paper On ConCurrency For PCMS Application Architecture
White Paper On ConCurrency For PCMS Application ArchitectureShahzad
 
It Probably Works - QCon 2015
It Probably Works - QCon 2015It Probably Works - QCon 2015
It Probably Works - QCon 2015Fastly
 
Os sample mid exam
Os sample mid examOs sample mid exam
Os sample mid examMesfin123
 
Intro To C++ - Cass 11 - Converting between types, formatting floating point,...
Intro To C++ - Cass 11 - Converting between types, formatting floating point,...Intro To C++ - Cass 11 - Converting between types, formatting floating point,...
Intro To C++ - Cass 11 - Converting between types, formatting floating point,...Blue Elephant Consulting
 
Intro To C++ - Class 11 - Converting between types, formatting floating point...
Intro To C++ - Class 11 - Converting between types, formatting floating point...Intro To C++ - Class 11 - Converting between types, formatting floating point...
Intro To C++ - Class 11 - Converting between types, formatting floating point...Blue Elephant Consulting
 

Similar to Appendices (20)

Kakfa summit london 2019 - the art of the event-streaming app
Kakfa summit london 2019 - the art of the event-streaming appKakfa summit london 2019 - the art of the event-streaming app
Kakfa summit london 2019 - the art of the event-streaming app
 
OLT open script
OLT open script OLT open script
OLT open script
 
Micro services from scratch - Part 1
Micro services from scratch - Part 1Micro services from scratch - Part 1
Micro services from scratch - Part 1
 
Programming in Java: Control Flow
Programming in Java: Control FlowProgramming in Java: Control Flow
Programming in Java: Control Flow
 
Software fundamentals
Software fundamentalsSoftware fundamentals
Software fundamentals
 
The art of the event streaming application: streams, stream processors and sc...
The art of the event streaming application: streams, stream processors and sc...The art of the event streaming application: streams, stream processors and sc...
The art of the event streaming application: streams, stream processors and sc...
 
Kafka summit SF 2019 - the art of the event-streaming app
Kafka summit SF 2019 - the art of the event-streaming appKafka summit SF 2019 - the art of the event-streaming app
Kafka summit SF 2019 - the art of the event-streaming app
 
C# simplified
C#  simplifiedC#  simplified
C# simplified
 
Maintaining Your Code Clint Eastwood Style
Maintaining Your Code Clint Eastwood StyleMaintaining Your Code Clint Eastwood Style
Maintaining Your Code Clint Eastwood Style
 
Vbscript
VbscriptVbscript
Vbscript
 
Declarative presentations UIKonf
Declarative presentations UIKonfDeclarative presentations UIKonf
Declarative presentations UIKonf
 
Software Architectures, Week 4 - Message-based Architectures, Message Bus
Software Architectures, Week 4 - Message-based Architectures, Message BusSoftware Architectures, Week 4 - Message-based Architectures, Message Bus
Software Architectures, Week 4 - Message-based Architectures, Message Bus
 
Clean Code: Chapter 3 Function
Clean Code: Chapter 3 FunctionClean Code: Chapter 3 Function
Clean Code: Chapter 3 Function
 
White Paper On ConCurrency For PCMS Application Architecture
White Paper On ConCurrency For PCMS Application ArchitectureWhite Paper On ConCurrency For PCMS Application Architecture
White Paper On ConCurrency For PCMS Application Architecture
 
It Probably Works - QCon 2015
It Probably Works - QCon 2015It Probably Works - QCon 2015
It Probably Works - QCon 2015
 
Session2
Session2Session2
Session2
 
Os sample mid exam
Os sample mid examOs sample mid exam
Os sample mid exam
 
Intro To C++ - Cass 11 - Converting between types, formatting floating point,...
Intro To C++ - Cass 11 - Converting between types, formatting floating point,...Intro To C++ - Cass 11 - Converting between types, formatting floating point,...
Intro To C++ - Cass 11 - Converting between types, formatting floating point,...
 
Intro To C++ - Class 11 - Converting between types, formatting floating point...
Intro To C++ - Class 11 - Converting between types, formatting floating point...Intro To C++ - Class 11 - Converting between types, formatting floating point...
Intro To C++ - Class 11 - Converting between types, formatting floating point...
 
Introduction to Procedural Programming in C++
Introduction to Procedural Programming in C++Introduction to Procedural Programming in C++
Introduction to Procedural Programming in C++
 

Recently uploaded

New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 

Recently uploaded (20)

New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 

Appendices

  • 3. 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. Bueanas Emmanuel T. Sanchez Mark Jayson O. Osian
  • 4. 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. Bueanas Emmanuel T. Sanchez Mark Jayson O. Osian
  • 6. 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 Satisfactory 3 – Satisfactory 2 – Fair 1 – Poor 5 4 3 2 1 Criteria E VS S F P 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
  • 7. 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 Satisfactory 3 – Satisfactory 2 – Fair 1 – Poor 5 4 3 2 1 Criteria E VS S F P 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
  • 9. 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.
  • 10. 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.
  • 11. 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.
  • 12. 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.
  • 14. 66 frmAcceptBuildingP.vb vbCrLf + "Change: " & change, vbInformation + vbOKCancel, "Review") Imports System If a = vbOK Then Imports System.Data With frmReport Imports system.Data.SqlClient .lblOr.Text = lblOr.Text Imports CrystalDecisions.Shared End With Imports CrystalDecisions.CrystalRe If lblId.Text = "13" Then ports.Engine Call nature1() Public Class frmAcceptP Call save() Dim SQLcmd As New SqlCommand Call print() Else Dim Amount As String Call natures() Dim cusname As String Call save() Dim teller As String Call print() Dim collection As String Me.Close() Dim colDate As String End If Dim totalAmount As Integer Dim natureOfCol As String End If Dim pay(7) As String End If Dim nature(7) As String End Sub Private Sub frmAcceptP_Load(ByVal sender Private Sub Button2_Click(ByVal sender As As System.Object, ByVal e As System.Object, ByVal e As System.EventArgs) System.EventArgs) Handles MyBase.Load Handles btnCancel.Click With frmMain If lblId.Text = "1" Then .Enabled = True With frmBirthC Me.Close() cusname = .txtCust.Text End With teller = .lblName.Text With frmBirthC Amount = .lblTotal.Text .Close() lblOr.Text = .lblOr.Text End With If Amount = 50 Then End Sub natureOfCol = "Birth Certificate" Private Sub btnPrint_Click(ByVal sender As Else System.Object, ByVal e As System.EventArgs) natureOfCol = "Birth Certificate for Handles btnPrint.Click travel" Dim change As Integer End If If Val(txtCash.Text) < Val(lblAmount.Text) collection = "15" 'Birth Certificate Or txtCash.Text = "" Or Not End With IsNumeric(txtCash.Text) Then lblAmount.Text = Amount MsgBox("Insufficient cash. Please enter ElseIf lblId.Text = "2" Then valid fund!", vbCritical + vbOKOnly, With frmBurialP "Payment") cusname = .txtCust.Text txtCash.Text = "" teller = .lblName.Text txtCash.Focus() Amount = .lblTotal.Text Else lblOr.Text = .lblOr.Text change = Val(txtCash.Text) - natureOfCol = "Burial Permit" Val(lblAmount.Text) collection = "23" 'Burial Permit 'Label3.Text = change + ".00" End With Dim a As String lblAmount.Text = Amount a = MsgBox("Please review the ElseIf lblId.Text = "3" Then Information:" + vbCrLf + "Name: " + cusname + With frmMarriageC vbCrLf + "Amount: " + Amount + vbCrLf + cusname = .txtCust.Text teller = .lblName.Text
  • 15. 67 Amount = .lblTotal.Text Amount = .lblTotal.Text lblOr.Text = .lblOr.Text lblOr.Text = .lblOr.Text natureOfCol = "Marriage Certificate" natureOfCol = "Tax Declaration" collection = "24" 'Marriage Certificate collection = "18" 'Tax Declaration End With End With lblAmount.Text = Amount lblAmount.Text = Amount ElseIf lblId.Text = "4" Then ElseIf lblId.Text = "9" Then With frmMarriageL With frmTransferF cusname = .txtCust.Text cusname = .txtCust.Text teller = .lblName.Text teller = .lblName.Text Amount = .lblTotal.Text Amount = .lblTotal.Text lblOr.Text = .lblOr.Text lblOr.Text = .lblOr.Text natureOfCol = "Marriage License" natureOfCol = "Transfer Fee" collection = "26" 'Marriage License collection = "27" 'Transfer Fee End With End With lblAmount.Text = Amount lblAmount.Text = Amount ElseIf lblId.Text = "5" Then ElseIf lblId.Text = "10" Then With frmMayorsC With frmTransferT If .lblTotal.Text = "Php 0.00" Then cusname = .txtCust.Text .lblTotal.Text = "0.00" teller = .lblName.Text End If Amount = .lblTotal.Text cusname = .txtCust.Text lblOr.Text = .lblOr.Text teller = .lblName.Text natureOfCol = "Transfer Tax" Amount = .lblTotal.Text collection = "28" 'Transfer Tax lblOr.Text = .lblOr.Text End With natureOfCol = "Mayors Clearance" lblAmount.Text = Amount collection = "20" ' ElseIf lblId.Text = "11" Then End With With frmPoliceC lblAmount.Text = Amount cusname = .txtCust.Text ElseIf lblId.Text = "6" Then teller = .lblName.Text With frmMedicalC Amount = .lblTotal.Text cusname = .txtCust.Text lblOr.Text = .lblOr.Text teller = .lblName.Text natureOfCol = "Police Clearance" Amount = .lblTotal.Text collection = "17" 'Police Clearance lblOr.Text = .lblOr.Text End With natureOfCol = "Medical Certificate" lblAmount.Text = Amount collection = "25" 'Medical Certificate ElseIf lblId.Text = "12" Then End With With frmLocationalC lblAmount.Text = Amount cusname = .txtCust.Text ElseIf lblId.Text = "7" Then teller = .lblName.Text With frmTaxC Amount = .lblTotal.Text cusname = .txtCust.Text lblOr.Text = .lblOr.Text teller = .lblName.Text natureOfCol = "Locational Clearance" Amount = .lblTotal.Text collection = "22" 'Locational Clearance lblOr.Text = .lblOr.Text End With natureOfCol = "Tax Clearance" lblAmount.Text = Amount collection = "21" 'Tax Clearance End With ElseIf lblId.Text = "13" Then lblAmount.Text = Amount With frmBusinessP ElseIf lblId.Text = "8" Then cusname = .txtCust.Text With frmTaxD teller = .lblName.Text cusname = .txtCust.Text Amount = .lblTotal.Text teller = .lblName.Text lblOr.Text = .lblOr.Text
  • 16. 68 natureOfCol = "Building Permit" SQLcmd.Connection = conn collection = "2" 'Building Permit SQLcmd.CommandText = "INSERT '********* *********' INTO tblDaily pay(0) = .txtPay1.Text (natureOfCol,colDate,colAmount,transOr,transT pay(1) = .txtPay2.Text eller)" & _ pay(2) = .txtPay3.Text "VALUES ('" & collection & "','" & pay(3) = .txtPay4.Text colDate & "','" & Amount & "','" & lblOr.Text & pay(4) = .txtPay5.Text "','" & teller & "')" pay(5) = .txtPay6.Text SQLcmd.ExecuteNonQuery() pay(6) = .txtPay7.Text conn.Close() pay(7) = .txtPay8.Text End If '********** *********' Catch ex As Exception nature(0) = "Mayors Permit" MsgBox(ex.Message) nature(1) = "Sanitary Inspection Fee" End Try nature(2) = "Police Clearance" Call ConnectDatabase() nature(3) = "Fire Inspection Fee" Try nature(4) = "Business Name Plate" If conn.State = ConnectionState.Open nature(5) = "Engineering Inspection Then Fee" SQLcmd.Connection = conn nature(6) = "Garbage Fee" SQLcmd.CommandText = "INSERT nature(7) = "Service Fee Health" INTO tblDaily End With (natureOfCol,colDate,colAmount,transOr,transT lblAmount.Text = Amount eller)" & _ End If "VALUES ('" & collection & "','" & colDate & "','" & Amount & "','" & lblOr.Text & End Sub "','" & teller & "')" Public Sub natures() SQLcmd.ExecuteNonQuery() colDate = Now.Date conn.Close() Call ConnectDatabase() End If Try Catch ex As Exception If conn.State = ConnectionState.Open MsgBox(ex.Message) Then End Try SQLcmd.Connection = conn Call ConnectDatabase() SQLcmd.CommandText = "INSERT Try INTO tblDaily If conn.State = ConnectionState.Open (natureOfCol,colDate,colAmount,transOr,transT Then eller)" & _ SQLcmd.Connection = conn "VALUES ('" & collection & "','" & SQLcmd.CommandText = "INSERT colDate & "','" & Amount & "','" & lblOr.Text & INTO tblDaily "','" & teller & "')" (natureOfCol,colDate,colAmount,transOr,transT SQLcmd.ExecuteNonQuery() eller)" & _ conn.Close() "VALUES ('" & collection & "','" & End If colDate & "','" & Amount & "','" & lblOr.Text & Catch ex As Exception "','" & teller & "')" MsgBox(ex.Message) SQLcmd.ExecuteNonQuery() End Try conn.Close() End Sub End If Public Sub nature1() Catch ex As Exception colDate = Now.Date MsgBox(ex.Message) Call ConnectDatabase() End Try Try Call ConnectDatabase() If conn.State = ConnectionState.Open Try Then
  • 17. 69 If conn.State = ConnectionState.Open Try Then If conn.State = ConnectionState.Open SQLcmd.Connection = conn Then SQLcmd.CommandText = "INSERT SQLcmd.Connection = conn INTO tblDaily SQLcmd.CommandText = "INSERT (natureOfCol,colDate,colAmount,transOr,transT INTO tblDaily eller)" & _ (natureOfCol,colDate,colAmount,transOr,transT "VALUES ('" & collection & "','" & eller)" & _ colDate & "','" & Amount & "','" & lblOr.Text & "VALUES ('" & collection & "','" & "','" & teller & "')" colDate & "','" & Amount & "','" & lblOr.Text & SQLcmd.ExecuteNonQuery() "','" & teller & "')" conn.Close() SQLcmd.ExecuteNonQuery() End If conn.Close() Catch ex As Exception End If MsgBox(ex.Message) Catch ex As Exception End Try MsgBox(ex.Message) Call ConnectDatabase() End Try Try Call ConnectDatabase() If conn.State = ConnectionState.Open Try Then If conn.State = ConnectionState.Open SQLcmd.Connection = conn Then SQLcmd.CommandText = "INSERT SQLcmd.Connection = conn INTO tblDaily SQLcmd.CommandText = "INSERT (natureOfCol,colDate,colAmount,transOr,transT INTO tblDaily eller)" & _ (natureOfCol,colDate,colAmount,transOr,transT "VALUES ('" & collection & "','" & eller)" & _ colDate & "','" & Amount & "','" & lblOr.Text & "VALUES ('" & collection & "','" & "','" & teller & "')" colDate & "','" & Amount & "','" & lblOr.Text & SQLcmd.ExecuteNonQuery() "','" & teller & "')" conn.Close() SQLcmd.ExecuteNonQuery() End If conn.Close() Catch ex As Exception End If MsgBox(ex.Message) Catch ex As Exception End Try MsgBox(ex.Message) Call ConnectDatabase() End Try Try End Sub If conn.State = ConnectionState.Open Then Public Sub save1() SQLcmd.Connection = conn Dim amountInDigit As String SQLcmd.CommandText = "INSERT Dim q As Integer INTO tblDaily q = lblOr.Text + 1 (natureOfCol,colDate,colAmount,transOr,transT amountInDigit = NumberToString(Amount) eller)" & _ Call ConnectDatabase() "VALUES ('" & collection & "','" & Try colDate & "','" & Amount & "','" & lblOr.Text & If conn.State = ConnectionState.Open "','" & teller & "')" Then SQLcmd.ExecuteNonQuery() SQLcmd.Connection = conn conn.Close() SQLcmd.CommandText = "INSERT End If INTO tblTempReceipt Catch ex As Exception (orNumber,cusName,date,amountToPay,amount MsgBox(ex.Message) ToPayDigit,payment,tellerName,natureOfCol)" End Try &_ Call ConnectDatabase()
  • 18. 70 "VALUES ('" & lblOr.Text & "','" & Call ConnectDatabase() cusname & "','" & colDate & "','" & pay(0) & Try "','" & amountInDigit & "','" & txtCash.Text & If conn.State = ConnectionState.Open "','" & teller & "','" & nature(0) & "')" Then Dim SQLRead As SqlDataReader = SQLcmd.Connection = conn SQLcmd.ExecuteReader SQLcmd.CommandText = "INSERT End If INTO tblTempReceipt conn.Close() (orNumber,cusName,date,amountToPay,amount Catch ex As Exception ToPayDigit,payment,tellerName,natureOfCol)" MsgBox(ex.Message) &_ End Try "VALUES ('" & lblOr.Text & "','" & Call ConnectDatabase() cusname & "','" & colDate & "','" & pay(3) & Try "','" & amountInDigit & "','" & txtCash.Text & If conn.State = ConnectionState.Open "','" & teller & "','" & nature(3) & "')" Then Dim SQLRead As SqlDataReader = SQLcmd.Connection = conn SQLcmd.ExecuteReader SQLcmd.CommandText = "INSERT End If INTO tblTempReceipt conn.Close() (orNumber,cusName,date,amountToPay,amount Catch ex As Exception ToPayDigit,payment,tellerName,natureOfCol)" MsgBox(ex.Message) &_ End Try "VALUES ('" & lblOr.Text & "','" & Call ConnectDatabase() cusname & "','" & colDate & "','" & pay(1) & Try "','" & amountInDigit & "','" & txtCash.Text & If conn.State = ConnectionState.Open "','" & teller & "','" & nature(1) & "')" Then Dim SQLRead As SqlDataReader = SQLcmd.Connection = conn SQLcmd.ExecuteReader SQLcmd.CommandText = "INSERT End If INTO tblTempReceipt conn.Close() (orNumber,cusName,date,amountToPay,amount Catch ex As Exception ToPayDigit,payment,tellerName,natureOfCol)" MsgBox(ex.Message) &_ End Try "VALUES ('" & lblOr.Text & "','" & Call ConnectDatabase() cusname & "','" & colDate & "','" & pay(4) & Try "','" & amountInDigit & "','" & txtCash.Text & If conn.State = ConnectionState.Open "','" & teller & "','" & nature(4) & "')" Then Dim SQLRead As SqlDataReader = SQLcmd.Connection = conn SQLcmd.ExecuteReader SQLcmd.CommandText = "INSERT End If INTO tblTempReceipt conn.Close() (orNumber,cusName,date,amountToPay,amount Catch ex As Exception ToPayDigit,payment,tellerName,natureOfCol)" MsgBox(ex.Message) &_ End Try "VALUES ('" & lblOr.Text & "','" & Call ConnectDatabase() cusname & "','" & colDate & "','" & pay(2) & Try "','" & amountInDigit & "','" & txtCash.Text & If conn.State = ConnectionState.Open "','" & teller & "','" & nature(2) & "')" Then Dim SQLRead As SqlDataReader = SQLcmd.Connection = conn SQLcmd.ExecuteReader SQLcmd.CommandText = "INSERT End If INTO tblTempReceipt conn.Close() (orNumber,cusName,date,amountToPay,amount Catch ex As Exception ToPayDigit,payment,tellerName,natureOfCol)" MsgBox(ex.Message) &_ End Try
  • 19. 71 "VALUES ('" & lblOr.Text & "','" & Call ConnectDatabase() cusname & "','" & colDate & "','" & pay(5) & Try "','" & amountInDigit & "','" & txtCash.Text & If conn.State = ConnectionState.Open "','" & teller & "','" & nature(5) & "')" Then Dim SQLRead As SqlDataReader = SQLcmd.Connection = conn SQLcmd.ExecuteReader SQLcmd.CommandText = "UPDATE End If tblReceipt set orFrom = '" & q & "'" conn.Close() Dim SQLRead As SqlDataReader = Catch ex As Exception SQLcmd.ExecuteReader MsgBox(ex.Message) End If End Try conn.Close() Call ConnectDatabase() Catch ex As Exception Try MsgBox(ex.Message) If conn.State = ConnectionState.Open End Try Then End Sub SQLcmd.Connection = conn Public Sub save() SQLcmd.CommandText = "INSERT Dim amountInDigit As String INTO tblTempReceipt Dim q As Integer (orNumber,cusName,date,amountToPay,amount q = lblOr.Text + 1 ToPayDigit,payment,tellerName,natureOfCol)" amountInDigit = NumberToString(Amount) &_ Call ConnectDatabase() "VALUES ('" & lblOr.Text & "','" & Try cusname & "','" & colDate & "','" & pay(6) & If conn.State = ConnectionState.Open "','" & amountInDigit & "','" & txtCash.Text & Then "','" & teller & "','" & nature(6) & "')" SQLcmd.Connection = conn Dim SQLRead As SqlDataReader = SQLcmd.CommandText = "INSERT SQLcmd.ExecuteReader INTO tblTempReceipt End If (orNumber,cusName,date,amountToPay,amount conn.Close() ToPayDigit,payment,tellerName,natureOfCol)" Catch ex As Exception &_ MsgBox(ex.Message) "VALUES ('" & lblOr.Text & "','" & End Try cusname & "','" & colDate & "','" & Amount & Call ConnectDatabase() "','" & amountInDigit & "','" & Amount & "','" & Try teller & "','" & natureOfCol & "')" If conn.State = ConnectionState.Open Dim SQLRead As SqlDataReader = Then SQLcmd.ExecuteReader SQLcmd.Connection = conn End If SQLcmd.CommandText = "INSERT conn.Close() INTO tblTempReceipt Catch ex As Exception (orNumber,cusName,date,amountToPay,amount MsgBox(ex.Message) ToPayDigit,payment,tellerName,natureOfCol)" End Try &_ Call ConnectDatabase() "VALUES ('" & lblOr.Text & "','" & Try cusname & "','" & colDate & "','" & pay(7) & If conn.State = ConnectionState.Open "','" & amountInDigit & "','" & txtCash.Text & Then "','" & teller & "','" & nature(7) & "')" SQLcmd.Connection = conn Dim SQLRead As SqlDataReader = SQLcmd.CommandText = "UPDATE SQLcmd.ExecuteReader tblReceipt set orFrom = '" & q & "'" End If Dim SQLRead As SqlDataReader = conn.Close() SQLcmd.ExecuteReader Catch ex As Exception End If MsgBox(ex.Message) conn.Close() End Try Catch ex As Exception
  • 20. 72 MsgBox(ex.Message) If use_us_group_names Then End Try groups = New String() {"", "thousand", End Sub "million", "billion", "trillion", "quadrillion", "quintillion", "sextillion", "septillion", Sub print() "octillion", "nonillion", "decillion", Call ConnectDatabase() "undecillion", "duodecillion", "tredecillion", "quattuordecillion", "quindecillion", Dim SQLcmd As String "sexdecillion", "septendecillion", "octodecillion", "novemdecillion", SQLcmd = "SELECT * FROM "vigintillion"} tblTempReceipt WHERE orNumber = '" & Else lblOr.Text & "'" groups = New String() {"", "thousand", "million", "milliard", "billion", "1000 billion", "trillion", "1000 trillion", "quadrillion", "1000 Dim SQLAdapter As New quadrillion", "quintillion", "1000 quintillion", SqlDataAdapter(SQLcmd, conn) "sextillion", "1000 sextillion", "septillion", "1000 Dim SQLSet As New DataSet septillion", "octillion", "1000 octillion", "nonillion", "1000 nonillion", "decillion", "1000 SQLAdapter.Fill(SQLSet, "tblTempReceipt decillion"} WHERE orNumber = '" & lblOr.Text & "'") End If Dim report As String = ' Clean the string a bit. Application.StartupPath + "receipt.rpt" ' Remove "$", ",", leading zeros, and ' anything after a decimal point. If Not IO.File.Exists(report) Then Const CURRENCY As String = "$" Throw (New Exception("Unable to locate Const SEPARATOR As String = "," report file:" & _ Const DECIMAL_POINT As String = "." vbCrLf & report)) num_str = num_str.Replace(CURRENCY, End If "").Replace(SEPARATOR, "") num_str = num_str.TrimStart(New Char() Dim document As New ReportDocument {"0"c}) Dim pos As Integer = document.Load(report) num_str.IndexOf(DECIMAL_POINT) If pos = 0 Then document.SetDataSource(SQLSet.Tables("tblTe Return "zero" mpReceipt WHERE orNumber = '" & lblOr.Text ElseIf pos > 0 Then & "'")) num_str = num_str.Substring(0, pos - 1) End If With frmReport .rptViewer.ShowRefreshButton = False ' See how many groups there will be. .rptViewer.ShowCloseButton = False Dim num_groups As Integer = .rptViewer.ShowGroupTreeButton = (num_str.Length + 2) 3 False .rptViewer.ReportSource = document ' Pad so length is a multiple of 3. .Show() num_str = num_str.PadLeft(num_groups * End With 3, " "c) End Sub Private Function NumberToString(ByVal ' Process the groups, largest first. num_str As String, Optional ByVal Dim result As String = "" use_us_group_names As Boolean = True) As Dim group_num As Integer String For group_num = num_groups - 1 To 0 Step ' Get the appropiate group names. -1 Dim groups() As String ' Get the next three digits.
  • 21. 73 Dim group_str As String = End If num_str.Substring(0, 3) num_str = num_str.Substring(3) ' If num = 0, we have hundreds only. Dim group_value As Integer = If num = 0 Then Return result.Trim() CInt(group_str) ' See if the rest is less than 20. ' Convert the group into words. If num < 20 Then If group_value > 0 Then ' Look up the correct name. If group_num >= groups.Length Then result &= " " & one_to_nineteen(num) result &= Else GroupToWords(group_value) & _ ' Handle the tens digit. " ?, " digit = num 10 Else num = num Mod 10 result &= result &= " " & multiples_of_ten(digit - GroupToWords(group_value) & _ 2) " " & groups(group_num) & ", " End If ' Handle the final digit. End If If num > 0 Then Next group_num result &= " " & one_to_nineteen(num) End If ' Remove the trailing ", ". End If If result.EndsWith(", ") Then result = result.Substring(0, result.Length Return result.Trim() - 2) End Function End If End Class Return result.Trim() frmLogin.vb End Function Imports System ' Convert a number between 0 and 999 into Imports System.Data words. Imports System.Data.SqlClient Private Function GroupToWords(ByVal num Public Class frmLogin As Integer) As String Dim SQLcmd As New SqlCommand Static one_to_nineteen() As String = Dim a As Boolean {"zero", "one", "two", "three", "four", "five", Dim status As String "six", "seven", "eight", "nine", "ten", "eleven", Dim tellerName As String "twelve", "thirteen", "fourteen", "fifteen", Private Sub frmLogin_Load(ByVal sender As "sixteen", "seventeen", "eightteen", "nineteen"} System.Object, ByVal e As System.EventArgs) Static multiples_of_ten() As String = Handles MyBase.Load {"twenty", "thirty", "forty", "fifty", "sixty", End Sub "seventy", "eighty", "ninety"} Public Sub acc() Static note As Integer ' If the number is 0, return an empty string. Call ConnectDatabase() If num = 0 Then Return "" Try If conn.State = ConnectionState.Open ' Handle the hundreds digit. Then Dim digit As Integer SQLcmd.Connection = conn Dim result As String = "" SQLcmd.CommandText = "SELECT * If num > 99 Then FROM tblTeller WHERE Usercode = '" & digit = num 100 txtCode.Text & "' AND Password = '" & num = num Mod 100 txtPass.Text & "'" result = one_to_nineteen(digit) & " Dim SQLread As SqlDataReader = hundred" SQLcmd.ExecuteReader
  • 22. 74 While SQLread.Read() With frmMain .Panel3.Visible = True .tsName.Text = SQLread("Name") .ToolStripButton5.Visible .tsPosition.Text = = False SQLread("Position") .Label2.Text = "Logout" .tsPositionT.Visible = True .tsUser.Visible = True .TransactionToolStripMenuItem1.Visible = True End With tellerName = SQLread("Name") .Window5ToolStripMenuItem.Visible = False End While If SQLread.HasRows = 0 Then .Window6ToolStripMenuItem.Visible = False conn.Close() MsgBox("Username/Password is .ORNumberToolStripMenuItem1.Visible = False Incorrect!" + vbCrLf + vbCrLf + "You have " & .ToolStripButton6.Visible 4 - note & " more attempts before being" + = False vbCrLf + "locked out of the system.", .ToolStripButton8.Visible MsgBoxStyle.Critical + MsgBoxStyle.OkOnly, = True "Error") Label7.Visible = True .AddTellerToolStripMenuItem1.Visible = False note = note + 1 If note = 5 Then .LogoutToolStripMenuItem1.Visible = True MsgBox("You have reached the .Button3.Visible = True maximum trial!" & vbCrLf & vbCrLf & "The System will be Locked and Terminated.", MsgBoxStyle.Exclamation + .UtilitiesToolStripMenuItem1.Visible = True MsgBoxStyle.OkOnly, "Security Access") End .BackUpDatabaseToolStripMenuItem.Visible = End If False txtPass.Text = "" txtCode.Text = "" .ORNumberToolStripMenuItem1.Visible = False Label5.Text = 5 - note txtCode.Focus() .AccountToolStripMenuItem.Visible = False Else Call verify() .AddTellerToolStripMenuItem2.Visible = False If status = "Not Updated" Then MsgBox("Your account is not yet .EditTellerToolStripMenuItem1.Visible = False verified.", vbCritical + vbOKOnly) frmMain.Show() .EditAccountToolStripMenuItem.Visible = True frmMain.Enabled = False frmUpdateT.Show() frmUpdateT.BringToFront() .Window4ToolStripMenuItem.Visible = False Me.Close() Else .Window5ToolStripMenuItem.Visible = False With frmMain frmMain.Enabled = True .Window6ToolStripMenuItem.Visible = False .tsReady2.Text = "Ready" .birthC.Visible = False .Button3.ForeColor = .marriageC.Visible = False Color.ForestGreen .marriageL.Visible = False If lblPosition.Text = "Teller 1" .mayorC.Visible = False Then .policeC.Visible = False With frmMain .taxC.Visible = False .taxD.Visible = False
  • 23. 75 .transferF.Visible = False .transferT.Visible = False .AddTellerToolStripMenuItem2.Visible = False .burialP.Visible = False .medicalC.Visible = False .EditTellerToolStripMenuItem1.Visible = False End With .EditAccountToolStripMenuItem.Visible = True CreateObject("SAPI.SpVoice").Speak("Welcom e, Teller 1") ElseIf lblPosition.Text = .Window4ToolStripMenuItem.Visible = False "Teller 2" Then With frmMain .Window5ToolStripMenuItem.Visible = False .Panel2.Visible = True .Window6ToolStripMenuItem.Visible = False .Button3.Visible = True .ToolStripButton5.Visible .businessP.Visible = False = False .lC.Visible = False .Label2.Text = "Logout" .buildingP.Visible = False .marriageL.Visible = False .TransactionToolStripMenuItem1.Visible = True .mayorC.Visible = False .transferF.Visible = False .Window4ToolStripMenuItem.Visible = False .transferT.Visible = False End With .Window6ToolStripMenuItem.Visible = False CreateObject("SAPI.SpVoice").Speak("Welcom .ORNumberToolStripMenuItem1.Visible = False e, Teller 2") .Button4.Visible = True ElseIf lblPosition.Text = .Label3.Visible = True "Teller 3" Then .Button5.Visible = True With frmMain .Label4.Visible = True .Button6.Visible = True .Panel4.Visible = True .Label5.Visible = True .Button7.Visible = True .Label6.Visible = True .ToolStripButton5.Visible .Button8.Visible = True = False .Label7.Visible = True .Label2.Text = "Logout" .ToolStripButton6.Visible = False .TransactionToolStripMenuItem1.Visible = True .ToolStripButton8.Visible = True .Window4ToolStripMenuItem.Visible = False .AddTellerToolStripMenuItem1.Visible = False .Window5ToolStripMenuItem.Visible = False .LogoutToolStripMenuItem1.Visible = True .Window6ToolStripMenuItem.Visible = False .ORNumberToolStripMenuItem1.Visible = False .UtilitiesToolStripMenuItem1.Visible = True .Button4.Visible = True .Label3.Visible = True .BackUpDatabaseToolStripMenuItem.Visible = .Button5.Visible = True False .Label4.Visible = True .Button6.Visible = True .ORNumberToolStripMenuItem1.Visible = False .Label5.Visible = True .Button7.Visible = True .AccountToolStripMenuItem.Visible = False .Label6.Visible = True
  • 24. 76 .Button8.Visible = True .Label7.Visible = True .CollectionToolStripMenuItem1.Visible = True .ToolStripButton6.Visible = False .TransactionToolStripMenuItem1.Visible = True .ToolStripButton8.Visible = True .Window4ToolStripMenuItem.Visible = True .AddTellerToolStripMenuItem1.Visible = False .Window5ToolStripMenuItem.Visible = True .Button4.Visible = True .LogoutToolStripMenuItem1.Visible = True .Label3.Visible = True .Button5.Visible = True .Label4.Visible = True .UtilitiesToolStripMenuItem1.Visible = True .Button6.Visible = True .Label5.Visible = True .BackUpDatabaseToolStripMenuItem.Visible = .Button7.Visible = True False .Label6.Visible = True .Button8.Visible = True .ORNumberToolStripMenuItem1.Visible = False .Label7.Visible = True .ToolStripButton6.Visible .AccountToolStripMenuItem.Visible = False = False .ToolStripButton8.Visible .AddTellerToolStripMenuItem2.Visible = False = True .EditTellerToolStripMenuItem1.Visible = False .AddTellerToolStripMenuItem1.Visible = False .EditAccountToolStripMenuItem.Visible = True .LogoutToolStripMenuItem1.Visible = True .Button3.Visible = True .birthC.Visible = False .Window4ToolStripMenuItem.Visible = False .marriageC.Visible = False .marriageL.Visible = False .Window5ToolStripMenuItem.Visible = False .mayorC.Visible = False .policeC.Visible = False .Window6ToolStripMenuItem.Visible = False .taxC.Visible = False .marriageL.Visible = False .taxD.Visible = False .mayorC.Visible = False .transferF.Visible = False .transferF.Visible = False .transferT.Visible = False .transferT.Visible = False .burialP.Visible = False .buildingP.Visible = False .medicalC.Visible = False .businessP.Visible = False .buildingP.Visible = False .lC.Visible = False .businessP.Visible = False End With .lC.Visible = False CreateObject("SAPI.SpVoice").Speak("Welcom .ORNumberToolStripMenuItem.Visible = True e, Teller 3") ElseIf lblPosition.Text = .EditAccountToolStripMenuItem.Visible = False "Administrator" Then With frmMain .BackUpDatabaseToolStripMenuItem.Visible = .ToolStripButton5.Visible True = True .Label2.Text = "Logout" .ORNumberToolStripMenuItem1.Visible = True .UtilitiesToolStripMenuItem1.Visible = True .AccountToolStripMenuItem.Visible = True
  • 25. 77 Dim SQLread As SqlDataReader = .AddTellerToolStripMenuItem2.Visible = True SQLcmd.ExecuteReader While SQLread.Read() .EditTellerToolStripMenuItem1.Visible = True lblPosition.Text = SQLread("Position") CreateObject("SAPI.SpVoice").Speak("Welcom a = True e, Administrator") End While End With conn.Close() End If End If Catch ex As Exception End With MsgBox(ex.Message) Me.Close() End Try note = 0 End Sub End If Private Sub Button1_Click(ByVal sender As End If System.Object, ByVal e As System.EventArgs) End If Handles Button1.Click conn.Close() Call acc() Catch ex As Exception Dim a As String MsgBox(ex.Message) a = Now.ToLongTimeString End Try With frmMain .Label10.Text = a End Sub End With Public Sub verify() End Sub conn.Close() Private Sub Button2_Click(ByVal sender As Call ConnectDatabase() System.Object, ByVal e As System.EventArgs) Try Handles Button2.Click If conn.State = ConnectionState.Open With frmMain Then .Enabled = True SQLcmd.Connection = conn Me.Close() SQLcmd.CommandText = "SELECT * End With FROM tblTeller where Usercode = '" & End Sub txtCode.Text & "'" Dim SQLread As SqlDataReader = Private Sub txtCode_LostFocus(ByVal sender SQLcmd.ExecuteReader As Object, ByVal e As System.EventArgs) While SQLread.Read() Handles txtCode.LostFocus status = SQLread("status") Call position() End While If txtCode.Text = "" Then conn.Close() a = True End If End If Catch ex As Exception If a = False Then MsgBox(ex.Message) MsgBox("Your a unathorized person !", End Try vbCritical + vbOKOnly, "Login") conn.Close() txtCode.Text = "" End Sub txtCode.Focus() Public Sub position() lblPosition.Text = "" Call ConnectDatabase() End If Try a = False If conn.State = ConnectionState.Open End Sub Then SQLcmd.Connection = conn Private Sub Label7_Click(ByVal sender As SQLcmd.CommandText = "SELECT * System.Object, ByVal e As System.EventArgs) FROM tblTeller where Usercode = '" & Handles Label7.Click txtCode.Text & "'" frmForgotP.Show()
  • 26. 78 Me.Hide() If Val(txtFrom.Text) >= Val(txtTo.Text) End Sub Then MsgBox("Invalid action. OR To is less End Class than OR From.", vbCritical + vbOKOnly, "Invalid Action") frmOR.vb txtFrom.Text = "" txtTo.Text = "" Imports System txtFrom.Focus() Imports System.Data Else Imports System.Data.SqlClient Call compare() Public Class frmOR End If Dim SQLcmd As New SqlCommand Private Sub frmOR_Load(ByVal sender As End Sub System.Object, ByVal e As System.EventArgs) Public Sub insert() Handles MyBase.Load Call ConnectDatabase() Try End Sub If conn.State = ConnectionState.Open Public Sub ORnumber() Then conn.Close() SQLcmd.Connection = conn Call ConnectDatabase() SQLcmd.CommandText = "INSERT Try INTO tblReceipt (orFrom,orTo) VALUES ('" & If conn.State = ConnectionState.Open txtFrom.Text & "','" & txtTo.Text & "')" Then MsgBox("O.R Number have been SQLcmd.Connection = conn added!", MsgBoxStyle.OkOnly + SQLcmd.CommandText = "UPDATE MsgBoxStyle.Information, "O.R Number") tblReceipt set [orFrom] = '" & txtFrom.Text & "', SQLcmd.ExecuteNonQuery() [orTo] = '" & txtTo.Text & "' where orFrom2 = '" conn.Close() & 1 & "'" End If SQLcmd.ExecuteNonQuery() Catch ex As Exception If Me.Text = "Edit OR" Then MsgBox(ex.Message) MsgBox("O.R Number have been End Try edited!", MsgBoxStyle.OkOnly + End Sub MsgBoxStyle.Information, "O.R Number") Else Private Sub Button2_Click(ByVal sender As MsgBox("O.R Number have been System.Object, ByVal e As System.EventArgs) added!", MsgBoxStyle.OkOnly + Handles Button2.Click MsgBoxStyle.Information, "O.R Number") With frmMain End If .Enabled = True conn.Close() Me.Close() End If End With Catch ex As Exception End Sub MsgBox(ex.Message) Public Sub compare() End Try Call ConnectDatabase() With frmMain Try .Enabled = True If conn.State = ConnectionState.Open Me.Close() Then End With SQLcmd.Connection = conn End Sub SQLcmd.CommandText = "SELECT * FROM tblDaily where transOr = '" & Private Sub Button1_Click(ByVal sender As txtFrom.Text & "'" System.Object, ByVal e As System.EventArgs) Dim SQLread As SqlDataReader = Handles Button1.Click SQLcmd.ExecuteReader If SQLread.HasRows = 0 Then
  • 27. 79 Call ORnumber() cmbTeller.Text & "','" & txtFull.Text & "','" & Else "Not Updated" & "')" MsgBox("Or number already exist.", Dim SQLRead As SqlDataReader = vbCritical + vbOKOnly, "Or Number") SQLcmd.ExecuteReader txtFrom.Text = "" MsgBox("Teller Added", txtTo.Text = "" vbInformation + vbOKOnly, "Add Teller") txtFrom.Focus() End If End If conn.Close() conn.Close() Catch ex As Exception End If MsgBox(ex.Message) Catch ex As Exception End Try MsgBox(ex.Message) End Sub End Try End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Private Sub txtFrom_TextChanged(ByVal Handles Button1.Click sender As System.Object, ByVal e As If txtUsercode.Text = "" Or System.EventArgs) Handles txtPassword.Text = "" Or cmbTeller.Text = "" Or txtFrom.TextChanged txtFull.Text = "" Then txtFrom.Focus() MsgBox("Please input necessary End Sub inforamtion.", vbCritical + vbOKOnly, "Input") End Class Else Call add() frmMain.Show() frmAddt.vb frmMain.Enabled = True Me.Close() Imports System End If Imports System.Data End Sub Imports System.Data.SqlClient Public Class frmAddT Private Sub Button2_Click(ByVal sender As Dim SQLcmd As New SqlCommand System.Object, ByVal e As System.EventArgs) Private Sub frmAddT_Load(ByVal sender As Handles Button2.Click System.Object, ByVal e As System.EventArgs) frmMain.Show() Handles MyBase.Load frmMain.Enabled = True Me.Close() End Sub Private Sub add() End Sub Call ConnectDatabase() Try Private Sub Panel1_Paint(ByVal sender As If conn.State = ConnectionState.Open System.Object, ByVal e As Then System.Windows.Forms.PaintEventArgs) SQLcmd.Connection = conn Handles Panel1.Paint SQLcmd.CommandText = "INSERT INTO tblTeller End Sub (Usercode,Password,Position,Name,Status)" & _ End Class "VALUES ('" & txtUsercode.Text & "','" & txtPassword.Text & "','" &