Beispiel #1
0
 public BusOrder()
 {
     servOrder      = new ServOrder();
     datOrder       = new DatOrder();
     busAgent       = new BusAgent();
     busPromociones = new BusPromociones();
 }
Beispiel #2
0
    private void TopTresPromociones()
    {
        List <EntPromociones> lst     = new BusPromociones().TopCincoPromociones();
        LiteralControl        literal = new LiteralControl();

        literal.Text = "";
        int contador = 0;

        foreach (EntPromociones ent in lst)
        {
            literal = new LiteralControl();
            if (contador == 0)
            {
                literal.Text += "<li data-target=\"#myCarousel\" data-slide-to=\"" + contador + "\" class=\"active\"></li>";
            }
            else
            {
                literal.Text += "<li data-target=\"#myCarousel\" data-slide-to=\"" + contador + "\"></li>";
            }
            phIndiceUno.Controls.Add(literal);

            literal = new LiteralControl();
            if (contador == 0)
            {
                literal.Text += "<div class=\"item active\">";
            }
            else
            {
                literal.Text += "<div class=\"item\">";
            }
            literal.Text += " <img src=\"" + ent.Foto + "\" alt=\"Chania\" style=\"margin: auto;\">";
            literal.Text += " <div class=\"carousel-caption\">";
            literal.Text += "     <h3>" + ent.Nombre + "</h3>";
            literal.Text += "     <p>" + ent.Descripcion + "</p>";
            literal.Text += " </div>";
            literal.Text += "</div>";
            phFotosUno.Controls.Add(literal);
            contador++;
        }
    }