public MisPublicacionesPage(int idSession) { this.idSession = idSession; db = new ControladorDB(); this.listView = new ListView(); listView.VerticalOptions = LayoutOptions.FillAndExpand; if (db.GetOfertasByIdPublicador(this.idSession) != null) { listView.ItemsSource = db.GetOfertasByIdPublicador(idSession); var cell = new DataTemplate(typeof(ImageCell)); //cell.SetBinding(ImageCell.ImageSourceProperty, "Image"); cell.SetBinding(TextCell.TextProperty, "NombreCargo"); cell.SetBinding(TextCell.DetailProperty, "Salario"); listView.ItemTemplate = cell; Content = new StackLayout { VerticalOptions = LayoutOptions.FillAndExpand, Children = { listView } }; } else { DisplayAlert("Error", "No ha publicado ninguna oferta! ", "OK"); } }
public BusquedaPage(string cargo, string ciudad, int idSession) { this.idSession = idSession; this.db = new ControladorDB(); if (!String.IsNullOrEmpty(ciudad)) { this.Title = ciudad; } else { this.Title = "Todas las ciudades"; } var listView = new ListView(); listView.VerticalOptions = LayoutOptions.FillAndExpand; listView.ItemsSource = db.GetOfertaByCargoOCity(cargo, ciudad); var cell = new DataTemplate(typeof(ImageCell)); //cell.SetBinding(ImageCell.ImageSourceProperty, "Image"); cell.SetBinding(TextCell.TextProperty, "NombreCargo"); cell.SetBinding(TextCell.DetailProperty, "Salario"); listView.ItemTemplate = cell; listView.ItemTapped += ListView_ItemTapped; Content = new StackLayout { VerticalOptions = LayoutOptions.FillAndExpand, Children = { listView } }; }
public LoginPage() { db = new ControladorDB(); Title = "Emplear"; Button registrarBoton = new Button { Text = "Registrar" }; registrarBoton.Clicked += RegistrarBoton_Clicked; Button logearBoton = new Button { Text = "Logear" }; logearBoton.Clicked += LogearBoton_ClickedAsync; entryUsuario = new Entry { Placeholder = "Usuario" }; entryPass = new Entry { IsPassword = true, Placeholder = "ContraseƱa" }; var stack = new StackLayout { Padding = 20, Children = { new Image { Source = "web_hi_res_512.jpg" }, new Label { Text = "Bienvenido a Emplear" }, entryUsuario, entryPass, logearBoton, registrarBoton } }; Content = new ScrollView { Content = stack }; }
public PublicarOferta(int idSession) { this.idSession = idSession; db = new ControladorDB(); var layout = new StackLayout { Padding = 10 }; entryCargo = new Entry { Placeholder = "Ingrese nombre del cargo" }; entrySalario = new Entry { Placeholder = "Ingrese el salario de la oferta" }; List <Ciudad> ciudades = new Ciudad().getCiudades(); picker = new Picker { Title = "Seleccione el lugar de la oferta", ItemsSource = ciudades }; botton = new Button { Text = "Publicar Oferta" }; botton.Clicked += Boton_Clicked; layout.Children.Add(entryCargo); layout.Children.Add(entrySalario); layout.Children.Add(picker); layout.Children.Add(botton); Content = layout; }