Beispiel #1
0
 public UploadEncoderDataFullObject(int uniqueId, int personId, int stationId, int exerciseId,
                                    string laterality, string resistance, UploadEncoderDataObject uo)
 {
     this.uniqueId   = uniqueId;
     this.personId   = personId;
     this.stationId  = stationId;
     this.exerciseId = exerciseId;
     this.laterality = laterality;
     this.resistance = resistance;
     this.uo         = uo;
 }
Beispiel #2
0
    public static List <UploadEncoderDataFullObject> SelectTempEncoder(bool dbconOpened)
    {
        openIfNeeded(dbconOpened);

        dbcmd.CommandText = "SELECT * FROM " + tableEncoder + " ORDER BY uniqueID";
        LogB.SQL(dbcmd.CommandText.ToString());
        dbcmd.ExecuteNonQuery();

        SqliteDataReader reader = dbcmd.ExecuteReader();

        List <UploadEncoderDataFullObject> l = new List <UploadEncoderDataFullObject>();

        while (reader.Read())
        {
            UploadEncoderDataObject uo = new UploadEncoderDataObject(
                Convert.ToInt32(reader[6]),                                     //repetitions
                Convert.ToInt32(reader[7]),                                     //numBySpeed
                Convert.ToInt32(reader[8]),                                     //lossBySpeed
                reader[9].ToString(),                                           //rangeBySpeed
                reader[10].ToString(),                                          //vmeanBySpeed
                reader[11].ToString(),                                          //vmaxBySpeed
                reader[12].ToString(),                                          //pmeanBySpeed
                reader[13].ToString(),                                          //pmaxBySpeed
                Convert.ToInt32(reader[14]),                                    //numByPower
                Convert.ToInt32(reader[15]),                                    //lossByPower
                reader[16].ToString(),                                          //rangeByPower
                reader[17].ToString(),                                          //vmeanByPower
                reader[18].ToString(),                                          //vmaxByPower
                reader[19].ToString(),                                          //pmeanByPower
                reader[20].ToString()                                           //pmaxByPower
                );

            UploadEncoderDataFullObject o = new UploadEncoderDataFullObject(
                Convert.ToInt32(reader[0]),                                     //uniqueID
                Convert.ToInt32(reader[1]),                                     //personID
                Convert.ToInt32(reader[2]),                                     //stationID
                Convert.ToInt32(reader[3]),                                     //exerciseID
                reader[4].ToString(),                                           //laterality
                reader[5].ToString(),                                           //resistance
                uo);

            l.Add(o);
        }

        reader.Close();
        closeIfNeeded(dbconOpened);

        return(l);
    }