public void update(double total, string locationName)
    {
        locationControl   = new LocationControl();
        locationClothes   = new LocationClothes();
        locationClothesDB = new LocationClothesDB();
        int ID = locationControl.getID(locationName);

        locationClothes.setLocationID(ID);
        locationClothes.setTotal(total);
        locationClothesDB.updateTotal(locationClothes);
    }
    public double getTotal(string locationName)
    {
        locationControl   = new LocationControl();
        locationClothes   = new LocationClothes();
        locationClothesDB = new LocationClothesDB();
        int ID = locationControl.getID(locationName);

        locationClothes.setLocationID(ID);
        locationClothesDB.selectTotal(locationClothes);
        return(locationClothes.getTotal());
    }
예제 #3
0
    public double getTotal(string locationName)
    {
        locationControl  = new LocationControl();
        locationEquips   = new LocationEquips();
        locationEquipsDB = new LocationEquipsDB();
        int ID = locationControl.getID(locationName);

        locationEquips.setLocationID(ID);
        locationEquipsDB.getTotal(locationEquips);
        return(locationEquips.getTotal());
    }
예제 #4
0
    public int getID(string locationName)
    {
        locationControl  = new LocationControl();
        locationEquips   = new LocationEquips();
        locationEquipsDB = new LocationEquipsDB();
        int ID = locationControl.getID(locationName);

        locationEquips.setLocationID(ID);
        locationEquipsDB.selectID(locationEquips);
        return(locationEquips.getID());
    }
예제 #5
0
    public void insert(int month, int year, string locationName)
    {
        locationControl = new LocationControl();
        attendance      = new Attendance();
        attendanceDB    = new AttendanceDB();
        int locationID = locationControl.getID(locationName);

        attendance.setMonth(month);
        attendance.setYear(year);
        attendance.setLocationID(locationID);
        attendanceDB.insert(attendance);
    }
    public bool checkIfLocationHasClothes(string locationName)
    {
        locationControl   = new LocationControl();
        locationClothes   = new LocationClothes();
        locationClothesDB = new LocationClothesDB();
        int ID = locationControl.getID(locationName);

        locationClothes.setLocationID(ID);
        bool check = locationClothesDB.checkIfLocationHasClothes(locationClothes);

        return(check);
    }
예제 #7
0
    public bool checkIfLocationHasEquips(string locationName)
    {
        locationControl  = new LocationControl();
        locationEquips   = new LocationEquips();
        locationEquipsDB = new LocationEquipsDB();
        int ID = locationControl.getID(locationName);

        locationEquips.setLocationID(ID);
        bool check = locationEquipsDB.checkIfLocationHasDevices(locationEquips);

        return(check);
    }
예제 #8
0
    public void insert(double total, string locationName)
    {
        locationControl  = new LocationControl();
        locationEquips   = new LocationEquips();
        locationEquipsDB = new LocationEquipsDB();
        locationControl.getLocationID(locationName);
        int ID = locationControl.getID(locationName);

        locationEquips.setLocationID(ID);
        locationEquips.setTotal(total);
        locationEquipsDB.insert(locationEquips);
    }
예제 #9
0
    public int getID(int month, int year, string locationName)
    {
        locationControl = new LocationControl();
        attendance      = new Attendance();
        attendanceDB    = new AttendanceDB();
        int locationID = locationControl.getID(locationName);

        attendance.setMonth(month);
        attendance.setYear(year);
        attendance.setLocationID(locationID);
        attendanceDB.selectID(attendance);
        return(attendance.getID());
    }
예제 #10
0
    public bool checkIfLocationAttendanceSubmitted(int month, int year, string locationName)
    {
        locationControl = new LocationControl();
        attendance      = new Attendance();
        attendanceDB    = new AttendanceDB();
        int locationID = locationControl.getID(locationName);

        attendance.setMonth(month);
        attendance.setYear(year);
        attendance.setLocationID(locationID);
        bool flag = attendanceDB.checkIfLocationAttendanceSubmitted(attendance);

        return(flag);
    }
예제 #11
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;
    }