예제 #1
0
        public Centro CrearCentro(string descripcion, int empresa)
        {
            Empresa empresaExistente = EmpresasDAO.Obtener(empresa);
            Centro  centroACrear     = new Centro()
            {
                Descripcion = descripcion,
                Empresa     = empresaExistente
            };

            return(CentroDAO.Crear(centroACrear));
        }
        public Centro CrearCentro(string descripcion, int empresa)
        {
            Empresa empresaExistente = EmpresaDAO.Obtener(empresa);
            Centro  CentroACrear     = new Centro()
            {
                DESCRIPCION = descripcion,
                EMPRESA     = empresaExistente
            };

            return(CentroDAO.Crear(CentroACrear));
        }
        public Centro ModificarCentro(int codigo, string descripcion, int empresa)
        {
            Empresa empresaExistente = EmpresaDAO.Obtener(empresa);
            Centro  centroAModificar = new Centro()
            {
                ID_CENTRO   = codigo,
                DESCRIPCION = descripcion,
                EMPRESA     = empresaExistente
            };

            return(CentroDAO.Modificar(centroAModificar));
        }
예제 #4
0
 public List <Centro> ListarCentro()
 {
     return(CentroDAO.ListarTodos().ToList());
 }
예제 #5
0
 public Centro ObtenerCentro(int codigo)
 {
     return(CentroDAO.Obtener(codigo));
 }