public bool Existe(int Id)
 {
     try
     {
         Biblioteca.DALC.EJEMPLAR ej = CommonBC.ModeloBiblioteca.EJEMPLAR.First
                                           (e => e.IDEJEMPLAR == Id);
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
        public bool Update_Disponibilidad(int id, string disp)
        {
            try
            {
                Biblioteca.DALC.EJEMPLAR ej = CommonBC.ModeloBiblioteca.EJEMPLAR.First
                                                  (e => e.IDEJEMPLAR == id);
                ej.DISPONIBILIDAD = disp;
                CommonBC.ModeloBiblioteca.SaveChanges();

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
        public bool Delete(int Id)
        {
            try
            {
                Biblioteca.DALC.EJEMPLAR ej = CommonBC.ModeloBiblioteca.EJEMPLAR.First
                                                  (e => e.IDEJEMPLAR == Id);
                CommonBC.ModeloBiblioteca.DeleteObject(ej);
                CommonBC.ModeloBiblioteca.SaveChanges();

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
        public bool Update(int id, int iddocumento, string estado, string ubicacion)
        {
            try
            {
                Biblioteca.DALC.EJEMPLAR ej = CommonBC.ModeloBiblioteca.EJEMPLAR.First
                                                  (e => e.IDEJEMPLAR == id);
                ej.DOCUMENTO_IDDOCUMENTO = iddocumento;
                ej.ESTADOEJEMPLAR        = estado;
                ej.UBICACIONEJEMPLAR     = ubicacion;
                CommonBC.ModeloBiblioteca.SaveChanges();

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }