/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pe.siso.horario.Services;

import java.util.ArrayList;
import pe.siso.horario.Beans.UbigeoDocente;
import pe.siso.horario.DAO.DAOFactory;
import pe.siso.horario.DAO.UbigeoDocenteDAO;

/**
 *
 * @author sistem16user
 */
public class UbigeoDocenteServices {
   DAOFactory fabrica = DAOFactory.getDAOFactory(DAOFactory.MYSQL);
   UbigeoDocenteDAO objUbigeoDocenteDAO= fabrica.getUbigeoDocenteDAO();
   
   public ArrayList<UbigeoDocente> cargarDepartamento(){
   ArrayList<UbigeoDocente> lista=null;
   
       try {
           lista=objUbigeoDocenteDAO.cargarDepartamento();
           
       } catch (Exception e) {
           e.printStackTrace();
       }
    return lista;
   
   }
   
   public ArrayList<UbigeoDocente> cargarProvincia(int codigoDepartamento){
   ArrayList<UbigeoDocente> lista=null;
   
       try {
           lista=objUbigeoDocenteDAO.cargarProvincia(codigoDepartamento);
           
       } catch (Exception e) {
           e.printStackTrace();
       }
    return lista;
   
   }
   
   public ArrayList<UbigeoDocente> cargarDistrito(int codigoProv, int codDep){
   ArrayList<UbigeoDocente> lista=null;
   
       try {
           lista=objUbigeoDocenteDAO.cargarDistrito(codigoProv, codDep);
           
       } catch (Exception e) {
           e.printStackTrace();
       }
    return lista;
   
   }
}
