Professional Documents
Culture Documents
Appendix A
Relevant Source Code
Imports System.Data
Imports System.Data.SqlClient
Imports System
Public Class Login info
Dim conn As SqlConnection
Dim cn As New SqlConnection("Data Source = DESKTOP-CPNQCCI;
integrated Security = true;" & "Initial Catalog = StudentAttendanceSystem")
Dim cmd As New SqlCommand
Dim dr As SqlDataReader
Dim dr2 As SqlDataReader
Dim sql_command As SqlClient.SqlCommand
cn.Close()
cn.Open()
Dim cmd As New SqlCommand("SELECT * FROM tbllogininfo WHERE
IDNo = @IDNo And Password = @Password", cn)
cmd.Parameters.AddWithValue("@IDNo", txtIDno.Text)
cmd.Parameters.AddWithValue("@Password", txtpass.Text)
Dim sdr As SqlDataReader = cmd.ExecuteReader()
Try
If (sdr.Read() = True) Then
GoTo inn
Else
MsgBox("Invalid ID", MsgBoxStyle.Critical)
txtIDno.Text = ""
txtpass.Text = ""
txtIDno.Focus()
Exit Sub
inn:
If sdr("Authority") = "Councilor" Then
authority.Text = "Councilor"
txtIDno.Text = ""
txtpass.Text = ""
' authority.Text = ""
'MsgBox("Successfully Login")
Agendainfo.Label19.Text = authority.Text
Me.Hide()
Agendainfo.Show()
Agendainfo.Button2.Enabled = True
Agendainfo.FileMaintenanceToolStripMenuItem.Enabled = False
Agendainfo.MasterListToolStripMenuItem.Enabled = True
Agendainfo.Button3.Enabled = True
Else
If sdr("Authority") = "President" Then
authority.Text = "President"
txtIDno.Text = ""
txtpass.Text = ""
'authority.Text = ""
Me.Hide()
Agendainfo.Show()
Agendainfo.btnadd.Enabled = True
Agendainfo.btnsave.Enabled = True
Agendainfo.btnedit.Enabled = True
Agendainfo.btncancel.Enabled = True
Agendainfo.Button2.Enabled = True
Agendainfo.btncancel.Enabled = True
Agendainfo.Button3.Enabled = True
Agendainfo.Label19.Text = authority.Text
Else
If sdr("Authority") = "IT" Then
authority.Text = "IT"
txtIDno.Text = ""
txtpass.Text = ""
'authority.Text = ""
Me.Hide()
Agendainfo.Show()
Agendainfo.btnadd.Enabled = True
Agendainfo.btnsave.Enabled = True
Agendainfo.btnedit.Enabled = True
Agendainfo.btncancel.Enabled = True
Agendainfo.Button2.Enabled = True
Agendainfo.btncancel.Enabled = True
Agendainfo.Label19.Text = authority.Text
Exit Sub
End If
End If
End If
End If
Catch ex As Exception
End Try
cn.Close()
End Sub
'Private Sub keypress_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles Button1.KeyPress,
txtpass.KeyPress
Me.Close()
End Sub
End Sub
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
Imports Excel = Microsoft.Office.Interop.Excel
newid2.Focus()
autoid()
End Sub
'Show sa Auto ID
Else
Exit Sub
End If
cn.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Sub retrieve_picture()
'Dim command As New SqlCommand(" Select * from tblattendanceinfo
where IDNo = '" & txtIDno.Text & " '", cn)
'Dim table As New DataTable()
'Dim adapter As New SqlDataAdapter(command)
'adapter.Fill(table)
'TextBox1.Text = txtIDno.Text
'txtIDno.Text = table.Rows(0)(0).ToString()
'img = table.Rows(0)(1)
'Dim ms As New MemoryStream(img)
'pbCapture.Image = Image.FromStream(ms)
searchfilltxtbox()
End Sub
searchfilltxtbox()
searchfilltestID()
newid2.Text = txtIDno.Text
retrieve_picture()
End Sub
'IDNo,Course,ContactNo,LastName,FirstName,Middlename
dr = cmd.ExecuteReader
'Dim cm2 As SqlCommand = New SqlCommand("Select testautoID From
tblattendanceinfo where testautoID='" & txtIDno.Text & "'", cn)
'dr2 = cm2.ExecuteReader
If dr.Read Then
txtIDno.Text = dr("IDNo").ToString
txtLastName.Text = dr("LastName").ToString
txtFirstName.Text = dr("FirstName").ToString
txtMiddleName.Text = dr("MiddleName").ToString
txtCourse.Text = dr("Course").ToString
txtContactNo.Text = dr("ContactNo").ToString
End If
cn.Close()
End Sub
'dr = cmd.ExecuteReader
Dim cm As SqlCommand = New SqlCommand("Select
Lastname,testautoID From tblattendanceinfo Where Lastname='" &
txtLastName.Text & "'", cn)
dr = cm.ExecuteReader
If dr.Read Then
txtLastName.Text = dr("Lastname").ToString
testautoID.Text = dr("testautoID").ToString
End If
cn.Close()
End Sub
Private Sub newid2_TextChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles newid2.TextChanged
Dim sql_server As String
Dim sql_connection As SqlConnection
sql_server = "Data Source = DESKTOP-CPNQCCI;Initial Catalog =
StudentAttendanceSystem;Integrated Security=True"
sql_connection = New SqlConnection(sql_server)
Try
Dim READER As SqlDataReader
Dim count As Integer
sql_connection.Open()
While READER.Read
count = count + 1
pbCapture.Image =
ImageConverter.ByteToImage(TryCast(READER.Item("Picture"), Byte()))
'pbRecordSignature.Image =
imageConverter.ByteToImage(TryCast(READER.Item("Signature"), Byte()))
' TextBox1.Text = Convert.ToString(READER("Firstname"))
End While
sql_connection.Close()
Catch ex As SqlException
MessageBox.Show(ex.Message)
End Try
End Sub
End Sub
cn.Close()
cn.Open()
'AND LastName ='" & txtLastName.Text & "' AND FirstName ='" &
txtFirstName.Text & "' AND MiddleInitial ='" & txtMiddleInitial.Text & "' AND
Password ='" & txtpass.Text & "'
If dr.HasRows Then
'editupdate()
save()
pbCapture.Image = My.Resources.a
cleartext()
autoid()
' editupdate()
End If
cn.Close()
'save()
'pbCapture.Image = My.Resources.a
'cleartext()
'btnSave.Text = "HAHAY"
' btnSave.Enabled = False
End Sub
Sub save()
cn.Close()
cn.Open()
Csql.Parameters.AddWithValue("@IDNo", txtIDno.Text.Trim)
Csql.Parameters.AddWithValue("@Course", txtCourse.Text.Trim)
'Csql.Parameters.AddWithValue("@YearLevel", txtYearLevel.Text.Trim)
Csql.Parameters.AddWithValue("@ContactNo", txtContactNo.Text.Trim)
Csql.Parameters.AddWithValue("@LastName", txtLastName.Text.Trim)
Csql.Parameters.AddWithValue("@FirstName", txtFirstName.Text.Trim)
Csql.Parameters.AddWithValue("@Middlename",
txtMiddleName.Text.Trim)
Csql.Parameters.AddWithValue("@Agenda", txtagenda.Text.Trim)
Csql.Parameters.AddWithValue("@Date", attenddate.Text.Trim)
Csql.Parameters.AddWithValue("@TimeRange", txttimerange.Text.Trim)
Csql.Parameters.AddWithValue("@SigninMorning",
txtsigninmorning.Text.Trim)
Csql.Parameters.AddWithValue("@SignoutMorning",
txtsignoutmorning.Text.Trim)
Csql.Parameters.AddWithValue("@SigninAfternoon",
txtsigninafternoon.Text.Trim)
Csql.Parameters.AddWithValue("@SignoutAfternoon",
txtsignoutafternoon.Text.Trim)
Csql.Parameters.AddWithValue("@Where1", txtsigninmorning.Text.Trim)
Csql.Parameters.AddWithValue("@Paid", txtsigninmorning.Text.Trim)
Csql.Parameters.AddWithValue("@testautoID", testautoID.Text.Trim)
Csql.Parameters.Add(New SqlParameter("@Picture",
SqlDbType.Binary)).Value = ImageConverter.ImageToByte(pbCapture.Image)
'Csql.Parameters.Add(New SqlParameter("@Signature",
SqlDbType.Binary)).Value =
ImageConverter.ImageToByte(pbRecordSignature.Image)
'dr.Close()
Csql.ExecuteNonQuery()
End Sub
Sub editupdate1()
Try
cn.Close()
cn.Open()
cn.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
cn.Close()
End Sub
Sub editupdate2()
Try
cn.Close()
cn.Open()
cn.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
cn.Close()
End Sub
Sub editupdate3()
Try
cn.Close()
cn.Open()
cn.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
cn.Close()
End Sub
Agendainfo.Show()
Me.Hide()
cleartext()
pbCapture.Image = My.Resources.a
btnSave.Visible = False
btnup1.Visible = False
btnup2.Visible = False
btn3.Visible = False
End Sub
Sub cleartext()
txtIDno.Text = ""
txtCourse.Text = ""
'txtYearLevel.Text = ""
txtContactNo.Text = ""
txtLastName.Text = ""
txtFirstName.Text = ""
txtMiddleName.Text = ""
txtsigninmorning.Text = ""
txtsignoutmorning.Text = ""
txtsigninafternoon.Text = ""
txtsignoutafternoon.Text = ""
Agendainfo.TextBox1.Text = ""
Agendainfo.txtwhat.Text = ""
End Sub
cleartext()
End Sub
End Sub
End Sub
End Sub
End Sub
cn.Close()
cn.Open()
'AND LastName ='" & txtLastName.Text & "' AND FirstName ='" &
txtFirstName.Text & "' AND MiddleInitial ='" & txtMiddleInitial.Text & "' AND
Password ='" & txtpass.Text & "'
If dr.HasRows Then
editupdate1()
MsgBox("Update Successfully", MsgBoxStyle.Information)
dr.Close()
ElseIf txtIDno.Text = "" Or txtLastName.Text = "" Or txtFirstName.Text =
"" Or txtMiddleName.Text = "" Or txtContactNo.Text = "" Or txtCourse.Text = ""
Then
MsgBox("Empty field is not allowed")
Else
save()
End If
' End If
cn.Close()
End Sub
cn.Close()
cn.Open()
'AND LastName ='" & txtLastName.Text & "' AND FirstName ='" &
txtFirstName.Text & "' AND MiddleInitial ='" & txtMiddleInitial.Text & "' AND
Password ='" & txtpass.Text & "'
If dr.HasRows Then
editupdate2()
MsgBox("Update Successfully", MsgBoxStyle.Information)
dr.Close()
ElseIf txtIDno.Text = "" Or txtLastName.Text = "" Or txtFirstNa
End Sub
'AND LastName ='" & txtLastName.Text & "' AND FirstName ='" &
txtFirstName.Text & "' AND MiddleInitial ='" & txtMiddleInitial.Text & "' AND
Password ='" & txtpass.Text & "'
If dr.HasRows Then
editupdate3()
MsgBox("Update Successfully", MsgBoxStyle.Information)
dr.Close()
ElseIf txtIDno.Text = "" Or txtLastName.Text = "" Or txtFirstName.Text =
"" Or txtMiddleName.Text = "" Or txtContactNo.Text = "" Or txtCourse.Text = ""
Then
End If
' End If
cn.Close()
End Sub
End Class
Imports System.Drawing.Imaging
''' <summary>
''' Image Converter Helper
''' </summary>
''' <remarks>Last update : </remarks>
Public Class ImageConverter
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
Me.Hide()
Agendainfo.Show()
Agendainfo.Button2.Enabled = True
Agendainfo.FileMaintenanceToolStripMenuItem.Enabled = False
Agendainfo.MasterListToolStripMenuItem.Enabled = True
Agendainfo.Button3.Enabled = True
Else
If sdr("Authority") = "President" Then
authority.Text = "President"
txtIDno.Text = ""
txtpass.Text = ""
'authority.Text = ""
Me.Hide()
Agendainfo.Show()
Agendainfo.btnadd.Enabled = True
Agendainfo.btnsave.Enabled = True
Agendainfo.btnedit.Enabled = True
Agendainfo.btncancel.Enabled = True
Agendainfo.Button2.Enabled = True
Agendainfo.btncancel.Enabled = True
Agendainfo.Button3.Enabled = True
Agendainfo.Label19.Text = authority.Text
Else
If sdr("Authority") = "IT" Then
authority.Text = "IT"
txtIDno.Text = ""
txtpass.Text = ""
'authority.Text = ""
Me.Hide()
Agendainfo.Show()
Agendainfo.btnadd.Enabled = True
Agendainfo.btnsave.Enabled = True
Agendainfo.btnedit.Enabled = True
Agendainfo.btncancel.Enabled = True
Agendainfo.Button2.Enabled = True
Agendainfo.btncancel.Enabled = True
Agendainfo.Label19.Text = authority.Text
Exit Sub
End If
End If
End If
End If
Catch ex As Exception
End Try
cn.Close()
End Sub
End Sub
End Class
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
Imports Excel = Microsoft.Office.Interop.Excel
While dr.Read
With ListView1
.Items.Add(dr.Item(0))
With .Items(.Items.Count - 1).SubItems
.Add(dr(7))
.Add(dr(3))
.Add(dr(4))
.Add(dr(5))
.Add(dr(2))
.Add(dr(1))
.Add(dr(10))
.Add(dr(11))
.Add(dr(12))
.Add(dr(13))
.Add(dr(14))
'.Add(dr(12))
'.Add(dr(13))
End With
End With
End While
cn.Close()
End Sub
cn.Close()
cn.Open()
dr = cmd.ExecuteReader
If dr.Read Then
txtagenda.Text = dr("Agenda").ToString
Label3.Text = dr("Date").ToString
End If
cn.Close()
End Sub
Sub showcontrolbox()
'cn.Close()
'cn.Open()
'Dim dt As New DataTable
'Dim ds As New DataSet
'ds.Tables.Add(dt)
'Dim da1 As New SqlDataAdapter("SELECT Agenda FROM
tblattendanceinfo Order by Agenda", cn) '<--or ("SELECT fname FROM users", conn)
'da1.fill(dt)
End Sub
End Sub
ds.Tables.Add(dt)
da.Fill(dt)
Next
End Sub
Form1.btnSave.Enabled = True
Form1.btnupdate.Enabled = False
Form1.btnupdate.Visible = False
Form1.btnSave.Visible = True
Me.Hide()
Form1.Show()
End Sub
Private Sub btnupdatestudent_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles btnupdatestudent.Click
Form1.btnupdate.Visible = True
Form1.btnSave.Visible = False
Me.Hide()
Form1.btnSave.Enabled = False
Form1.btnupdate.Enabled = True
Form1.Show()
End Sub
Me.Hide()
Agendainfo.Show()
End Sub
End Class
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
showall()
End Sub
End With
ListView1.Items.Clear()
dr = cmd.ExecuteReader
While dr.Read
With ListView1
.Items.Add(dr.Item(0))
With .Items(.Items.Count - 1).SubItems
.Add(dr(1))
.Add(dr(2))
.Add(dr(3))
.Add(dr(4))
.Add(dr(5))
.Add(dr(6))
.Add(dr(7))
End With
End With
End While
cn.Close()
End Sub
da.Fill(dt)
Next
End Sub
Sub printagenda()
Dim fileTest As String = Application.StartupPath & "\GeneratedReport\" &
"\Attendance.xlsx"
Dim oExcel As Object
oExcel = CreateObject("Excel.Application")
oExcel.Visible = True
oExcel.Workbooks.Open(fileTest)
Dim oBook As Excel.Workbook
Dim oSheet As Excel.Worksheet
oBook = oExcel.ActiveWorkbook
oSheet = oExcel.Worksheets(1)
dt = MSSQL.SQLGetDataTable(cSQL)
nRow = 15
'nRow1 = 10
'nRow2 = 12
Next
oBook.PrintPreview()
oExcel.DisplayAlerts = False
oBook.Close()
oExcel.Quit()
End Sub
End Sub
printagenda()
End Sub
End Sub
Private Sub txtIDno_TextChanged_1(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles txtIDno.TextChanged
searching()
End Sub
End Class
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
cn.Open()
'AND LastName ='" & txtLastName.Text & "' AND FirstName ='" &
txtFirstName.Text & "' AND MiddleInitial ='" & txtMiddleInitial.Text & "' AND
Password ='" & txtpass.Text & "'
If dr.HasRows Then
MsgBox("ID Number Already Exist!")
Else
save()
Agendainfo.Show()
Me.Hide()
End If
cn.Close()
End Sub
Sub save()
cn.Close()
cn.Open()
Dim Csql As New SqlCommand("INSERT INTO
tbllogininfo(IDNo,Contact,LastName,FirstName,MiddleInitial,Password,Authority)
VALUES
(@IDNo,@Contact,@LastName,@FirstName,@MiddleInitial,@Password,@Authority);"
, cn)
Csql.Parameters.AddWithValue("@IDNo", txtIDno.Text.Trim)
Csql.Parameters.AddWithValue("@Contact", txtContactNo.Text.Trim)
Csql.Parameters.AddWithValue("@LastName", txtLastName.Text.Trim)
Csql.Parameters.AddWithValue("@FirstName", txtFirstName.Text.Trim)
Csql.Parameters.AddWithValue("@MiddleInitial",
txtMiddleInitial.Text.Trim)
Csql.Parameters.AddWithValue("@Password", txtpass.Text.Trim)
Csql.Parameters.AddWithValue("@Authority", txtauthority.Text.Trim)
Csql.ExecuteNonQuery()
End Sub
End Sub
End Sub
End Class
#Region "ExcelWriter"
#End Region
#Region "REPORTS"
'Public Sub AttendeeReport()
' Dim fileTest As String = Application.StartupPath & "\GeneratedReport\"
& "\Attendance.xlsx"
' Dim oExcel As Object
' oExcel = CreateObject("Excel.Application")
' oExcel.Visible = True
' oExcel.Workbooks.Open(fileTest)
' Dim oBook As Excel.Workbook
' Dim oSheet As Excel.Worksheet
' oBook = oExcel.ActiveWorkbook
' oSheet = oExcel.Worksheets(1)
' dt = MSSQL.SQLGetDataTable(cSQL)
' nRow = 15
' nRow1 = 10
' Next
' oBook.PrintPreview()
' oExcel.DisplayAlerts = False
' oBook.Close()
' oExcel.Quit()
'End Sub
#End Region
#End Region
End Module
Imports System.Management
Imports System.IO.Ports
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO
Next
SerialPort1.PortName = Comport.Text
SerialPort1.BaudRate = 9600
SerialPort1.Parity = Parity.None
SerialPort1.StopBits = StopBits.One
SerialPort1.DataBits = 8
SerialPort1.Handshake = Handshake.RequestToSend
SerialPort1.DtrEnable = True
SerialPort1.RtsEnable = True
SerialPort1.NewLine = vbCrLf
'showall()
End Sub
End Function
ds.Tables.Add(dt)
da.Fill(dt)
End Sub
If SerialPort1.IsOpen Then
SerialPort1.Close()
Else
SerialPort1.PortName = Comport.Text.ToString
Try
SerialPort1.Open()
If SerialPort1.IsOpen() Then
SerialPort1.Close()
'Exit Sub
'Selse
End If
Catch ex As Exception
SerialPort1.Close()
' sqlcon.Close()
Exit Sub
MsgBox("Please Insert a Bundle/Broadband!")
Finally
End Try
End If
With ListView1.Items.Add("send ---- " & (ds.Tables(0).Rows(i).Item(2)),
2)
End With
ListView1.Refresh()
MsgBox("Now sending SMS to : " & (ds.Tables(0).Rows(i).Item(4)))
Next
MsgBox("SEND SUCCESSFULLY!")
End Sub
Me.Hide()
Agendainfo.Show()
End Sub
End Class
Appendix B
EVALUATION TOOL OR TEST
DOCUMENTS
3. The SSC Officers will be collecting their fines on the day of signing their
clearance?
3. Do you think this system could help you much in making to be easier?
Yes No Maybe
Yes No Maybe
Appendix C
SAMPLE INPUT/ OUTPUT/
REPORTS
Appendix D
USER GUIDE
How to print out the Payment form? Scan the ID and click the print.
1. If the student want to request their fines to the SSC the SSC will print out
the payment form.
1 Go to switch Board then click SMS select Modem and Contact no. of the
students then Send.
Appendix E
PROCESS / DATA
INFORMATION FLOW
Current Process
1.1 Disseminating Information
1.2 Purchasing Attendance Card
1.3 Signing of Attendance card
Log in Form
Attendance Form
Payment Form
Appendix G
TEST RESULT
Appendix H
PICTURES
Appendix I
CURRICULUM VITAE
Daimler B. Fernandez
Personal Information
Gender : Male
Educational Background
Elementary Level :
Secondary Level :
March 2017
Affliations/Achievements
Arnel G. Campoy
Campoyarnel@gmail.com
09776145114
Personal Information
Gender : Male
Educational Background
2005-2006
2009-2010
2016-2017
Affliations/Achievements
Jessamae_quistadio@y.c
09102163055
Personal Information
Gender : Female
Educational Background
2007-2008
HighSchool
2011-2012
Tertiary Level : Cronasia Foundation College, Inc.
2016-2017
Affliations/Achievements