BIS Chapter 5
BIS Chapter 5
SUMMARY OF FINDINGS
This study aimed to determine the satisfactory of the residents about the automation of Barangay
Information System. The respondents of this study were the residents of Barangay 1, Tumauini, Isabela.
The proposed system were rated satisfactory.
CONLUSION
Based on the result of the study, the researchers found-out that:
1. The current state of barangay information system at the said barangay is still operating manually to
provide its services. Based on the feedback of the respondents, the said barangay offers a poor
and inefficient service.
RECOMMENDATION
We, the researchers, recommend as the result of the study, that Barangay 1 should take the next step in
automating their information system to the next level. Hence, we offer a solution which is more relevant in
nowadays requirements. Technology. The proposed system would be a great help in their operation to
maintain and keep track on their records regarding the information of the whole population of the barangay.
1
BIBLIOGRAPHY
APPENDICES
A. SURVEY QUESTIONNAIRE HERE
2
Login Form
3
Main Form / Dashboard
4
Resident Registration Form
5
Barangay Officials Page
6
Certificate of Indigency / Document / Report
7
Resident Repository
using BarangayInformationSystem.AppGlobal;
using BarangayInformationSystem.Interfaces;
using BarangayInformationSystem.Models;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BarangayInformationSystem.Repositories
{
public class ResidentRepository : IGenericRepository<Resident>
{
private string storedProc = $@"dbo.sp_Residents";
/// <summary>
/// update as deceased function instead
/// </summary>
/// <param name="id"></param>
/// <exception cref="NotImplementedException"></exception>
public void DeleteData(string id)
{
throw new NotImplementedException();
}
8
using (SqlConnection con = new SqlConnection(App.ConnectionString))
{
con.Open();
SqlCommand cmd = new SqlCommand(storedProc, con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@queryType", 0);
cmd.Parameters.AddWithValue("@residentId", id);
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(dt);
}
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}
return dt;
}
9
cmd.Parameters.AddWithValue("@gender", data.Gender);
cmd.Parameters.AddWithValue("@maritalStatus", data.MaritalStatus);
cmd.Parameters.AddWithValue("@occupation", data.Occupation);
cmd.Parameters.AddWithValue("@dateofBirth", data.DateofBirth);
cmd.Parameters.AddWithValue("@placeofBirth", data.PlaceofBirth);
cmd.Parameters.AddWithValue("@nationality", data.Nationality);
cmd.Parameters.AddWithValue("@religionSect", data.ReligionSect);
cmd.Parameters.AddWithValue("@bloodType", data.BloodType);
cmd.Parameters.AddWithValue("@householdHead", data.HouseholdHead);
cmd.Parameters.AddWithValue("@householdId", data.HouseholdId);
cmd.Parameters.AddWithValue("@houseNo", data.HouseNo);
cmd.Parameters.AddWithValue("@zoneNo", data.ZoneNo);
cmd.Parameters.AddWithValue("@remarks", data.Remarks);
if (newEntry)
cmd.Parameters.AddWithValue("@createdBy", data.CreatedBy);
else
cmd.Parameters.AddWithValue("@modifiedBy", data.ModifiedBy);
cmd.ExecuteNonQuery();
10
Resident Validation
using BarangayInformationSystem.DI;
using BarangayInformationSystem.Interfaces;
using BarangayInformationSystem.Models;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BarangayInformationSystem.Validations
{
public class ResidentValidation : IGenericValidation<Resident>
{
IGenericRepository<Resident> repository = DIContainer.residentRepository();
DataTable dt = repository.GetData(data.ResidentId);
if (newEntry && dt.Rows.Count > 0)
error += $@"Cannot proceed. Record is already existing.{"\n"}";
else
{
if (String.IsNullOrEmpty(data.FirstName))
error += $@"First Name is required{"\n"}";
if (String.IsNullOrEmpty(data.MiddleName))
error += $@"Middle Name is required{"\n"}";
11
if (String.IsNullOrEmpty(data.LastName))
error += $@"Last Name is required{"\n"}";
if (String.IsNullOrEmpty(data.PlaceofBirth))
error += $@"Place of Birth is required{"\n"}";
if (String.IsNullOrEmpty(data.Nationality))
error += $@"Nationality is required{"\n"}";
if (String.IsNullOrEmpty(data.HouseholdId))
error += $@"Household Id is required{"\n"}";
if (String.IsNullOrEmpty(data.ZoneNo))
error += $@"Zone No or Street is required{"\n"}";
}
if (!String.IsNullOrEmpty(error.Trim()))
MessageBox.Show(error.ToString(), "Validation error", MessageBoxButtons.OK, MessageBoxIcon.Error);
else
result = true;
return result;
12
}
}
}
Global Repository
using BarangayInformationSystem.AppGlobal;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BarangayInformationSystem
{
public static class GlobalRepository
{
public static string generatResidentId()
{
string residentId = string.Empty;
DataTable dt = new DataTable();
try
{
using (SqlConnection con = new SqlConnection(App.ConnectionString))
{
string sql = $@"SELECT dbo.fn_GenerateResidentId()";
con.Open();
SqlCommand cmd = new SqlCommand(sql, con);
cmd.CommandType = CommandType.Text;
residentId = cmd.ExecuteScalar().ToString();
13
}
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}
return residentId;
}
con.Open();
SqlCommand cmd = new SqlCommand(sql, con);
cmd.CommandType = CommandType.Text;
householdId = cmd.ExecuteScalar().ToString();
}
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}
return householdId;
}
public static DataTable getHouseholdHeads()
{
DataTable dt = new DataTable();
14
try
{
using (SqlConnection con = new SqlConnection(App.ConnectionString))
{
string sql = $@"SELECT * FROM dbo.fn_GetHouseholdHeads()";
con.Open();
SqlCommand cmd = new SqlCommand(sql, con);
cmd.CommandType = CommandType.Text;
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(dt);
if (dt.Rows.Count > 0)
foreach (DataColumn dc in dt.Columns)
dc.ReadOnly = false;
}
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}
return dt;
}
}
}
Main Class
using BarangayInformationSystem.AppGlobal;
using BarangayInformationSystem.Models;
using BarangayInformationSystem.Views.Pages;
using DevExpress.XtraEditors;
using System;
using System.Collections.Generic;
15
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BarangayInformationSystem
{
public partial class MainForm : DevExpress.XtraEditors.XtraForm
{
public MainForm()
{
InitializeComponent();
initTempUser();
}
16
private void officeNavigationBar1_ItemClick(object sender,
DevExpress.XtraBars.Navigation.NavigationBarItemEventArgs e)
{
int tag = e == null ? 0 : Int16.Parse(e.Item.Tag.ToString());
mainPanel.Controls.Clear();
switch (tag)
{
case 0:
mainPanel.Controls.Add(new ucDashboard() { Dock = DockStyle.Fill });
break;
case 1:
mainPanel.Controls.Add(new ucResidents() { Dock = DockStyle.Fill });
break;
default:
break;
}
}
17
HONORATO GUZMAN BAQUIRAN COLLEGE INC.
PERSONAL INFORMATION
LASTNAME:
FIRSTNAME:
MIDDLE NAME:
PLACE OF BIRTH:
FAMILY BACKGROUND
FATHER MOTHER
LASTNAME: LASTNAME:
FIRSTNAME: FIRSTNAME:
MIDLLE NAME: MIDLLE NAME:
EDUCATIONAL BACKGROUND
LEVEL NAME OF SCHOOL YEAR GRADUATED
COLLEGE
VOCATIONAL TRADE COURSE
SECONDARY
ELEMENTARY
18