internal void cargarTablaMozos(EditarMozo editarMozo, int id)
        {
            try
            {
                conectar();

                string sql = "select * from Mozo where id = " + id;

                command = new SQLiteCommand(sql, connection);
                SQLiteDataReader lector = command.ExecuteReader();

                while (lector.Read())
                {
                    editarMozo.textBoxNombre.Text     = lector.GetString(0);
                    editarMozo.checkBoxMañana.Checked = lector.GetBoolean(2);
                    editarMozo.checkBoxTarde.Checked  = lector.GetBoolean(3);
                    editarMozo.checkBoxNoche.Checked  = lector.GetBoolean(4);
                }

                command.Connection.Close();;
            }
            catch (Exception e)
            {
                throw new Exception("Error: " + e);
            }
            finally
            {
                desconectar();
            }
        }
 private void buttonBorrar_Click_1(object sender, EventArgs e)
 {
     if (seleccionado != null)
     {
         int        index      = int.Parse(seleccionado.Cells["id"].Value.ToString());
         EditarMozo editarMozo = new EditarMozo(this, index);
         editarMozo.ShowDialog();
         seleccionado = null;
         recargarTabla();
     }
 }