protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { foreach (Hotel h in hotelBll.BuscarTodos()) { lstHotel.Items.Add(new ListItem() { Value = h.Id.ToString(), Text = h.Nombre + " - " + h.Direccion }); } for (int i = 1; i < 6; i++) { ListItem item = new ListItem() { Text = i + " Estrella", Value = i.ToString() }; lstLimpieza.Items.Add(item); lstUbicacion.Items.Add(item); lstPrecio.Items.Add(item); lstAtencion.Items.Add(item); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { hoteles = bll.BuscarTodos(); tag1 = new List <Hotel>(); tag2 = new List <Hotel>(); foreach (Hotel h in hoteles) { foreach (Tag t in h.tags) { if (t.Id == 1) { tag1.Add(h); break; } } } foreach (Hotel h in hoteles) { foreach (Tag t in h.tags) { if (t.Id == 3) { tag2.Add(h); break; } } } hoteles = hoteles.OrderByDescending(o => o.Puntos).ToList(); tag1 = tag1.OrderByDescending(o => o.Puntos).ToList(); tag2 = tag2.OrderByDescending(o => o.Puntos).ToList(); } }
protected void Page_Load(object sender, EventArgs ee) { IList <Hotel> hoteles = hotelBll.BuscarTodos(); Hotel h = hotelBll.BuscarPorId(2); Evento e = new Evento(); e.Autor = "Dago"; e.Modulo = "hash"; e.Descripcion = Encriptador.Encriptar("hi"); bitacora.RegistrarEvento(e); IPatente patente = autorizacionBll.ObtenerPatentePorUsuario(usuarioBll.BuscarPorId(1)); IList <Usuario> usuarios = usuarioBll.BuscarTodos(); }
protected void Page_Load(object sender, EventArgs e) { tbl.Rows.Clear(); TableHeaderRow hrow = new TableHeaderRow(); hrow.Cells.Add(new TableHeaderCell { Text = "Nombre" }); hrow.Cells.Add(new TableHeaderCell { Text = "Direccion" }); hrow.Cells.Add(new TableHeaderCell { Text = "Fecha de creacion" }); hrow.Cells.Add(new TableHeaderCell { Text = "" }); tbl.Rows.Add(hrow); IList <Hotel> hoteles = hotelBll.BuscarTodos(); foreach (Hotel h in hoteles) { TableRow row = new TableRow(); row.Cells.Add(new TableCell { Text = h.Nombre }); row.Cells.Add(new TableCell { Text = h.Direccion }); row.Cells.Add(new TableCell { Text = h.FechaCreacion.ToString() }); HyperLink l = new HyperLink { Text = "Editar", NavigateUrl = "hotelEditar?id=" + h.Id }; TableCell tc = new TableCell(); tc.Controls.Add(l); row.Cells.Add(tc); tbl.Rows.Add(row); } }
protected void Page_Load(object sender, EventArgs e) { foreach (Hotel h in hotelBll.BuscarTodos()) { ListItem i = new ListItem() { Text = h.Nombre + " - " + h.Precio, Value = h.Id.ToString() }; lstHoteles.Items.Add(i); } foreach (Destino d in destinoBll.BuscarTodos()) { ListItem i = new ListItem() { Text = d.Descripcion, Value = d.Id.ToString() }; lstDestinos.Items.Add(i); } foreach (Vuelo h in vueloBll.BuscarTodos()) { ListItem i = new ListItem() { Text = h.Empresa + " - " + h.objOrigen.Codigo + " - " + h.objDestino.Codigo + " - " + h.Precio, Value = h.Id.ToString() }; lstVuelos.Items.Add(i); } foreach (Tag h in tagBll.BuscarTodos()) { ListItem i = new ListItem() { Text = h.Codigo, Value = h.Id.ToString() }; lstTags.Items.Add(i); } }