示例#1
0
        public static void agregar(Prestamo elPrestamo)
        {
            Datos datos = new Datos();

            string sql = "INSERT INTO " + tabla + " (fechaPrestamo, fechaDevolucion, fechaRealDevolucion, estadoPrestamo) values('" + elPrestamo.FechaPrestamo + "','" + elPrestamo.FechaDevolucion+ "','" + elPrestamo.FechaRealDevolucion+ "','" + elPrestamo.EstadoPrestamo + "')";
            datos.insertar(sql);
        }
示例#2
0
 // incio consultas sql
 public static void agregar(Atraso elAtraso)
 {
     Datos datos = new Datos();
     string sql = "INSERT INTO " + tabla + " (id,idPrestamo,sancion,estado) VALUES('" + elAtraso.Id + "','" + elAtraso.IdPrestamo + "','" + elAtraso.sancion + "','" + elAtraso.estado + "')";
     datos.insertar(sql);
 }
示例#3
0
 public static void modificar(Prestamo elPrestamo)
 {
     Datos datos = new Datos();
     string sql = "UPDATE " + tabla + " SET fechaPrestamo='" + elPrestamo.FechaPrestamo + "',apellidfechaDevolucion" + elPrestamo.FechaDevolucion + "',fechaRealDevolucion='" + elPrestamo.FechaRealDevolucion + "',estadoPrestamo='" + elPrestamo.EstadoPrestamo + "' WHERE id='" + elPrestamo.Id + "'";
     datos.insertar(sql);
 }