Example #1
0
    public void fillDataGridViewLocationAttendance(DataGridView dataGridView, string locationName, int month, int year)
    {
        locationControl = new LocationControl();
        attendance      = new Attendance();
        attendanceDB    = new AttendanceDB();
        int locationID = locationControl.getID(locationName);

        attendance.setLocationID(locationID);
        attendance.setMonth(month);
        attendance.setYear(year);
        SqlDataAdapter adapter   = attendanceDB.fillDataGridViewLocationAttendance(attendance);
        DataTable      dataTable = new DataTable();

        adapter.Fill(dataTable);
        dataGridView.DataSource = dataTable;
    }