public CrearAlerta(DateTime dtmFechaCreacion) { InitializeComponent(); //COMPRUEBO QUE ESTÉ LOGUEADO Y BUSCO LAS HUERTAS DEL USUARIO PARA BINDEAR CON EL COMBO bool isLoggedIn = App.Current.Properties.ContainsKey("IsLoggedIn") ? (bool)App.Current.Properties["IsLoggedIn"] : false; if (isLoggedIn) { String userLog = App.Current.Properties["user"].ToString(); var misHuertas = HuertaServicio.TodasLasHuertas(userLog); if (misHuertas.Count > 0) { cmbHuertas.ItemsSource = misHuertas; } } else { DisplayAlert("Mensaje", "No tiene iniciada la sesion", "Ok"); Navigation.PushAsync(new Index()); } //OBTENGO LA LISTA DE TIPOS DE ALERTA PARA BINDEAR CON EL COMBO var lstTiposAlerta = TipoAlertaServicio.todosLosTiposAlerta(); cmbTipoAlerta.ItemsSource = lstTiposAlerta; //LA FECHA DE LA ALERTA YA VIENE DE LA PANTALLA ANTERIOR (CALENDARIO) dtmFechaRec = dtmFechaCreacion; lblFecha.Text = dtmFechaRec.ToShortDateString(); }
private void CargarHuertas(string userId) { var misHuertas = HuertaServicio.TodasLasHuertas(userId); if (misHuertas.Count > 0) { lstHuertas.ItemsSource = misHuertas; } }
public MenuGraficos() { InitializeComponent(); //COMPRUEBO QUE ESTÉ LOGUEADO Y BUSCO LAS HUERTAS DEL USUARIO PARA BINDEAR CON EL COMBO bool isLoggedIn = App.Current.Properties.ContainsKey("IsLoggedIn") ? (bool)App.Current.Properties["IsLoggedIn"] : false; if (isLoggedIn) { String userLog = App.Current.Properties["user"].ToString(); var misHuertas = HuertaServicio.TodasLasHuertas(userLog); if (misHuertas.Count > 0) { cmbHuertas.ItemsSource = misHuertas; } } else { DisplayAlert("Mensaje", "No tiene iniciada la sesion", "Ok"); Navigation.PushAsync(new Index()); } }