예제 #1
0
파일: Admin.cs 프로젝트: hoem/WebSalesianos
 private void buttonBuscarLibro_Click(object sender, EventArgs e)
 {
     if (textBoxIdLibroBuscar.Text != "")
     {
         //try
         //{
             ENBook book = new ENBook();
             book = book.read(textBoxIdLibroBuscar.Text);
             textBoxAsignaturasLibroBuscar.Text = book.Subject.Name;
             textBoxCursosLibroBuscar.Text = book.Course.Courses;
             textBoxNombreLibroBuscar.Text = book.Name;
             textBoxEditorialBuscaLibro.Text = book.CIF;
             textBoxDescripcionBuscaLibro.Text = book.Description;
             pictureBoxImagenLibro.Image = Image.FromFile(book.Image);
             buttonEliminarLibro.Visible = true;
        /* }
         catch
         {
             MessageBox.Show("Inserte un libro correcto.", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }*/
     }
     else
         MessageBox.Show("Inserte un curso.", "Atención!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
 }
예제 #2
0
파일: Admin.cs 프로젝트: hoem/WebSalesianos
        private void buttonEliminarLibro_Click(object sender, EventArgs e)
        {
            ENBook book = new ENBook();
            book = book.read(textBoxIdLibroBuscar.Text);
            book.delete();

            buttonEliminarLibro.Visible = false;
        }