Exemplo n.º 1
0
        private void librosToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            formLibros frLibros = new formLibros();

            frLibros.ShowDialog();
            frLibros.Close();
        }
Exemplo n.º 2
0
 private void btnLibros_Click(object sender, EventArgs e)
 {
     if (dgv_Autores.CurrentRow != null && dgv_Autores.CurrentRow.Index > -1)
     {
         List <Entidades.Libros> libros = new LibroLogic().GetAllXAutor(Convert.ToInt32(dgv_Autores.Rows[dgv_Autores.CurrentRow.Index].Cells["idAutor"].Value), Program.IdUsuario);
         if (libros.Count != 0)
         {
             formLibros libs = new formLibros(libros);
             libs.ShowDialog();
             libs.Close();
         }
         else
         {
             MessageBox.Show("¡No se han cargado libros para este autor!", "Mensaje del sistema", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         }
     }
 }