示例#1
0
}
//si hizo click en el envio
if (isset($_POST['submit'])) {
    //captura de datos
    $id = $_POST['idHidden'];
    $isbn = $_POST['isbn'];
    $titulo = $_POST['titulo'];
    $tema = $_POST['tema'];
    $autor = $_POST['autor'];
    $elibrolibro = new Libros();
    $elibrolibro->setNum_referencia($id);
    $elibrolibro->setIsbn($isbn);
    $elibrolibro->setTitulo($titulo);
    $elibrolibro->setTema($tema);
    $elibrolibro->setAutor($autor);
    $libroBLL = new LibrosBLL();
    $libroBLL->Modificar($elibrolibro);
    if ($libroBLL->getHayError()) {
        $mensaje = "Registro no modificado: Error en el registro";
        echo "<script>";
        echo "if(alert('{$mensaje}'));";
        echo "window.location='mantenimientoLibro.php'";
        echo "</script>";
    } else {
        $mensaje = "Actualizado correctamente";
        echo "<script>";
        echo "if(alert('{$mensaje}'));";
        echo "window.location='mantenimientoLibro.php'";
        echo "</script>";
    }
    //sea cual sea el caso lo retorna a mantenimientos
示例#2
0
<br><br>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;">
<title>Libros</title>
<link href="../css/helper.css" media="screen" rel="stylesheet" type="text/css" />
</head>
<body><br>
<h1 >Mantenimiento de Libros</h1>
<?php 
//Inicializar la sesi�n
session_start();
require_once "IncluirClases.php";
//Crear la instancia del Componente de L�gicas de Negocio
$LibroBLL = new LibrosBLL();
$list1 = "";
$list2 = "";
//Invocar el m�todo de Listas
$resultado = $LibroBLL->Listar($list1, $list2);
//Si hay tuplas, cargar el mantenimiento
if ($resultado != FALSE) {
    echo "<a href='NuevoLibro.php?accion=I&id=0'>Nuevo Libro</a><br/><br/>";
    echo "<table width='900px' align='Center' border=1>";
    echo "<tr>";
    //	echo "  <td width='100px'>Numero Referencia</td>";
    echo "  <td width='100px'>ISBN</td>";
    echo "  <td width='300px'>Titulo</td>";
    //	echo "  <td width='200px'>Tema</td>";
    echo "  <td width='100px'>Autor</td>";
    echo "  <td width='100px' colspan=2 align=center>Accion</td>";
示例#3
0
    $id = $_GET['id'];
}
//si hizo click en el envio
if (isset($_POST['submit'])) {
    //captura de datos
    //	$id = $_POST ['idHidden'];
    $isbn = $_POST['isbn'];
    $titulo = $_POST['titulo'];
    $tema = $_POST['tema'];
    $autor = $_POST['autor'];
    $elibrolibro = new Libros();
    $elibrolibro->setIsbn($isbn);
    $elibrolibro->setTitulo($titulo);
    $elibrolibro->setTema($tema);
    $elibrolibro->setAutor($autor);
    $libroBLL = new LibrosBLL();
    $libroBLL->Agregar($elibrolibro);
    if ($libroBLL->getHayError()) {
        $mensaje = "Registro no agregado: El ISBn YA existe!";
        echo "<script>";
        echo "if(alert('{$mensaje}'));";
        echo "window.location='mantenimientoLibro.php'";
        echo "</script>";
    } else {
        $mensaje = "Agregado correctamente";
        echo "<script>";
        echo "if(alert('{$mensaje}'));";
        echo "window.location='mantenimientoLibro.php'";
        echo "</script>";
    }
}