Get array of a sqlite table

0

Oigan I wanted to ask you how to individually obtain the objects of a sqlite table, essentially I need to obtain the date of this appointment to compare it with the current date, but I have problems to fetch this data ... What really interests me is to get date and time in some variable Thank you

var citas = memberDatabase.GetCitas();
int citCount = citas.Count();
for (int i = 0; i < citCount; i++) {

  var ct = new Cita();

  ct = citas[i];

  /*Supongo que debe ser algo como
    IEnumerable<Cita> ct = citas;
    ct = citas[i];
    var dt = ct.fecha[i]
    ...
    Pues aquí me falta algo de code*/


}

This is my class and my GetCitas method

public IEnumerable < Cita > GetCitas() {
  var citasx = (from cit in conn.Table < Cita > () select cit);
  return citasx.ToList();
}

// Clase Cita

{
  [PrimaryKey]
  public int ID {
    get;
    set;
  }
  public string razon {
    get;
    set;
  }
  public string descripcion {
    set;
    get;
  }
  public string fecha {
    set;
    get;
  }
  public string hora {
    set;
    get;
  }
}
    
asked by E.Rawrdríguez.Ophanim 21.06.2018 в 19:49
source

1 answer

0

Listow: 3

List < Cita > citas = memberDatabase.GetCitasL();
int citCount = citas.Count();
foreach(Cita ct in citas) {
  var dt = ct.fecha;
}
    
answered by 21.06.2018 / 21:46
source