Exemple #1
0
 public bool AgregarPrestamos(prestamoClase p)
 {
     using (librosmclEntities lb = new librosmclEntities())
     {
         try
         {
             prestamos x = new prestamos();
             x.libro            = p.libro;
             x.usuario          = p.usuario;
             x.fecha_devolucion = p.fecha_devolucion;
             x.fecha_prestamo   = DateTime.Now;
             Descontar(x.libro);
             lb.prestamos.Add(x);
             lb.SaveChanges();
             return(true);
         }
         catch
         {
             return(false);
         }
     };
 }
Exemple #2
0
 public bool EliminarPrestamos(prestamoClase x)
 {
     throw new NotImplementedException();
 }