using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace presentacion
{
    public partial class resultado : Form
    {
        private List<string[]> lista;
        private string consulta;
        public resultado(List<string[]> lista,string consulta)
        {
            InitializeComponent();
            this.lista = lista;
            this.consulta = consulta;
            textBox1.Text = "";
            mostrar();
        }
        private void mostrar() 
        {
            if (lista.Count == 0) MessageBox.Show("Sin conincidencias");
            else
            {
                textBox1.Clear();
                textBox1.Text += consulta + "\r\n";
                textBox1.Text += "------------------------------------------------\r\n";
                foreach (string[] s in lista)
                {
                    textBox1.Text += (s[0] + "\r\n" + s[1] + "\r\n" + s[2] + "\r\n" + s[3] + "\r\n" + s[4] + "\r\n"+ s[5] + "\r\n");
                    textBox1.Text += "------------------------------------------------\r\n";
                }
            }
        }
    }
}
