public bool OnCheckCine(object sender, AddCineEventsArgs e)
        {
            int count = 0;

            foreach (Local l in locals)
            {
                if (l.Identifier == e.Identifier)
                {
                    count++;
                }
            }
            if (count == 0)
            {
                Cine c = new Cine(e.OwnerName, e.Identifier, e.AttentionTime, e.Number);
                locals.Add(c);
                return(true);
            }
            else
            {
                return(false);
            }
        }
        public void Initialize()
        {
            Restaurante r1 = new Restaurante("Kika", 1, "12:00-19:00", false);

            locals.Add(r1);
            Restaurante r2 = new Restaurante("Juan", 2, "10:00-22:00", true);

            locals.Add(r2);
            Restaurante r3 = new Restaurante("Isabel", 3, "8:00-13:00", false);

            locals.Add(r3);
            Cine c = new Cine("Francisco", 4, "10:00-24:00", 10);

            locals.Add(c);
            List <string> l = new List <string>()
            {
                "Juguetes", "Ropa niño"
            };
            Tienda t1 = new Tienda("José", 5, "10:00-22:00", l);

            locals.Add(t1);
            List <string> a = new List <string>()
            {
                "Mujer", "Accesorios", "Cosméticos"
            };
            Tienda t2 = new Tienda("María", 6, "10:00-22:00", a);

            locals.Add(t2);
            List <string> d = new List <string>()
            {
                "Comida sana"
            };
            Tienda t3 = new Tienda("Diego", 7, "10:00-22:00", d);

            locals.Add(t3);
            Recreacional r = new Recreacional("Antonia", 8, "11:00-20:00");

            locals.Add(r);
        }
        private void button4_Click_1(object sender, EventArgs e)
        {
            string nombreloc = NomTextBox2.Text;

            NomTextBox2.Clear();
            IDTextBox2.Clear();
            DueñoTextbox2.Clear();
            HorarioTextbox2.Clear();
            textboxcineytiendayrestaurante2.Clear();

            if (comboBox2.Text == "Cine")
            {
                try
                {
                    Cine asd = cines.Where(cine => cine.nombre == nombreloc).FirstOrDefault();
                    if (asd == null)
                    {
                        NomTextBox2.Text = "No Existe";
                    }
                    else
                    {
                        NomTextBox2.Text     = asd.nombre;
                        DueñoTextbox2.Text   = asd.dueño;
                        IDTextBox2.Text      = asd.id;
                        HorarioTextbox2.Text = asd.horario;
                        textboxcineytiendayrestaurante2.Text = asd.nSalas;
                    }
                }
                catch
                {
                    NomTextBox2.Text = "No Existe";
                }
            }
            else if (comboBox2.Text == "Recreacional")
            {
                try
                {
                    Recreacional asd = recreacionales.Where(recreacional => recreacional.nombre == nombreloc).FirstOrDefault();
                    if (asd == null)
                    {
                        NomTextBox2.Text = "No Existe";
                    }
                    else
                    {
                        DueñoTextbox2.Text   = asd.dueño;
                        IDTextBox2.Text      = asd.id;
                        HorarioTextbox2.Text = asd.horario;
                    }
                }
                catch
                {
                    NomTextBox2.Text = "No Existe";
                }
            }
            else if (comboBox2.Text == "Restaurante")
            {
                try
                {
                    Restaurante asd = restaurantes.Where(restaurante => restaurante.nombre == nombreloc).FirstOrDefault();
                    if (asd == null)
                    {
                        NomTextBox2.Text = "No Existe";
                    }
                    else
                    {
                        DueñoTextbox2.Text   = asd.dueño;
                        IDTextBox2.Text      = asd.id;
                        HorarioTextbox2.Text = asd.horario;
                        textboxcineytiendayrestaurante2.Text = asd.mesasExclusivas;
                    }
                }
                catch
                {
                    NomTextBox2.Text = "No Existe";
                }
            }
            else if (comboBox2.Text == "Tienda")
            {
                try
                {
                    Tienda asd = tiendas.Where(tienda => tienda.nombre == nombreloc).FirstOrDefault();
                    if (asd == null)
                    {
                        NomTextBox2.Text = "No Existe";
                    }
                    else
                    {
                        DueñoTextbox2.Text   = asd.dueño;
                        IDTextBox2.Text      = asd.id;
                        HorarioTextbox2.Text = asd.horario;
                        textboxcineytiendayrestaurante2.Text = asd.categorias;
                    }
                }
                catch
                {
                    NomTextBox2.Text = "No Existe";
                }
            }
        }